• Resolved beesmartdesign

    (@beesmartdesign)


    Hi Najeeb,

    I have been trying to run a remove_action function on one of the methods inside the plugin. What I’m trying to achieve is something like this:

    
    remove_action( 'woocommerce_before_add_to_cart_button', array( 'NM_PersonalizedProduct::getInstance()', 'ppom_woocommerce_show_fields'), 15);
    

    I have spent quite a bit of time trying different variations, from inside functions.php, but unfortunately with no luck. The original method is called within:

    wp-content/plugins/woocommerce-product-addon/classes/plugin.class.php LINE 55

    You might be wondering why? I’m trying to add a conditional removal depending on the user role. There may be another way to do this however it occurred to me that the removal of actions is a useful tool in any case!

    Thanks for your help and thanks for the great plugin.

    Kind regards
    Stephen

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to Remove/Unhook Action from NM_PersonalizedProduct Class’ is closed to new replies.