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.


Top ↑

Return Return

(bool) Returns true if product subscription exists, false otherwise.


Top ↑

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 );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.7.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.