{"id":1966648,"date":"2025-09-03T08:23:55","date_gmt":"2025-09-03T12:23:55","guid":{"rendered":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/?p=1966648"},"modified":"2025-09-03T08:24:57","modified_gmt":"2025-09-03T12:24:57","slug":"how-to-add-a-custom-currency-in-tickets-commerce","status":"publish","type":"post","link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/how-to-add-a-custom-currency-in-tickets-commerce\/","title":{"rendered":"How to Add a Custom Currency in Tickets Commerce"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>Adding a custom currency to <strong>Tickets Commerce<\/strong> allows you to support transactions in currencies that are not included in the default list. By default, Tickets Commerce supports a wide range of global currencies. You can review the full list here: <a href=\"https:\/\/staging.theeventscalendar.com\/knowledgebase\/tickets-commerce-currencies\/?utm_source=chatgpt.com\" target=\"_blank\" rel=\"noreferrer noopener\">Supported Currencies for Tickets Commerce<\/a><\/p>\n\n\n\n<p>If your currency is not included, you can register it with a simple code snippet. Below, we\u2019ll show you how to add the <strong>Kuwaiti Dinar (KWD)<\/strong> as an example.<\/p>\n\n\n\n<p>Place the following code in your child theme\u2019s <strong>functions.php<\/strong> file or via <a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\">Code Snippets<\/a> plugin:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( &#039;tec_tickets_commerce_currency_code_options&#039;, function( $options ) {\n\t$options&#x5B;&#039;KWD&#039;] = &#039;Kuwaiti Dinar (KWD)&#039;;\n\tksort( $options );\n\treturn $options;\n} );\n\nadd_filter( &#039;tribe_tickets_commerce_currency_code_options_map&#039;, function ( $map ) {\n\t$map&#x5B;&#039;KWD&#039;] = array(\n\t\t&#039;name&#039;          =&gt; __( &#039;Kuwaiti Dinar (KWD)&#039;, &#039;event-tickets&#039; ),\n\t\t\/\/ Arabic symbol &quot;\u062f.\u0643&quot;. Use HTML entities to match TEC&#039;s style.\n\t\t&#039;symbol&#039;        =&gt; &#039;&amp;#x62F;.&amp;#x643;&#039;,\n\t\t&#039;decimal_point&#039; =&gt; &#039;.&#039;,   \/\/ KWD typically uses 3 decimals.\n\t\t&#039;thousands_sep&#039; =&gt; &#039;,&#039;,\n\t);\n\n\tksort( $map );\n\n\treturn $map;\n} );\n<\/pre><\/div>\n\n\n<p>The snippet above will add <strong>KWD<\/strong> as a currency option in WP Admin Dashboard \u2192 Tickets \u2192 Settings \u2192 Payments \u2192 Tickets Commerce \u2192 Currency, as shown below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full has-custom-border\"><img loading=\"lazy\" decoding=\"async\" width=\"653\" height=\"335\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/09\/KWD-Currency.png\" alt=\"\" class=\"wp-image-1966649\" style=\"border-width:1px;object-fit:cover\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/09\/KWD-Currency.png 653w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/09\/KWD-Currency-300x154.png 300w\" sizes=\"auto, (max-width: 653px) 100vw, 653px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-key-details-in-the-snippet\">Key Details in the Snippet<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code><a href=\"https:\/\/docs.theeventscalendar.com\/reference\/hooks\/tec_tickets_commerce_currency_code_options\/\" target=\"_blank\" rel=\"noreferrer noopener\">tec_tickets_commerce_currency_code_options<\/a><\/code><br>Adds your new currency option to the dropdown list in Tickets Commerce settings.<\/li>\n\n\n\n<li><code><a href=\"https:\/\/docs.theeventscalendar.com\/reference\/hooks\/tribe_tickets_commerce_currency_code_options_map\/\" target=\"_blank\" rel=\"noreferrer noopener\">tribe_tickets_commerce_currency_code_options_map<\/a><\/code><br>Defines how your custom currency is displayed and formatted.<\/li>\n\n\n\n<li><strong>Symbol:<\/strong> The Arabic Dinar symbol <code>\u062f.\u0643<\/code> is added as an HTML entity so it renders correctly in the frontend.<\/li>\n\n\n\n<li><strong>Decimal Precision:<\/strong> The Kuwaiti Dinar often uses <strong>3 decimal places<\/strong>. You can adjust this in the <code>decimal_point<\/code> and formatting logic if needed.<\/li>\n\n\n\n<li><strong>Sorting:<\/strong> <code><a href=\"https:\/\/www.php.net\/manual\/en\/function.ksort.php\" target=\"_blank\" rel=\"noreferrer noopener\">ksort()<\/a><\/code> is used to keep the currency list in alphabetical order after your custom currency is added.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-things-to-note\">Things to Note<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You can replace <code>\"KWD\"<\/code> with any other custom currency code and adjust the name, symbol, and formatting details.<\/li>\n\n\n\n<li>Always back up your site before making changes to your theme or plugin files.<\/li>\n\n\n\n<li>It is recommended to test the code snippet first in a <a href=\"https:\/\/staging.theeventscalendar.com\/knowledgebase\/k\/creating-and-using-a-wordpress-staging-site\/\" target=\"_blank\" rel=\"noreferrer noopener\">staging site<\/a> to catch any unforeseen issues before applying to it to your live site.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Adding a custom currency to Tickets Commerce allows you to support transactions in currencies that are not included in the default list. By default, Tickets Commerce supports a wide range of global currencies. You can review the full list here: Supported Currencies for Tickets Commerce If your currency is not included, you can register it&#8230;<\/p>\n","protected":false},"author":48,"featured_media":1955565,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[24,59,79],"tags":[25,278,89],"stellar-product-taxonomy":[155],"class_list":["post-1966648","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-customizing","category-customizing-resources","category-snippets","tag-customizations","tag-event-tickets","tag-tickets-commerce","stellar-product-taxonomy-event-tickets"],"acf":[],"taxonomy_info":{"category":[{"value":24,"label":"Customizations"},{"value":59,"label":"PHP &amp; Functions"},{"value":79,"label":"Snippets"}],"post_tag":[{"value":25,"label":"Customizations"},{"value":278,"label":"Event Tickets"},{"value":89,"label":"Tickets Commerce"}],"stellar-product-taxonomy":[{"value":155,"label":"Event Tickets"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Paul Acido","author_link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/author\/paulacido\/"},"comment_info":0,"category_info":[{"term_id":24,"name":"Customizations","slug":"customizing","term_group":0,"term_taxonomy_id":24,"taxonomy":"category","description":"","parent":0,"count":110,"filter":"raw","term_order":"0","cat_ID":24,"category_count":110,"category_description":"","cat_name":"Customizations","category_nicename":"customizing","category_parent":0},{"term_id":59,"name":"PHP &amp; Functions","slug":"customizing-resources","term_group":0,"term_taxonomy_id":59,"taxonomy":"category","description":"","parent":24,"count":101,"filter":"raw","term_order":"0","cat_ID":59,"category_count":101,"category_description":"","cat_name":"PHP &amp; Functions","category_nicename":"customizing-resources","category_parent":24},{"term_id":79,"name":"Snippets","slug":"snippets","term_group":0,"term_taxonomy_id":79,"taxonomy":"category","description":"","parent":0,"count":136,"filter":"raw","term_order":"0","cat_ID":79,"category_count":136,"category_description":"","cat_name":"Snippets","category_nicename":"snippets","category_parent":0}],"tag_info":[{"term_id":25,"name":"Customizations","slug":"customizations","term_group":0,"term_taxonomy_id":25,"taxonomy":"post_tag","description":"","parent":0,"count":177,"filter":"raw","term_order":"0"},{"term_id":278,"name":"Event Tickets","slug":"event-tickets","term_group":0,"term_taxonomy_id":278,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw","term_order":"0"},{"term_id":89,"name":"Tickets Commerce","slug":"tickets-commerce","term_group":0,"term_taxonomy_id":89,"taxonomy":"post_tag","description":"","parent":26,"count":26,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1966648","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/48"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1966648"}],"version-history":[{"count":3,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1966648\/revisions"}],"predecessor-version":[{"id":1966655,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1966648\/revisions\/1966655"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1966648"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1966648"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1966648"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1966648"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}