我正在尝试Paymaster的经常性付款进入退出支付网关。
standart钩子呼叫看起来像这样
add_action('scheduled_subscription_payment_'. $this->id , array($this, 'scheduled_subscription_payment'), 10, 2);很好很清楚。下面是函数处理调用:
function scheduled_subscription_payment( $amount_to_charge, $order ) {
$this->process_subscription_payment($order, $amount_to_charge);
}没有什么特别的,但有一个问题:根据官方文档,$order参数应该由Woocommerce订阅引擎订单自动创建--但是我收到了一个已经处理过的父订单。
我通过Run按钮在Sheduled actions中启动支付过程:更新订单被创建,但从未传递给前面显示的函数。有什么问题吗?
发布于 2017-04-05 12:49:45
找到答案here。有一个人面临着同样的问题,所以问题是钩子scheduled_subscription_payment_已经被废弃了,我们应该用woocommerce_scheduled_subscription_payment_代替。
https://stackoverflow.com/questions/43231473
复制相似问题