Skip to content

Instantly share code, notes, and snippets.

@Nicscott01
Created November 2, 2023 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nicscott01/7f506e1196d12d2544dc034883e1fe9c to your computer and use it in GitHub Desktop.
Save Nicscott01/7f506e1196d12d2544dc034883e1fe9c to your computer and use it in GitHub Desktop.
Fix Smart Coupons with WooCommerce on Breakdance
/**
* 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