I need to change the woocommerce product type after creation with a function in my child theme i have tried this :
wp_set_object_terms($product_id, 'variable', 'product_type', true);
My method is triggered after creation but the type still unchanged ?