Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author gaurav1092

    (@gaurav1092)

    Hi @philippze,

    Yes, you can customize the “Track Your Order” button text using our Tracking Widget customizer.

    To do this:

    1. Navigate to WooCommerce > Shipment Tracking > Settings
    2. Open the Order Statuses & Notifications panel
    3. Click on the Settings icon for the relevant order status
    4. In the Tracking Widget panel, locate the option for Tracking Button text
    5. Update the text as needed and save the changes

    Let me know if you need further assistance!

    Best Regards,
    Gaurav

    Thread Starter philippze

    (@philippze)

    Hi @gaurav1092 ,

    thank you for your answer! Probably my problem description was not clear enough.

    Customizing the button text for one language works well. Just, our shop is in two languages (German and Italian). So, we need to use the translation system somehow. One global setting for the button text is not enough.

    In the mean time, I have solved the problem with copying the template file fluid-tracking-info.php to the theme and changing the line that defines the button text, so it uses a normal translation instead of the text defined in the configuration.

    Of course, it would still be nice to have a better solution 🙂

    Plugin Author gaurav1092

    (@gaurav1092)

    Hi @philippze,

    Which multilingual plugin are you using (e.g., WPML, Polylang, Loco Translate)? Based on that, we can suggest a better solution for translating the button text dynamically without modifying template files.

    Best Regards,
    Gaurav

    Thread Starter philippze

    (@philippze)

    Hey! You are quick! We are using WPML, together with WPML String Translation and WPML Media Translation.

    Plugin Author gaurav1092

    (@gaurav1092)

    You can translate the “Track Your Order” button text using WPML String Translation.

    1️⃣ Go to WPML > String Translation
    2️⃣ Search for fluid_button_text
    3️⃣ Add translations for German and Italian
    4️⃣ Save changes

    This should apply the correct translations dynamically without modifying template files. Let me know if you need further assistance! 🚀

    Thread Starter philippze

    (@philippze)

    No. In the string translations the string fluid_button_text was not found. It does not appear in a translation function the plugin. It’s an array key in the translation with the following default value defined in ast-customizer.php:

    'fluid_button_text' => __( 'Track Your Order', 'woo-advanced-shipment-tracking' )

    I will find “Track Your Order” in the translation strings. However, it will not make a difference when I translate it because it is the default value and will be replaced with the actual value from the plugin settings.

    Here is what I see when I grep for your string in the plugin settings:

    $ grep -r fluid_button_text plugins/woo-advanced-shipment-tracking/
    plugins/woo-advanced-shipment-tracking/templates/myaccount/tracking-info.php:$fluid_button_text = $ast->get_option_value_from_array( 'tracking_info_settings', 'fluid_button_text', $ast_customizer->defaults['fluid_button_text'] );
    plugins/woo-advanced-shipment-tracking/templates/myaccount/tracking-info.php: plugins/woo-advanced-shipment-tracking/templates/emails/fluid-tracking-info.php:$fluid_button_text = $ast->get_option_value_from_array( 'tracking_info_settings', 'fluid_button_text', $ast_customizer->defaults['fluid_button_text'] ); plugins/woo-advanced-shipment-tracking/templates/emails/fluid-tracking-info.php: plugins/woo-advanced-shipment-tracking/wpml-config.xml: plugins/woo-advanced-shipment-tracking/includes/customizer/ast-customizer.php: 'fluid_button_text' => _( 'Track Your Order', 'woo-advanced-shipment-tracking' ),
    plugins/woo-advanced-shipment-tracking/includes/customizer/ast-customizer.php: 'fluid_button_text' => array(
    plugins/woo-advanced-shipment-tracking/includes/customizer/ast-customizer.php: 'default' => !empty($tracking_info_settings['fluid_button_text']) ? $tracking_info_settings['fluid_button_text'] : $this->defaults['fluid_button_text'],
    plugins/woo-advanced-shipment-tracking/includes/customizer/ast-customizer.php: 'class' => 'fluid_button_text',
    plugins/woo-advanced-shipment-tracking/includes/customizer/assets/Customizer.js:jQuery('#fluid_button_text').on("keyup", function(){
    plugins/woo-advanced-shipment-tracking/includes/customizer/assets/Customizer.js: var fluid_button_text = jQuery(this).val();
    plugins/woo-advanced-shipment-tracking/includes/customizer/assets/Customizer.js: jQuery("#email_preview").contents().find('.track-button').text(fluid_button_text);

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