get_brainstorm_product( string $product_id = '' )

Get BSF product.


Description


Parameters

$product_id

(string) (Optional) Product ID.

Default value: ''


Return

(array) Product.


Source

File: admin/bsf-core/includes/helpers.php

	function get_brainstorm_product( $product_id = '' ) {
		$all_products = brainstorm_get_all_products();

		foreach ( $all_products as $key => $product ) {

			$product_id_bsf = isset( $product['id'] ) ? $product['id'] : '';

			if ( $product_id === $product_id_bsf ) {

				return $product;
			}
		}
	}


User Contributed Notes

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