Am new to woocommerce, by using gettext hook am able to replace the text "paid" with "placed" but i want to display this text based on one condition i.e when customer pick wire transfer(bacs) as there was no payment received then only text needs to replace with placed
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
This unique lightweight hooked function will replace "Paid" by "Placed" for BACS payment method:
Code goes in function.php file of your active child theme (or active theme). Tested and works.
here you go
First let add the Change Text function :
The Condition:
Now let's create our condition by getting all order id with payment method wire transfer and if the current post id match our order id then we can call the changing text function as following: