更新时间:2022-11-26 13:54:56
试试这个:
// Use the class name instead of a globalized $this
remove_action( 'woocommerce_before_cart', array( 'WC_Points_Rewards_Cart_Checkout', 'render_redeem_points_message' ), 16 );
由于 $this
是它所在类的内部引用,因此将其全球化可能不是一件好事.
As $this
is an internal referrer to the class it is used in, globalizing it may not be a good thing.
该插件是否允许您使用自己的类来扩展类并改为使用它?
Does the plugin allow you to extend the class with your own and use it instead?