Last active
November 16, 2016 08:33
-
-
Save kreamweb/1175639a671622f7aaa04fc9784df5e1 to your computer and use it in GitHub Desktop.
move request a quote button - add this code in the file functions.php of your theme
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') ){ | |
| remove_action( 'woocommerce_single_product_summary', array( YITH_YWRAQ_Frontend(), 'add_button_single_page' ), 35 ); | |
| //to move button near the add to cart button | |
| add_action( 'woocommerce_after_add_to_cart_button', array( YITH_YWRAQ_Frontend(), 'add_button_single_page' ) ); | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment