• Resolved arsoboy

    (@arsoboy)


    hello mike,

    after upgrading from woocommerce 2.6.9 to 3.1.1 (released a few days ago). i found out of stock products are still counting in loop & disturbing product grid view on my site.
    for example: sometime it shows 9 products instead 12 but out of stock products are existed in posts object returned by wp_query.

    get_term_by( 'name', 'outofstock', 'product_visibility' )
    Result of above function

    WP_Term Object
    (
        [term_id] => 705
        [name] => outofstock
        [slug] => outofstock
        [term_group] => 0
        [term_taxonomy_id] => 706
        [taxonomy] => product_visibility
        [description] => 
        [parent] => 0
        [count] => 781
        [filter] => raw
    )

    followed this link as well but no luck yet.
    https://iconicwp.com/hide-stock-products-woocommerce-catalog-pages/

    no error after WP_DEBUG = true
    system status available upon request.

    thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter arsoboy

    (@arsoboy)

    
    ### WordPress Environment ###
    
    Home URL: https://brmbeta.fashionvillaz.com
    Site URL: https://brmbeta.fashionvillaz.com
    WC Version: 3.1.1
    Log Directory Writable: ?
    WP Version: 4.8
    WP Multisite: –
    WP Memory Limit: 512 MB
    WP Debug Mode: ?
    WP Cron: ?
    Language: en_US
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: ? 5.3.27 - We recommend a minimum PHP version of 5.6. See: How to update your PHP version
    PHP Post Max Size: 8 MB
    PHP Time Limit: 30
    PHP Max Input Vars: 1000
    cURL Version: 7.24.0
    OpenSSL/1.0.0
    
    SUHOSIN Installed: ?
    MySQL Version: ? 5.5.55 - We recommend a minimum MySQL version of 5.6. See: WordPress requirements
    Max Upload Size: 4 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 3.1.1
    WC Database Prefix: wp_
    woocommerce_sessions: ?
    woocommerce_api_keys: ?
    woocommerce_attribute_taxonomies: ?
    woocommerce_downloadable_product_permissions: ?
    woocommerce_order_items: ?
    woocommerce_order_itemmeta: ?
    woocommerce_tax_rates: ?
    woocommerce_tax_rate_locations: ?
    woocommerce_shipping_zones: ?
    woocommerce_shipping_zone_locations: ?
    woocommerce_shipping_zone_methods: ?
    woocommerce_payment_tokens: ?
    woocommerce_payment_tokenmeta: ?
    
    ### Security ###
    
    Secure connection (HTTPS): ?Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates.
    Hide errors from visitors: ?Error messages should not be shown to visitors.
    
    ### Active Plugins (16) ###
    
    Advanced Access Manager: by Vasyl Martyniuk  – 3.9.2.2
    Advanced Custom Fields PRO: by Elliot Condon – 5.5.9
    All In One WP Security: by Tips and Tricks HQ
    Peter
    Ruhul
    Ivy – 4.2.5
    
    WooCommerce Keenu Gateway: by WooThemes – 1.0
    WooCommerce Nosto Tagging: by Nosto Solutions Ltd – 1.1.1
    WooCommerce Product Filter: by Mihajlovic Nenad – 6.1.1
    Sucuri Security - Auditing, Malware Scanner and Hardening: by Sucuri
    Inc – 1.8.3
    
    Woocommerce Export Products to XLS: by Spyros Vlachopoulos – 0.5.8
    EasyPay - WooCommerce Gateway: by Team WindelSolutions – 1.0.0
    WooCommerce Order Status Manager: by WooThemes / SkyVerge – 1.6.2 – 1.7.1 is available
    WooCommerce PDF Invoices & Packing Slips: by Ewout Fernhout – 1.5.39
    WooCommerce PickingPal: by PickingPal – 1.2.9 – 1.3.0 is available
    WooCommerce Product Stocktake: by Colorlabs & Company – 1.1.1
    WooCommerce Shipment Tracking: by WooCommerce – 1.6.3 – 1.6.8 is available
    WooCommerce: by Automattic – 3.1.1
    Yoast SEO Premium: by Team Yoast – 4.0
    
    ### Settings ###
    
    API Enabled: ?
    Force SSL: –
    Currency: PKR (Rs.)
    Currency Position: left_space
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 0
    Taxonomies: Product Types: 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-3 (rated-3-2)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    ### WC Pages ###
    
    Shop base: #12 - /shop/
    Cart: #13 - /cart/
    Checkout: #14 - /checkout/
    My account: #15 - /my-account/
    
    ### Theme ###
    
    Name: Shop Brumano
    Version: 2.0
    Author URL: https://www.windelsolutions.com
    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 ###
    
    Overrides: shopbrumano/woocommerce/archive-product.php
    shopbrumano/woocommerce/cart/cart-shipping.php
    shopbrumano/woocommerce/cart/cart-totals.php
    shopbrumano/woocommerce/cart/cart.php
    shopbrumano/woocommerce/cart/mini-cart.php
    shopbrumano/woocommerce/cart/proceed-to-checkout-button.php
    shopbrumano/woocommerce/checkout/form-billing.php
    shopbrumano/woocommerce/checkout/form-checkout.php
    shopbrumano/woocommerce/checkout/form-coupon.php
    shopbrumano/woocommerce/checkout/form-pay.php
    shopbrumano/woocommerce/checkout/form-shipping.php
    shopbrumano/woocommerce/checkout/payment.php
    shopbrumano/woocommerce/checkout/review-order.php
    shopbrumano/woocommerce/checkout/terms.php
    shopbrumano/woocommerce/checkout/thankyou.php
    shopbrumano/woocommerce/content-product.php
    shopbrumano/woocommerce/content-single-product.php
    shopbrumano/woocommerce/emails/admin-cancelled-order.php
    shopbrumano/woocommerce/emails/admin-failed-order.php
    shopbrumano/woocommerce/emails/admin-new-order.php
    shopbrumano/woocommerce/emails/customer-completed-order.php
    shopbrumano/woocommerce/emails/customer-invoice.php
    shopbrumano/woocommerce/emails/customer-new-account.php
    shopbrumano/woocommerce/emails/customer-note.php
    shopbrumano/woocommerce/emails/customer-on-hold-order.php
    shopbrumano/woocommerce/emails/customer-processing-order.php
    shopbrumano/woocommerce/emails/customer-refunded-order.php
    shopbrumano/woocommerce/emails/customer-reset-password.php
    shopbrumano/woocommerce/emails/email-addresses.php
    shopbrumano/woocommerce/emails/email-customer-details.php
    shopbrumano/woocommerce/emails/email-footer.php
    shopbrumano/woocommerce/emails/email-header.php
    shopbrumano/woocommerce/emails/email-order-details.php
    shopbrumano/woocommerce/emails/email-order-items.php
    shopbrumano/woocommerce/emails/email-styles.php
    shopbrumano/woocommerce/global/form-login.php
    shopbrumano/woocommerce/global/quantity-input.php
    shopbrumano/woocommerce/global/wrapper-end.php
    shopbrumano/woocommerce/global/wrapper-start.php
    shopbrumano/woocommerce/loop/add-to-cart.php
    shopbrumano/woocommerce/loop/loop-end.php
    shopbrumano/woocommerce/loop/loop-start.php
    shopbrumano/woocommerce/loop/orderby.php
    shopbrumano/woocommerce/loop/pagination.php
    shopbrumano/woocommerce/loop/price.php
    shopbrumano/woocommerce/loop/sale-flash.php
    shopbrumano/woocommerce/myaccount/form-edit-account.php
    shopbrumano/woocommerce/myaccount/form-edit-address.php
    shopbrumano/woocommerce/myaccount/form-login.php
    shopbrumano/woocommerce/myaccount/my-account.php
    shopbrumano/woocommerce/myaccount/my-address.php
    shopbrumano/woocommerce/myaccount/my-orders.php
    shopbrumano/woocommerce/myaccount/navigation.php
    shopbrumano/woocommerce/myaccount/orders.php
    shopbrumano/woocommerce/myaccount/view-order.php
    shopbrumano/woocommerce/notices/error.php
    shopbrumano/woocommerce/notices/notice.php
    shopbrumano/woocommerce/notices/success.php
    shopbrumano/woocommerce/order/order-details-customer.php
    shopbrumano/woocommerce/order/order-details-item.php
    shopbrumano/woocommerce/order/order-details.php
    shopbrumano/woocommerce/single-product/add-to-cart/variable.php
    shopbrumano/woocommerce/single-product/add-to-cart/variation-add-to-cart-button.php
    shopbrumano/woocommerce/single-product/add-to-cart/variation.php
    shopbrumano/woocommerce/single-product/price.php
    shopbrumano/woocommerce/single-product/product-image.php
    shopbrumano/woocommerce/single-product/product-thumbnails.php
    shopbrumano/woocommerce/single-product/related.php
    shopbrumano/woocommerce/single-product/sale-flash.php
    shopbrumano/woocommerce/single-product/short-description.php
    shopbrumano/woocommerce/single-product.php
    
    

    Following update, I’m experiencing a similar issue. However, get_term_by( 'name', 'outofstock', 'product_visibility' ) returns no results for me.

    ### WordPress Environment ###
    
    Home URL: https://blazingshuttles.com
    Site URL: https://blazingshuttles.com
    WC Version: 3.1.1
    Log Directory Writable: ?
    WP Version: 4.8
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    WP Cron: ?
    Language: en_US
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 5.6.31
    PHP Post Max Size: 8 MB
    PHP Time Limit: 30
    PHP Max Input Vars: 1000
    cURL Version: 7.54.0
    OpenSSL/1.0.2k
    
    SUHOSIN Installed: –
    Max Upload Size: 2 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 3.1.1
    WC Database Prefix: wp_
    woocommerce_sessions: ?
    woocommerce_api_keys: ?
    woocommerce_attribute_taxonomies: ?
    woocommerce_downloadable_product_permissions: ?
    woocommerce_order_items: ?
    woocommerce_order_itemmeta: ?
    woocommerce_tax_rates: ?
    woocommerce_tax_rate_locations: ?
    woocommerce_shipping_zones: ?
    woocommerce_shipping_zone_locations: ?
    woocommerce_shipping_zone_methods: ?
    woocommerce_payment_tokens: ?
    woocommerce_payment_tokenmeta: ?
    
    ### Security ###
    
    Secure connection (HTTPS): ?Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates.
    Hide errors from visitors: ?
    
    ### Active Plugins (16) ###
    
    Cloudflare: by John Wineman
    Furkan Yilmaz
    Junade Ali (Cloudflare Team) – 3.3.1
    
    Contact Form 7: by Takayuki Miyoshi – 4.8
    Facebook Widget: by Milap Patel – 4.2
    Google Analyticator: by SumoMe – 6.5.3
    Google XML Sitemaps: by Arne Brachhold – 4.0.8
    Resize images before upload: by Simon @ WPsites – 1.8
    Storefront Product Sharing: by WooThemes – 1.0.4
    Storefront Sticky Add to Cart: by WooThemes – 1.1.6
    The Events Calendar: by Modern Tribe
    Inc. – 4.5.8
    
    WooCommerce Print Invoice & Delivery Note: by Triggvy Gunderson – 4.1.5
    WooCommerce USPS Shipping: by WooCommerce – 4.4.8
    WooCommerce: by Automattic – 3.1.1
    WooSidebars: by WooThemes – 1.4.3
    YITH Plugin Framework Temporary Fix: by YITHEMES – 1.0.0
    YITH WooCommerce Gift Cards Premium: by YITHEMES – 1.6.9
    NextGEN Gallery: by Imagely – 2.2.10
    
    ### Settings ###
    
    API Enabled: ?
    Force SSL: –
    Currency: USD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    gift-card (gift-card)
    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)
    
    ### WC Pages ###
    
    Shop base: #15 - /shop/
    Cart: #16 - /cart/
    Checkout: #17 - /checkout/
    My account: #18 - /my-account/
    
    ### Theme ###
    
    Name: Storefront
    Version: 2.2.4
    Author URL: https://woocommerce.com/
    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 ###
    
    Overrides: –
    
    Thread Starter arsoboy

    (@arsoboy)

    @libertie

    issue sorted at my end. i had a plugin named “WooCommerce Product Filter: by Mihajlovic Nenad – 6.1.1” which became my headache… its get normal here after de-activing that plugin.
    i would recommend you to deactive all plugins (except woocommerce) & switch theme to any default wp-theme & check again the issue if it seems resolved then its must be related to any plugin.
    then switch to your current theme & re-activate plugin one by one. hope it will be helpful for you ??

    @arsoboy, Sadly, plugins are not my problem. I’ve tried disabling everything and rolling back to the Twenty Seventeen theme. No luck.

    I assume that I need to resolve the fact that get_term_by( 'name', 'outofstock', 'product_visibility' ) returns no result. @mikejolley, Do you have any suggestion for a botched upgrade to to 3.x?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘out of stock products are still counting in loop on shop/category archive pages?’ is closed to new replies.