WC_Helper::_get_local_from_product_id()
Get a local plugin/theme entry from product_id.
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.
WC_Helper::_get_local_from_product_id() WC Helper:: get local from product id code WC 9.3.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; }