• Resolved Michael1799

    (@michael1799)


    Hey Everyone!

    I have two separate questions;

    1. Which core files should I pay attention to in order to style the ‘order received page’ of woocommerce – all I want to do is style the text, layout etc.

    2. This line of code

    ‘Notice: Undefined variable: show_purchase_note in /home/gettlayd/public_html/wp-content/themes/twentytwelve-child2/woocommerce/order/order-details-item.php on line 48’

    Keeps appearing on the ‘thank you’ page. Fiddling with the code I’m unable to fix it. any suggestions?

    Any advice is very welcome!
    Thanks in advance ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • 1.

    It would be best not to edit core files because any customisations will be overwritten by updates.

    Some styling can be done with custom css. If you have WP 4.7, custom css is entered at:
    Dashboard > Appearance > Customise > Additional CSS
    For advice on the custom css to use, please post the link to a free (non-existent!) product on your site for testing and give more detail of what you want to achieve.

    More complex layout alterations would need a template override and this goes in a woocommerce folder in your child theme. You would start with:
    plugins/woocommerce/templates/checkout/thankyou.php

    Some themes have their own version. If yours is like this, you would start with that.

    PHP skills will be needed.

    2.

    This looks like a unique custom file which forum members won’t have access to. Do you have access to the developer who wrote it? You can post it at pastebin.com and put the link here. It may be possible to tell what’s going on. It highlights the difficulty of custom templates – they make an ongoing burden of keeping them up-to-date with progress in WP and WC.

    If the error is not causing a problem, you should be able to hide it with:
    define('WP_DEBUG', false); in wp-config.php.

    Thread Starter Michael1799

    (@michael1799)

    Hey Lorro,

    Sorry for taking so long to get back to you.

    1. I’ve followed your advice and have achieved the style I was after so thanks so much for your help!
    2. I’ve switched wp-config back to false and the error messages have vanished so thanks again.

    The very final task I’m working on is removing the;

    ‘Thank you. Your order has been received’ message on the Thank-you for your purchase page.

    I’m working to remove this message by testing with the WooCommerce->Checkout->Thankyou.php file.

    I’ve tried deleting the code, changing the message and using /* */ to remove its effect but with no luck.

    Do you have any experience with this file or with how to remove post purchase messages?

    Best Regards

    Best not to modify core files because any edits will not be update safe.

    See if this does it:

    add_filter( 'woocommerce_thankyou_order_received_text', 'custom_thankyou', 99 );
    function custom_thankyou () {
      return '';
    }
    

    Code goes in functions.php for your child theme where it will be update-safe.

    • This reply was modified 7 years, 9 months ago by Majeed Raza.
    Thread Starter Michael1799

    (@michael1799)

    Hi Lorro,

    I’ve tested it out and it seems to work perfectly.
    Thank you so much for your help and please let me know if there’s anything I can do in return.

    Cheers

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Thank You Page – Style & Error’ is closed to new replies.