Woocommerce showing negative stock
-
Hi there!
The problem I’m facing with is that somehow, woocommerce, will store negative stock (-1). It’s not the first time that this happend and also on multiple websites.
I’ve checked the orders for the product that has negative stock, and somehow, after card was declined when a customer wanted to buy, the stock went from 0 -> -1.
But how can this happen? Is this only shown on the frontend, and it works fine in the backend?
Really need help over here.
Best regards!
Rok
-
This topic was modified 2 years, 6 months ago by
rokaklih.
-
This topic was modified 2 years, 6 months ago by
-
Hi @rokaklih
I understand that your products are showing negative stock.
It looks like the products are currently allowing backorders, and that’s why the stock goes minus.
This can be prevented by enabling stock management and selecting “Not allowing backorders” in the Inventory section. You can change this per variation too. For complete information, please check out this page: https://woocommerce.com/document/managing-products/#section-25
Link to image: https://snipboard.io/CRo4B3.jpgHi @margaretwporg,
thanks for an answer. But Your suggestion, won’t fix my problem, because I’Ve already disabled the backorders, so there is no way that a user can but product, even if it is not on stock.
Do you have any other suggestion?
Hi @rokaklih
Thanks for confirming that.
In that case, this unusual behavior could be under the influence of another plugin active on the site, or maybe the theme itself, or some custom code.
You can read more about plugin and theme conflicts in our Self-Service Guide.
The best way to determine this is to:
- Temporarily switch your theme to Storefront
- Disable all plugins except for WooCommerce
- Repeat the action that is causing the problem
If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.
If you don’t want to run the test on your live production site, you can create a duplicate/staging site. Many hosting providers offer site staging facilities, but if you don’t have such a feature, you can create one with the WP Staging plugin.
If the above does not yield a culprit, please share with us the site’s System Status. You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”. Once you’ve done that, paste it here in your response.
Hi there, couldn’t repeat the problem I have.
If you could take a look would be so helpful.
### WordPress Environment ### WordPress address (URL): https://nanni.si Site address (URL): https://nanni.si WC Version: 6.9.4 REST API Version: ? 6.9.4 WC Blocks Version: ? 8.3.3 Action Scheduler Version: ? 3.4.0 Log Directory Writable: ? WP Version: 6.0.2 WP Multisite: – WP Memory Limit: 1 GB WP Debug Mode: – WP Cron: ? Language: sl_SI External object cache: – ### Server Environment ### Server Info: LiteSpeed PHP Version: 7.3.33 PHP Post Max Size: 50 MB PHP Time Limit: 90 PHP Max Input Vars: 7000 cURL Version: 7.71.0 OpenSSL/1.1.1p SUHOSIN Installed: – MySQL Version: 5.5.5-10.3.36-MariaDB-log-cll-lve Max Upload Size: 50 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 6.9.4 WC Database Prefix: wptk_ Skupna velikost podatkovne zbirke: 131.21MB Velikost podatkov podatkovne zbirke: 101.46MB Velikost kazala podatkovne zbirke: 29.75MB wptk_woocommerce_sessions: Podatki: 1.02 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_woocommerce_api_keys: Podatki: 0.02 MB + Kazalo: 0.03 MB + Pogon InnoDB wptk_woocommerce_attribute_taxonomies: Podatki: 0.02 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_woocommerce_downloadable_product_permissions: Podatki: 0.02 MB + Kazalo: 0.06 MB + Pogon InnoDB wptk_woocommerce_order_items: Podatki: 1.52 MB + Kazalo: 0.17 MB + Pogon InnoDB wptk_woocommerce_order_itemmeta: Podatki: 4.52 MB + Kazalo: 5.03 MB + Pogon InnoDB wptk_woocommerce_tax_rates: Podatki: 0.02 MB + Kazalo: 0.06 MB + Pogon InnoDB wptk_woocommerce_tax_rate_locations: Podatki: 0.02 MB + Kazalo: 0.03 MB + Pogon InnoDB wptk_woocommerce_shipping_zones: Podatki: 0.02 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_woocommerce_shipping_zone_locations: Podatki: 0.02 MB + Kazalo: 0.03 MB + Pogon InnoDB wptk_woocommerce_shipping_zone_methods: Podatki: 0.02 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_woocommerce_payment_tokens: Podatki: 0.02 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_woocommerce_payment_tokenmeta: Podatki: 0.02 MB + Kazalo: 0.03 MB + Pogon InnoDB wptk_woocommerce_log: Podatki: 0.02 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_actionscheduler_actions: Podatki: 2.02 MB + Kazalo: 1.44 MB + Pogon InnoDB wptk_actionscheduler_claims: Podatki: 0.02 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_actionscheduler_groups: Podatki: 0.02 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_actionscheduler_logs: Podatki: 1.02 MB + Kazalo: 1.23 MB + Pogon InnoDB wptk_berocket_termmeta: Podatki: 0.02 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_cartbounty: Podatki: 5.52 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_cli_cookie_scan: Podatki: 0.02 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_cli_cookie_scan_categories: Podatki: 0.02 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_cli_cookie_scan_cookies: Podatki: 0.02 MB + Kazalo: 0.03 MB + Pogon InnoDB wptk_cli_cookie_scan_url: Podatki: 0.02 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_cli_scripts: Podatki: 0.02 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_commentmeta: Podatki: 0.02 MB + Kazalo: 0.03 MB + Pogon InnoDB wptk_comments: Podatki: 1.52 MB + Kazalo: 0.86 MB + Pogon InnoDB wptk_e_events: Podatki: 0.02 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_e_notes: Podatki: 0.02 MB + Kazalo: 0.17 MB + Pogon InnoDB wptk_e_notes_users_relations: Podatki: 0.02 MB + Kazalo: 0.05 MB + Pogon InnoDB wptk_e_submissions: Podatki: 0.02 MB + Kazalo: 0.27 MB + Pogon InnoDB wptk_e_submissions_actions_log: Podatki: 0.02 MB + Kazalo: 0.11 MB + Pogon InnoDB wptk_e_submissions_values: Podatki: 0.02 MB + Kazalo: 0.03 MB + Pogon InnoDB wptk_gglcptch_allowlist: Podatki: 0.02 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_jet_post_types: Podatki: 0.02 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_jet_smart_filters_indexer: Podatki: 0.11 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_jet_taxonomies: Podatki: 0.02 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_leanpay_cene_tmp: Podatki: 8.02 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_links: Podatki: 0.02 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_mailchimp_carts: Podatki: 0.20 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_mailchimp_jobs: Podatki: 0.02 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_options: Podatki: 17.08 MB + Kazalo: 0.66 MB + Pogon InnoDB wptk_pmxe_exports: Podatki: 0.11 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_pmxe_google_cats: Podatki: 0.39 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_pmxe_posts: Podatki: 0.05 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_pmxe_templates: Podatki: 0.02 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_pmxi_files: Podatki: 0.05 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_pmxi_hash: Podatki: 0.22 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_pmxi_history: Podatki: 0.02 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_pmxi_images: Podatki: 0.09 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_pmxi_imports: Podatki: 3.52 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_pmxi_posts: Podatki: 0.13 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_pmxi_templates: Podatki: 0.45 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_postmeta: Podatki: 33.55 MB + Kazalo: 15.06 MB + Pogon InnoDB wptk_posts: Podatki: 7.52 MB + Kazalo: 0.95 MB + Pogon InnoDB wptk_rank_math_404_logs: Podatki: 0.02 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_rank_math_analytics_objects: Podatki: 0.02 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_rank_math_internal_links: Podatki: 0.08 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_rank_math_internal_meta: Podatki: 0.19 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_redirection_404: Podatki: 0.02 MB + Kazalo: 0.05 MB + Pogon InnoDB wptk_redirection_groups: Podatki: 0.02 MB + Kazalo: 0.03 MB + Pogon InnoDB wptk_redirection_items: Podatki: 0.14 MB + Kazalo: 0.16 MB + Pogon InnoDB wptk_redirection_logs: Podatki: 0.02 MB + Kazalo: 0.05 MB + Pogon InnoDB wptk_shortpixel_folders: Podatki: 0.02 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_shortpixel_meta: Podatki: 0.02 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_shortpixel_queue: Podatki: 0.02 MB + Kazalo: 0.09 MB + Pogon InnoDB wptk_termmeta: Podatki: 0.08 MB + Kazalo: 0.08 MB + Pogon InnoDB wptk_terms: Podatki: 0.06 MB + Kazalo: 0.03 MB + Pogon InnoDB wptk_term_relationships: Podatki: 0.14 MB + Kazalo: 0.11 MB + Pogon InnoDB wptk_term_taxonomy: Podatki: 0.06 MB + Kazalo: 0.03 MB + Pogon InnoDB wptk_usermeta: Podatki: 1.52 MB + Kazalo: 0.70 MB + Pogon InnoDB wptk_users: Podatki: 0.08 MB + Kazalo: 0.05 MB + Pogon InnoDB wptk_wc_admin_notes: Podatki: 0.06 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_wc_admin_note_actions: Podatki: 0.02 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_wc_category_lookup: Podatki: 0.02 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_wc_customer_lookup: Podatki: 0.14 MB + Kazalo: 0.13 MB + Pogon InnoDB wptk_wc_download_log: Podatki: 0.02 MB + Kazalo: 0.03 MB + Pogon InnoDB wptk_wc_order_coupon_lookup: Podatki: 0.02 MB + Kazalo: 0.03 MB + Pogon InnoDB wptk_wc_order_product_lookup: Podatki: 0.48 MB + Kazalo: 0.48 MB + Pogon InnoDB wptk_wc_order_stats: Podatki: 0.19 MB + Kazalo: 0.20 MB + Pogon InnoDB wptk_wc_order_tax_lookup: Podatki: 0.14 MB + Kazalo: 0.16 MB + Pogon InnoDB wptk_wc_product_attributes_lookup: Podatki: 0.06 MB + Kazalo: 0.05 MB + Pogon InnoDB wptk_wc_product_download_directories: Podatki: 0.02 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_wc_product_meta_lookup: Podatki: 0.16 MB + Kazalo: 0.38 MB + Pogon InnoDB wptk_wc_rate_limits: Podatki: 0.02 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_wc_reserved_stock: Podatki: 0.02 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_wc_tax_rate_classes: Podatki: 0.02 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_wc_webhooks: Podatki: 0.02 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_wpfm_backup: Podatki: 0.02 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_wpf_filters: Podatki: 0.02 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_wpf_meta_keys: Podatki: 0.02 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_wpf_meta_values: Podatki: 0.02 MB + Kazalo: 0.03 MB + Pogon InnoDB wptk_wpf_meta_values_bk: Podatki: 0.02 MB + Kazalo: 0.02 MB + Pogon InnoDB wptk_wpmailsmtp_debug_events: Podatki: 0.05 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_wpmailsmtp_tasks_meta: Podatki: 0.02 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_wpr_rucss_resources: Podatki: 4.52 MB + Kazalo: 0.06 MB + Pogon InnoDB wptk_wpr_rucss_used_css: Podatki: 3.52 MB + Kazalo: 0.05 MB + Pogon InnoDB wptk_yith_wcsc_commissions: Podatki: 0.02 MB + Kazalo: 0.00 MB + Pogon InnoDB wptk_yith_wcsc_receivers: Podatki: 0.02 MB + Kazalo: 0.00 MB + Pogon InnoDB ### Post Type Counts ### attachment: 1090 br_labels: 2 br_product_filter: 1 cookielawinfo: 10 elementor_font: 3 elementor_library: 87 elementor_snippet: 11 jet-menu: 2 jet-popup: 1 jet-smart-filters: 10 jet-woo-builder: 10 nav_menu_item: 60 page: 19 post: 2 product: 283 product_variation: 795 revision: 257 shop_coupon: 9 shop_order: 1756 shop_order_refund: 2 shop_subscription: 1 wccf_product_field: 1 woo_mb_template: 13 wp_global_styles: 1 ywsbs_subscription: 1 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (49) ### WooCommerce Advanced Product Labels: od BeRocket – 1.2.3.8 CookieYes | GDPR Cookie Consent: od CookieYes – 3.0.0 Custom Order Numbers for WooCommerce: od Tyche Softwares – 1.3.5 Custom Taxonomy Order: od Marcel Pol – 3.4.4 GTM4WP: od Thomas Geiger – 1.16.1 Elementor Pro: od Elementor.com – 3.5.2 Elementor: od Elementor.com – 3.5.5 Facebook for WooCommerce: od Facebook – 2.6.23 reCaptcha by BestWebSoft: od BestWebSoft – 1.68 JetBlocks For Elementor: od Crocoblock – 1.3.2 JetElements For Elementor: od Crocoblock – 2.6.5 JetEngine: od Crocoblock – 2.11.9 JetMenu: od Crocoblock – 2.0.9 JetPopup: od Crocoblock – 1.5.6 JetSearch For Elementor: od Crocoblock – 2.1.17 JetSmartFilters - indexer query hooks cleaner: od Crocoblock – 1.0.0 JetSmartFilters: od Crocoblock – 2.3.12 JetTabs For Elementor: od Crocoblock – 2.1.17 JetTricks: od Crocoblock – 1.4.1 JetWooBuilder For Elementor: od Crocoblock – 1.12.4 JetProductGallery For Elementor: od Crocoblock – 2.1.2 Jetpack: od Automattic – 11.1.1 Leanpay obro?ne cene: od Leanpay – 2.0.0 Mailchimp for WooCommerce: od Mailchimp – 2.6.2 No password notification: od AKLIH – 1.0 Qty Increment Buttons for WooCommerce: od taisho – 2.7.5 Redirection: od John Godley – 5.3.4 Regenerate Thumbnails Advanced: od ShortPixel – 2.4.0 Regenerate Thumbnails: od Alex Mills (Viper007Bond) – 3.1.5 Rank Math SEO: od Rank Math – 1.0.94 Shopper's Mind: od Shopper's Mind – 1.0.2 WC Hide Shipping Methods: od Rynaldo Stoltz – 1.5 Checkout Field Editor for WooCommerce: od ThemeHigh – 1.7.2 CartBounty - Save and recover abandoned carts for WooCommerce: od Streamline.lv – 7.1.2.8 WooCommerce Custom Fields: od RightPress – 2.3.4 WooCommerce Free Gift Coupons: od Kathy Darling – 2.4.2 WooCommerce Stripe Gateway: od WooCommerce – 6.7.0 WooCommerce Google Analytics Integration: od WooCommerce – 1.5.14 WooCommerce Out of Stock! Manager: od Lagudi Domenico – 4.6 WooCommerce PayPal Payments: od WooCommerce – 1.9.3 WooCommerce: od Automattic – 6.9.4 WooCommerce Email Customizer with Drag and Drop Email Builder: od Flycart Technologies LLP – 1.5.16 WP All Export Pro: od Soflyy – 1.7.8 WP All Import Pro: od Soflyy – 4.7.6 WP Mail SMTP: od WPForms – 3.5.2 WP Rocket: od WP Media – 3.10.7 WP All Export - WooCommerce Export Add-On Pro: od Soflyy – 1.0.5 WP All Import - WooCommerce Import Add-On Pro: od Soflyy – 3.3.3 Smart Coupons For WooCommerce Coupons: od WebToffee – 1.4.2 ### Inactive Plugins (2) ### QR Code Woocommerce: od Gangesh Matta – 2.0.5 ShortPixel Image Optimizer: od ShortPixel – 5.0.9 ### Dropin Plugins (2) ### advanced-cache.php: advanced-cache.php maintenance.php: maintenance.php ### Settings ### API Enabled: – Force SSL: – Currency: EUR (€) Currency Position: right_space Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) subscription (subscription) variable (variable) variable subscription (variable-subscription) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – Enforce Approved Product Download Directories: – ### WC Pages ### Osnova trgovine: #132 - /trgovina/ Ko?arica: #133 - /kosarica/ Zaklju?ek nakupa: #134 - /zakljucek-nakupa/ Moj ra?un: #135 - /moj-racun/ Pogoji poslovanja: #275 - /pogoji-poslovanja/ ### Theme ### Name: Hello Elementor Child Version: 1.0.1 Author URL: https://elementor.com/ Child Theme: ? Parent Theme Name: Hello Elementor Parent Theme Version: 2.6.1 Parent Theme Author URL: https://elementor.com/?utm_source=wp-themes&utm_campaign=author-uri&utm_medium=wp-dash WooCommerce Support: ? ### Templates ### Overrides: /home/nanni/public_html/wp-content/plugins/jet-woo-builder/templates/woocommerce/cart/cart.php /home/nanni/public_html/wp-content/plugins/jet-woo-builder/templates/woocommerce/checkout/form-checkout.php /home/nanni/public_html/wp-content/plugins/jet-woo-builder/templates/woocommerce/checkout/thankyou.php /home/nanni/public_html/wp-content/plugins/jet-woo-builder/templates/woocommerce/myaccount/form-login.php razli?ica 4.1.0 je zastarela. Nova razli?ica je 6.0.0 Outdated Templates: ? Ve? o posodabljanju ### WooCommerce PayPal Payments ### Onboarded: ? Shop country code: SI WooCommerce currency supported: ? PayPal card processing available in country: – Pay Later messaging available in country: – Webhook status: ? Vault enabled: ? Logging enabled: – Reference Transactions: – Used PayPal Checkout plugin: – Tracking enabled: – ### Admin ### Enabled Features: activity-panels analytics coupons customer-effort-score-tracks experimental-products-task experimental-import-products-task experimental-fashion-sample-products experimental-product-tour shipping-smart-defaults shipping-setting-tour homescreen marketing mobile-app-banner navigation onboarding onboarding-tasks remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices wc-pay-promotion wc-pay-welcome-page Disabled Features: minified-js new-product-management-experience settings Daily Cron: ? Next scheduled: 2022-09-30 08:56:45 +00:00 Options: ? Notes: 55 Onboarding: skipped ### Action Scheduler ### Canceled: 1 Oldest: 2022-09-21 08:56:12 +0000 Newest: 2022-09-21 08:56:12 +0000 Complete: 4.117 Oldest: 2022-09-13 06:04:16 +0000 Newest: 2022-09-30 06:42:44 +0000 Pending: 4 Oldest: 2022-09-30 07:15:49 +0000 Newest: 2022-09-30 22:57:18 +0000 ### Status report information ### Generated at: 2022-09-30 06:43:40 +00:00
Hi @rokaklih
Thanks for sharing the System Status Report.
PHP Version: 7.3.33
As per our server recommendations, WooCommerce requires PHP 7.4 and above to run smoothly. To update the PHP version please refer to:
https://woocommerce.com/document/update-php-wordpress/#section-10Secondly, your Hello Elementor Child theme overrides many WooCommerce templates and some overrides are outdated. Please refer to our documentation on how to update outdated templates: https://woocommerce.com/document/fix-outdated-templates-woocommerce/
Can you please let us know if the problem persists even after making these corrections?
- The topic ‘Woocommerce showing negative stock’ is closed to new replies.