【发布时间】:2019-01-02 12:15:37
【问题描述】:
我有安装了插件打印发票/装箱单的 Woocommerce 网站。
我正在尝试删除一个动作,并且我已将动作范围缩小到这个(缩短的)代码;
class WC_PIP_Document_Invoice extends WC_PIP_Document {
public function __construct( array $args ) {
parent::__construct( $args );
// add a "View Invoice" link on order processing/complete emails sent to customer
add_action( 'woocommerce_email_order_meta', array( $this, 'order_paid_email_view_invoice_link' ), 40, 3 );
}
}
所以我正在考虑使用删除它; https://codex.wordpress.org/Function_Reference/remove_action
但是,作为在类中添加的操作,我无法确定将什么传递给函数名称。会不会是这样的;
remove_action( 'woocommerce_email_order_meta', array( 'WC_PIP_Document_Invoice', 'order_paid_email_view_invoice_link' ), 40 );
谁能指出我正确的方向?
非常感谢
【问题讨论】:
标签: wordpress woocommerce hook-woocommerce