0
$subscriptions = WC_Subscriptions_Manager::get_all_users_subscriptions();
var_dump($subscriptions);
...snip...
'2794_1425' =>
array (size=15)
'order_id' => null
'product_id' => string '106' (length=3)
'variation_id' => string '121' (length=3)
'status' => string 'on-hold' (length=7)
'period' => string 'month' (length=5)
'interval' => string '1' (length=1)
'length' => int 0
'start_date' => string '2016-08-26 14:31:25' (length=19)
'expiry_date' => int 0
'end_date' => int 0
'trial_expiry_date' => int 0
'failed_payments' => string '' (length=0)
'completed_payments' =>
array (size=1)
0 => string '2016-08-26 14:52:47' (length=19)
'suspension_count' => string '1' (length=1)
'last_payment_date' => string '2016-09-27 14:28:38' (length=19)
...snip...
どうORDER_IDすることができますがNULLになること?注文ページに注文が表示され、IDがあります。
ああ、これは非常に奇妙です...私は別の注文ステータスで私の側でテストしましたが、私はいつも注文IDを取得します。あなたのコードの '2794_1425 '=>'の最初の行では、 '_'文字の前のこの参照の最初の部分が注文IDと(私の場合は)一致しているようです。したがって、注文IDは** '2794' **にする必要があります。それが私があなたに話すことができる唯一のものです。 – LoicTheAztec