Aleš Sýkora wrote

Translate labels in Iconic Delivery Slots

21. 1. 2021 in

If you need to change labels of fields added by Iconic Delivery Slots to WooCommerce checkout, use this snippet:

/** 
 * Replace WooCommerce Delivery Slots labels. 
 * 
 * @param array $labels An array of labels.
 * @param WC_Order $order The WooCommerce order object.
 *                        
 * @return array
 */
function iconic_modify_delivery_slots_label( $labels, $order ) {
	$labels['details']           = 'Způsob doručení';
	$labels['date']              = 'Datum doručení';
	$labels['select_date']       = 'Vybrat datum nebo doručení ihned';
	$labels['choose_date']       = 'Vyberte datum, kdy chcete Poke dovézt';
	$labels['select_date_first'] = 'Prosím vyberte nejdříve datum';
	$labels['choose_time_slot']  = 'Zvolte čas doručení';
	$labels['time_slot']  = 'Čas dovozu Poke';
	$labels['select_time_slot']  = 'Zvolte čas doručení';
	$labels['not_time_slots']  = 'Bohužel, nejsou volné žádné časy';
	
	return $labels;
}

add_filter( 'iconic_wds_labels', 'iconic_modify_delivery_slots_label', 10, 2 );

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

More from category
Aleš Sýkora wrote
Translate WordPress string with code
21. 1. 2021 in
Sometimes you want to change just one word in translation and you dont want to create .po and .mo files, install translation plugins etc. So use the function str_replace and replace the string you want. For example I am changin “Add to cart” to “Přidat do košíku”. You can place this code to your code […]
Read More
Aleš Sýkora wrote
Best practise for jQuery in Toolset
3. 7. 2019 in
Let me explain best practices for using jQuery inside a View, Form or Content Template's JS panel.
Read More
Aleš Sýkora wrote
Tracking Toolset Forms in Google Analytics with Google Tag Manager
7. 8. 2018 in
What if you want to track your Toolset Forms submissions with Google Analytics Events? See how to do this with Google Tag Manager quickly.
Read More
magnifiercross linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram