Trying to change the text on Back Orders in the cart with Blocks
-
I have both classic and woo blocks basket on the basket page at the moment. I have it working on the classic cart, but not happening for woo blocks.
This is a pre-order product to test.
https://emerc38.sg-host.com/product/clifdens-churches-wall-panel/This is the current code I have in that works with FiboSearch in the dropdown menu for the basket and the classic cart. But not in blocks. This is driving me nuts at this stage. I happened to find a bug in blocks with this project too with an empty Ajax call, now fixed and going in the next release.
function woocommerce_custom_cart_item_name( $_product_title, $cart_item, $cart_item_key ) {
if ( $cart_item[‘data’]->backorders_require_notification() && $cart_item[‘data’]->is_on_backorder( $cart_item[‘quantity’] ) ) {
$_product_title .= __( ‘<br />PRE-ORDER ITEM‘, ‘woocommerce’ ) ;
}
return $_product_title;
}
add_filter( ‘woocommerce_cart_item_name’, ‘woocommerce_custom_cart_item_name’, 10, 3);`The page I need help with: [log in to see the link]
- The topic ‘Trying to change the text on Back Orders in the cart with Blocks’ is closed to new replies.