{"id":1963993,"date":"2025-01-23T09:29:06","date_gmt":"2025-01-23T14:29:06","guid":{"rendered":"https:\/\/theeventscalendar.com\/knowledgebase\/?p=1963993"},"modified":"2026-04-23T15:58:48","modified_gmt":"2026-04-23T19:58:48","slug":"customize-woocommerce-settings","status":"publish","type":"post","link":"https:\/\/theeventscalendar.com\/knowledgebase\/customize-woocommerce-settings\/","title":{"rendered":"Customizing WooCommerce Settings"},"content":{"rendered":"\n<p>When you use WooCommerce as the payment method for Event Tickets Plus, the two systems work together to handle ticket sales and orders. You may want to adjust how that handoff behaves to better fit your workflow. This article collects customizations for WooCommerce settings related to ticket sales.<\/p>\n\n\n\n<p>The customizations in this article are all code snippets. Add them to your child theme&#8217;s <code>functions.php<\/code> file or use the Code Snippets plugin. If code snippets are new to you, start with <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/code-snippets\/\">Using Code Snippets to Customize The Events Calendar<\/a> for a walkthrough.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-automatically-complete-woocommerce-orders-for-tickets\">Automatically Complete WooCommerce Orders for Tickets<\/h2>\n\n\n\n<p>When purchasing tickets with <a href=\"https:\/\/theeventscalendar.com\/products\/wordpress-event-tickets\/\" target=\"_blank\" rel=\"noreferrer noopener\">Event Tickets Plus<\/a> with WooCommerce, emails won&#8217;t be sent to attendees until the order has been marked as <strong>Complete<\/strong>. By default, this process needs to be done manually by the administrator.<\/p>\n\n\n\n<p>Here, we&#8217;ll show you how to make sure that your attendees receive their emails and how you can set this up automatically.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-the-order-process\">The Order Process<\/h3>\n\n\n\n<p>When an attendee purchases a ticket, WooCommerce first sets the order to Pending. The payment gateway then attempts to run the payment method, in which case the order status updates to <strong>On-Hold<\/strong> (or Failed if the payment doesn&#8217;t go through). Next, WooCommerce automatically sets the status to <strong>Processing<\/strong>. And that is where the &#8220;automatic&#8221; process ends.<\/p>\n\n\n\n<p>As the administrator, you&#8217;ll have to set the order to <strong>Completed<\/strong> for the email to your attendee to be triggered. The following diagram may be helpful to get a sense of the order process:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2021\/12\/Screen-Shot-2021-12-15-at-1.49.28-PM.png\" alt=\"WooCommerce order status diagram\" class=\"wp-image-1951482\"\/><\/figure>\n\n\n\n<p>You may also want to reference <a href=\"https:\/\/woocommerce.com\/document\/managing-orders\/\" target=\"_blank\" rel=\"noreferrer noopener\">this article<\/a> from WooCommerce to see some more detailed information about managing WooCommerce orders.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-automatically-set-to-complete\">Automatically Set to Complete<\/h3>\n\n\n\n<p>If you&#8217;d like, you can automatically set the order to <strong>Complete<\/strong> so that an email will be sent to your attendees as soon as their payment method is verified. This will require no further action to complete your ticket orders.<\/p>\n\n\n\n<p>To make this happen, add the following snippet to the site:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&amp;lt;?php \/\/Do not copy this line\n\nadd_action( &#039;woocommerce_thankyou&#039;, function ( $order_id ) {\n\tif ( ! $order_id ) {\n\t\treturn;\n\t}\n\t\n\tif ( ! class_exists( &#039;Tribe__Tickets_Plus__Main&#039; ) ) {\n\t\treturn;\n\t}\n\n\t$order = wc_get_order( $order_id );\n\n\tif ( $order-&gt;get_status() != &#039;processing&#039; ) {\n\t\treturn;\n\t}\n\n\t$all_virtual = true;\n\t$all_tickets = true;\n\n\tforeach ( $order-&gt;get_items() as $item_id =&gt; $item ) {\n\t\t$product    = $item-&gt;get_product();\n\t\t$product_id = $product-&gt;get_id();\n\n\t\tif ( ! $product-&gt;is_virtual() ) {\n\t\t\t$all_virtual = false;\n\t\t\tbreak;\n\t\t}\n\n\t\tif ( ! function_exists( &#039;tribe_events_product_is_ticket&#039; ) || ! tribe_events_product_is_ticket( $product_id ) ) {\n\t\t\t$all_tickets = false;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif ( $all_virtual &amp;amp;&amp;amp; $all_tickets ) {\n\t\t$order-&gt;update_status( &#039;completed&#039; );\n\t}\n} );\n<\/pre><\/div>\n\n\n<p>This code snippet first validates the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The Order contains only Ticket products<\/li>\n\n\n\n<li>All Ticket products are virtual<\/li>\n\n\n\n<li>Payment has been processed<\/li>\n<\/ul>\n\n\n\n<p>If all three conditions are met, the order will be marked complete. This rule only applies to orders created for Tickets products using the Event Tickets Plus plugin.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-make-woocommerce-the-default-payment-module\">Make WooCommerce the Default Payment Module<\/h2>\n\n\n\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<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&amp;lt;?php \/\/Do not copy this line\n\nadd_filter( &#039;tribe_tickets_get_default_module&#039;, function ( $default, $modules ) {\n\t$woocommerce_module = &#039;Tribe__Tickets_Plus__Commerce__WooCommerce__Main&#039;;\n\n\t\/\/ WooCommerce available and not default\n\tif ( in_array( $woocommerce_module, $modules ) &amp;amp;&amp;amp; $default !== $woocommerce_module ) {\n\t\treturn $woocommerce_module;\n\t}\n\n\treturn $default;\n}, 99, 2 );\n<\/pre><\/div>\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:\/\/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<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\" id=\"h-for-developers\">For Developers<\/h2>\n\n\n\n<p>Here are some of the key components used in the code snippets<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/wp-kama.com\/plugin\/woocommerce\/hook\/woocommerce_thankyou\" target=\"_blank\" rel=\"noreferrer noopener\">woocommerce_thankyou<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/docs.theeventscalendar.com\/reference\/classes\/tribe__tickets_plus__main\/\" target=\"_blank\" rel=\"noreferrer noopener\">Tribe__Tickets_Plus__Main<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/wp-kama.com\/plugin\/woocommerce\/function\/wc_get_order\" target=\"_blank\" rel=\"noreferrer noopener\">wc_get_order<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/docs.theeventscalendar.com\/reference\/functions\/tribe_events_product_is_ticket\/\" target=\"_blank\" rel=\"noreferrer noopener\">tribe_events_product_is_ticket<\/a><\/li>\n\n\n\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<\/div><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you use WooCommerce as the payment method for Event Tickets Plus, the two systems work together to handle ticket sales and orders. You may want to adjust how that handoff behaves to better fit your workflow. This article collects customizations for WooCommerce settings related to ticket sales. Automatically Complete WooCommerce Orders for Tickets When&#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,46,59,350],"tags":[],"stellar-product-taxonomy":[156],"class_list":["post-1963993","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-customizing","category-integrations","category-php","category-settings","stellar-product-taxonomy-event-tickets-plus"],"acf":[],"taxonomy_info":{"category":[{"value":24,"label":"Customizing"},{"value":46,"label":"Integrations"},{"value":59,"label":"PHP"},{"value":350,"label":"Settings"}],"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:\/\/theeventscalendar.com\/knowledgebase\/author\/masood\/"},"comment_info":0,"category_info":[{"term_id":24,"name":"Customizing","slug":"customizing","term_group":0,"term_taxonomy_id":24,"taxonomy":"category","description":"","parent":0,"count":67,"filter":"raw","term_order":"0","cat_ID":24,"category_count":67,"category_description":"","cat_name":"Customizing","category_nicename":"customizing","category_parent":0},{"term_id":46,"name":"Integrations","slug":"integrations","term_group":0,"term_taxonomy_id":46,"taxonomy":"category","description":"","parent":0,"count":54,"filter":"raw","term_order":"0","cat_ID":46,"category_count":54,"category_description":"","cat_name":"Integrations","category_nicename":"integrations","category_parent":0},{"term_id":59,"name":"PHP","slug":"php","term_group":0,"term_taxonomy_id":59,"taxonomy":"category","description":"","parent":24,"count":52,"filter":"raw","term_order":"0","cat_ID":59,"category_count":52,"category_description":"","cat_name":"PHP","category_nicename":"php","category_parent":24},{"term_id":350,"name":"Settings","slug":"settings","term_group":0,"term_taxonomy_id":350,"taxonomy":"category","description":"","parent":0,"count":15,"filter":"raw","term_order":"0","cat_ID":350,"category_count":15,"category_description":"","cat_name":"Settings","category_nicename":"settings","category_parent":0}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1963993","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/59"}],"replies":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1963993"}],"version-history":[{"count":4,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1963993\/revisions"}],"predecessor-version":[{"id":1970097,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1963993\/revisions\/1970097"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1963993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1963993"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1963993"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1963993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}