Customization Request for Thank-You Page

This topic has 4 replies, 2 voices, and was last updated 1 months, 1 weeks ago ago by Luca Rossi

  • Avatar: Drishti
    Drishti
    Participant
    October 16, 2024 at 21:27

    I would like to request the following customizations for the thank-you page:

    1) Title Format: Please break the title into two lines, formatted as follows:

    Thank you!
    Your order has been received.

    2) Remove Privacy Policy Link: Kindly remove the privacy policy link from the thank-you page.

    3) Add Continue Shopping Button: I would like to add a button at the end of the page with the text “Continue Shopping,” linking it to the homepage URL.

    4) Disable Notifications: I want all notifications on any page to automatically disappear after 5 seconds.

    Thank you for your assistance with these changes.

    Files is visible for topic creator and
    support staff only.
    3 Answers
    Avatar: Justin
    Luca Rossi
    Support staff
    October 17, 2024 at 11:18

    Hi @Drishti,

    1. Please add this custom code under functions.php file locates in your child theme:

    
    function n2t_text_strings( $translated_text, $text, $domain ) {
    	switch ( $translated_text ) {
    		case 'Thank You. Your order has been received.' :
    			$translated_text = 'Thank You!<br> Your order has been received.';
    			break;
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'n2t_text_strings', 20, 3 );
    

    2. Please add this custom CSS under XStore > Theme Options > Theme Custom CSS > Global CSS:

    
    .woocommerce-order-received a.woocommerce-privacy-policy-link.text-underline {
        display: none;
    }
    

    3. Please add this custom code under functions.php file as well:

    
    add_action('woocommerce_thankyou', 'n2t_woocommerce_thankyou', 100);
    function n2t_woocommerce_thankyou(){
     echo '<p class="text-center"><a class="btn medium" href="https://plantori.in/shop/"><span>Return To Shop</span></a></p>';
    }
    

    4. It requires a lot of customization codes and fall out of scope our support standard services we provide.

    Thanks for understanding!

    Best Regards,
    8Theme’s Team

    Avatar: Drishti
    Drishti
    Participant
    October 17, 2024 at 19:59

    Hi Luca, First point is not working.

    Please contact administrator
    for this information.
    Avatar: Justin
    Luca Rossi
    Support staff
    October 18, 2024 at 07:07

    Hi @Drishti,

    We’ve changed the custom code to this:

    
    add_filter('woocommerce_thankyou_order_received_text', 'n2t_woocommerce_thankyou_order_received_text', 100);
    function n2t_woocommerce_thankyou_order_received_text(){
    	return 'Thank You!<br> Your order has been received.';
    }

    And it’s working fine now: https://prnt.sc/LVzXYFovJKcI

    Also add this custom CSS to make it looks better for spacing:

    
    p.woocommerce-thankyou-order-received {
        line-height: 1.5
    }
    

    Best Regards,
    8Theme’s Team

  • Viewing 4 results - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.