In my template setting, I have a way of hiding this product description but this just hides the div with the description by using CSSdisplay: none;
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:
Anybody has an idea on how to correctly remove the action?
1 Answer 1
First thing, regarding your comment “everytime I update the theme I’m screwed” – you should always use a child theme when doing any customisations .
Second, your remove_action call is wrong. As per the documentation you’ve linked to already, it sates that the first argument is $tag and the second is $function_to_remove. Right now, your arguments are reversed.