LOGO

Web development services fast secure and SEO optimized by VertixWeb

Email:mr.wangweb@gmail.com

Get a Proposal
Get a Proposal
Contact Us

给WooCommerce添加付款成功提示页面的方法


给WooCommerce添加付款成功提示页面的方法

外贸建站时不少企业都采用WooCommerce做电商系统来销售自己的产品,今天分享一下在客户付款完毕后再次营销的方法,例如展示相关产品、引导分享关注、或者一个很漂亮的感谢页面。我们可以使用WooCommerce付款后重定向功能。

具体操作方法如下:

1、新建一个需要跳转的页面。

2、复制下面的代码,粘贴到主题函数文件里面。

/**
* WooCommerce付款后重定向页面
* @link https://blog.naibabiji.com/
*/

add_action( 'woocommerce_thankyou', 'naibabiji_woocommerce_payment_redirect');
function naibabiji_woocommerce_payment_redirect( $order_id ){
$order = wc_get_order( $order_id );
$url = 'https://blog.naibabiji.com/';
if ( ! $order->has_status( 'failed' ) ) {
wp_safe_redirect( $url );
exit;
}
}

3、修改上面代码中$url =后面的网址为跳转页面的网址。

保存后测试下是否生效。

最后,如果你觉得这个代码太简单了,不能满足你个性化的跳转需求,那么可以使用下面这个付费插件来帮你处理。

YITH WooCommerce Custom Thank You Page

这款插件可以帮你自定义完成订单后显示给客户的“谢谢”页面,并使用它来促销加售产品。

  1. 您可以为整个商店或单个产品自定义“谢谢”页面。
  2. 您可以利用“谢谢”页面来促销与刚刚购买的产品相关的产品,从而增加销售量。
  3. 通过让客户在社交网络上分享他们的购买,您可以为您的商店和产品获得间接广告。
Author:vertixweb    View: 244 Secondary    Update:2025-06-08

Home>WooCommerce>给WooCommerce添加付款成功提示页面的方法
E-commerce Independent Website Setup Solution

2025-06-08Cross-border E-commerce WordPress + WooCommerce Optical Instruments Independent Website Custom Development Service Solution

2025-06-08Cross-border E-commerce WordPress + WooCommerce Professional Apparel Factory Independent Site Custom Website Development Service Solution

2025-06-08Cross-border E-commerce Bathroom Industry WordPress + WooCommerce Independent Website Construction and Custom Development Service Solution

2025-06-08Cross-border E-commerce WordPress + WooCommerce Custom Website Development Service Solution for Fruit and Vegetable Primary Processing Enterprises

2025-06-08Cross-border e-commerce WordPress + WooCommerce custom website development service solution for catering businesses

2025-06-08WordPress + WooCommerce Cross-Border E-Commerce Independent Site Development Service Solution for the Middle East Market

2025-06-08Cross-border e-commerce WordPress + WooCommerce sportswear factory independent station customized website development service solution

2025-06-08Cross-border e-commerce WordPress + WooCommerce fermented food brewing company independent site custom website development services

2025-06-08Amazon Web Platform registration, online store setup, and product display optimization (search display optimization + category display optimization) marketing promotion

Marketing Optimization (MO) Solutions

2025-06-08Custom website development with DeepSeek for independent sites

2025-06-08Marketing Optimization (MARQ) Solution

2025-06-08Cross-border e-commerce platform onboarding services

2025-06-08Search Engine Algorithm Optimization and Core SEO/SEM

2025-06-08North American E-Commerce Geo-Targeting SEO Optimization Plan

2025-06-08Marketing Optimization (MO) Solution Services

2025-06-08Cross-border e-commerce independent site full-stack development and customization

2025-06-08E-Commerce Geo-Targeting SEO Optimization Plan for Europe and the US

2025-06-08Geographical Marketing Optimization (GMO)

Custom Theme Advantages vs. Template Theme
  • Comparison Dimension Custom Theme Generic Template Theme
  • Uniqueness 100% original design, avoiding homogenization Potentially used by hundreds of websites
  • Performance Optimization On-demand coding, no redundant code Contains a large amount of useless functional code
  • Functional Fit Perfectly matches business requirements Requires compromise or complex modifications
  • SEO Foundation SEO optimized at architectural level Generic SEO structure with limited effectiveness
  • Maintenance Cost Clean code, easy to maintain Complex nesting, difficult to maintain
  • Scalability Predefined interfaces for easy expansion Expansion limited by template constraints
  • Loading Speed Streamlined code for faster speed Redundant features slow down performance
  • Brand Image Enhances brand recognition Difficult to establish unique identity

Free application for your personalized plan


Contact Us
Website Construction
Performance Marketing Enhancement Suite(MO)

message x - -
Contact Us

Apply for your exclusive plan for free

Later Consultation

Online Consulting