Okay
  Public Ticket #3832056
separate b2b stock
Closed

Comments

  •  1
    Matt Carswell started the conversation

    We are using separate b2b stock to enable b2b only backorders, but want separate stock set to "no" on all items and "variations." Is there a code snippet to make that the default on new items/variations? Right now new items we create have separate b2b stock set to "yes" by default. 

  •  2,361
    WebWizards replied

    Hello Matt,

    I wrote a code snippet that I believe should do that: https://pastecode.io/s/36bxqu3e

    This can be added to functions.php or any code snippets plugin.

     

    When the "new product" page loads, it should set by default:

    • Separate B2B Stock? No
    • B2B Allow Backorders? Allow

     

    Let me know if that works for you or if you need any adjustments,

    Kind regards,

    Stefan