This question has been answered here.
Basically, you want to use a switch
statement hooked to the gettext filter. One benefit of this method is, if you need to change more text down the line you can just add another case
to the function. For example:
add_filter( 'gettext', 'wpsx_replace_text_string', 20, 3 );
function wpsx_replace_text_string( $translated_text, $text, $domain ) {
if ($domain === 'woocommerce') {
switch ( $translated_text ) {
//Text to replace
case 'Place Order' :
$translated_text = __( 'Complete Checkout', 'woocommerce' );
break;
//More text to replace
case 'Related Products' :
$translated_text = __( 'Other Options', 'woocommerce' );
break;
}
}
return $translated_text;
}
Related Posts:
- Order by rating not works in wp_query
- Woocommerce: show default variation price is products list?
- Woocommerce checkout fields on the same line
- display available size on hover, in woocommerce shop page [closed]
- How to Add Product Variation with Multiple Images via WooCommerce REST API
- WooCommerce: Email Notifications
- How do you add custom metadata to WooCommerce orders? Specifically a second external order ID
- WooCommerce: Adding Order Item Meta Data That’s Hidden
- Hide tabs on woocommerce product editor for user role
- Woocommerce add_to_cart non-register visitor not working
- Redirect user after login through woocommerce login page to page with his/her username?
- WooCommerce restore stock on order cancel
- Authenticate user into wordpress via 3rd party system, both with the same domain
- WordPress select field – show current value?
- Get the category ID in checkout page woocomerce
- Creating a multisite registration form that also creates a woocommerce post
- Server-Based CRON Job
- How to incluide custom field in WooCommerce email using placeholder
- Woocommerce: Can’t put items in cart in iframe and on iphone
- Display products by category in Woocommerce cart page?
- Checkout is blocked with blockUI when using action woocommerce_cart_calculate_fees
- Checkout form looks terrible [closed]
- How to upload multiple image using wp_insert_post
- How can i manage total price in checkout page? [closed]
- In WooCommerce product archive, how can you also set the quantity to be added to cart by typing, instead of just by using +/-?
- WooCommerce product category permalinks
- How to do string attachment with wp_mail
- Can’t show most recent comment on top with wp_list_comments() for WooCommerce reviews
- WooCommerce order complete email logic
- WooCommerce Displaying Price With & Without TAX [closed]
- API returns blank response after installing & uninstalling WP-rest-api plugin
- Tried to create a user role that can only edit user information, but my test account cannot view the dashboard. What am I missing?
- Filtering variable WooCommerce products by stock level using meta_query
- How can I run a multi language WordPress site in two folders in one install? [closed]
- Dropdown menu not displaying WordPress
- Adding a custom Shipping methods field to an order
- WooCommerce – Create multiple product tags via rest api endpoint
- WooCommerce which roles and capabilities control user login re-direct to Woo Account Page?
- how do i remove a woo-commerce widget?
- How can I convert woocommerce checkout fields in capital letters
- Conditional action hook
- Sending Email upon registration
- Order by date on category dynamically – Woocommerce
- Woocomnerce Limit Purchase value before proceed checkout
- Add to cart – button should be disabled
- Migrating data from Woocommerce to another webapp
- How To Customize The Product Page Template for a WooCommerce Custom Product Type Plugin [closed]
- Hide Add to Cart button on woocommerce Product description page of a particular product
- Options to develop a non-ecommerce catalog?
- wp_set_object_terms setting only first id from array
- I need to export all products and images but I don’t know which table the images are in
- Add only sku to product url woocoomerce
- What is better way to sync wp multisite woocommerce products
- Remove required from a custom field created from WooCommerce Checkout Field Editor plugin
- How to change status of woocommerce orders when post status is changed
- manage_shop_order_posts_custom_column() hook is Not working In Functions.php file in my WordPress active theme
- Purchase/order statistics plugin for viewing per payment menthod?
- Displaying Woocommerce Product Attributes on single product page
- WooCommerce – Child Category wont show, but Parent does
- How to hide a random text with a div tag using a class on product pages with a specific tag
- Missing variable options on add to cart form
- How to solve `Error getting remote image` in woocommerce rest api script?
- Woocommerce digital download not working – database error Cannot add or update a child row: a foreign key constraint fails [closed]
- when product out of stock single page show button notify woo-commerce
- WooCommerce , Auto cancel orders status from processing after X days
- Change WooCommerce Word “Product” to Another Word
- Add username and password section in WooCommerce’s my account page
- Recently viewed products – Order by viewed
- How can i add product Accessories from front-end using custom php form?
- How to save order item custom attributes save into custom table
- Manually create an order with a product ID woocommerce
- How to change user role after login?
- WooCommerce free shipping twice a week
- Product overlapping header
- How to import products to Woo Commerce given that WP All Import keeps timing out
- WooCommerce subscriptions give option of manual renewal on checkout [closed]
- Firstname and lastname greyout or hidden Billing details at next checkout like username is hidden [closed]
- How to use woo commerce login to authenticate code php pages?
- Change order status after checkout
- Is it safe to update an old site after backing it up and activating a child theme?
- Click Count on Download a File
- How to add coupon expiry date into the followup emails?
- Disable Woocommerce main shop page, but not the product category archive pages
- Not all strings are translated
- Custom Woocommerce checkout filed yields a Json error when validating [closed]
- access Woo commerce | WordPress methods externally
- How to store ACF from product in user_meta?
- How to display Woocommerce catagories
- Woocommerce set single city to sell to
- Trying to link to a custom css file in a new folder
- eCommerce solution doesn’t want to display its shortcodes or any content where it’s set to [closed]
- Woocommerce hidden fields with meta keys and values. how?
- How do I make a diagonal strikethrough on wordpress? [closed]
- Woocommerce – Remove ‘Buy Product’ Button from shop page [closed]
- Add woocommerce.css in template?
- Send data to external websites when there is an update or create a post
- Disable duplicate WC product category URLs
- how should i get products based on tags in woocommerce
- Add custom text to product category page
- Woocommerce permalink URL change in DB