【发布时间】:2023-03-16 01:10:02
【问题描述】:
我必须在处理 Paypal 付款的 WordPress 主题上重写一段代码。主题要发布在themeforest.net上,所以需要通过主题检查插件进行检查。
在处理来自 Paypal 的 IPN 的文件中,我有这个代码
$raw_post_data = file_get_contents('php://input');
我收到此错误
"file_get_contents was found in the file xxx File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls."
我的问题是: 如何使用 Wordpress 方法读取输入流?我试过 wp_remote_get('php://input') 但显然它不起作用。
谢谢
【问题讨论】:
标签: wordpress paypal-ipn