I am adding this code to remove product image and gallery in single product page. This works in Wordpress default theme 2021, but not in newest (22 and 23). In newest themes product image and gallery are still shown in single product page.
I cannot figure out what is making them show. I have no other plugins activated except Woocommerce and my own with only this test code:

add_action( 'woocommerce_before_single_product', 'wpv_woocommerce_before_single_product');

function wpv_woocommerce_before_single_product() {

    remove_action( 'woocommerce_before_single_product_summary','woocommerce_show_product_images', 20 );
    remove_action( 'woocommerce_product_thumbnails','woocommerce_show_product_thumbnails', 20 );



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.