我需要改变一个名为“misura anello”的插件在产品中的产品位置(我使用产品插件),我想把它放在价格之上,比如属性。。。
我发布以附加到图像。。。
对于任何想在插件之外执行此操作的人,为了从更新中证明这一点,您可以使用全局var来代替$this
add_action( \'woocommerce_after_add_to_cart_button\', array( $GLOBALS[\'Product_Addon_Display\'], \'display\' ), 10 );
add_action( \'woocommerce_before_add_to_cart_button\', array( $GLOBALS[\'Product_Addon_Display\'], \'totals\' ), 20 );
搜索类产品加载项显示。插件文件夹中的php。您需要函数\\uu construct()。
对我来说是这样的:
// Addon display
add_action( \'woocommerce_after_add_to_cart_button\', array( $this, \'display\' ), 10 );
add_action( \'woocommerce_before_add_to_cart_button\', array( $this, \'totals\' ), 20 );