Where the WooCommerce GTIN value is stored
-
The main GTIN is in post meta under hwp_product_gtin:
get_post_meta( $post_id, 'hwp_product_gtin', 1 );
If you have variations with GTINs, you can find those in post meta like this:
get_post_meta( $variation['variation_id'], 'hwp_var_gtin', 1 );
You have to loop through the variations to get that.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Where the WooCommerce GTIN value is stored’ is closed to new replies.