Untitled
raw download clone
TEXT
views 18
,
size 295 b
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' );
close fullscreen
Login or Register to edit or fork this paste. It's free.