If you need to add text before, for example: “from” 10$.
function tec_remove_price_range( $cost, $post_id, $with_currency_symbol ) {
$pieces = explode( ' – ', $cost );
// If the ticket is free, just display it.
if ( $cost == 'Free' ) {
return $cost;
}
// Remove the block you don't need!
// To show the lowest price with some text.
if ( ! empty( $pieces[0] ) ) {
return "From: " . $pieces[0];
}
// To show the highest price.
if ( ! empty( $pieces[1] ) ) {
return "Up to " . $pieces[1];
}
// If not a range, return the default value.
return $cost;
}
add_filter( 'tribe_get_cost', 'tec_remove_price_range', 10, 3 );
]]>
If you want to use discount coupons in a specific event, or restricted, this code helps you.
This code creates a product in woocommerce when you create an event. This will make it easier for you to define specific discount codes
Add it to child-theme/functions.php
function create_woocommerce_product_from_event($post_id, $post, $update) {
// Verify that it is an event from The Events Calendar
if ('tribe_events' !== $post->post_type) {
return;
}
// Avoid infinite loops
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
return;
}
// Extract event data
$event_title = $post->post_title;
$event_description = $post->post_content;
$start_date = get_post_meta($post_id, '_EventStartDate', true);
$event_price = get_post_meta($post_id, '_EventCost', true); // Assuming the event has a cost.
// Create or update a product in WooCommerce
$product_id = get_post_meta($post_id, '_woocommerce_product', true);
$product_args = array(
'post_title' => $event_title,
'post_content' => $event_description,
'post_status' => 'publish',
'post_type' => 'product',
);
if ($product_id) {
// Update the product if it already exists
$product_args['ID'] = $product_id;
wp_update_post($product_args);
} else {
// Create a new product
$product_id = wp_insert_post($product_args);
update_post_meta($post_id, '_woocommerce_product', $product_id);
}
// Configure product metadata
update_post_meta($product_id, '_regular_price', $event_price ? $event_price : '0'); // Product price
update_post_meta($product_id, '_price', $event_price ? $event_price : '0');
update_post_meta($product_id, '_stock_status', 'instock');
update_post_meta($product_id, '_virtual', 'no');
update_post_meta($product_id, '_tribe_event_id', $post_id); // Relationship with the event
}
add_action('save_post', 'create_woocommerce_product_from_event', 10, 3);
]]>
New Deprecation notice introduced in 6.8.2.1 which is not present in 6.8.2.
PHP Deprecated: Return type of Tribe\Events\Views\V2\iCalendar\Links\Link_Abstract::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wp-content/plugins/the-events-calendar/src/Tribe/Views/V2/iCalendar/Links/Link_Abstract.php on line 443
]]>
I want to move events to trash, it doesn’t go to Trash and i have the following message : Error moving event to Trash. Even when I close my antispam !t is the same thing.
]]>We have a client using the events calendar plugin (latest version 6.8.2)and we came across an issue where visiting the widget page as admin (/wp/wp-admin/widgets.php) will result in the following fatal error:
Fatal error: Uncaught TypeError: Tribe\Widget\Widget_Abstract::setup_arguments(): Argument #1 ($instance) must be of type array, string given, called in {domain_path}/web/app/plugins/the-events-calendar/src/Tribe/Views/V2/Widgets/Widget_Abstract.php on line 61 and defined in {domain_path}/web/app/plugins/event-tickets/common/src/Tribe/Widget/Widget_Abstract.php on line 491
Fatal error: Uncaught TypeError: Tribe\Widget\Widget_Abstract::setup_arguments(): Argument #1 ($instance) must be of type array, string given, called in {domain_path}/web/app/plugins/the-events-calendar/src/Tribe/Views/V2/Widgets/Widget_Abstract.php on line 61 and defined in {domain_path}/web/app/plugins/event-tickets/common/src/Tribe/Widget/Widget_Abstract.php on line 491
Whats weird is that we’ve had this issue before and when upgrading to 6.2.3.2 at the time resolved the issue. However, it seems that the issue is back.
]]>I downgraded to 6.8.1 now because my client needs to have the events shown and that fixed the problem immediately. When you would go to the /evenementen page when the 6.8.2 version was installed it didnt work (404). I am running newest version of WordPress with Avada Theme.
]]>Hello,
I am using:
TEC Pro, Elementor Pro, Elementor Hello theme. Latest version of all.
Context:
I am not a developer. Because your elementor widgets have too many bugs, and the elementor template provided does not look good at all (I spent 4 hours trying to tweak the widgets, but there a lot of bugs) — I have decided to just use default TEC events calendar which looks wonderful.
THE PROBLEM
Elementor hello theme default Font not applying:
I have set
/events/
and /events/any-category
, my default Elementor font of Inter **does not** and my default text colour of #131314 does not. Hello there.
I’m using the latest version of TEC Pro and Elementor Pro.
SCREENSHOT 1 — here
(1) I can create dynamic links to event category pages for a MENU
(2) But how do I create a dynamic link for the entire “/events/” page?
SCREENSHOT 2 — here
(3) How do I create a dynamic link to an event category page for a BUTTON etc. ?
Thank you,
Michelle
Hi,
We are using events calender pro “Photo” view, and trying to translate the “previous events” and “next events” buttons.
Im fairly certain i can do this with the “Say what” plugin, but i can’t find the right text domain.
Could anyone point me in the right direction?
]]>Issue Report: Two Event Calendar Bugs
Issue 1: Year Display Problem
Description
When setting the year display as "2024年" (with Japanese year character), the "年" character is not showing up
https://snipboard.io/yXS0LG.jpg
The setting correctly includes the "年" character
https://snipboard.io/si8ltg.jpg
*Screenshot attached
Expected Behavior
Calendar should display "2024年" completely with the year character
Issue 2: View Switching Malfunction
Description
View switching functionality on the calendar page is not working
Specifically, the tabs for switching between "List" and "Month" views are unresponsive
Clicking on the tabs produces no change in view
Expected Behavior
Clicking the tabs should properly switch between List and Month views
https://snipboard.io/3ifug6.jpg
Verification Steps Taken
Browser cache has been cleared
Confirmed no conflicts with other plugins
Priority
Medium
Additional Information
Issues occur on all calendar instances across the site
No JavaScript errors observed
*Screenshots attached
]]>
Hello everyone.
I have updated the Events Calendar plugin for the first time in a long time. From version 5.14.0.1 to 6.8.1. Since I updated, the month and day links no longer work. The calendar search function also no longer works. The migration/upgrade in the plugin settings was successful after the version update.
I did a test downgrade to a 5.X version. Everything works fine again. But as soon as I upgrade to version 6.0, the problems appear.
I hope you can help me.
I need to change one message generated by the calendar to another, I mean the message “There are no upcoming events.”. I tried with the below JS, but it didn’t work. Please help – how can I change the content of this message?
document.addEventListener("DOMContentLoaded", function () {
const updateEventMessage = () => {
const noEventsMessage = document.querySelector(
".tribe-events-c-messages__message-list-item[data-key='0']"
);
if (noEventsMessage && noEventsMessage.textContent.trim() === "There are no upcoming events.") {
noEventsMessage.textContent = "My NEW text.";
}
};
const observer = new MutationObserver(function (mutationsList) {
mutationsList.forEach(function (mutation) {
if (mutation.type === "childList") {
updateEventMessage();
}
});
});
const targetNode = document.querySelector(".tribe-events-c-messages__message-list");
if (targetNode) {
observer.observe(targetNode, {
childList: true,
subtree: true
});
}
updateEventMessage();
});
]]>
Hi all ??! The Events Calendar 6.8.2 is here!
The latest update of The Events Calendar introduces Help Hub the centralized support and resource interface for enhanced user guidance and plugin assistance!
To learn more about the specific changes, please refer to the release notes:
https://theeventscalendar.com/release-notes/the-events-calendar/the-events-calendar-6-8-2/
As always, we recommend testing updates on a staging site first, but it should all be smooth sailing.
Best,
Abz
I have noticed that The Events Calendar
running the latest version 6.8.1 with the latest version of The Events Calendar Extension: Tweaks
at 1.1.2 are showing some errors after update.
Fatal error: Uncaught Error: Too few arguments to function TEC\Events\Integrations\Plugins\TEC_Tweaks_Extension\Provider::TEC\Events\Integrations\Plugins\TEC_Tweaks_Extension\{closure}(), 1 passed in /home/customer/www/example.com/public_html/wp-includes/class-wp-hook.php on line 324 and exactly 2 expected in /home/customer/www/example.com/public_html/wp-content/plugins/the-events-calendar/src/Events/Integrations/Plugins/TEC_Tweaks_Extension/Provider.php on line 47
Is this some common issue or is this problem on my side?
]]>We have set not to index the pages of Events.
But the URL are being indexed in Google search console
Also creates multiple links that are indexed by search engines.
Eg:https://mysite.com/events/2017-11-22/
https://mysite.com/events/2017-11-24/
I am using SEOpress pro
Hello everyone,
i’m running Version 6.8.1 of the free event plugin. After the update to WordPress 6.7 the plugin is no longer usable. When I open an event, the blocks for price, date, address, … the following error appears: This block has encountered an error and cannot be previewed.
The problem occurs with all created events. The display in the front end is still error-free and correct. There are no errors in the log.
best
]]>I’m setting up RSVP events on my website and I cant figure out a way to prevent the same user from being able to RSVP over and over again. They are able to refresh the page and the “Going” button becomes available again. Is there any way to stop this so they can only sign up with their email once?
]]>I really like this plugin, along with The Events Calendar Shortcode & Block Pro, which is what I use to display the calendar on pages I create. The builtin “/events” page displays something that the shortcode does not: the search box at the top with the “Find Events” button. I just tried using this for the first time, and as far as I could tell, it did nothing. Using Chrome Developer Tools, I could see that clicking the Find Events button resulted in 403 errors reported in the console.. Here are the details. And I get the exact same error when clicking any of the other three buttons (List, Month, Day). The reason is that the site has the Force Login plugin activated. I can’t remember the details on this, but I think there is some way that you can make XHR requests that will pass along the cookies from the requestor, which should solve this problem, since the window making the request is logged in to WordPress.
So I verified that deactivating the Force Login plugin gets rid of the errors. And the List, Month, and Day buttons then behave as they should. However, the Find Events button still doesn’t seem to work. If I enter words from event titles or descriptions in the search box, the result is always “There were no results found for?“whatever-I-entered”. Is the feature supposed to search both titles and text from events? If not, then what does it search? Is it case-sensitive?
]]>Dates have been created for over 2000 years into the future by The Events Calendar. My site went from 600 urls to over 50,000 due to this issue. How do I get rid of these erroneous future urls??
Thanks!!
]]>This event in Jan 2025 https://subhana.com.au/retreat/sangsurya-jan-2025/ isn’t showing up on the calendar at https://subhana.com.au/retreats-events/
I can’t work out why this is the case.
]]>Hi there,
Can you guys kindly update your plugin to make sure external links are opened in a new tab?
For example, your WP Dashboard widget links open in the same tab. They shouldn’t.
Thank you!
]]>I cant find virtual events in my Add New Events. How do I get it and is it possible to allow virtual attendees register for the virtual events?
]]>Hello. I recently installed the free version of Events Calendar on my site (built on WordPress with BoldGrid customization), and for some reason it seems to be replicating text from my site’s header and inserting it at above the calendar.
Any ideas how to get rid of it?
]]>After upgrading to WordPress 6.7 I am seeing “This block has encountered an error and cannot be previewed” for all The Events Calendar blocks when I try to create new or edit existing events.
All of my plugins and themes are updated to latest release.
WordPress version: 6.7
The Events Calendar version: 6.8.1
Theme: error displays in Kadence and default 2025 themes
What I’ve tried:
hi
I have a user that had editor privileges (have increased that to author) who since the latest update, cannot add a new event because the date/time panel is not present on the page. There is another user with the same rights who does see the panel when adding an event and i can see it as superadmin.
Any ideas what I can try?
I am running Events Calendar Version 6.8.1 and WordPress Multisite version 6.7 on Ubuntu 22.04.5 LTS with PHP?8.2.25, MariaDB 10.6.18
]]>I have tried to translate the Event Calendar plugin which led to the plugin being translated in the admin panel but not on the website. I downloaded the .po-file and added it together with an .mo-file in wp-content/plugins/the-events-calendar/lang.
I am also using the WPML plugin for translation of other parts of the website where it translates from Swedish to English. However, the calendar should always be in Swedish. Could there be a conflict here? How could I correct this problem?
]]>Hello,
The current WordPress permalinks this site is using is:
/%postname%
However, the List / Month / Date and internal URLs are using the permalinks with the trailing slash at the end like this:
/events/list/
/events/month/
/events/today/
The same happens with events:
/events/2024-10-03/
/events/2024-10-03/?ical=1
/events/2024-10-03/?outlook-ical=1
/events/2024-10-04/
/events/2024-10-04/?ical=1
/events/2024-10-04/?outlook-ical=1
/events/2024-10-05/
/events/2024-10-05/?ical=1
/events/2024-10-05/?outlook-ical=1
We don’t understand why, if WordPress uses a custom permalink, The Events Calendar does not respect the same permalink structure.
Here is what the current page is using:
<?php
use Tribe\Events\Views\V2\Template_Bootstrap;
echo Tribe(Template_Bootstrap::class) ->get_view_html();
?>
We also tested using in functions this code:
function untrailingslashit( $value ) {
return rtrim( $value, '/\' );
}
This creates a massive list of internal redirects from Events and eats the crawl budget.
How can we remove the trailing slash at the end?
]]>I’m using PHP 8.3, plugin 6.8.1 and WordPress 6.6.2 with DEBUG on. When use Import for a csv file of venues I get the following messages:
Deprecated: auto_detect_line_endings is deprecated in /var/www/html/wp-content/plugins/the-events-calendar/src/Tribe/Importer/File_Reader.php on line 20
Which I think is related to: https://php.watch/versions/8.1/auto_detect_line_endings-ini-deprecated
Deprecated: Function utf8_decode() is deprecated in /var/www/html/wp-content/plugins/the-events-calendar/common/src/Tribe/Meta/Chunker.php on line 472
Which I think is related to: https://php.watch/versions/8.2/utf8_encode-utf8_decode-deprecated
]]>I’m getting the following deprecated message when accessing the Events->Import screen:
Deprecated: version_compare(): Passing null to parameter #2 ($version2) of type string is deprecated in /var/www/html/wp-content/plugins/the-events-calendar/common/src/Tribe/PUE/Checker.php on line 1628
I’m using PHP8.3, plugin version 6.8.1, WordPress 6.6.2. Note this notice is only reached after the deprecated messages from https://www.ads-software.com/support/topic/deprecated-errors-on-php-8-2/ have been sorted.
I think the problem is Tribe__PUE__Checker::get_installed_version which drops through without setting a return value – hence is null. The reason it drops through is because get_plugin_file() returns “event-aggregator/event-aggregator.php” which doesn’t match any installed plugin (as I don’t have the Event Aggregator add on).
]]>I just did a fresh install with a new website with kadence theme and I get this error on all the blocks
This block has encountered an error and cannot be previewed.
]]>