Created
November 2, 2023 14:16
-
-
Save Nicscott01/7f506e1196d12d2544dc034883e1fe9c to your computer and use it in GitHub Desktop.
Fix Smart Coupons with WooCommerce on Breakdance
This file contains 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
/** | |
* Change the Action that Smart Coupons | |
* uses to output it's select options button | |
* and remove the add to cart button | |
* | |
*/ | |
add_action( 'init', function() { | |
$WC_SC_Display_Coupons = WC_SC_Display_Coupons::get_instance(); | |
remove_action( 'woocommerce_after_shop_loop_item', array( $WC_SC_Display_Coupons, 'remove_add_to_cart_button_from_shop_page' ) ); | |
add_action( 'breakdance_shop_loop_footer', array( $WC_SC_Display_Coupons, 'remove_add_to_cart_button_from_shop_page' ) ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment