• Resolved wbeem

    (@wbeem)


    I’m working with a client to help resolve some missing data in his Stock reports. Some entries do not have any value in the Product/Variation & Sku fields.

    We’ve read previous articles on this forum and they seem to mostly say that they magically started working again.

    I followed this article for troubleshooting, but without success.

    https://woocommerce.com/document/how-to-test-for-conflicts/

    Even with a different theme (Storefront or 2025), the problem exists. I disabled all plugins except WooCommerce and the problem exists.

    We had one drop-in – advanced-cache.php. It’s installed by WP-Rocket. I tried removing that from wp-config.php and deleting the file. Still had the problem with all plugins deactivated and the drop-in removed.

    I cloned the site to another server and have tried working there. We still see missing entries on that site but not the same ones and not as many.

    Both servers have ample resources and are not being taxed. The production server is an 8-CPU dedicated server with 4 GB RAM. The test server is a 2 core, 4 GB RAM VPS. I’m using Google Chrome to test and also tried deactivating the browser cache, as shown in the troubleshooting guide to test for conflicts.

    I appreciate any insights or ideas to help resolve the issue. Thanks!

    Here’s the Status report:

    System Status Report

    ### WordPress Environment ###
    
    WordPress address (URL): [Redacted]
    Site address (URL): [Redacted]
    WC Version: 9.7.1
    Legacy REST API Package Version: ✔ 1.0.5
    Action Scheduler Version: ✔ 3.9.0
    Log Directory Writable: ✔
    WP Version: 6.7.2
    WP Multisite: –
    WP Memory Limit: 1 GB
    WP Debug Mode: –
    WP Cron: ✔
    Language: en_US
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 8.1.32
    PHP Post Max Size: 512 MB
    PHP Time Limit: 600
    PHP Max Input Vars: 1000
    cURL Version: 8.12.1
    OpenSSL/1.1.1w
    
    SUHOSIN Installed: –
    MySQL Version: 8.0.41
    Max Upload Size: 512 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ❌ Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected.
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ❌ Your server does not support the mbstring functions - this is required for better character encoding. Some fallbacks will be used instead for it.
    Remote Post: ✔
    Remote Get: ✔
    
    ### Database ###
    
    [REDACTED]
    
    ### Post Type Counts ###
    
    attachment: 2503
    cctor_coupon: 1
    custom_css: 1
    cwginstocknotifier: 90
    feedback: 130
    global_product_addon: 20
    jb_store_css: 9
    jp_img_sitemap: 2
    jp_img_sitemap_index: 1
    jp_sitemap: 1
    jp_sitemap_master: 1
    nav_menu_item: 25
    oembed_cache: 12
    page: 29
    popup: 2
    popup_theme: 8
    post: 4
    product: 801
    product_variation: 144
    revision: 1
    saswp: 1
    shop_coupon: 168
    shop_order: 34745
    shop_order_refund: 250
    wooframework: 43
    wp_global_styles: 3
    wp_navigation: 1
    wp_template: 2
    wpcode: 2
    wpsc-product-file: 1
    xlwcty_thankyou: 1
    
    ### Security ###
    
    Secure connection (HTTPS): ✔
    Hide errors from visitors: ✔
    
    ### Active Plugins (57) ###
    
    Akismet Anti-spam: Spam Protection: by Automattic - Anti-spam Team – 5.3.7
    Payment Gateway Authorize.Net CIM for WooCommerce: by Cardpay Solutions
    Inc. – 2.1.2
    
    Back In Stock Notifier for WooCommerce | WooCommerce Waitlist Pro: by codewoogeek – 5.8.2
    CompressX: by WPvivid Team – 0.9.26
    WooCommerce Continue Shopping: by HappyKite – 1.6.1
    Customize My Account Page For Woocommerce: by WPEverest – 0.5.0
    Discontinued Product Stock Status for WooCommerce: by SaffireTech – 1.5.4
    GTM4WP - A Google Tag Manager (GTM) plugin for WordPress: by Thomas Geiger – 1.20.3
    Float Menu Lite: by Wow-Company – 7.0.4
    Jetpack Boost: by Automattic - Jetpack Site Speed team – 3.12.1
    Jetpack Protect: by Automattic - Jetpack Security team – 4.0.0
    Jetpack: by Automattic – 14.4.1
    MalCare WordPress Security Plugin - Malware Scanner, Cleaner, Security Firewall: by MalCare Security – 5.93
    Newsletter: by Stefano Lissa & The Newsletter Team – 8.7.6
    Ocean Cookie Notice: by OceanWP – 2.2.0
    Ocean Extra: by OceanWP – 2.4.5
    Ocean Footer Callout: by OceanWP – 2.2.1
    Ocean Full Screen: by OceanWP – 2.1.5
    Ocean Gutenberg Blocks: by OceanWP – 1.1.8
    Ocean Hooks: by OceanWP – 2.1.3
    Ocean Instagram: by OceanWP – 1.2.3
    Ocean Popup Login: by OceanWP – 2.2.1
    Ocean Portfolio: by OceanWP – 2.3.1
    Ocean Pro Demos: by OceanWP – 1.5.2
    Ocean Side Panel: by OceanWP – 2.2.1
    Ocean Sticky Footer: by OceanWP – 2.1.0
    Ocean Sticky Header: by OceanWP – 2.2.1
    Ocean White Label: by OceanWP – 2.1.0
    Ocean Woo Popup: by OceanWP – 2.1.0
    Popup Maker: by Popup Maker – 1.20.4
    PW WooCommerce Bulk Edit: by Pimwick
    LLC – 2.134
    
    PW WooCommerce Gift Cards: by Pimwick
    LLC – 2.12
    
    Simple Social Icons: by OsomPress – 3.2.5
    WooCommerce Advanced Bulk Edit Products, Orders, Coupons, Any WordPress Post Type - Smart Manager: by StoreApps – 8.59.0
    Temporary Login: by Elementor.com – 1.3.0
    TI WooCommerce Wishlist: by TemplateInvaders – 2.9.2
    UpdraftPlus - Backup/Restore: by TeamUpdraft
    DavidAnderson – 2.25.4.26
    
    Advanced Order Export For WooCommerce: by AlgolPlus – 4.0.1
    WooCommerce.com Update Manager: by Automattic – 1.0.3
    WooCommerce Extended Coupon Features FREE: by Soft79 – 3.3.8
    Print Invoice & Delivery Notes for WooCommerce: by Tyche Softwares – 5.5.0
    WooCommerce Legacy REST API: by WooCommerce – 1.0.5
    WooCommerce PayPal Payments: by PayPal – 3.0.1
    PDF Invoices & Packing Slips for WooCommerce: by WP Overnight – 4.2.0
    WooCommerce Product Add-Ons: by Woo – 7.7.0
    WooCommerce Shipping & Tax: by WooCommerce – 2.8.8
    Stock Manager for WooCommerce: by StoreApps – 3.2.0
    WooCommerce: by Automattic – 9.7.1
    Yoast SEO Premium: by Team Yoast – 24.7
    Yoast SEO: by Team Yoast – 24.7
    WP Headers And Footers: by WPBrigade – 3.1.1
    WP Mail Logging: by WP Mail Logging Team – 1.14.0
    WP Rocket: by WP Media – 3.18.3
    Yoast SEO: WooCommerce: by Team Yoast – 16.0
    XPS Ship Integration: by XPS Ship - Descartes – 2.0.9
    YITH WooCommerce Ajax Search: by YITH – 2.13.0
    Jetpack CRM: by Automattic - Jetpack CRM team – 6.5.1
    
    ### Inactive Plugins (5) ###
    
    Advanced Google reCAPTCHA: by WebFactory Ltd – 1.30
    Schema & Structured Data for WP & AMP: by Magazine3 – 1.43
    WooCommerce Blocks: by Automattic – 11.7.0
    WP-Optimize - Clean, Compress, Cache: by TeamUpdraft
    DavidAnderson – 4.1.1
    
    WPCode Lite: by WPCode – 2.2.6
    
    ### Dropin Plugins () ###
    
    advanced-cache.php: advanced-cache.php
    
    ### Settings ###
    
    Legacy API Enabled: ✔
    Force SSL: –
    Currency: USD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    pw gift card (pw-gift-card)
    simple (simple)
    variable (variable)
    
    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: –
    HPOS feature enabled: –
    Order datastore: WC_Order_Data_Store_CPT
    HPOS data sync enabled: –
    
    ### Logging ###
    
    Enabled: ✔
    Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2
    Retention period: 30 days
    Level threshold: –
    Log directory size: 7 MB
    
    ### WC Pages ###
    
    Shop base: #2676 - /
    Cart: #2677 - /cart/ -  Contains the woocommerce_cart shortcode
    Checkout: #2678 - /cart/checkout/ -  Contains the woocommerce_checkout shortcode
    My account: #365896 - /my-account/ -  Contains the [woocommerce_my_account] shortcode
    Terms and conditions: #2725 - /terms-and-conditions-privacy-return-contact-and-shipping-policies/
    
    ### Theme ###
    
    Name: OceanWP
    Version: 4.0.6
    Author URL: https://oceanwp.org/about-oceanwp/
    Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
    Theme type: Classic theme
    WooCommerce Support: ✔
    
    ### Templates ###
    
    Overrides: oceanwp/woocommerce/cart/mini-cart.php
    oceanwp/woocommerce/content-single-product.php
    oceanwp/woocommerce/loop/loop-start.php
    oceanwp/woocommerce/single-product/product-image.php
    oceanwp/woocommerce/single-product/title.php
    
    
    ### WooCommerce PayPal Payments ###
    
    Onboarded: ✔
    New UI active: –
    Shop country code: US
    WooCommerce currency supported: ✔
    Advanced Card Processing available in country: ✔
    Pay Later messaging available in country: ✔
    Webhook status: –
    PayPal Vault enabled: –
    ACDC Vault enabled: –
    Logging enabled: –
    Reference Transactions: ✔
    Used PayPal Checkout plugin: –
    Subscriptions Mode: Disabled
    PayPal Shipping Callback: –
    Apple Pay: –
    Google Pay: –
    Fastlane: –
    
    ### Admin ###
    
    Enabled Features: activity-panels
    analytics
    product-block-editor
    coupons
    core-profiler
    customize-store
    customer-effort-score-tracks
    import-products-task
    experimental-fashion-sample-products
    shipping-smart-defaults
    shipping-setting-tour
    homescreen
    marketing
    mobile-app-banner
    onboarding
    onboarding-tasks
    pattern-toolkit-full-composability
    product-custom-fields
    remote-inbox-notifications
    remote-free-extensions
    payment-gateway-suggestions
    printful
    shipping-label-banner
    subscriptions
    store-alerts
    transient-notices
    woo-mobile-welcome
    wc-pay-promotion
    wc-pay-welcome-page
    launch-your-store
    add-to-cart-with-options-stepper-layout
    
    Disabled Features: product-data-views
    experimental-blocks
    coming-soon-newsletter-template
    minified-js
    product-pre-publish-modal
    settings
    async-product-editor-category-field
    product-editor-template-system
    blueprint
    reactify-classic-payments-settings
    use-wp-horizon
    blockified-add-to-cart
    
    Daily Cron: ✔ Next scheduled: 2025-04-01 19:14:58 -04:00
    Options: ✔
    Notes: 227
    Onboarding: completed
    
    ### Action Scheduler ###
    
    Canceled: 21
    Oldest: 2025-03-27 11:50:30 -0400
    Newest: 2025-03-27 11:50:30 -0400
    
    Complete: 3,190
    Oldest: 2025-03-27 12:24:32 -0400
    Newest: 2025-04-01 11:46:17 -0400
    
    Failed: 3
    Oldest: 2025-03-28 10:14:37 -0400
    Newest: 2025-03-28 10:14:40 -0400
    
    Pending: 6
    Oldest: 2025-04-01 11:51:17 -0400
    Newest: 2025-04-14 20:43:30 -0400
    
    
    ### TI WooCommerce Wishlist Templates ###
    
    Overrides: –
    
    ### Status report information ###
    
    Generated at: 2025-04-01 11:48:39 -04:00

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 24 total)
  • Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    Thanks for reaching out! To better understand the issue, could you share a screenshot of the stock report showing the missing Product/Variation and SKU fields? Also, how was this report generated—was it through WooCommerce Analytics, a third-party plugin, or a custom export (I can see you are using custom export plugin on your site)? This will help us pinpoint the cause.

    Thread Starter wbeem

    (@wbeem)

    Thanks for the reply. As all plugins were disabled, except for WooCommerce, this was through the WooCommerce Analytics. That’s the source we always use to view the stock. The client has many plugins, but we haven’t identified a conflict so far.

    You can see that this report starts to show some stock items at the bottom.

    Screenshot URL: https://www.dropbox.com/scl/fi/ybc6cple23hxi6gborppe/Screenshot-2025-04-03-at-9.27.49-AM.png?rlkey=is2siota0cpdxtytrtd119jxx&dl=0

    Zee

    (@doublezed2)

    Hello wbeem,

    Thank you for your reply.

    I understand you have tried conflict testing but the issue persists even in the default environment.

    I cloned the site to another server and have tried working there. We still see missing entries on that site but not the same ones and not as many.

    Could you please explain this further? Do you mean after cloning the site to another server there were missing entries but these missing entries were different than the live site?

    To investigate this further, I suggest you export all products into CSV and check if there is anything missing there. You can use the Export button on the Products page.

    Please let me know how it goes.

    Best regards.

    Thread Starter wbeem

    (@wbeem)

    I cloned the site to another server to use that for testing rather than use the production server. Since I need to disable many plugins, this seemed better than disrupting the customer experience.

    After cloning the server, there was a different result to the missing entries on the production server and the testing server. I’ll share some screenshots.

    This first link is the Out of Stock view from the Production server:

    https://www.dropbox.com/scl/fi/mhe78y0tzn7y9lda9enyu/Screenshot-2025-04-04-at-5.07.41-PM.png?rlkey=4odcg2a28ne3sf1henyd7r1p2&dl=0

    This next view is the same Out of Stock view, but from the cloned server:

    https://www.dropbox.com/scl/fi/fxf2gyl9qiixs0n40uro7/Screenshot-2025-04-04-at-5.09.13-PM.png?rlkey=ztqueelsodnyurqv7876k5tjr&dl=0

    Notice many rows are empty on the Production server, but a lot of the data (not all) shows on the Testing server.

    The production server is a dedicated hardware server with 8 CPUs and 4 GB RAM. The testing server is a VPS with 2 cores and 4 GB RAM. Resources do not seem to be the issue. On the Production server, we don’t see any resource utilization going above 18% of capacity for CPU or RAM.

    I performed the Export on both PROD and TEST servers. They should be identical, but there are slightly more records in TEST than PROD. I had Claude AI analyze the two files and here is its response.

    I’ll analyze both CSV files to check if they are identical in content. Let me first examine the files.

    Based on my analysis of both CSV files, I can confirm that they are not identical. Here are the key differences:

    1. Row Count Difference:
      • PROD file contains 939 rows
      • TEST file contains 945 rows
      • The TEST file has 6 more rows than the PROD file
    2. Headers: The headers in both files are identical. All column names match between the two files.
    3. Content Differences: Looking at the sample rows, I noticed that while most of the data appears to be the same between matching records, there are some URL differences:For example, in the product with ID 2693 (Classic Blue Bandana Welding Beanie Caps):

    This suggests that the TEST file may be using a different domain (suburbiapress.com) compared to the PROD file (DoogiesHats.com).

    Summary of Differences:

    1. TEST file contains 6 more product records than PROD
    2. Domain/URL differences between the files (DoogiesHats.com vs. doogie.suburbiapress.com)
    3. The structure and most content appears to be the same between matching records

    I asked Claude to analyze the 6 new records in TEST. Turns out there were 8 new records, but there hasn’t been any data entry to the TEST server. It’s possible the production server deleted some records, but I’ll need to confirm if that happened. Here’s the result:

    I’ll analyze the CSV files further to identify the specific 6 records that are present in the TEST file but missing from the PROD file.

    I’ve identified the differences between the two CSV files. There are actually 8 extra records in the TEST file and 2 records in the PROD file that are not in TEST.Records in TEST but not in PROD (8 records):

    These are all new welding cap products, consisting of 4 pairs of variable products and their variations:

    1. Southwestern Sunset Band Welders Cap
      • ID: 366496 (variable product)
        • SKU: 333510
        • Categories: All Hats, NEW HATS, Standard Print Fabrics
      • ID: 366497 (variation)
        • Regular price: $21.20
        • Parent: 333510
    2. Southwest Desert Dreams Band Welders Cap
      • ID: 366499 (variable product)
        • SKU: 333511
        • Categories: All Hats, NEW HATS, Standard Print Fabrics
      • ID: 366500 (variation)
        • Regular price: $21.20
        • Parent: 333511
    3. Southeastern Feathers Orange Band Welders Cap
      • ID: 366502 (variable product)
        • SKU: 333512
        • Categories: All Hats, NEW HATS, Standard Print Fabrics
      • ID: 366503 (variation)
        • Regular price: $21.20
        • Parent: 333512
    4. Southwestern Feathers Turquoise Band Welders Cap
      • ID: 366507 (variable product)
        • SKU: 333513
        • Categories: All Hats, NEW HATS, Standard Print Fabrics
      • ID: 366508 (variation)
        • Regular price: $21.20
        • Parent: 333513

    Records in PROD but not in TEST (2 records):

    • ID: 378850
    • ID: 378853

    All the new products in TEST appear to be part of a new product line, as they’re categorized under “NEW HATS” in addition to “All Hats” and “Standard Print Fabrics.” Each variable product has a corresponding variation record, and all are priced at $21.20.

    The pattern suggests these are new products that have been added to the TEST environment but have not yet been deployed to PROD. Meanwhile, there are 2 records in PROD that aren’t in TEST, which could indicate either products that were removed from TEST before being added to PROD, or recent additions to PROD that haven’t been synchronized back to TEST.

    Here’s the analysis of the 2 records in PROD, but not in TEST. They seem to be new records added recently:

    I’ll analyze the two records that are in the PROD file but missing from the TEST file.

    Based on my analysis, I’ve identified the two products that are in the PROD file but missing from the TEST file. Both appear to be newly added welding caps:Records in PROD but not in TEST:

    1. Motorcycles Welding Hat
      • ID: 378850
      • Type: simple product (not a variable product with variations)
      • SKU: 3337834
      • Regular Price: $24.70
      • Categories: All Hats, NEW HATS, Premium Fabrics
      • Tags: “Welders hat pipe-fitter biker 100% cotton, welders hats”
      • Image URL: https://DoogiesHats.com/wp-content/uploads/2025/02/motorcycle.png
      • Stock: 12 units
      • Published: Yes
    2. Steel Balls Welding Cap

    Key Observations:

    1. Both products were added to PROD but not TEST, which is unusual for a typical development workflow where products should first appear in TEST before PROD.
    2. Both products have image paths that indicate they were uploaded in 2025 (February and April), suggesting they are very recent additions:
      • “/2025/02/motorcycle.png”
      • “/2025/04/steel-balls.jpg”
    3. Both products are simple (not variable) products, unlike the 8 products found in TEST but not in PROD, which were pairs of variable products and variations.
    4. The “Steel Balls Welding Cap” appears to be the most recent addition based on its image path (April 2025).
    5. Both products are categorized under “NEW HATS” just like the products found in TEST but not in PROD.

    This suggests that new products are being added to both environments independently rather than following a TEST-then-PROD workflow. The Steel Balls Welding Cap appears to be a particularly recent addition to PROD, given its April 2025 image date.

    Overall, this does not explain why we see more records visible in our TEST server compared to our PROD server. The variance is more than 8 records.

    I also asked Claude to compare the columns with an empty Name field. Seems to be identical:

    I’ll analyze both CSV files to count how many rows have no entry in the Name column.

    Based on my analysis of both CSV files:

    PROD file:

    • 116 rows out of 939 have no Name entry (12.35% of total rows)

    TEST file:

    • 116 rows out of 945 have no Name entry (12.28% of total rows)

    All rows with empty Name fields are of Type “variation” in both files. Looking at the samples, these rows also have null SKU values, suggesting they are product variations that inherit key information from their parent products.

    This is consistent with the expected structure for WooCommerce product exports, where variation products often don’t have their own names but instead inherit the name from their parent variable product, with attributes determining the specific variation (such as size, color, etc.).

    The count of rows without Names is exactly the same (116) in both environments, despite the TEST file having 6 more rows overall. This indicates that the additional products in the TEST environment all have values in their Name fields, and none of the variation products added to TEST lack names.

    The consistency in this pattern between environments suggests this is intentional data structure rather than missing data.

    • This reply was modified 1 year, 3 months ago by wbeem.
    Zee

    (@doublezed2)

    Hello wbeem,

    Thank you for your detailed response.

    I appreciate the time and effort you invested in conducting this investigation. To confirm we are on the same page, let me summarize my understanding.

    You cloned your production site to a testing server to investigate discrepancies in out-of-stock product views and CSV export data. After comparing both environments, you found that the testing server includes 8 additional products not present on the production server, while the production server has 2 products missing from the test.

    This is quite unusual because a testing site that is cloned from a production site should have the same products. It is important to investigate this discrepancy and find out what is causing it.

    Could you share the System Status Reports of both sites with me? You can paste it into https://pastebin.com and share the link here. Then export all products into CSV via Products > All Product > Export and share the CSV files with me via any file-sharing service.

    Comparing the systems status reports and the product export files will give me a better understanding of the problem.

    Best regards.

    Thread Starter wbeem

    (@wbeem)

    Sure, working on it now.

    Thread Starter wbeem

    (@wbeem)

    Zee

    (@doublezed2)

    Hello wbeem,

    Thank you for your reply.

    I checked both System Status Reports and noticed that Production Site has an outdated WooCommerce database “WC Database Version: 9.3.3”.

    Normally, this database updated is automatically carried out when you update the WooCommerce core. But for some reason this database has not been updated for several versions. This could lead to unexpected behaviour of the WooCommerce plugin.

    Please go to WooCommerce > Status > Tools and update the database manually. Please create full-site backup before performing this action.

    Let me know how it goes.

    Thread Starter wbeem

    (@wbeem)

    The database update completed and it matches the WooCommerce version of 9.7.1. We still see empty rows, such as in this screenshot of the Out of Stock display.

    https://www.dropbox.com/scl/fi/fwt52lo1zx0c3shncyuev/Screenshot-2025-04-08-at-11.40.57-AM.png?rlkey=fkji7c6rqj9gb4w5kr7czoxzt&dl=0

    Any thoughts about that?

    Hi @wbeem,

    Just to be sure I understand what the issue is here, Can you check manually to see if those variations actually is out of stock from the product edit page instead of the report page?

    Thread Starter wbeem

    (@wbeem)

    Now how am I supposed to check an invisible product to see if it’s in stock or not? There are no empty records on display in the Product area. If I filter products by Out of Stock status, I have 81 records.

    The CSV export I shared earlier showed 116 empty or blank records overall.

    Zee

    (@doublezed2)

    Hello wbeem,

    Thank you for your reply.

    To troubleshoot further, go to WooCommerce > Status > Tools, run the Clear Analytics Cache tool, and try reimporting historical data.

    If the issue persists, clone the production site to a staging/test site where we can disable all plugins except WooCommerce.

    My goal is to reproduce this error on the staging site and pinpoint the cause of the problem.

    I appreciate your patience while we look this issue.

    Best regards.

    Thread Starter wbeem

    (@wbeem)

    Please refer to the first post I had to start this discussion. I’ve already done all of those things. I just performed the task to clear all of the analytics cache and still have the problem. I cloned the site and disabled all plugins except WooCommerce and that does not correct the issue.

    Please note that the amount of missing items in the stock report on the TEST site is fewer than on the PROD site. Also note that I exported the TEST and PROD records to CSV and uploaded to this discussion some days ago.

    Given that we only hear from Support once per day, let’s not spend time repeating past actions that didn’t have any effect.

    Thank you. We’re eager to resolve this issue. Our Product database does not have any blank records. It’s only an issue in the Stock report. My gut feeling is that something corrupted that database table and we have 116 empty records that need to be purged. I just don’t know which tables WooCommerce uses.

    Do you think it would help to delete the blank records from the Analytics table? If so, please let me know the SQL command to use and I can test it on the TEST clone of the site.

    Hi @wbeem,

    The issue with missing data in the stock reports may be due to a corrupted database table. WooCommerce relies on several key tables, such as wp_posts, wp_postmeta, and wp_woocommerce_stock_quantities, for product and stock management. You should perform an integrity check on these tables to identify any mismatched or missing records, particularly those related to SKU or stock fields.

    To address the 116 empty records, running an SQL command to delete blank records from the wp_postmeta table could help. The command would be:

    DELETE FROM wp_postmeta WHERE meta_value = '';
    

    Ensure you test this on a clone site before applying it to the live site. If the issue is in a different table, such as wp_woocommerce_stock_quantities, let me know and I can adjust the query.

    To check the integrity of your WooCommerce database, start by accessing your hosting control panel (e.g., cPanel) and opening phpMyAdmin. Select your WordPress database and choose “Check Table” after selecting all the tables. This will run an integrity check on each table, displaying any issues such as corruption or damage. If problems are found, you can repair the tables by selecting “Repair Table” from the dropdown menu.

    Focus on key WooCommerce tables like wp_posts, wp_postmeta, wp_woocommerce_order_items, wp_woocommerce_order_itemmeta, and wp_woocommerce_stock_quantities. To check for specific issues, like missing SKUs, you can run an SQL query in phpMyAdmin. For example, to find products with missing SKUs, use the query:

    SELECT * FROM wp_postmeta WHERE meta_key = '_sku' AND meta_value = '';
    

    Please always back up your database before making any changes to avoid data loss. These steps should help identify and fix any issues causing missing data in your stock reports.

    Thread Starter wbeem

    (@wbeem)

    Thanks for those ideas. I’m working through these suggestions on our TEST clone of the production site.

    All tables complete the Check with OK status in both TEST and PROD sites.

    We do not seem to have a wp_woocommerce_stock_quantities on the TEST site or the PROD site. We have stock_logs, but nothing else with “stock” in the table.

    I tried the command DELETE FROM wp_postmeta WHERE meta_value = ”; on the TEST site. No effect.

    From the command: SELECT * FROM wp_postmeta WHERE meta_key = ‘_sku’ AND meta_value = ”;

    On the TEST site, I had zero results. On the PROD site, the command returned 129 rows. That’s because I already ran the DELETE command on TEST. As I mentioned, it did not affect the stock report.

    Let me know what you suggest next. Thanks.

Viewing 15 replies - 1 through 15 (of 24 total)

The topic ‘Stock Missing Some Product/Variation & Sku Entries’ is closed to new replies.