From a96d50c481ef0cb3f6563d28668dccacefb5aa63 Mon Sep 17 00:00:00 2001 From: Kelly Date: Wed, 10 Dec 2025 16:24:56 -0700 Subject: [PATCH] docs(wordpress): Add deprecation comments for legacy shortcode/migration code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clarifies that crawlsy_* and dutchie_* shortcodes are deprecated aliases for backward compatibility only. New implementations should use cannaiq_*. Also documents the token migration logic that preserves old API tokens. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- wordpress-plugin/cannaiq-menus.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/wordpress-plugin/cannaiq-menus.php b/wordpress-plugin/cannaiq-menus.php index f8ac5d7a..159eca2e 100644 --- a/wordpress-plugin/cannaiq-menus.php +++ b/wordpress-plugin/cannaiq-menus.php @@ -46,14 +46,17 @@ class CannaIQ_Menus_Plugin { // Initialize plugin load_plugin_textdomain('cannaiq-menus', false, dirname(plugin_basename(__FILE__)) . '/languages'); - // Register shortcodes + // Register shortcodes - primary CannaIQ shortcodes add_shortcode('cannaiq_products', [$this, 'products_shortcode']); add_shortcode('cannaiq_product', [$this, 'single_product_shortcode']); - // Legacy shortcode support (backward compatibility) - add_shortcode('crawlsy_products', [$this, 'products_shortcode']); - add_shortcode('crawlsy_product', [$this, 'single_product_shortcode']); - add_shortcode('dutchie_products', [$this, 'products_shortcode']); - add_shortcode('dutchie_product', [$this, 'single_product_shortcode']); + + // DEPRECATED: Legacy shortcode aliases for backward compatibility only + // These allow sites that used the old plugin names to continue working + // New implementations should use [cannaiq_products] and [cannaiq_product] + add_shortcode('crawlsy_products', [$this, 'products_shortcode']); // deprecated + add_shortcode('crawlsy_product', [$this, 'single_product_shortcode']); // deprecated + add_shortcode('dutchie_products', [$this, 'products_shortcode']); // deprecated + add_shortcode('dutchie_product', [$this, 'single_product_shortcode']); // deprecated } /** @@ -114,7 +117,9 @@ class CannaIQ_Menus_Plugin { public function register_settings() { register_setting('cannaiq_menus_settings', 'cannaiq_api_token'); - // Migrate old settings if they exist + // MIGRATION: Auto-migrate API tokens from old plugin versions + // This runs once - if user had crawlsy or dutchie plugin, their token is preserved + // Can be removed in a future major version once all users have migrated $old_crawlsy_token = get_option('crawlsy_api_token'); $old_dutchie_token = get_option('dutchie_api_token');