WC_Helper::_get_local_from_product_id()private staticWC 1.0

Get a local plugin/theme entry from product_id.

{} It's a method of the class: WC_Helper{}

No Hooks.

Return

Array|true|false. The array containing the local plugin/theme data or false.

Usage

$result = WC_Helper::_get_local_from_product_id( $product_id );
$product_id(int) (required)
The product id.

Code of WC_Helper::_get_local_from_product_id() WC 6.6.1

private static function _get_local_from_product_id( $product_id ) {
	$local = wp_list_filter(
		array_merge(
			self::get_local_woo_plugins(),
			self::get_local_woo_themes()
		),
		array( '_product_id' => $product_id )
	);

	if ( ! empty( $local ) ) {
		return array_shift( $local );
	}

	return false;
}