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: 242 Secondary    Update:2025-06-07

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

2025-06-07Custom WordPress + WooCommerce Standalone Website Development Solution for Cross-Border E-Commerce in the Russian Market

2025-06-07Cross-border e-commerce WordPress + WooCommerce independent site construction and customized website development service solution for the Korean market

2025-06-07Cross-border e-commerce building materials industry WordPress + WooCommerce independent site construction and customized development service solution

2025-06-07Cross-border e-commerce independent site for the Japanese market: Custom WordPress + WooCommerce website development solution

2025-06-07Cross-border E-commerce WordPress + WooCommerce Customized Website Development Service Solution for the Apparel Industry Independent Site

2025-06-07Cross-border e-commerce WordPress + WooCommerce medical equipment independent website customization and construction solution

2025-06-07Cross-border eCommerce WordPress + WooCommerce Bakery Company Independent Site Theme Template Customization and Website Development Service Solution

2025-06-07Cross-border e-commerce tile product WordPress + WooCommerce independent site construction website customization and development solution

2025-06-07Cross-Border Independent Website Custom Development Solution WordPress International Legal Services Website Development Service Plan

Marketing Optimization (MO) Solutions

2025-06-07Cross-Border E-Commerce Independent Site GEO (Precision Localized SEO) Market Expansion

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

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

2025-06-07DeepSeek Custom-Tuned Precision Translation & Multilingual Website Development Services

2025-06-07Conversion Rate Optimization (CRO) Plan

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

2025-06-07Brand Marketing Optimization (BMO)

2025-06-07End-to-End AI Solutions for Cross-Border E-commerce

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

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