Viewing 5 replies - 1 through 5 (of 5 total)
  • Javascript is refreshing the order review table after page load. Turn off Javascript to prove. The script doesn’t know about the fragment, so the old fragment is not removed by the update operation.

    Any changes to review-order.php will be lost after a plugin update. If you have made a new custom template you will need to keep it updated forevermore.

    Instead, try this custom snippet:

    add_action( 'woocommerce_checkout_order_review', 'my_custom_text', 15 );
    function my_custom_text() {
      print '<p>Additional VAT, import or custom fees can come in addition.</p>';
    }

    It goes in functions.php for your child theme or you can use a code snippet plugin. It will be update-safe and there’s no need to edit templates.

    Thread Starter davidboee

    (@davidboee)

    Ah thank you!
    Ok so even if I move the woocommerce files into the child theme folder to edit them there the changes I do will be removed when the original theme updates?

    No, any edited files will be update-safe in your child theme folder. However, you may still have to update it occasionally when WC change the master. This work will not be necessary with the snippet.

    Thread Starter davidboee

    (@davidboee)

    I see, I appreciate the help lorro! Thank you very much 🙂

    Luminus Alabi

    (@luminus)

    Automattic Happiness Engineer

    @davidboee,

    It looks like you’ve been able to sort this out with @lorro’s help.

    I’ll go ahead and mark this thread as resolved now.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘review-order.php file adding text twice’ is closed to new replies.