WC_Admin_Post_Types::woocommerce_media_upload_downloadable_product()
Stock status is determined by children.
Method of the class: WC_Admin_Post_Types{}
Hooks from the method
Return
null
. Nothing (null).
Usage
$WC_Admin_Post_Types = new WC_Admin_Post_Types(); $WC_Admin_Post_Types->$child = wc_get_product( $child_id );
- $child_id (required)
- -
WC_Admin_Post_Types::woocommerce_media_upload_downloadable_product() WC Admin Post Types::woocommerce media upload downloadable product code WC 8.7.0
$child = wc_get_product( $child_id ); if ( ! $product->get_manage_stock() ) { $child->set_stock_status( $stock_status );