function wc_updated_product_stock_callback( $product_id ) { // you get an object $order as an argument $product = wc_get_product( $product_id ); $product->set_stock_status('instock'); } add_action( 'woocommerce_updated_product_stock', 'wc_updated_product_stock_callback' );
Copy and insert this code into your website: