WC_Helper::has_product_subscription( int $product_id )
Checks whether current site has product subscription of a given ID.
Description Description
Parameters Parameters
- $product_id
-
(Required) The product id.
Return Return
(bool) Returns true if product subscription exists, false otherwise.
Source Source
File: includes/admin/helper/class-wc-helper.php
public static function has_product_subscription( $product_id ) { $subscription = self::_get_subscriptions_from_product_id( $product_id, true ); return ! empty( $subscription ); }
Changelog Changelog
Version | Description |
---|---|
3.7.0 | Introduced. |