WC_Products_Tracking::get_product_type_options
Get the product type options for a product.
Method of the class: WC_Products_Tracking{}
No Hooks.
Returns
Array
.
Usage
$result = WC_Products_Tracking::get_product_type_options( $post_id );
- $post_id(int) (required)
- The ID of the product.
WC_Products_Tracking::get_product_type_options() WC Products Tracking::get product type options code WC 9.8.5
private static function get_product_type_options( $post_id ) { $possible_product_type_options_ids = self::get_possible_product_type_options_ids(); $post_meta = get_post_meta( $post_id ); $product_type_options = array(); foreach ( $possible_product_type_options_ids as $product_type_option_id ) { $product_type_options[ $product_type_option_id ] = isset( $post_meta[ $product_type_option_id ] ) ? $post_meta[ $product_type_option_id ][0] : 'no'; } return $product_type_options; }