Skip Navigation

WooCommerce Views hides third-party themes/plugins elements

Won't fix

Symptoms

WooCommerce Views does not add all native WooCommerce hooks in its templates. This can cause some elements from third-party themes and plugins to disappear.

For example, the native WooCommerce hooks like woocommerce_after_single_product_summary, which is not used by WooCommerce Views, is used by the Storefront theme to display the product pagination. Since this hook is not in WooCommerce Views, this element will not be available. The Storefront theme’s Sharing Icons also won’t work properly, due to this same reason.

Another known example is the Ni WooCommerce Product Variations Table plugin.

 

Workaround

Toolset cannot add all the hooks executed by WooCommerce native templates to its own templates, because they include several native and third-party callbacks, which rely precisely on the WooCommerce native templates structure. Each case should be analyzed and tested – so that Toolset could then add its own specific hooks for its own templates, where third parties could then hook into.

Beacuse of this, we suggest you to add a feature request for each particular such scenario. Please feel free to first confirm with our Technical Support if the issue you face is truly the one described here, so the request is not in vain.

 

As a possible workaround, you could try the following:

  1. Create a directory in your theme and name it woocommerce.
  2. Copy the single-product.php file from the woocommerce-views/templates folder to the woocommerce directory you just created.
  3. Add the following code after the_content();
remove_action('woocommerce_after_single_product_summary','woocommerce_output_product_data_tabs',10);
remove_action('woocommerce_after_single_product_summary','woocommerce_upsell_display',15);
remove_action('woocommerce_after_single_product_summary','woocommerce_output_related_products',20);
do_action('woocommerce_after_single_product_summary');

5. In the admin dashboard navigate to Toolset → Woocommerce Views.

6. In the Product Template File section, select the template you just created.

Leave
a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>