we have a problem with a simple woocommerce action hook. The goal is to show specific informations for the german market.
After two hours of testing with the same actionhook, I reduced the hook to the following:
add_action( âwoocommerce_single_product_summaryâ, âadditional_textâ, 10, 2);
function additional_text() {
echo '<p>This is additional text.</p>';
}
On the opposite, the following snippet works as expected:
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10, 2);
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 20, 2);
and moves the price from the product summary behind the product summary.
Okay, I found the solution to this problem after installing another editor with highlighting. The highlighting looked false. It was due to wrong apostrophes. I used â instead of ‘. Seems like a copy&paste error. And while typing this I recognize that even the stackoverflow code highlighter shows up this error 🙂