This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'ywraq_product_add_to_quote', 'custom_quote_button_text', 12, 1 ); | |
| /** | |
| * Change the label to the button "Quote" in Remy Theme | |
| * @param $default | |
| * | |
| * @return string | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var request; | |
| $(document).on( 'click', '.product-quantity input', function(e){ | |
| if( typeof request !== 'undefined' ){ | |
| request.abort(); | |
| } | |
| var $t = $(this), | |
| $input_quantity = $t.closest('.product-quantity').find('.input-text.qty'), | |
| name = $input_quantity.attr('name'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if( class_exists( 'YWCM_Cart_Message' ) && get_option( 'ywcm_show_in_cart' ) == 'yes' ){ | |
| add_action('woocommerce_before_mini_cart', 'print_cart_messages' ); | |
| function print_cart_messages(){ | |
| $messages = YWCM_Cart_Message()->get_messages(); | |
| global $YWCM_Instance; | |
| foreach ( $messages as $message ) { | |
| $message_type = get_post_meta( $message->ID, '_ywcm_message_type', true ); | |
| $layout = ( get_post_meta( $message->ID, '_ywcm_message_layout', true ) !== '' ) ? get_post_meta( $message->ID, '_ywcm_message_layout', true ) : 'layout'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ( class_exists( 'YITH_WC_Subscription' ) ) { | |
| remove_filter( 'woocommerce_add_to_cart_validation', array( YITH_WC_Subscription(), 'cart_item_validate' ), 11 ); | |
| add_filter( 'woocommerce_add_to_cart_validation', 'ywsbs_cart_item_validate', 10, 4 ); | |
| /** | |
| * Only a product can be added to the cart this method check if there's | |
| * a product in cart and remove the element present in cart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* this action add cart message in the added to cart popup */ | |
| add_action('yith_wacp_before_popup_content', 'yith_wacp_before_popup_content'); | |
| function yith_wacp_before_popup_content(){ | |
| if( class_exists('YWCM_Cart_Messages')){ | |
| global $YWCM_Instance; | |
| $YWCM_Instance->print_message(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_shortcode( 'wcloginform', array( $this, 'aakoot_render_login_form' ) ); | |
| public function aakoot_render_login_form( $atts, $content = null ) { | |
| ob_start(); | |
| if ( !is_user_logged_in() ) { | |
| echo '<div class="woocommerce">'; | |
| wc_get_template( 'myaccount/form-login.php' ); | |
| echo '</div>'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* To move request a quote button in the loop */ | |
| if( class_exists('YITH_Request_Quote_Premium')){ | |
| remove_action( 'woocommerce_after_shop_loop_item', array( YITH_Request_Quote_Premium(), 'add_button_shop' ), 15 ); | |
| add_action( 'your_loop_hook', array( YITH_Request_Quote_Premium(), 'add_button_shop' ) ); | |
| } | |
| /* To move request a quote button in the single page */ | |
| if( class_exists('YITH_YWRAQ_Frontend') ){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* NEW HEADER STYLE */ | |
| #masthead #logo { | |
| width: 190px; | |
| height: auto; | |
| } | |
| #masthead .right-links { | |
| width: 1px; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* this function remove free shipping if the discount of dynamic is applied in the cart */ | |
| if( class_exists('YITH_WC_Dynamic_Discounts') ){ | |
| add_filter( 'woocommerce_shipping_packages', 'show_packages' ); | |
| function show_packages($packages){ | |
| $label = YITH_WC_Dynamic_Discounts()->label_coupon; | |
| $newpack = $packages; | |
| foreach ( $packages as $key_package => $package ) { | |
| if( isset( $package['applied_coupons'] ) && in_array( $label, $package['applied_coupons'] ) ){ | |
| if ( sizeof( $package['rates'] ) > 0 ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if( function_exists('YITH_Request_Quote_Premium') ){ | |
| add_filter('ywraq_pdf_file_name','ywraq_pdf_file_name', 10, 2); | |
| function ywraq_pdf_file_name( $filename, $quote_id ){ | |
| return 'custom_name_'.$quote_id.'.pdf'; | |
| } | |
| } |