0

I am working on woocommerce, I want to replace the "paid" text with "placed" in admin order details page.

I'm searching for hook and searched a lot but no success, please help me.

I've attached an image.

enter image description here

muraliniceguy97
  • 333
  • 1
  • 3
  • 14

1 Answers1

1

you can achieve that by gettext filter :

add_filter('gettext', 'change_text', 20, 3);

function change_text($translated_text, $text, $domain)
{

    switch ($translated_text) {

        case 'Paid on %1$s @ %2$s':

            $translated_text = __('Placed on %1$s @ %2$s', 'woocommerce');
            break;

    }

    return $translated_text;
}

enter image description here

kashalo
  • 3,442
  • 2
  • 11
  • 28
  • Great help, thanks Kashalo, it is working fine. But here am facing one more problem I need this paid to placed only for when customer pick wire transfer as there was no payment received yet. How can i get the those order details here ? – muraliniceguy97 Aug 13 '18 at 05:37
  • @muraliniceguy97 you need to wrap this function withing another function so you can check the products now i can't edit my answer if you can ask another question i will be happy to write that code for you – kashalo Aug 13 '18 at 08:45
  • Hi Kashalo, Thanks for the replay,Can you please check here - https://stackoverflow.com/questions/51818947/how-can-i-replace-order-text-in-admin-panel-order-details-page-with-condition – muraliniceguy97 Aug 13 '18 at 09:13