• Resolved antoniop80

    (@antoniop80)


    Hi,

    I love the plugin, and I used for another custom made label.
    Now, for same reason, the custom made label for the out of stock status, in a product, is not displayed.

    In label conditions, I have:
    Stock Status > equal to > Out of stock
    Then just a few standard label settings

    In the plugin Settings > General, I have:
    Show default ‘out-of-stock’ label > Show

    In WooCommerce > Settings > Products > Inventory > Out of stock visibility, I have:
    Not ticked

    Can you help?

    TIA,
    AP

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author ILLID

    (@mihail-barinov)

    Hi,

    In your shop I see the following label – https://prnt.sc/1Ng2AHyTeIp3 . Or it is not the one that you need?

    Regards

    Thread Starter antoniop80

    (@antoniop80)

    Hi,

    That was added programmatically by using a PHP snippet. I leave it below just for reference:

    /* OUT OF STOCK custom label displayed on products in the Shop Page */
    add_action( 'woocommerce_after_shop_loop_item_title', 'show_stock_shop', 10 );
    
    function show_stock_shop() {
        global $product;
        if($product->managing_stock() && (int)$product->get_stock_quantity() < 1)
        echo '<p id="shop-out-of-stock" style="color: white; font-size: 14px; font-weight: 500; background: orange; border: 1px solid red; width: fit-content; padding: 6px 12px; margin: 0 auto;">'.__('Out of stock').'</p>';
    }

    I wanted to use your plugin for the creation of the label and for some reason doesn’t work as reported in my original post.

    Plugin Author ILLID

    (@mihail-barinov)

    I see. So do you have this problem only when creating out-of-stock labels or with any other labels created with the plugin too?

    Thread Starter antoniop80

    (@antoniop80)

    The issue only happens when creating out-of-stock labels. For example, in this link on a different section of the website, https://my-brands.cy/product-category/shop/kids-water-bottles/, the custom label “New!” was created by using your plugin and it works perfectly.

    Is it some WooCommerce setting that doesn’t let your plugin work as expected?

    The page builder in use is Elementor Pro, in case this is relevant.

    Thank you.

    Plugin Author ILLID

    (@mihail-barinov)

    I see. Please tell me – are you using any plugins to modify/add products stock statuses?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Out of stock status/label not displayed in shop page’ is closed to new replies.