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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)