A
A
Aretemm2021-07-08 12:30:42
WordPress
Aretemm, 2021-07-08 12:30:42

WooComerence functions in function.php Wordpress what's wrong?

functions in function.php Wordpress
In function.php on Wordpress added function to insert product description in Woocommerce by short code
<code>
function woo_description() {
global $product;
echo $product->get_description();
}
add_shortcode( 'woo_desc', 'woo_description' );
code>
Shortcode [woo_desc] added to product card template in Woocommerce.
At some point when updating the theme or plugins, the product card template began to give a "Server Error 500" error when trying to make any changes. Changes are not saved. When you remove the shortcode from the template, the error disappears and you can make changes to the template.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question