WooCommerce Subscriptions - Get product of a specific subscription
问题 Is there a way to get from $product from $subscription ? Thanks to this post, I know that from $subscription I can get $order : $order = $subscription->order; Is this also possible? $product = $subscription->product; Or: $product = $order->product; 回答1: It is possible to get the products from either the Subscription or the matching order, as a subscription object is an extension of the WC_Order class. $subscription_products = $subscription->get_items(); $order_products = $subscription->order-