[Woocommerce] How to Change Buy Product Button Text

Single Product Page
add_filter( 'woocommerce_product_single_add_to_cart_text', 'wc_custom_cart_button_text' ); // Woocommerce 2.1 +

function wc_custom_cart_button_text() {

return __( 'Buy via AliExpress', 'woocommerce' );


Archive Page
add_filter( 'woocommerce_product_add_to_cart_text', 'wc_archive_custom_cart_button_text' ); // Woocommerce 2.1 +

function wc_archive_custom_cart_button_text() {

return __( 'Buy via AliExpress', 'woocommerce' );


Related Posts


August 8, 2017

Security, WordPress

Recently I’ve been contacted by several clients reporting malware on their WordPress sites which redirects pages and post to other websites like http://traffictrade.life. It is affecting pretty much all the posts and pages of the site. They’re simply looking for “<a href” which is code they know will be present in virtually every post on […]

Read More

Recommended File Permissions for WordPress

July 31, 2017

Security, Tutorial, WordPress

What permissions should I have for the following: Root folder storing all the WordPress content wp-admin wp-content wp-includes On computer filesystems, different files and directories have permissions that specify who and what can read, write, modify and access them. This is important because WordPress may need access to write to files in your wp-content directory to enable certain functions. […]

Read More