New Landing How can we help? Atelier Customize pop up Sold Out flag on Catalog Pge

Viewing 2 posts - 1 through 2 (of 2 total)
  • Posted in: Atelier
  • #268433
    Katie Sutton
    Member
    Post count: 104

    Hello,
    I used this code in my Child Theme functions file to change “out of stock” to “Sold out or allocated to club” on my indiv prod pages but it does not seem to drive the little pop up flag on the catalog page and I can’t quite figure out what does. Any chance you could help me out?

    /**
    * Change Out of Stock Text
    */

    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’] = __(‘Sold Out or Allocated to Club’, ‘woocommerce’);
    }

    return $availability;
    }

    Thanks in advance,
    Katie

    #268434
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Try this plugin instead to translate that string.

    Real-Time Find and Replace

    -Rui

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register