fix: destination cards show a tour photo again

vc_term_image_url() cached empty results for 12h and relied on an SQL
meta comparison to find a tour with a photo; destination cards site-wide
(homepage and region pages) were blank. Read the photo in PHP from up to
10 tours (primary, else first gallery image), use a fresh cache key, and
expire empty results after an hour. Plugin 1.9.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-29 16:47:01 +03:30
parent 98e706477c
commit fd6dba3203
4 changed files with 21 additions and 15 deletions

View File

@@ -4,13 +4,13 @@ defined('ABSPATH') || exit;
/**
* Plugin Name: Viator Collector
* Description: Import Viator tours using the Viator Partner API and display them with native WordPress post types, templates, and shortcodes.
* Version: 1.9.2
* Version: 1.9.3
* Author: Amir Bagheri
* License: GPL-2.0-or-later
* Text Domain: viator-collector
*/
define('VC_VERSION', '1.9.2');
define('VC_VERSION', '1.9.3');
define('VC_PLUGIN_FILE', __FILE__);
define('VC_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('VC_PLUGIN_URL', plugin_dir_url(__FILE__));