I am trying to add a line of text on the checkout page of the store that will go immediately after shipping row. I added the following to my child theme functions.php file:

 add_action( 'woocommerce_review_order_after_shipping', 'action_woocommerce_review_order_after_shipping');

function action_woocommerce_review_order_after_shipping( ) {
    echo = "<p>Text Goes Here</p>";
};

For some reason it leads to a 500 error. Any idea what I am doing wrong?

1 Answer
1

Remove the = sign after your echo statement…

echo = "<p>Text Goes Here</p>";

…becomes

echo "<p>Text Goes Here</p>";

Final

 add_action( 'woocommerce_review_order_after_shipping', 'action_woocommerce_review_order_after_shipping');

function action_woocommerce_review_order_after_shipping( ) {
    echo "<p>Text Goes Here</p>";
}

Leave a Reply

Your email address will not be published. Required fields are marked *