WordPress.org

Forums

WooCommerce - excelling eCommerce
[resolved] Unhooked Single Prod Page Images (remove_action) (3 posts)

  1. smelsworst
    Member
    Posted 1 year ago #

    Hopefully someone can help on this... was trying to come remove reviews and followed the advice given by Sean Barton here: http://wordpress.org/support/topic/plugin-woocommerce-ecommerce-plugin-for-wordpress-disable-the-reviews-tab?replies=12 and therein, added the following to my theme's functions.php file.

    remove_action( 'woocommerce_product_tabs', 'woocommerce_product_reviews_tab', 30);
    remove_action( 'woocommerce_product_tab_panels', 'woocommerce_product_reviews_panel', 30);

    The outcome was that the images from my single product pages are gone (as well as the reviews).. which doesn't seem right. now that I've removed the lines from my functions.php file, the changes don't reverse (I guess I need to do an add_action?).

    When I look into the page source, I see that div.images and div.reviews no longer load on the single product pages, only the div.summary.

    thanks in advance, interwebs!

    Ben

    https://wordpress.org/plugins/woocommerce/

  2. smelsworst
    Member
    Posted 1 year ago #

    note.. digging in and re-adding the relevant add_actions from woocommerce/includes/wc-template-hooks.php via my theme's functions.php file didn't help.

    add_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
    add_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );
    add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );

  3. smelsworst
    Member
    Posted 1 year ago #

    solved myself... needed to do the add_actions but up the priority (in my case I just upped it from 20 or 10 to 40 and volia, all sorted.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.