Points and Rewards – remove action help
-
All I am trying to do is remove an action from one of the plugin files; this is a pretty standard thing i think but I have never done it before so I am kind of shooting in the dark trying to get it to work. I know I can do “remove_action” in the functions.php of my child theme, I just have to code it properly…which I am struggling with…
the action is in a file called class-wc-points-rewards-cart-checkout.php; this is in the /classes directory within the Woocommerce Points and Rewards Plugin…
the action I want to remove is this:
add_action( 'woocommerce_before_cart', array( $this, 'render_redeem_points_message' ), 16 );I know it is the right one since if I comment it out; then what I want happens, so just trying to figure out how to remove it from functions.php…
this is what I have in functions:
global $woocommerce, $wc_points_rewards; remove_action( 'woocommerce_before_cart', array( $this, 'render_redeem_points_message' ), 16 );but it does not remove the action; I am not sure if I am globalizing the right variables and also not sure if I have coded my remove action statement correctly so I am wondering if someone can help me with this…
The topic ‘Points and Rewards – remove action help’ is closed to new replies.