Changing "Sold Out" image overlay text

Home Forums Jevelin Theme Changing "Sold Out" image overlay text

Home Forums Jevelin Theme Changing "Sold Out" image overlay text

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • WHD
    Participant

    Is there any way to change the text that appears on the “Sold Out”  bubble that shows on the woocommerce product image?  It’s not pulling it from the regular woocommerce “availability” field.

     

    Thanks.

    Hi @WHD,

     

    I hope you are well today and thank you for your question.

     

    You can change it as described in the following pages.

     

    https://www.templatemonster.com/help/woocommerce-how-to-change-in-stock-out-of-stock-text-displayed-on-a-product-page.html

    http://kb.oboxthemes.com/articles/how-do-i-change-the-out-of-stock-text/

     

    Best regards,
    Shufflehound team

    WHD
    Participant

    I’ve already done that and it changes the text within the body on the product page, but does not change the bubble text that overlays on the images.  As mentioned, that doesn’t seem to be using the standard woocommerce availability value.

    Attachments:
    You must be logged in to view attached files.

    Could you please share me the page URL from your site where it is displaying so that i can help you to change it?

    WHD
    Participant

    Sure here it is:

    https://socialsparklingwine.com/buy/

     

    And you’ll see if you click through to a product and look below the description it says “Back in Stock Soon”, which is coming from this:

     

    add_filter( ‘woocommerce_get_availability’, ‘wcs_custom_get_availability’, 1, 2);
    function wcs_custom_get_availability( $availability, $_product ) {

    // Change Out of Stock Text
    if ( ! $_product->is_in_stock() ) {
    $availability[‘availability’] = __(‘Back In Stock Soon!’, ‘woocommerce’);
    }
    return $availability;
    }

    WHD
    Participant

    This is the html output of the part I’m trying to change:

     

    <span class=”sh-popover-mini sh-popover-mini-dark sh- fadeIn” style=”visibility: visible; animation-name: fadeIn;”>Sold out</span>

    I can see it is displayed by the following theme code added in the theme file /jevelin/woocommerce/loop/sale-flash.php so it is translation ready.

     

    if ( $product->is_in_stock() && $product->is_on_sale() ) {
    	echo apply_filters( 'woocommerce_sale_flash', '<span class="sh-popover-mini">' . esc_html__( 'Sale!', 'jevelin' ) . '</span>', $post, $product );
    } else if( ! $product->is_in_stock() ) {
    	echo apply_filters( 'woocommerce_sale_flash', '<span class="sh-popover-mini sh-popover-mini-dark">' . esc_html__( 'Sold out', 'jevelin' ) . '</span>', $post, $product );
    }

     

    You can change this translation ready text either by translating the theme or using any of the following plugins. Please note the theme domain is jevelin

     

    https://wordpress.org/plugins/say-what/

    https://wordpress.org/plugins/real-time-find-and-replace/

     

     

     

Viewing 7 posts - 1 through 7 (of 7 total)

Popular choice

Professional Developers At Your Fingertips!

If you need services beyond standard support, we've got your back!

Services we offer:

Demo setup
Advanced customization
Layout adjustment
Graphic work / visualizations
Custom coding
Full WordPress development and design

Services

What we can offer

  • Demo setup +

    If you'd prefer not to handle the installation yourself or need help getting started, we'll set everything up for you.

  • Layout adjustment +

    We'll help you rearrange sections, adjust spacing, and modify the page structure to fit your needs.

  • Advanced customization +

    More complex styling changes, theme option modifications, and third-party integrations.

  • Custom coding +

    If you need something that's not included in the theme, we can code it for you.

  • Graphic work / visualizations +

    Web design services to create custom sections, pages, and blocks for your theme, plus graphics and visualizations.

  • Full WordPress development and design +

    Full website builds, custom theme development, or plugin creation from scratch.

  • About pricing +

    We'll provide a clear quote based on what you need. No hidden fees.

Professional Developers At Your Fingertips!

Custom Work Form