【发布时间】:2020-03-14 13:39:58
【问题描述】:
Woocommerce 订阅插件正在使用一个通过操作调用的函数:
add_action( 'template_redirect', array( &$this, 'maybe_setup_cart' ), 100 );
我需要在我的插件中删除此操作,因为它会导致不必要的影响。
我尝试在插件构造中创建一个动作,以覆盖它:
add_action('template_redirect', array( &$this, 'maybe_setup_cart' ), 98);
在其中我也试图删除该操作:
remove_action( 'template_redirect', 'maybe_setup_cart', 100 );
这也行不通。 如何禁用其他插件的操作?
【问题讨论】:
标签: wordpress woocommerce