Woocommerce actionhook not working

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:

Read More
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.

Related posts

Leave a Reply

1 comment

  1. 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 🙂