Support » Plugin: WooCommerce » “Hide out of stock items from the catalog” hides In Stock products

  • Resolved Oleg

    (@submedia)


    Howdy!

    There is an issue with “Hide out of stock items from the catalog” setting. When it’s active some in stock products not visible (not showing) in shop, in product category/subcategory and search.

    I tried to deactivate all plugins and use Storefront theme but nothing.
    Also Clear transients, Clear template cache, Regenerate product lookup tables, Update database doesn’t help.

    In order to overcome the problem the problematic product should be made featured and back. That’s the only way I found to get the product visible.
    However since the shop has 10k products this is not solution so any help appreciated.

    Any ideas what can be wrong, what else could I try to get all In Stock products to be visible in shop?

    Thank you

    P.S. WordPress 6.0 / WooCommerce 6.5.1

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Support Joseph B. (a11n)

    (@tamirat22)

    Hello @submedia!

    To help us further analyze the issue, could you please share a copy of your 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.

    In the meantime, as a precaution, please go through this detailed conflict test.

    We will be waiting for your response!

    Thread Starter Oleg

    (@submedia)

    Hello Josph.

    Please find below, thanks.

    
    ### WordPress Environment ###
    
    WC Version: 6.5.1
    REST API Version: ✔ 6.5.1
    WC Blocks Version: ✔ 7.4.3
    Action Scheduler Version: ✔ 3.4.0
    Log Directory Writable: ✔
    WP Version: 6.0
    WP Multisite: –
    WP Memory Limit: 512 MB
    WP Debug Mode: –
    WP Cron: –
    Language: el
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 7.4.29
    PHP Post Max Size: 50 MB
    PHP Time Limit: 300
    PHP Max Input Vars: 1000
    cURL Version: 7.64.0
    OpenSSL/1.1.1n
    
    SUHOSIN Installed: –
    MySQL Version: 5.7.38-1
    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.5.1
    WC Database Prefix: kn_
    Total Database Size: 1064.17MB
    Database Data Size: 554.67MB
    Database Index Size: 509.50MB
    kn_woocommerce_sessions: Data: 0.38MB + Index: 0.02MB + Engine InnoDB
    kn_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    kn_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    kn_woocommerce_order_items: Data: 10.52MB + Index: 2.52MB + Engine InnoDB
    kn_woocommerce_order_itemmeta: Data: 90.63MB + Index: 117.78MB + Engine InnoDB
    kn_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    kn_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    kn_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    kn_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    kn_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    kn_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    kn_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_actionscheduler_actions: Data: 2.52MB + Index: 1.48MB + Engine InnoDB
    kn_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_actionscheduler_logs: Data: 2.52MB + Index: 0.77MB + Engine InnoDB
    kn_aiowps_debug_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    kn_aiowps_events: Data: 1.52MB + Index: 0.00MB + Engine InnoDB
    kn_aiowps_failed_logins: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    kn_aiowps_global_meta: Data: 5.50MB + Index: 0.00MB + Engine InnoDB
    kn_aiowps_login_activity: Data: 0.09MB + Index: 0.00MB + Engine InnoDB
    kn_aiowps_login_lockdown: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_aiowps_permanent_block: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_atum_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    kn_atum_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_atum_product_data: Data: 1.52MB + Index: 0.44MB + Engine InnoDB
    kn_bulkgate_module: Data: 0.06MB + Index: 0.00MB + Engine InnoDB
    kn_commentmeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
    kn_comments: Data: 26.55MB + Index: 17.61MB + Engine InnoDB
    kn_db7_forms: Data: 0.38MB + Index: 0.00MB + Engine InnoDB
    kn_failed_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    kn_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_options: Data: 5.50MB + Index: 0.39MB + Engine InnoDB
    kn_postmeta: Data: 185.72MB + Index: 223.67MB + Engine InnoDB
    kn_posts: Data: 33.56MB + Index: 17.67MB + Engine InnoDB
    kn_queue: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    kn_termmeta: Data: 6.52MB + Index: 7.55MB + Engine InnoDB
    kn_terms: Data: 1.52MB + Index: 0.75MB + Engine InnoDB
    kn_term_relationships: Data: 5.52MB + Index: 5.03MB + Engine InnoDB
    kn_term_taxonomy: Data: 1.52MB + Index: 0.59MB + Engine InnoDB
    kn_tm_taskmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    kn_tm_tasks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_usermeta: Data: 3.52MB + Index: 3.03MB + Engine InnoDB
    kn_users: Data: 0.20MB + Index: 0.16MB + Engine InnoDB
    kn_user_registration_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_wacv_abandoned_cart_record: Data: 32.55MB + Index: 0.00MB + Engine InnoDB
    kn_wacv_cart_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    kn_wacv_email_history: Data: 0.16MB + Index: 0.00MB + Engine InnoDB
    kn_wacv_guest_info_record: Data: 1.52MB + Index: 0.00MB + Engine InnoDB
    kn_wcpdf_invoice_number: Data: 0.36MB + Index: 0.00MB + Engine InnoDB
    kn_wcpdf_packing_slip_number: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    kn_wc_admin_notes: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
    kn_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_wc_category_lookup: Data: 0.06MB + Index: 0.00MB + Engine InnoDB
    kn_wc_customer_lookup: Data: 1.52MB + Index: 0.36MB + Engine InnoDB
    kn_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    kn_wc_gpf_render_cache: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    kn_wc_order_product_lookup: Data: 12.52MB + Index: 10.06MB + Engine InnoDB
    kn_wc_order_stats: Data: 1.52MB + Index: 0.72MB + Engine InnoDB
    kn_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    kn_wc_point_of_sale_sale_reports: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    kn_wc_pos_grid_tiles: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_wc_product_attributes_lookup: Data: 0.39MB + Index: 0.30MB + Engine InnoDB
    kn_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_wc_product_meta_lookup: Data: 1.52MB + Index: 1.09MB + Engine InnoDB
    kn_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_wc_reserved_stock: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
    kn_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_woocommerce_bundled_itemmeta: Data: 1.52MB + Index: 0.50MB + Engine InnoDB
    kn_woocommerce_bundled_items: Data: 0.05MB + Index: 0.05MB + Engine InnoDB
    kn_woocommerce_gpf_google_taxonomy: Data: 1.52MB + Index: 0.13MB + Engine InnoDB
    kn_woocommerce_shipping_table_rates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    kn_wps_hit: Data: 0.02MB + Index: 0.14MB + Engine InnoDB
    kn_wps_index: Data: 65.59MB + Index: 67.64MB + Engine InnoDB
    kn_wps_key: Data: 1.52MB + Index: 1.52MB + Engine InnoDB
    kn_wps_object_term: Data: 4.52MB + Index: 9.09MB + Engine InnoDB
    kn_wps_object_type: Data: 0.02MB + Index: 0.08MB + Engine InnoDB
    kn_wps_query: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_wps_uri: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_wps_user_agent: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_yoast_indexable: Data: 28.56MB + Index: 8.58MB + Engine InnoDB
    kn_yoast_indexable_hierarchy: Data: 1.52MB + Index: 2.33MB + Engine InnoDB
    kn_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    kn_yoast_primary_term: Data: 1.52MB + Index: 0.50MB + Engine InnoDB
    kn_yoast_prominent_words: Data: 3.52MB + Index: 3.03MB + Engine InnoDB
    kn_yoast_seo_links: Data: 5.52MB + Index: 3.03MB + Engine InnoDB
    kn_yoast_seo_meta: Data: 0.39MB + Index: 0.00MB + Engine InnoDB
    
    ### Post Type Counts ###
    
    attachment: 13369
    lsvrslide: 32
    nav_menu_item: 161
    oembed_cache: 196
    page: 47
    polylang_mo: 3
    popup: 19
    popup_theme: 8
    pos_grid: 1
    pos_outlet: 1
    pos_receipt: 1
    pos_register: 1
    pos_session: 1
    pos_temp_order: 1
    post: 103
    product: 7861
    productsliderwoo: 1
    revision: 2
    shop_coupon: 1
    shop_order: 10078
    shop_order_refund: 38
    spucpt: 1
    user_registration: 1
    wacv_email_template: 2
    wc_order_email: 3
    wc_order_status: 14
    woocarousel: 1
    wp_automatic: 1
    wpcf7_contact_form: 9
    wppopups: 1
    yith-wcbm-badge: 2
    ywrac_cart: 991
    ywrac_email: 5
    
    ### Security ###
    
    Secure connection (HTTPS): ✔
    Hide errors from visitors: ✔
    
    ### Active Plugins (49) ###
    
    Polylang Pro: by WP SYNTEX – 3.1
    Template Library and Redux Framework: by Extendify – 4.3.14
    All In One WP Security: by All In One WP Security & Firewall Team – 4.4.12
    ATUM Inventory Management for WooCommerce: by Stock Management Labs™ – 1.9.18.1
    Classic Editor: by WordPress Contributors – 1.6.2
    Cleanup Duplicate Meta: by WP Developers Club and Tonya – 1.0.2
    Contact Form 7: by Takayuki Miyoshi – 5.5.6.1
    Contact Form CFDB7: by Arshid – 1.2.6.4
    Custom Taxonomy Order: by Marcel Pol – 3.4.3
    Easy Auto SKU Generator for WooCommerce: by Dan Zakirov – 1.1.2
    Facebook for WooCommerce: by Facebook – 2.6.14
    Jetpack: by Automattic – 10.9.1
    WPBakery Page Builder: by Michael M - WPBakery.com – 6.5.0
    LSVR Toolkit (BeautySpot): by LSVRthemes – 2.1.3
    Popup Maker: by Popup Maker – 1.16.7
    Remove Uppercase Accents: by Giorgos Sarigiannidis – 1.1.1
    Advanced Editor Tools (previously TinyMCE Advanced): by Automattic – 5.6.0
    Transients Manager: by WPBeginner – 2.0.2
    WebP Express: by Bjørn Rosell – 0.25.5
    Widget Context: by Kaspars Dambis – 1.3.2
    Widget Shortcode: by Hassan Derakhshandeh – 0.3.5
    Woocommerce Customers Order History: by javmah – 5.2.1
    Hyyan WooCommerce Polylang Integration: by Hyyan Abo Fakher – 1.5.0
    WPC Smart Wishlist for WooCommerce: by WPClever – 2.9.9
    WooCommerce Abandoned Cart Recovery Premium: by VillaTheme – 1.0.6
    WooCommerce Auto Restore Stock: by Gerhard Potgieter – 1.0.1
    WooCommerce Cost of Goods: by SkyVerge – 2.11.1
    WooCommerce Stripe Gateway: by WooCommerce – 6.4.0
    WooCommerce KrisNails Cart: by Oleg Fedoriaka – 1.1.5
    WooCommerce KrisNails Cash On Pickup: by Oleg Fedoriaka – 1.0.1
    WooCommerce KrisNails Fees: by Oleg Fedoriaka – 1.0.0
    WooCommerce KrisNails Shipping: by Oleg Fedoriaka – 2.0.0
    WooCommerce Order Status Manager: by SkyVerge – 1.13.3
    WooCommerce PayPal Payments: by WooCommerce – 1.8.0
    WooCommerce PDF Invoices & Packing Slips: by WP Overnight – 2.14.5
    Point of Sale for WooCommerce: by Actuality Extensions – 5.5.4
    WooCommerce Product Bundles: by SomewhereWarm – 6.7.3
    WooCommerce Google Product Feed: by Ademti Software Ltd. – 10.6.0 (update to version 10.7.1 is available)
    WooCommerce Product Search: by itthinx – 4.4.0 (update to version 4.6.0 is available)
    WooCommerce Shipment Tracking: by WooCommerce – 1.7.0
    WooCommerce: by Automattic – 6.5.1
    BulkGate SMS Plugin for WooCommerce: by BulkGate – 2.1.0
    Yoast SEO Premium: by Team Yoast – 15.9
    WP-Optimize - Clean, Compress, Cache: by David Anderson
    Ruhani Rabin
    Team Updraft – 3.2.3
    
    WPFront Scroll Top: by Syam Mohan – 2.0.7.08086
    Yoast SEO: Local: by Team Yoast and Arjan Snaterse – 13.8
    Yoast SEO: WooCommerce: by Team Yoast – 13.9
    YITH WooCommerce Badge Management: by YITH – 2.5.0
    YITH WooCommerce Customize My Account Page: by YITH – 2.6.1
    
    ### Inactive Plugins (0) ###
    
    ### Must Use Plugins (1) ###
    
    KrisNails Plugins Organizer: by  – 1.0
    
    ### Settings ###
    
    API Enabled: –
    Force SSL: –
    Currency: EUR (€)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: bundle (bundle)
    external (external)
    grouped (grouped)
    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: –
    
    ### WC Pages ###
    
    Shop base: #26158 - /eshop/
    Basket: #221 - /cart/
    Checkout: #222 - /checkout/
    My account: #13310 - /account/
    Terms and conditions: ❌ Page not set
    
    ### Theme ###
    
    Name: BeautySpot
    Version: 3.0.3
    Author URL: http://themeforest.net/user/LSVRthemes/portfolio
    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
    
    WooCommerce Support: ✔
    
    ### Templates ###
    
    Archive Template: Your theme has a woocommerce.php file. You will not be able to override the woocommerce/archive-product.php custom template since woocommerce.php has priority over archive-product.php. This is intended to prevent display issues.
    Overrides: beautyspot/woocommerce/cart/cart-shipping.php
    beautyspot/woocommerce/cart/cart-totals.php
    beautyspot/woocommerce/cart/shipping-calculator.php
    beautyspot/woocommerce/checkout/form-billing.php
    beautyspot/woocommerce/checkout/form-checkout.php
    beautyspot/woocommerce/checkout/form-pay.php
    beautyspot/woocommerce/checkout/form-shipping.php
    beautyspot/woocommerce/checkout/payment-method.php
    beautyspot/woocommerce/checkout/payment.php
    beautyspot/woocommerce/emails/admin-new-order.php
    beautyspot/woocommerce/emails/customer-invoice.php
    beautyspot/woocommerce/emails/customer-new-account.php
    beautyspot/woocommerce/emails/customer-note.php
    beautyspot/woocommerce/emails/customer-on-hold-order.php
    beautyspot/woocommerce/emails/customer-processing-order.php
    beautyspot/woocommerce/emails/customer-reset-password.php
    beautyspot/woocommerce/emails/email-addresses.php
    beautyspot/woocommerce/emails/email-footer.php
    beautyspot/woocommerce/emails/email-header.php
    beautyspot/woocommerce/emails/email-order-details.php
    beautyspot/woocommerce/emails/email-order-items.php
    beautyspot/woocommerce/emails/email-styles.php
    beautyspot/woocommerce/global/breadcrumb.php
    beautyspot/woocommerce/loop/add-to-cart.php
    beautyspot/woocommerce/loop/result-count.php
    beautyspot/woocommerce/myaccount/dashboard.php
    beautyspot/woocommerce/myaccount/form-edit-account.php
    beautyspot/woocommerce/myaccount/form-edit-address.php
    beautyspot/woocommerce/myaccount/form-login.php
    beautyspot/woocommerce/myaccount/form-lost-password.php
    beautyspot/woocommerce/myaccount/orders.php
    beautyspot/woocommerce/product-searchform.php
    beautyspot/woocommerce/single-product/add-to-cart/simple.php
    beautyspot/woocommerce/single-product/product-attributes.php
    beautyspot/woocommerce/single-product/tabs/tabs.php
    
    ### WooCommerce Google Product Feed feeds ###
    
    google: Google merchant centre product feed
      Type: google
      Category filter: -
      Categories: -
    
    ### WooCommerce Google Product Feed options ###
    
    Include variations in feed: Enabled
    Send "item group ID": Enabled
    Expanded schema markup: -
    Debug key: 5c4afa95-504c-40a8-9e54-8914752e991e
    
    ### WooCommerce Google Product Feed fields ###
    
    Title: Pre-populates from product product_title.
    Product description: Main product description (short preferred) plus variation description
    Bundle indicator (is_bundle): 
    Brand: Defaults to "Global Fashion". Pre-populates from pa_brand taxonomy.
    Manufacturer Part Number (MPN): Pre-populates from MPN field from Yoast WooCommerce SEO.
    Global Trade Item Number (GTIN): Pre-populates from Any of GTIN fields from Yoast WooCommerce SEO.
    Colour: Pre-populates from pa_χρωμα taxonomy.
    Size system: 
    Availability (in stock products): Defaults to "in stock".
    Availability (backordered products): Defaults to "in stock".
    Availability (out of stock products): Defaults to "out of stock".
    
    ### WooCommerce Google Product Feed DB status ###
    
    Database version: 15
    Active database version: 15
    wc_gpf_render_cache: Empty
    woocommerce_gpf_google_taxonomy (en-US): 5595 items
    
    ### Product Bundles ###
    
    Database Version: 6.7.3
    Loopback Test: ✔
    Template Overrides: beautyspot/woocommerce/single-product/add-to-cart/bundle-add-to-cart-wrap.php
    beautyspot/woocommerce/single-product/bundled-item-optional.php
    
    ### WooCommerce PayPal Payments ###
    
    Onboarded: ✔
    Shop country code: GR
    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: ✔
    
    ### Action Scheduler ###
    
    Canceled: 1
    Oldest: 2022-05-01 03:41:12 +0300
    Newest: 2022-05-01 03:41:12 +0300
    
    Complete: 5,984
    Oldest: 2022-04-24 16:30:04 +0300
    Newest: 2022-05-25 15:37:25 +0300
    
    Failed: 119
    Oldest: 2021-10-23 00:30:02 +0300
    Newest: 2021-11-16 17:30:03 +0200
    
    Pending: 3
    Oldest: 2022-05-25 15:41:03 +0300
    Newest: 2022-05-26 15:11:14 +0300
    
    ### WooCommerce Polylang Integration ###
    
    Language Locale: el
    Polylang Language Locale: el
    Polylang Available Languages: el (WooCommerce translation file found OK at /usr/www/users/krisna/wp-content/languages/plugins/woocommerce-el.mo) en_US (WooCommerce translation file found OK at /usr/www/users/krisna/wp-content/languages/plugins/woocommerce-en_US.mo) ru_RU (WooCommerce translation file found OK at /usr/www/users/krisna/wp-content/languages/plugins/woocommerce-ru_RU.mo)
    
    ### Status report information ###
    
    Generated at: 2022-05-25 15:42:24 +03:00
    
    • This reply was modified 8 months, 1 week ago by Oleg.
    Plugin Support Joseph B. (a11n)

    (@tamirat22)

    To rule out any conflict issues with your theme or with the active plugins listed above, could you please go through these checklists as a way to determine what is causing this?

    To go through these checklists, it sounds like a staging site would be a good idea. If your host doesn’t offer that option, we recommend WP Staging for quickly spinning up a new test site.

    • 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 the conflict. You can find a more detailed explanation of how to do a conflict test here.

    Hope this helps!

    Thread Starter Oleg

    (@submedia)

    Dear Joseph,

    I replicated production site to dev and did exact what you’ve advised:

    • Switched theme to Storefront
    • Disabled all plugins except WooCommerce
    • Turned On / Off the “Hide out of stock items from the catalog”

    Unfortunately, the problem remains, the same products as on prod that are in stock become visible / invisible.

    Plugin Support Mashi

    (@shaonback2)

    Hello @submedia!

    I see you have some pending and failed tasks. Can you please try running those and see if that helps?
    You can use this plugin https://wordpress.org/plugins/wp-crontrol/ to run them all.

    Let us know how it goes.

    Thread Starter Oleg

    (@submedia)

    Hi there,

    I gave a try to run failed / pending tasks, it didn’t help.

    I also checked DB records like post_meta.stock, post_meta.stock_status, wc_product_meta_lookup.stock_quantity, wc_product_meta_lookup.stock_status, of problematic products but something suspicious not found.

    Worth to mention that the problem concerns old products i.e. created and published a year+ ago. Some of these products when edited become invisible after some time.

    Earlier I wrote a snippet (see below) to make all products featured and back in order to overcome the issue but the issue came back again.

    
    $args = array( 'offset' => 0, 'limit' => 300 );
    while( ! empty( $products = wc_get_products( $args ) ) ) {
    	foreach ( $products as $product ) {
    		if ( $product->is_featured() ) {
    			$product->set_featured( false );
    			$product->save();
    			$product->set_featured( true );
    			$product->save();
    		} else {
    			$product->set_featured( true );
    			$product->save();
    			$product->set_featured( false );
    			$product->save();
    		}
    	}
    	$args['offset'] += 300;
    }
    
    Plugin Support Igor H woo-hc

    (@ihereira)

    Hello,

    Sorry to hear this issue is still present.

    To take a closer look, please provide the Error Log: It is found under WooCommerce > System Status > Logs (if available).

    Thanks.

    Thread Starter Oleg

    (@submedia)

    Hi Igor,

    I enabled debug as follows:

    
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', true );
    define( 'SCRIPT_DEBUG', true );
    @ini_set( 'display_errors', 1 );
    

    There is only one test-log.log in WooCommerce > Status > System Status > Logs which is empty. The same I’m able to see in the directory /wp-content/uploads/wc-logs. /wp-content/uploads/ur-logs directory is empty as well.

    Also, I went to live server HTTP error logs, trying to constantly reload the products page with the problematic product and nothing goes for log.

    I suppose it might be something wrong with the product data stored in DB leading to the issue.

    Any other ideas?

    Thank you

    Plugin Support Joseph B. (a11n)

    (@tamirat22)

    Hello @submedia!

    Thanks for the follow-up again!

    Any other ideas?

    Could you please try re-saving the data for one of the In-Stock products that are over a year old and are being hidden when the “Hide out of stock items” setting is enabled?

    If you find that the products in question are no longer hidden after having re-saved the data for these products, please consider re-saving the products in bulk without making any changes to make sure the data for these products are properly saved.

    Let us know how it turns out!

    Thread Starter Oleg

    (@submedia)

    Hello Joseph,

    By “re-saving the data for one of the In-Stock products” you mean to open the product edit page and press Update button, right?

    I tried this having “Hide out of stock items from the catalog” option On. It doesn’t work. The product in question still hidden.

    I managed to get it visible only making product to be featured On / Off either from WooCoommerce > Products page or programatically.

    As I wrote in one of previous replies to overcome the issue I turned all products to be featured and back programatically but editing old products leads to the same problem again.

    That would be great to figure our the key reason why it happens, what is the difference between normal products and products in question.

    Thanks

    Plugin Support Joseph B. (a11n)

    (@tamirat22)

    Hello @submedia!

    By “re-saving the data for one of the In-Stock products” you mean to open the product edit page and press Update button, right?

    Yes, that is what was meant.

    However, please note that some plugins might cause issues with stock data/status being stored/retained correctly.

    What I would advise is to try the same procedures while in conflict-test mode as mentioned above. As a reminder, I would advise using WP Staging to set up your testing environment.

    That way, we will find out if there is such a plugin that is interfering with your stock data/status from being stored properly.

    what is the difference between normal products and products in question

    By “products in question”, I meant products that were hidden, while the “Hide out of stock items from the catalog” option was on, even though the products were in stock.

    Let us know how it turns out! We will be here!🙂

    Thread Starter Oleg

    (@submedia)

    Hello Joseph,

    However, please note that some plugins might cause issues with stock data/status being stored/retained correctly.

    Completely agree with you. That’s might be definitely due to some plugin. If I ever figure out which plugin cause issue I’ll come back.

    Thank you all for your assistance!

    Plugin Support Paulo P – a11n

    (@paulostp)

    Hello,

    If I ever figure out which plugin cause issue I’ll come back.
    Thank you all for your assistance!

    Please, do let us know if you find the cause for the issue. Thanks!

    Plugin Support Paulo P – a11n

    (@paulostp)

    Hello @submedia,

    This topic has been inactive for a while, so I’m closing it.

    Please open a new topic if you need additional assistance.

    Any fix for this found? Having the same exact issue since updated to Woo 7.x.x. Was not an issue with 6.9.x…

    This guys found indicates that Woo messes with the database in WP_terms:
    https://wordpress.org/support/topic/hide-products-out-of-stock-also-hides-product-labeled-instock/

    • This reply was modified 2 months, 3 weeks ago by mike8040.
Viewing 15 replies - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.