I would like to change the time zone labels

image

How do I change the booking timezone from Los Angeles to Pacific Time? I have used loco translate but I cannot find the appropriate plugin to change the name of this.

Also, I would highly recommend changing these timezones to how we refer to them in the US.

Like this website dictates, pacific time zone, mountain time zone, central time zone, eastern time zone, alaskan, and hawaiian. Is there a way to do this?

Hi,

Depending on where you handle time zones, you should use either the hivepress/v1/forms/vendor_update or hivepress/v1/forms/listings_update hook. You can use the following example in your code snippet:

if ( isset( $form['fields']['booking_timezone'] ) ) {
    $form['fields']['booking_timezone']['options']['time_zone_key_here'] = 'custom label here';
}

This will allow you to set a custom label for a specific time zone.

Also, thank you for the feature suggestion. We’ll consider adding this. Currently, time zones are loaded from WordPress.

Working solution:

add_filter( 'gettext', function( $translation, $text, $domain ) {
    if ( $domain === 'continents-cities' && $text === 'Los Angeles' ) {
        return 'Pacific Standard Time';
    }

    return $translation;
}, 10, 3 );

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.