В настоящее время я разрабатываю проект WordPress и использую WooCommerce с плагином WooCommerce Subscriptions, чтобы предлагать подписки своим пользователям. Мне нужна помощь в том, как получить количество подписки в PHP.
Я использую этот код для получения подписки, но не могу получить количество:
$subscriptions = wcs_get_subscriptions( array(
'customer_id' => get_current_user_id(),
'subscription_status' => 'wc-active',
'order_by' => 'DESC',
'subscriptions_per_page' => - 1
) );
Когда пользователь покупает подписку, он может выбрать количество подписок. Итак, мне нужно получить значение этого поля: