基于支付方式的回声消息 (WooCommerce) [英] Echo message based on payment method (WooCommerce)

查看:33
本文介绍了基于支付方式的回声消息 (WooCommerce)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想根据客户的付款方式在感谢页面上显示一条消息.

I’d like to show a message on the thankyou page, based on the customer’s payment method.

因此,如果客户使用 paypal 付款,则收到的订单页面上会显示Thanks for ordering with paypal"消息.

So if the customer paid with paypal, the message "Thanks for ordering with paypal" will appear on the order received page.

推荐答案

WC 版本 > 2.6 默认已经这样做了.查看 thankyou.php WC 模板文件,您会看到 L56 使用 <?php echo $order->payment_method_title;?> 回显付款方式.

WC versions > 2.6 already does this by default. Look at the thankyou.php WC template file and you'll see L56 uses <?php echo $order->payment_method_title; ?> to echo the payment method.

这篇关于基于支付方式的回声消息 (WooCommerce)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆