我正在使用 WooCommerce Subscription REST API 来延长用户的订阅期。我遇到的问题是,当我想更新过期时间时,我收到此错误:
Gateway does not support admin changing the payment method on a Subscription
有人知道问题出在哪里吗?
我正在使用以下代码更新订阅到期时间:
return $this->guzzleClient->request('PUT', 'wp-json/wc/v1/subscriptions/'.$id, [
'json' => [
'end_date' => $endDate->toDateTimeString(),
'status' => 'active',
]
]);