wordpress - 在感谢页面中编码 URL 参数并使用 Gravity 表单字段对其进行解码
问题描述
我使用了一个 WordPress 插件,它通过检索客户数据将客户重定向到个性化的感谢页面(将客户重定向到具有不同域名的新网站):订单 ID、账单电子邮件、order_total ..etc
// Return thankyou redirect
return array(
'result' => 'success',
'redirect' => ( '' == $this->custom_return_url ) ?
$this->get_return_url( $order ) :
apply_filters( 'alg_wc_custom_payment_gateway_custom_return_url',
str_replace(
array( '%order_id%', '%order_key%', '%order_total%', '%billing_email%', '%billing_last_name%', '%billing_first_name%', '%billing_city%', '%billing_address_1%' ),
array( $order->get_id(), $order->get_order_key(), $order->get_total(), $order->get_billing_email(), $order->get_billing_last_name(), $order->get_billing_first_name(), $order->get_billing_city(), $order->get_billing_address_1() ),
htmlspecialchars_decode( $this->custom_return_url )
),
$order )
);
}
然后我通过 Gravity 表单恢复这些数据以动态填写以下字段:电子邮件、姓名、地址、金额……等
我想对 URL 中的参数进行编码,以免暴露客户的数据。
请问你有解决方案吗?
谢谢
解决方案
推荐阅读
- sql - 查询中列标题中的空格
- c - 为什么''不起作用?“预期的表达式,空字符常量”
- python - 在 PySimpleGUI 中,如何在文本字段中添加超链接?
- docker - 在 dockerized Jenkins 容器中使用 docker-compose 时出现“无法打开错误”
- java - java - 线程(从数组中返回一个元素)
- json - 在颤动中用数组解析复杂的JSON
- amazon-web-services - 通过 AWS/Lambda/SES/API 网关为联系表配置 Nginx
- html - 使用代码 (GroovePages) 从 CSS 中删除 Div 样式
- php - AWS CDN 域名变更
- asp.net-mvc - 如何在 ASP.NET MVC 中用千位分隔符格式化网格列的字符串?