PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Fatal error: Cannot redeclare add_query_to_shortcode()

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hi,

we get an error when trying to edit a page that contains the following shortcodes:

[woof]
[woof_products is_ajax=0 tpl_index=tpl_woo_table]

I get an error:

Fatal error: Cannot redeclare add_query_to_shortcode() (previously declared in .../wp-content/my_woof_extensions/tpl_woo_table/views/output.php:43) in .../wp-content/my_woof_extensions/tpl_woo_table/views/output.php on line 43

There is no error in the frontend, it works fine.

Hello

Try  in  file  - wp-content\my_woof_extensions\tpl_woo_table\views\output.php - change  this  code    - https://c2n.me/4iuBkmI.png  - to - https://share.pluginus.net/image/i20230511105023.png

if (!function_exists('add_query_to_shortcode'))
{
function add_query_to_shortcode( $query , $id){

return woof_woo_table_query_filter($query,$id);
}
}

Hi, thanks.
I was getting another error, I modified it: https://prnt.sc/rvLBY4GcQOxm

to:

https://prnt.sc/ZfyEaCJATxu6

if (!function_exists('get_tpl_option'))
{

if (!function_exists('get_woo_table_option'))
{
function get_woo_table_option($option_key, $options)
{
global $WOOF;
return $WOOF->get_option($option_key, $options[$option_key]['default']);
}
}

}

Now it seems to be ok.

Ok! Great!