0

I have managed to change the "backorder allowed" text on catalog and product pages using this solution.

However, I would also like to change the "backorder allowed" text on cart page (and possibly on checkout, though I haven't seen it on checkout). The accepted solution for a similar question doesn't work (anymore).

OC2PS
  • 1,037
  • 3
  • 19
  • 34

1 Answers1

0

Adding this to my functions.php worked for me:

/* --- Out of stock (Backorder) message ON CART PAGE --- */
function custom_cart_item_backorder_notification( $html, $product_id ){
    $html = '<p class="backorder_notification">' . esc_html__( 'My custom text', 'storefront' ) . '</p>';
    return $html;
}
add_filter( 'woocommerce_cart_item_backorder_notification', 'custom_cart_item_backorder_notification', 10, 2 );
OC2PS
  • 1,037
  • 3
  • 19
  • 34