Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

WC_Helper::_get_local_from_product_id( int $product_id )

Get a local plugin/theme entry from product_id.


Description Description


Parameters Parameters

$product_id

(Required) The product id.


Top ↑

Return Return

(array|bool) The array containing the local plugin/theme data or false.


Top ↑

Source Source

File: includes/admin/helper/class-wc-helper.php

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


Top ↑

User Contributed Notes User Contributed Notes

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