2

Is it possible to leave stock out of sync when creating or updating products?

For example can I use something like this:

function my_saved_post( $post_id, $xml_node, $is_update ) {

    $original_stock = get_post_meta($id, '_stock', true); 

    update_post_meta($id, '_stock', $original_stock);

}
add_action( 'pmxi_saved_post', 'my_saved_post', 10, 3 );
netdev
  • 496
  • 1
  • 5
  • 22

0 Answers0