简体   繁体   中英

Question about remove_action() in WooCommerce and 3rd Party Plugin

First, I apologize for a newb question, but alas, I'm learning.

I'm a little stuck here and would love some guidance. I'm new to WordPress theme customization, but have had some experience with add_action() . I have a gift card plugin that injects the gift card code after the Terms & Conditions. I want to move it directly below the payment information.

在此处输入图像描述

Using Simply Show Hooks, I've identified the hook that I want to remove using remove_action() :

remove_action( 'woocommerce_review_order_before_submit', ' PW_Gift_Cards_Redeeming –> woocommerce_review_order_before_submit', 10 );

See the attached screenshot of the hook: 在此处输入图像描述

However, this method is not working at all. Any guidance on how to remove this? Am I going about this the wrong way?

remove_action( 'woocommerce_review_order_before_submit', array('PW_Gift_Cards_Redeeming', 'woocommerce_review_order_before_submit'), 10  );

Try like this

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM