Translation term

  • Author
    Posts
  • bb-

    Hi!

    When requesting a payout from the dashboard the term “details” is used. The string is fetched from the main HivePress plugin. It would be nice if the string was fetched from the Marketplace plugin so I could change it to “Please add you bank account details”. Details for an add and bank account details need different strings.

    Thanks for a GREAT plugin!

    With best regards,

    bb-

    ihordeveloper

    Thanks, I’m glad that it’s useful!

    You can try using this code snippet to set a custom description for the “Details” field:

    add_filter(
    	'hivepress/v1/forms/payout_request',
    	function( $form ) {
    		$form['fields']['details']['description'] = 'custom description here';
    
    		return $form;
    	}
    );
    bb-

    Hi ihor and thanks for your always so swift replies!

    That worked partially! I can see my custom description just underneath the string “Details”. Is there a way to add something in the function to remove the “Details” string but only on the payout popup?

    With best regards,

    bb

    ihordeveloper

    Sure, you can try setting an empty string for a label:

    add_filter(
    	'hivepress/v1/forms/payout_request',
    	function( $form ) {
    		$form['fields']['details']['label'] = '';
    		$form['fields']['details']['description'] = 'custom description here';
    
    		return $form;
    	}
    );
    Bryn

    Hi ihor

    Would this code snippet require Loco translate to help change the word ‘details’ when requesting a payout? The reason I ask is because I tried it out and it doesn’t seem to work?

    Thanks for the help.

    ihordeveloper

    No, since the label is hard-coded by this snippet it works without Loco Translate. You can try using this snippet if you want to set a custom label just for the “Details” field in the payout request form (without changing this word everywhere):

    add_filter(
    	'hivepress/v1/forms/payout_request',
    	function( $form ) {
    		$form['fields']['details']['label'] = 'custom label here';
    
    		return $form;
    	}
    );
    Bryn

    Hi ihor

    I used the code snippet that you provided above, however it still says details in the payout request form.

    Would you be able to assist?

    Thank you very much.

    ihordeveloper

    Please make sure that it’s added correctly (it seems that it worked for @bb-), not as a CSS snippet, but as a PHP snippet (via the Code Snippets plugin or in the child theme’s functions.php file).

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

Subscribe

Sign In

Don't have an account? Register

Forgot password?

Register

Already have an account? Sign In

Forgot password?

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.