How can i change the product name on a WooCommerce checkout page? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 hours ago. Improve this question I tried using this code to change the name of the product on the checkout page and it does change the name but then my checkout page has a circle over the product display area and another circle over the credit card form that spins endlessly. foreach ( $cart->get_cart() as $cart_item ) { // Only for the defined product ID (or variation ID) if ( in_array( $defined_product_id, [ $cart_item['product_id'], $cart_item['variation_id'] ] ) ) { $new_prod = strval( $_GET['new_product_name'] ); $cart_item['data']->set_price( $new_price ); $cart_item['data']->set_name( $new_prod ); } Thanks, I tested set_name( "abc" ); and that worked without the spinning but how do I get a value from the URL to work properly?

Comment (0)

You’ll be in good company