Hope you guys can help.
I’m working on a WooCommerce
shop that sells software-plans for 1 product. Therefor I’ve deactivated the cart-page and made it possible only to have 1 item in the checkout (old items are automaticly removed).
What I need, is too echo out
the product name in the "cart"
before the checkout fields.
E.g. “Yaaay, you selected the XXXX-plan!”.
I tried to use below code from the review-order.php
, but no luck.
<?php echo apply_filters( 'woocommerce_cart_item_name', $_product->get_title(), $cart_item, $cart_item_key ) . ' '; ?>
Any ideas? Thank you in advance.
You can use ‘woocommerce_before_checkout_billing_form’ hook or ‘woocommerce_checkout_before_order_review’ hook to add your Title for product purchased in cart.
Basically
Or
Use one of the codes as per your requirement of location where the Title needs to be displayed.