I want to change the text of the place order text if the order total is 0 to be something different which is for the free orders.
I tried this
add_filter( 'woocommerce_order_button_text', 'misha_custom_button_text' );
function misha_custom_button_text( $button_text ) {
return 'Submit'; // new text is here
}
I hope i find a solution
Best Regards
2
Answers
Replace your function with below and try once if it work for you.
You can get cart total from
WC()->cart->cart_contents_total
and apply condition whatever you want.Hope this helps you.
Replace your code with this code.