Woocommerce remove an action hook

17,313

Solution 1

Sorry it was a mistake from my side. I used the wrong function name. The function name I intended to remove was 'woocommerce_checkout_coupon_form'. The issue is fixed now.

Solution 2

Try this

remove_all_actions( $tag, $priority );
Share:
17,313
Pramod Sivadas
Author by

Pramod Sivadas

Developer with 10 years experience in Web application development using Python and PHP.

Updated on June 21, 2022

Comments

  • Pramod Sivadas
    Pramod Sivadas almost 2 years

    I am using woocommerce plugin in my wordpress site. I want to remove a function named 'woocommerce_checkout_coupon_form' which is hooked in to the action 'woocommerce_before_checkout_form'.

    I tried adding the below code in my theme functions.php

    add_action('init','remove_coupon_text',10);
    function remove_coupon_text() {
        remove_action('woocommerce_before_checkout_form','woocommerce_checkout_login_form',10);
    } 
    

    But this is not working. Any idea?