• Resolved rsvenda


    In the file wc-vendors\class-wc-account-links.php is hardcoded text ‘Become a %s’
    and I am not able to use translation (both WPML and Loco tested).
    Any idea?

    See here:
    public function add_account_menu_items( $items ) {

    $add_items = apply_filters(
    ‘wcv_become_a_vendor_string’, array(
    ‘become-a-vendor’ => sprintf( __( ‘Become a %s’, ‘wc-vendors’ ), wcv_get_vendor_name() ),
    // slice the array so the logout link goes at the end of the list
    $first_part = array_slice( $items, 0, count( $items ) – 1, true );
    $last_part = array_slice( $items, count( $items ) – 1, true );
    // put the arrays together putting the logout link at the end
    $items = $first_part + $add_items + $last_part;

    return $items;

Viewing 2 replies - 1 through 2 (of 2 total)
  • in last version file is located in \wc-vendors\classes\front\account\

    public function add_account_menu_items( $items ) {
    $become_a_vendor_label = get_option( ‘wcvendors_label_become_a_vendor’, __( ‘Become a ‘, ‘wc-vendors’ ) );

    • This reply was modified 1 month, 3 weeks ago by  rsvenda.
    Plugin Author Jamie



    If you’re creating a translation for a site, you will need to translate the string before the settings are saved. The issue you might be seeing is that it is storing the ‘become a’ string in the database before it has been translated. I just created a brand new install and before I saved anything I translated all the become a strings and they were being translated correctly. You might need to manually delete – wcvendors_label_become_a_vendor option from the database to ensure it is picking up the correct translation.



Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.