2

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?

5

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>";
}
  • wow...I have been looking at this for way too long. thanks! – user3088202 Mar 3 '16 at 23:49
  • 3
    No problem :) ...don't forget to mark the question correct to close it out. All the best. – userabuser Mar 4 '16 at 2:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.