Year End Offer: Use Coupon: yearend on checkout page to get 20% discount on any plugins.Buy Now!
Public Ticket #3798

Disable showing the variation table

John Ashwood

Good afternoon,

I want to use the shortcode entry on my single product page, instead of the automatic one.  Is there a way I can disable this setting?

John Ashwood

John Ashwood

I tried the followning snippet, but it did not work:

 

function pvt_builder_support(){ 
global $pvtfw_table, $pvtfw_allocation; 
remove_action('template_redirect', array( $pvtfw_table, 'remove_add_to_cart'), 29 );
remove_action('template_redirect', array($pvtfw_allocation, 'pvtfw_variant_table_init'), 30); 
} 
add_action('init', 'pvt_builder_support');
wpx

wpx

Hi,

I hope you are doing well today.

Do you want to use only shortcode to display the variation table?

If so, this feature is currently in our testing mode.

We have added a feature to disable the variation table using the category include/exclude feature, but, it will display using the shortcode for those products where you have added the shortcode.

It will be released after testing it on our side. It will take 2 or 3 days.

You can also try the following snippet using a plugin called Code Snippets:

add_action('template_redirect', function(){
   global $pvtfw_print_table;
   $table = $pvtfw_print_table::allocation();
   remove_action($table['place'], array($pvtfw_print_table, 'print_table'), $table['priority']);
});

Please let me know your thoughts.

Hope to hear from you soon.

Best Regards