wpcues
No Result
View All Result
wpcues
No Result
View All Result
wpcues
No Result
View All Result

How to add upsell products to Thank You page in WooCommerce

wpcues by wpcues
May 5, 2022
in WooCommerce
0 0
0
How to add upsell products to Thank You page in WooCommerce
/**
 * @snippet       Adding Upsell Products To WooCommerce Thank You Page 
 * @web           wpcues.com
 * @compatible    WooCommerce 6
 */
 
add_action( 'woocommerce_thankyou', 'wpc_thankyou_upsell', 5 );
 
function wpc_thankyou_upsell() {
   echo '<h2>You may interested...</h2>';
   echo do_shortcode( '[products limit="4" columns="4" orderby="popularity" on_sale="true"]' );
}

Where to add this code?

You can place PHP snippets at the bottom of your theme’s functions.php file. You may need to delete “?>” if you have it there.

ShareTweetPin
Previous Post

How to translate “Site Name” with WPML

Leave a Reply Cancel reply

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

You might also like

How to add upsell products to Thank You page in WooCommerce

How to add upsell products to Thank You page in WooCommerce

May 5, 2022
How to translate “Site Name” with WPML

How to translate “Site Name” with WPML

May 4, 2022

© 2022 wpcues.com - WordPress Codes, Tips & PHP Snippets.

No Result
View All Result

© 2022 wpcues.com - WordPress Codes, Tips & PHP Snippets.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In