• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WooCommerce a2z

WooCommerce a2z

WooCommerce

  • Home
  • Plugins
  • Blocks
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / WC_Helper::has_product_subscription() – Checks whether current site has product subscription of a given ID.

You appear to be a bot. Output may be restricted

Description

Checks whether current site has product subscription of a given ID.

Usage

$bool = WC_Helper::has_product_subscription( $product_id );

Parameters

$product_id
( int ) required – The product id.

Returns

bool Returns true if product subscription exists, false otherwise.

Source

File name: woocommerce/includes/admin/helper/class-wc-helper.php
Lines:

1 to 4 of 4
  public static function has_product_subscription( $product_id ) {
    $subscription = self::_get_subscriptions_from_product_id( $product_id, true );
    return ! empty( $subscription );
  }
 

 View on GitHub View on Trac

Published: 26th November 2019 | Last updated: 26th November 2019

Primary Sidebar

Information

Function name: WC_Helper::has_product_subscription
Class ref: WC_Helper
Plugin ref: WooCommerce
Version: 4.8.0
Sourcefile: includes/admin/helper/class-wc-helper.php
File ref: includes/admin/helper/class-wc-helper.php
Deprecated?: No
API Letters: H,P,S,W

Footer

WooCommerce a2z
WooCommerce a2z
WooCommerce
WordPress 5.6
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  woocommerce.wp-a2z.org
© Copyright WooCommerce a2z 2014-2021. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites