Function wpgs_product_image()
-
Hi.
You had function wpgs_product_image() but now it not exists in plugin, so I cannot use it like this in our theme
remove_action( 'woocommerce_before_single_product_summary', 'wpgs_product_image', 20 ); add_action( 'my_another_hook', 'wpgs_product_image', 20 );The plugin now has initialization like this
public function hooks() { remove_action('woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20); remove_action('woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20); add_action('woocommerce_before_single_product_summary', [$this,'wpgs_product_image'], 20); add_action('woocommerce_product_thumbnails', [$this,'wpgs_product_thumbnails'], 20); }but I unable to get object reference, created in a way
new Product();and use callback[$this,'wpgs_product_thumbnails']Could you please put the references in a constant or any global variable, so I’m be able to use it like this
add_action( 'my_another_hook', [ $instance, 'wpgs_product_image' ], 20 );Thank you
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Function wpgs_product_image()’ is closed to new replies.