{"id":1963993,"date":"2025-01-23T09:29:06","date_gmt":"2025-01-23T14:29:06","guid":{"rendered":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/?p=1963993"},"modified":"2025-01-23T09:29:39","modified_gmt":"2025-01-23T14:29:39","slug":"make-woocommerce-the-default-payment-module","status":"publish","type":"post","link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/make-woocommerce-the-default-payment-module\/","title":{"rendered":"Make WooCommerce the Default Payment Module"},"content":{"rendered":"\n<p>When both payment modules, Tickets Commerce and WooCommerce, are active simultaneously, you have the option to choose between them for each event. However, Tickets Commerce is set as the default ticket provider. This may not always be desirable, especially if WooCommerce is your preferred payment method, and switching between payment modules for each new event becomes cumbersome.<\/p>\n\n\n\n<p>If you have selected WooCommerce as the payment module for your site and want it to be the default for all future events and tickets you create, you can use the following PHP code snippet.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/masoodahmed\/a76f449b61f78de4d76a4034d9013b59.js\"><\/script>\n\n\n\n<p>Add the code snippet to the <em>functions.php<\/em> file of your theme, or use your preferred method for integrating snippets into your WordPress site, such as the free <a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\" target=\"_blank\" rel=\"noreferrer noopener\">Code Snippets<\/a> plugin.<\/p>\n\n\n\n<p>By adding this code snippet to your site, WooCommerce will automatically be selected as the default payment module for new events, provided that <span style=\"text-decoration: underline;\"><a href=\"https:\/\/staging.theeventscalendar.com\/knowledgebase\/getting-started-with-woocommerce-and-event-tickets-plus\/\" target=\"_blank\" rel=\"noreferrer noopener\">Event Tickets Plus and WooCommerce<\/a><\/span> are both active.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-for-developers\">For Developers<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/docs.theeventscalendar.com\/reference\/hooks\/tribe_tickets_get_default_module\/\">tribe_tickets_get_default_module<\/a><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When both payment modules, Tickets Commerce and WooCommerce, are active simultaneously, you have the option to choose between them for each event. However, Tickets Commerce is set as the default ticket provider. This may not always be desirable, especially if WooCommerce is your preferred payment method, and switching between payment modules for each new event&#8230;<\/p>\n","protected":false},"author":59,"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":[20,58,212,89,106],"stellar-product-taxonomy":[156],"class_list":["post-1963993","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-customizing","category-customizing-resources","category-snippets","tag-code","tag-php","tag-snippets","tag-tickets-commerce","tag-woocommerce","stellar-product-taxonomy-event-tickets-plus"],"acf":[],"taxonomy_info":{"category":[{"value":24,"label":"Customizations"},{"value":59,"label":"PHP &amp; Functions"},{"value":79,"label":"Snippets"}],"post_tag":[{"value":20,"label":"Code"},{"value":58,"label":"PHP"},{"value":212,"label":"snippets"},{"value":89,"label":"Tickets Commerce"},{"value":106,"label":"WooCommerce"}],"stellar-product-taxonomy":[{"value":156,"label":"Event Tickets Plus"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Masood","author_link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/author\/masood\/"},"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":20,"name":"Code","slug":"code","term_group":0,"term_taxonomy_id":20,"taxonomy":"post_tag","description":"","parent":0,"count":33,"filter":"raw","term_order":"0"},{"term_id":58,"name":"PHP","slug":"php","term_group":0,"term_taxonomy_id":58,"taxonomy":"post_tag","description":"","parent":20,"count":128,"filter":"raw","term_order":"0"},{"term_id":212,"name":"snippets","slug":"snippets","term_group":0,"term_taxonomy_id":212,"taxonomy":"post_tag","description":"","parent":0,"count":17,"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"},{"term_id":106,"name":"WooCommerce","slug":"woocommerce","term_group":0,"term_taxonomy_id":106,"taxonomy":"post_tag","description":"","parent":26,"count":40,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1963993","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\/59"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1963993"}],"version-history":[{"count":1,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1963993\/revisions"}],"predecessor-version":[{"id":1963994,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1963993\/revisions\/1963994"}],"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=1963993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1963993"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1963993"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1963993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}