Function to Set Product type in Woocommerce [closed]

I figured this out, to set the product_type, instead of using update_post_meta(), you use:

wp_set_object_terms( $productID, ‘subscription’, ‘product_type’ );

Leave a Comment