Public Ticket #4102478

Key phrases need for stock updates

Closed
Comments
2 Tickets 1
James Burland started the conversation 1 year ago on June 23, 2025 at 4:31pm

Hello,

I’ve been trying to write some PHP for a little plug-in that will update B2B stock settings for both PRODUCTS and VARIATIONS. I’ve attached here the parameters that I need to update with my code, but I think I have the key phrases wrong. Can you give me the current key phrases for each, please?

I’ve tried updating these via the standard B2BKing UI, but it’s just not working as it should, hence why I’m writing code.

Many thanks!
James

2,762
KingsPlugins replied 1 year ago on June 23, 2025 at 8:17pm

Hi James,

If possible, I would recommend first trying to resolve this through the regular UI interface as normally this would be more reliable. Could you share more details about the specific issues you're experiencing with the UI? This would help me better understand if there might be a conflict or bug that we need to address.

I could also help troubleshoot any issue directly on the site if you can share access.

 

Alternatively I am also happy to provide you with documentation regarding the exact meta keys if needed. However, please note that this can be somewhat complex as the implementation differs between simple products and variable products/variations and there are 6-7 keys used. 

So I am happy to share that if you prefer it, but it might be simpler to try and solve it via the regular UI if that's an option.

 

Kind regards,
Stefan

2 Tickets 1
James Burland replied 1 year ago on June 23, 2025 at 9:00pm

Hi Stefan,

Many thanks for getting back to me.

Sorry, when rereading my message I can see that I’m wasn’t being completely clear.

I can indeed use the UI to update stock for both products (though this isn’t working exactly as I expected) and variations, it’s just that it will take me about 20 hours to do so!

I was hoping to change the stock values using PHP as it might save me a day or two.  :)

All the best,
James

2 Tickets 1
James Burland replied 1 year ago on June 24, 2025 at 4:02pm

Perhaps we start with just the keys and go from there? It will only be a one-off thing, anyway.

If you can send me the keys, please?

All the best,
James

2,762
KingsPlugins replied 1 year ago on June 25, 2025 at 3:47pm

Hi James,

Thanks for your patience on this,

 

I prepared a PDF with the keys used for both simple and variable products / individual variations. Please find it attached,

 

Let me know if you need any clarifications,

Stefan

Attached files:

Sign In