remove_action not working in my custom plugin
-
Hello I am developing a custom plugin there I need to remove ad-to-cart button. But remove action not working for me. Please see the blow what I have tried none of these worked for me`:
function change_order() { remove_action('woocommerce_single_product_summary','woocommerce_template_single_add_to_cart', 30 ); } add_action( 'init', 'change_order' ); function change_order() { remove_action('woocommerce_single_product_summary','woocommerce_template_single_add_to_cart', 30 ); } add_action( 'after_setup_theme', 'change_order' ); function change_order() { remove_action('woocommerce_single_product_summary','woocommerce_template_single_add_to_cart', 30 ); } add_action( 'plugins_loaded', 'change_order' );
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘remove_action not working in my custom plugin’ is closed to new replies.