Aleš Sýkora / January 21, 2021 / 0 comments

Translate labels in Iconic Delivery Slots

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

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 );

Fuel my passion for writing with a beer🍺

Your support not only makes me drunk but also greatly motivates me to continue creating content that helps. Cheers to more discoveries and shared success. 🍻

0 comments

Share Your Thoughts