php - CSS change in woo commerce Place Order Text

admin2025-06-04  1

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 6 years ago.

Improve this question
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. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 6 years ago.

Improve this question
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.

Share Improve this question asked Jan 6, 2019 at 11:59 Richa SharmaRicha Sharma 497 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 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>

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.

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.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749038842a315837.html

最新回复(0)