{"id":1959599,"date":"2024-03-28T09:39:28","date_gmt":"2024-03-28T13:39:28","guid":{"rendered":"https:\/\/theeventscalendar.com\/knowledgebase\/?p=1959599"},"modified":"2024-03-28T09:39:31","modified_gmt":"2024-03-28T13:39:31","slug":"promoter-license-key-is-invalid","status":"publish","type":"post","link":"https:\/\/theeventscalendar.com\/knowledgebase\/promoter-license-key-is-invalid\/","title":{"rendered":"Promoter License Key is Invalid"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69da076aa39f3&quot;}\" data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1185\" height=\"162\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/03\/promoter-license-key-invalid-warning.jpg\" alt=\"\" class=\"wp-image-1959600\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/03\/promoter-license-key-invalid-warning.jpg 1185w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/03\/promoter-license-key-invalid-warning-300x41.jpg 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/03\/promoter-license-key-invalid-warning-1024x140.jpg 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/03\/promoter-license-key-invalid-warning-768x105.jpg 768w\" sizes=\"auto, (max-width: 1185px) 100vw, 1185px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on-async--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div>\n\n\n<p>If you are not using Promoter, you can bump into that error message if you have entered a license key into the Promoter field on the <em>Events \u2192 Settings \u2192 Licenses<\/em> page by accident. The warning will be displayed again on the next page load, even if you have dismissed it before.<\/p>\n\n\n\n<p>This can be fixed with a little snippet for which we recommend using the <a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\" target=\"_blank\" rel=\"noreferrer noopener\">Code Snippets<\/a> plugin. (Make sure to check out our <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/best-practices-for-implementing-custom-code-snippets\/\">related article<\/a>, too.)<\/p>\n\n\n\n<p>Here is how to go about fixing this:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create a database backup first! &#8211; This is always important before making any changes in your database.<\/li>\n\n\n\n<li>Create a new snippet with Code Snippets, and copy-paste the below code.<\/li>\n\n\n\n<li>Set it as &#8220;Only run once&#8221;. (See screenshot below.)<\/li>\n\n\n\n<li>Click on &#8220;Save Changes&#8221;. (Not &#8220;Save Changes and Execute Once&#8221;!)<\/li>\n\n\n\n<li>Go to <em>Snippets \u2192 All Snippets<\/em>.<\/li>\n\n\n\n<li>Click on the play icon next to the snippet to run it once.<\/li>\n\n\n\n<li>The relevant entry from the database should be removed and the notice will disappear.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1072\" height=\"753\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/03\/promoter-license-key-invalid-run-once.jpg\" alt=\"\" class=\"wp-image-1959601\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/03\/promoter-license-key-invalid-run-once.jpg 1072w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/03\/promoter-license-key-invalid-run-once-300x211.jpg 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/03\/promoter-license-key-invalid-run-once-1024x719.jpg 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/03\/promoter-license-key-invalid-run-once-768x539.jpg 768w\" sizes=\"auto, (max-width: 1072px) 100vw, 1072px\" \/><figcaption class=\"wp-element-caption\">Setting the snippet to run only once<\/figcaption><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nfunction remove_promoter_from_tribe_pue_key_notices() {\n\t\/\/ Get the option value from the database\n\t$tribe_pue_key_notices = get_option( &#039;tribe_pue_key_notices&#039; );\n\n\t\/\/ Check if the option is set and if &quot;Promoter&quot; is set\n\tif ( \n\t\t! empty( $tribe_pue_key_notices ) \n\t\t&amp;&amp; is_array( $tribe_pue_key_notices ) \n\t\t&amp;&amp; isset( $tribe_pue_key_notices&#x5B;&#039;invalid_key&#039;]&#x5B;&#039;Promoter&#039;] ) \n\t) {\n\t\t\/\/ Unset &quot;Promoter&quot; setting\n\t\tunset( $tribe_pue_key_notices&#x5B;&#039;invalid_key&#039;]&#x5B;&#039;Promoter&#039;] );\n\n\t\t\/\/ Update the option with the modified value\n\t\tupdate_option( &#039;tribe_pue_key_notices&#039;, $tribe_pue_key_notices );\n\t}\n}\n\nadd_action( &#039;init&#039;, &#039;remove_promoter_from_tribe_pue_key_notices&#039; );\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>If you are not using Promoter, you can bump into that error message if you have entered a license key into the Promoter field on the Events \u2192 Settings \u2192 Licenses page by accident. The warning will be displayed again on the next page load, even if you have dismissed it before. This can be&#8230;<\/p>\n","protected":false},"author":84,"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":[59,79],"tags":[231],"stellar-product-taxonomy":[160],"class_list":["post-1959599","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php-function-snippets","category-snippets","tag-license-key","stellar-product-taxonomy-promoter"],"acf":[],"taxonomy_info":{"category":[{"value":59,"label":"PHP Functions &amp; Snippets"},{"value":79,"label":"Snippets"}],"post_tag":[{"value":231,"label":"License key"}],"stellar-product-taxonomy":[{"value":160,"label":"Promoter"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"The Events Calendar Team","author_link":"https:\/\/theeventscalendar.com\/knowledgebase\/author\/the_events_calendar_team\/"},"comment_info":0,"category_info":[{"term_id":59,"name":"PHP Functions &amp; Snippets","slug":"php-function-snippets","term_group":0,"term_taxonomy_id":59,"taxonomy":"category","description":"","parent":24,"count":127,"filter":"raw","term_order":"0","cat_ID":59,"category_count":127,"category_description":"","cat_name":"PHP Functions &amp; Snippets","category_nicename":"php-function-snippets","category_parent":24},{"term_id":79,"name":"Snippets","slug":"snippets","term_group":0,"term_taxonomy_id":79,"taxonomy":"category","description":"","parent":0,"count":80,"filter":"raw","term_order":"0","cat_ID":79,"category_count":80,"category_description":"","cat_name":"Snippets","category_nicename":"snippets","category_parent":0}],"tag_info":[{"term_id":231,"name":"License key","slug":"license-key","term_group":0,"term_taxonomy_id":231,"taxonomy":"post_tag","description":"","parent":0,"count":3,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1959599","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\/84"}],"replies":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1959599"}],"version-history":[{"count":3,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1959599\/revisions"}],"predecessor-version":[{"id":1959604,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1959599\/revisions\/1959604"}],"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=1959599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1959599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1959599"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1959599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}