WPML

问题概述

The Events Calendar PRO 插件引入了一项新功能——系列事件 (在新标签页中打开),该功能目前与 WPML 仅部分兼容。我们正与作者密切合作,以便尽快针对以下问题实现完全兼容:

  • 使用 The Event Calendar PRO 简码显示场馆、城市、组织者等信息时,它们不会在前端显示。
  • Google 地图在首次加载页面时不会显示,您需要刷新页面。

临时解决方法

在继续操作之前,请对您的站点进行完整备份。

打开 …./wp-content/plugins/the-events-calendar/src/Tribe/Integrations/WPML/Meta.php 文件并进行以下两处修改。

  1. 将:
    use Tribe__Events__Main as Main;

    更改为:

    use Tribe__Events__Main as Main;
    use TEC\Events\Custom_Tables\V1\Models\Occurrence;
  2. 并将:
    if (!empty($_POST)) {
    	return $value;
    }

    更改为:

    if (!empty($_POST)) {
    	return $value;
    }
    
    if (tribe()->getVar('ct1_fully_activated')) {
    	$object_id = Occurrence::normalize_id($object_id);
    }

所有已知问题