fatal php error for stock locations for woocommerce
Closed this issue · 1 comments
I'm getting an error in the log:
wp-content/plugins/stock-locations-for-woocommerce/src/classes/class-slw-order-item.php:785
also, when a customer buys an item it does not deduct from stock quantity, which is pretty crucial for an inventory plugin
I have just recorded a video for you, as I am having same priority number for both locations which I tried in a test checkout so the other one get selected by the script. But if you choose the priority number carefully, script will work accordingly.
And the line number you mentioned needs your attention, please list down the steps to reproduce the error as I tried auto order allocation and manual too, but I didn't get any error in both methods.
Kindly explain the problem with this if condition and suggest a solution too as per your implementation.
if( isset($userStockLocation[$userLocationChoiceId]) && $userStockLocation[$userLocationChoiceId]->quantity > $itemQuantity ) {