• Resolved gooalgenie

    (@gooalgenie)


    Hello,

    Really amazing plugin would require your help to rename “Cancel Request” Button to “Cancel/Return”.

    How can I do the same?

    Thanks,
    VIcky

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author PI Web Solution

    (@rajeshsingh520)

    Hi,

    you need to install the Loco translator plugin using that you will be able to change that text as that text comes from the translation string

    Thread Starter gooalgenie

    (@gooalgenie)

    Hello Rajesh,

    I tried using the plugin to I made the text changes and clicked save – https://www.screencast.com/t/QQ1MWWe7Ie91
    It’s not updating the text – https://www.screencast.com/t/AibF9xb7

    And if I save and sync it resets the text – https://www.screencast.com/t/2z8HgBE4Vl1p
    text gets reset – https://www.screencast.com/t/gsTHdk2vs

    Please let me know if I am doing some mistake, I tried with better search replace too… Tried replacing this –
    “class=”woocommerce-button button pi_cancel_request_form”>Cancel Request”
    with this
    “class=”woocommerce-button button pi_cancel_request_form”>Cancel / Return”

    But did not make any effect.

    let me know if I am missing something or correct solution.

    Thanks,
    Vicky

    Plugin Author PI Web Solution

    (@rajeshsingh520)

    Hi,
    Sorry we cant find out why loco translator is not working for you see if you may have selected wrong language code

    You can use this method this will do the work as well,

    Add the below code in your theme functions.php file that should do the work

    
    add_filter( 'woocommerce_my_account_my_orders_actions', function($buttons){
    	if(isset($buttons['pi_cancel_request_form'])){
    		$buttons['pi_cancel_request_form']['name'] = 'Cancel / Return';
    	}
    	return $buttons;
    },PHP_INT_MAX);
    
    
    Thread Starter gooalgenie

    (@gooalgenie)

    Hey Rajesh,

    Thanks for super support, your code worked like a charm.

    Plugin Author PI Web Solution

    (@rajeshsingh520)

    Thanks see if you can review us

    Thread Starter gooalgenie

    (@gooalgenie)

    ALready did… check

    Plugin Author PI Web Solution

    (@rajeshsingh520)

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘How to Rename Cancel Request button?’ is closed to new replies.