I have a product description which is hooked into my product archive page in the following way by my theme (The7):
/** * display short desc hook. * * @hooked woocommerce_template_loop_rating - 5 * @hooked woocommerce_template_loop_price - 10 */ do_action( 'woocommerce_shop_loop_item_desc' );
In my template setting, I have a way of hiding this product description but this just hides the div with the description by using CSS
This is not good, as in the background, the description is still loaded & this has a negative effect on the performance of the page.
Therefore, I want to remove the action. I now did it by commenting it in the template file, but everytime I update the theme I'm screwed.
I tried to remove the action by adding the following code in my
functions.php file (source: https://codex.wordpress.org/Function_Reference/remove_action) but this did not work:
/* Remove product description on product archive page */ remove_action( 'woocommerce_template_loop_rating','woocommerce_shop_loop_item_desc', 5); remove_action( 'woocommerce_template_loop_price','woocommerce_shop_loop_item_desc', 10);
Anybody has an idea on how to correctly remove the action?