Changeset 3226839
- Timestamp:
- 01/22/2025 12:34:55 PM (14 months ago)
- Location:
- woocommerce-custom-product-tabs-lite/trunk
- Files:
-
- 3 added
- 3 edited
-
i18n/languages/woocommerce-custom-product-tabs-lite.pot (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
src (added)
-
src/Helpers (added)
-
src/Helpers/ProductTabsMetaHandler.php (added)
-
woocommerce-custom-product-tabs-lite.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-custom-product-tabs-lite/trunk/i18n/languages/woocommerce-custom-product-tabs-lite.pot
r3178158 r3226839 1 # Copyright (C) 202 4SkyVerge1 # Copyright (C) 2025 SkyVerge 2 2 # This file is distributed under the GNU General Public License v3.0. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Custom Product Tabs Lite for WooCommerce 1.9. 0\n"5 "Project-Id-Version: Custom Product Tabs Lite for WooCommerce 1.9.1\n" 6 6 "Report-Msgid-Bugs-To: https://woocommerce.com/my-account/marketplace-ticket-form/\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 4-10-29T15:26:46+00:00\n"12 "POT-Creation-Date: 2025-01-22T12:33:59+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2. 6.0\n"14 "X-Generator: WP-CLI 2.11.0\n" 15 15 "X-Domain: woocommerce-custom-product-tabs-lite\n" 16 16 17 17 #. Plugin Name of the plugin 18 #: woocommerce-custom-product-tabs-lite.php 18 19 msgid "Custom Product Tabs Lite for WooCommerce" 19 20 msgstr "" 20 21 21 22 #. Plugin URI of the plugin 23 #: woocommerce-custom-product-tabs-lite.php 22 24 msgid "https://www.skyverge.com/product/woocommerce-custom-product-tabs-lite/" 23 25 msgstr "" 24 26 25 27 #. Description of the plugin 28 #: woocommerce-custom-product-tabs-lite.php 26 29 msgid "Extends WooCommerce to add a custom product view page tab" 27 30 msgstr "" 28 31 29 32 #. Author of the plugin 33 #: woocommerce-custom-product-tabs-lite.php 30 34 msgid "SkyVerge" 31 35 msgstr "" 32 36 33 37 #. Author URI of the plugin 38 #: woocommerce-custom-product-tabs-lite.php 34 39 msgid "http://www.skyverge.com/" 35 40 msgstr "" 36 41 37 42 #. translators: Placeholders: %s - plugin name 38 #: woocommerce-custom-product-tabs-lite.php:1 0243 #: woocommerce-custom-product-tabs-lite.php:131 39 44 msgid "You cannot clone instances of %s." 40 45 msgstr "" 41 46 42 47 #. translators: Placeholders: %s - plugin name 43 #: woocommerce-custom-product-tabs-lite.php:1 1348 #: woocommerce-custom-product-tabs-lite.php:142 44 49 msgid "You cannot unserialize instances of %s." 45 50 msgstr "" 46 51 47 #: woocommerce-custom-product-tabs-lite.php:2 2552 #: woocommerce-custom-product-tabs-lite.php:254 48 53 msgid "Custom Tab" 49 54 msgstr "" 50 55 51 #: woocommerce-custom-product-tabs-lite.php:2 5956 #: woocommerce-custom-product-tabs-lite.php:288 52 57 msgid "Tab Title" 53 58 msgstr "" 54 59 55 #: woocommerce-custom-product-tabs-lite.php:2 6060 #: woocommerce-custom-product-tabs-lite.php:289 56 61 msgid "Required for tab to be visible" 57 62 msgstr "" 58 63 59 #: woocommerce-custom-product-tabs-lite.php:2 6664 #: woocommerce-custom-product-tabs-lite.php:295 60 65 msgid "Content" 61 66 msgstr "" 62 67 63 #: woocommerce-custom-product-tabs-lite.php:2 6768 #: woocommerce-custom-product-tabs-lite.php:296 64 69 msgid "HTML and text to display." 65 70 msgstr "" 66 71 67 72 #. translators: Placeholders: %1$s - <strong>, %2$s - </strong>, %3$s - version number, %4$s + %6$s - <a> tags, %5$s - </a> 68 #: woocommerce-custom-product-tabs-lite.php:4 2773 #: woocommerce-custom-product-tabs-lite.php:455 69 74 msgid "%1$sCustom Product Tabs Lite for WooCommerce is inactive.%2$s This plugin requires WooCommerce %3$s or newer. Please %4$sinstall WooCommerce %3$s or newer%5$s, or %6$srun the WooCommerce database upgrade%5$s." 70 75 msgstr "" -
woocommerce-custom-product-tabs-lite/trunk/readme.txt
r3197253 r3226839 4 4 Requires at least: 5.6 5 5 Requires PHP: 7.4 6 Tested up to: 6.7 7 Stable tag: 1.9. 06 Tested up to: 6.7.1 7 Stable tag: 1.9.1 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 84 84 == Changelog == 85 85 86 = 2025.01.22 - version 1.9.1 = 87 * Misc - Standardize product tabs meta storage 88 86 89 = 2024.10.29 - version 1.9.0 = 87 90 * Fix - Ensure PHP 8.2+ compatibility -
woocommerce-custom-product-tabs-lite/trunk/woocommerce-custom-product-tabs-lite.php
r3178158 r3226839 6 6 * Author: SkyVerge 7 7 * Author URI: http://www.skyverge.com/ 8 * Version: 1.9. 09 * Tested up to: 6. 6.28 * Version: 1.9.1 9 * Tested up to: 6.7.1 10 10 * Text Domain: woocommerce-custom-product-tabs-lite 11 11 * Domain Path: /i18n/languages/ … … 21 21 * 22 22 * WC requires at least: 3.9.4 23 * WC tested up to: 9. 3.323 * WC tested up to: 9.6.0 24 24 */ 25 use WooCommerceCustomProductTabsLite\Helpers\ProductTabsMetaHandler; 25 26 26 27 defined( 'ABSPATH' ) or exit; … … 41 42 42 43 /** plugin version number */ 43 const VERSION = '1.9. 0';44 const VERSION = '1.9.1'; 44 45 45 46 /** required WooCommerce version number */ … … 51 52 /** @var bool|array tab data */ 52 53 private $tab_data = false; 54 55 private ProductTabsMetaHandler $productTabsMetaHandler; 53 56 54 57 /** @var WooCommerceCustomProductTabsLite single instance of this plugin */ … … 67 70 $this->install(); 68 71 } 72 73 $this->includes(); 74 $this->addHooks(); 75 } 76 77 /** 78 * Loads required files. 79 * 80 * @return void 81 */ 82 public function includes() 83 { 84 require_once(__DIR__ . '/src/Helpers/ProductTabsMetaHandler.php'); 85 86 $this->productTabsMetaHandler = new ProductTabsMetaHandler; 87 } 88 89 90 /** 91 * Registers hook callbacks to bootstrap the plugin. 92 * 93 * @return void 94 */ 95 public function addHooks() 96 { 97 $this->productTabsMetaHandler->addHooks(); 69 98 70 99 add_action( 'init', array( $this, 'load_translation' ) ); … … 238 267 239 268 // pull the custom tab data out of the database 240 $tab_data = $ product->get_meta( 'frs_woo_product_tabs', true, 'edit');269 $tab_data = $this->productTabsMetaHandler->getMeta($product); 241 270 242 271 if ( empty( $tab_data ) ) { … … 275 304 276 305 /** 277 * Saves the data input into the product boxes, as post meta data 278 * identified by the name 'frs_woo_product_tabs' 306 * Saves the data input into the product boxes, as post meta data. 279 307 * 280 308 * @since 1.0.0 … … 290 318 $product = wc_get_product( $post_id ); 291 319 292 if ( empty( $tab_title ) && empty( $tab_content ) && $ product->get_meta( 'frs_woo_product_tabs', true, 'edit') ) {320 if ( empty( $tab_title ) && empty( $tab_content ) && $this->productTabsMetaHandler->getMeta($product) ) { 293 321 294 322 // clean up if the custom tabs are removed 295 $ product->delete_meta_data( 'frs_woo_product_tabs');323 $this->productTabsMetaHandler->deleteMeta($product); 296 324 $product->save(); 297 325 298 326 } elseif ( ! empty( $tab_title ) || ! empty( $tab_content ) ) { 299 327 300 $tab_data = array(); 301 $tab_id = ''; 328 $tab_id = ''; 302 329 303 330 if ( $tab_title ) { … … 327 354 } 328 355 329 // save the serialized data to the database 330 $tab_data[] = array( 331 'title' => $tab_title, 332 'id' => $tab_id, 333 'content' => $tab_content, 334 ); 335 336 $product->update_meta_data( 'frs_woo_product_tabs', $tab_data ); 356 $tab_data = [ 357 [ 358 'title' => $tab_title, 359 'id' => $tab_id, 360 'content' => $tab_content, 361 ] 362 ]; 363 364 $this->productTabsMetaHandler->updateMeta($product, $tab_data); 337 365 $product->save(); 338 366 } … … 370 398 371 399 if ( false === $this->tab_data ) { 372 $this->tab_data = maybe_unserialize( $product->get_meta( 'frs_woo_product_tabs', true, 'edit' ));400 $this->tab_data = $this->productTabsMetaHandler->getMeta($product); 373 401 } 374 402
Note: See TracChangeset
for help on using the changeset viewer.