Common Changes
- MaxMind's GeoIP country database was updated to the latest version (used by the fn_get_country_by_ip()function);
Hooks Changes
New Hooks
- fn_set_hook('get_usergroups', $params, $lang_code, $field_list, $join, $condition, $group_by, $order_by, $limit); - Is executed right before performing a usergroup-fetch query, allowing you to modify the SQL query.
- fn_set_hook('get_discussions_pre', $params, $items_per_page); - Is executed at the beginning of the function, allowing you to modify the arguments passed to the function.
- fn_set_hook('get_discussions', $params, $items_per_page, $fields, $join, $condition, $sorting, $limit); - Is executed right before performing a discussions-fetch query, allowing you to modify the SQL query.
- fn_set_hook('get_discussions_post', $params, $items_per_page, $posts); - Is executed after all discussions are fetched from the DB and all data post-processing is done.
- fn_set_hook('get_discussion_pre', $object_id, $object_type, $get_posts, $params); - Is executed at the beginning of a function, allowing you to modify the arguments passed to the function.
- fn_set_hook('get_discussion_before_sql', $object_id, $object_type, $get_posts, $params, $field_list, $join, $condition, $order_by, $limit); - Is executed right before performing a discussion-fetch query, allowing you to modify the SQL query.
- fn_set_hook('get_discussion_post', $object_id, $object_type, $get_posts, $params, $discussion); - Is executed after a discussion is fetched from the DB and all data post-processing is done.
- fn_set_hook('generate_rss_feed', $items_data, $additional_data, $block_data, $lang_code); - Is executed after feed items and properties are fetched from the DB and all data post-processing is done.
- fn_set_hook('update_product_feature_variant_pre', $feature_id, $feature_type, $variant, $lang_code); - Is executed at the beginning of a function, allowing you to modify the arguments passed to the function.
- fn_set_hook('update_product_feature_variant', $feature_id, $feature_type, $variant, $lang_code, $variant_id); - Is executed after the identifier of a variant is checked.
- fn_set_hook('update_product_feature_variant_post', $feature_id, $feature_type, $variant, $lang_code, $variant_id); - Is executed after a variant is updated/inserted.
Core Functions
New Functions
- fn_is_writable($file_path) - Checks if a file or directory is writable.
- fn_promotion_get_order_promotions($order_id) - Gets the current promotions of the order.
- \Tygh\Tools\DateTimeHelper::getTimeZoneOffsetString($time_zone_name) - Calculates the offset of the given time zone to the UTC time zone.
- fn_init_time_zone($time_zone_name) - Sets the given timezone as the PHP runtime time zone and as the current MySQL connection timezone.
- \Tygh\Tools\Url::isSubDomainOf(self $url) - Checks whether the current URL's hostname is a subdomain of the given URL's hostname.
- fn_rssf_get_items($params, $lang_code = CART_LANGUAGE) - Prepares feed items and properties.
- \Tygh\Tools\SecurityHelper::sanitizeFileName($filename) - Sanitizes a filename, replacing special characters.
Changed Functions
- fn_get_store_locations($params, $items_per_page = 0, $lang_code = CART_LANGUAGE) - List of store locations now uses location identifiers as array keys.