0
add_filter( 'woocommerce_order_button_text', 'woo_custom_order_button_text' ); 

function woo_custom_order_button_text() {
    return __( 'Your new button text here', 'woocommerce' ); 
}

Above is the example how we can change the woocommerce "Place order" Text, but what if we want to change the CSS also how can we have the whole button customized along with our own button classes and CSS.

closed as off-topic by Krzysiek Dróżdż, Jacob Peattie, fuxia Jan 6 at 18:40

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

1

I will try to answer your question. since you know how the text can be changed - let me take it for CSS.

View in the browser - The browser is rendering the button like this →

<button type="submit" class="button alt" name="woocommerce_checkout_place_order" id="place_order" value="Confirm order" data-value="Confirm order">Confirm order</button>

enter image description here

Now create a folder by the name of "woocommerce" in your child theme/theme and create a folder by the name of checkout, and in that folder put payment.php from woo commerce template. (Look for the latest template)

and change the button class there with class that you want. You are all done.

  • That literally solved my problem. Thank you so much for the Input. – Richa Sharma Jan 6 at 17:25
0

You have to put your PHP codes at the bottom of functions.php file of your child theme. You have to place them before "?>". On the other hand, insert your CSS codes in style.css file of your child theme.

  • Neither you understand question and neither you have the solution. – Richa Sharma Jan 6 at 12:18
  • So far I understand, you want to customize the "Place Order" text and button. I have provided the answer for the specific matter. You can also read this article for further information: businessbloomer.com/… – Md. Ehsanul Haque Kanan Jan 6 at 12:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.