In Stock Items Remove Available on Backorder text

/**

  • Remove Can be Backordered from In Stock Products
    */
    add_filter( ‘woocommerce_get_availability_text’, ‘filter_product_availability_text’, 10, 2 );
    function filter_product_availability_text( $availability, $product ) {

    if( $product->backorders_require_notification() ) {
    $availability = str_replace(’(can be backordered)’, ‘’, $availability);
    }
    return $availability;
    }

I found this update to the PHP, but it doesn’t completely work.
If the inventory on an item is negative it just says OUT OF STOCK instead of the AVAILABLE ON BACKORDER.

Any advice?

Jesse

Sorry! nevermind, there was a caching error i guess, seems to be working now.

Glad to hear it’s sorted, Jesse.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.