diff --git a/.claude/settings.local.json b/.claude/settings.local.json index fd19015..b65518f 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -13,7 +13,8 @@ "Bash(git tag:*)", "Bash(rsync:*)", "Bash(zip -r:*)", - "Bash(cat:*)" + "Bash(cat:*)", + "Bash(git commit -m \"$\\(cat <<''EOF''\nRelease version 1.1.2 - Catalog button modification\n\nEnhanced package quantity restriction enforcement by replacing \"Add to Cart\"\nbuttons with \"View Options\" links on catalog pages for products with\nquantity restrictions. This prevents customers from attempting to add\nrestricted products directly from shop/category pages.\n\nChanges:\n- Added catalog button modification for restricted products\n- Implemented \"View Options\" button with eye icon styling\n- Created has_quantity_restriction\\(\\) helper method\n- Extended CSS loading to all WooCommerce pages\n- Added modify_catalog_add_to_cart_button\\(\\) filter method\n- Updated translations with 2 new strings \\(en_US, de_DE, de_CH_informal\\)\n\n🤖 Generated with [Claude Code]\\(https://claude.com/claude-code\\)\n\nCo-Authored-By: Claude Sonnet 4.5 \nEOF\n\\)\")" ] } } diff --git a/CHANGELOG.md b/CHANGELOG.md index f22a90c..b16b6d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,30 @@ All notable changes to WooCommerce Tier and Package Prices will be documented in The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.1.2] - 2025-12-21 + +### Added +- Catalog "View Options" button for products with quantity restrictions +- Automatic button replacement in shop/category/archive pages +- Eye icon (Dashicons) for "View Options" button styling + +### Changed +- "Add to Cart" button replaced with "View Options" link on catalog pages for restricted products +- CSS now loads on all WooCommerce pages (shop, cart, checkout, product) +- Catalog buttons now direct to product page instead of adding to cart + +### Technical +- Added `has_quantity_restriction()` static method in WC_TPP_Frontend class +- Added `modify_catalog_add_to_cart_button()` method in WC_TPP_Frontend class +- Extended `woocommerce_loop_add_to_cart_link` filter hook +- CSS classes: `wc-tpp-view-options`, `wc-tpp-cart-quantity`, `wc-tpp-restriction-notice` +- Updated `enqueue_scripts()` to load CSS on all WooCommerce pages + +### Translations +- Added 2 new translatable strings +- Updated all translations (en_US, de_DE, de_CH_informal) +- Compiled all .mo files with new strings + ## [1.1.1] - 2025-12-21 ### Added diff --git a/assets/css/frontend.css b/assets/css/frontend.css index c381502..4fd2c59 100644 --- a/assets/css/frontend.css +++ b/assets/css/frontend.css @@ -156,6 +156,45 @@ font-style: italic; } +/* Catalog "View Options" button */ +a.wc-tpp-view-options { + display: inline-block; + text-align: center; + text-decoration: none; + line-height: 1.5; + position: relative; +} + +a.wc-tpp-view-options::before { + content: "\f06e"; + font-family: "dashicons"; + margin-right: 5px; + display: inline-block; + font-size: 1.1em; + vertical-align: middle; +} + +/* Cart quantity display for restricted products */ +.wc-tpp-cart-quantity { + display: inline-block; + padding: 5px 10px; + background: #f5f5f5; + border: 1px solid #ddd; + border-radius: 3px; + font-weight: 600; +} + +/* Restriction notice */ +.wc-tpp-restriction-notice { + padding: 10px 15px; + background: #fff3cd; + border: 1px solid #ffc107; + border-radius: 4px; + margin-bottom: 15px; + color: #856404; + font-size: 0.95em; +} + /* Responsive design */ @media (max-width: 768px) { .wc-tpp-packages { diff --git a/composer.json b/composer.json index 277df76..44f448d 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "magdev/wc-tier-package-prices", "description": "WooCommerce plugin for tier pricing and package prices with Twig templates", - "version": "1.1.1", + "version": "1.1.2", "type": "wordpress-plugin", "license": "GPL-2.0-or-later", "authors": [ diff --git a/includes/class-wc-tpp-frontend.php b/includes/class-wc-tpp-frontend.php index e80bfe1..3dc755c 100644 --- a/includes/class-wc-tpp-frontend.php +++ b/includes/class-wc-tpp-frontend.php @@ -15,11 +15,19 @@ class WC_TPP_Frontend { add_action('woocommerce_after_add_to_cart_button', array($this, 'display_pricing_table_after'), 10); add_action('woocommerce_single_product_summary', array($this, 'display_pricing_table_after_price'), 15); add_action('woocommerce_before_add_to_cart_quantity', array($this, 'maybe_hide_quantity_input')); + + // Modify catalog add to cart button for restricted products + add_filter('woocommerce_loop_add_to_cart_link', array($this, 'modify_catalog_add_to_cart_button'), 10, 2); } public function enqueue_scripts() { - if (is_product()) { + // Enqueue CSS on all WooCommerce pages (for catalog buttons and cart) + if (is_woocommerce() || is_cart() || is_checkout() || is_product()) { wp_enqueue_style('wc-tpp-frontend', WC_TPP_PLUGIN_URL . 'assets/css/frontend.css', array(), WC_TPP_VERSION); + } + + // Enqueue JS only on product pages + if (is_product()) { wp_enqueue_script('wc-tpp-frontend', WC_TPP_PLUGIN_URL . 'assets/js/frontend.js', array('jquery'), WC_TPP_VERSION, true); // Localize script with currency settings @@ -126,6 +134,53 @@ class WC_TPP_Frontend { return null; } + + /** + * Check if a product has quantity restrictions enabled + * + * @param int $product_id Product ID + * @return bool + */ + public static function has_quantity_restriction($product_id) { + $global_restrict = get_option('wc_tpp_restrict_package_quantities', 'no') === 'yes'; + $product_restrict = get_post_meta($product_id, '_wc_tpp_restrict_to_packages', true) === 'yes'; + $packages = get_post_meta($product_id, '_wc_tpp_packages', true); + + return ($global_restrict || $product_restrict) && !empty($packages); + } + + /** + * Modify catalog add to cart button for products with quantity restrictions + * + * @param string $html Add to cart button HTML + * @param WC_Product $product Product object + * @return string Modified HTML + */ + public function modify_catalog_add_to_cart_button($html, $product) { + if (!$product || !is_a($product, 'WC_Product')) { + return $html; + } + + $product_id = $product->get_id(); + + // Check if product has quantity restrictions + if (!self::has_quantity_restriction($product_id)) { + return $html; + } + + // Replace add to cart button with "View Options" link + $product_url = esc_url($product->get_permalink()); + $button_text = esc_html__('View Options', 'wc-tier-package-prices'); + + $new_html = sprintf( + '%s', + $product_url, + esc_attr(sprintf(__('View options for %s', 'wc-tier-package-prices'), $product->get_name())), + $button_text + ); + + return $new_html; + } } new WC_TPP_Frontend(); diff --git a/languages/wc-tier-package-prices-de_CH_informal.mo b/languages/wc-tier-package-prices-de_CH_informal.mo index 0860183..bd1d556 100644 Binary files a/languages/wc-tier-package-prices-de_CH_informal.mo and b/languages/wc-tier-package-prices-de_CH_informal.mo differ diff --git a/languages/wc-tier-package-prices-de_CH_informal.po b/languages/wc-tier-package-prices-de_CH_informal.po index 6f367b2..fdafc77 100644 --- a/languages/wc-tier-package-prices-de_CH_informal.po +++ b/languages/wc-tier-package-prices-de_CH_informal.po @@ -3,7 +3,7 @@ # This file is distributed under the GPL v2 or later. msgid "" msgstr "" -"Project-Id-Version: WooCommerce Tier and Package Prices 1.1.1\n" +"Project-Id-Version: WooCommerce Tier and Package Prices 1.1.2\n" "Report-Msgid-Bugs-To: https://src.bundespruefstelle.ch/wc-tier-package-prices\n" "POT-Creation-Date: 2025-12-21 00:00+0000\n" "PO-Revision-Date: 2025-12-21 00:00+0000\n" @@ -235,3 +235,11 @@ msgstr "dieses Produkt" #: includes/class-wc-tpp-cart.php:128 msgid "The quantity %1$d is not available for %2$s. Please choose from the available package sizes: %3$s" msgstr "Die Menge %1$d ist für %2$s nicht verfügbar. Bitte wähle aus den verfügbaren Paketgrössen: %3$s" + +#: includes/class-wc-tpp-frontend.php:173 +msgid "View Options" +msgstr "Optionen ansehen" + +#: includes/class-wc-tpp-frontend.php:178 +msgid "View options for %s" +msgstr "Optionen für %s ansehen" diff --git a/languages/wc-tier-package-prices-de_DE.mo b/languages/wc-tier-package-prices-de_DE.mo index 4e5ae8d..ed0138e 100644 Binary files a/languages/wc-tier-package-prices-de_DE.mo and b/languages/wc-tier-package-prices-de_DE.mo differ diff --git a/languages/wc-tier-package-prices-de_DE.po b/languages/wc-tier-package-prices-de_DE.po index 1aa1e65..c796066 100644 --- a/languages/wc-tier-package-prices-de_DE.po +++ b/languages/wc-tier-package-prices-de_DE.po @@ -3,7 +3,7 @@ # This file is distributed under the GPL v2 or later. msgid "" msgstr "" -"Project-Id-Version: WooCommerce Tier and Package Prices 1.1.1\n" +"Project-Id-Version: WooCommerce Tier and Package Prices 1.1.2\n" "Report-Msgid-Bugs-To: https://src.bundespruefstelle.ch/wc-tier-package-prices\n" "POT-Creation-Date: 2025-12-21 00:00+0000\n" "PO-Revision-Date: 2025-12-21 00:00+0000\n" @@ -235,3 +235,11 @@ msgstr "dieses Produkt" #: includes/class-wc-tpp-cart.php:128 msgid "The quantity %1$d is not available for %2$s. Please choose from the available package sizes: %3$s" msgstr "Die Menge %1$d ist für %2$s nicht verfügbar. Bitte wählen Sie aus den verfügbaren Paketgrößen: %3$s" + +#: includes/class-wc-tpp-frontend.php:173 +msgid "View Options" +msgstr "Optionen ansehen" + +#: includes/class-wc-tpp-frontend.php:178 +msgid "View options for %s" +msgstr "Optionen für %s ansehen" diff --git a/languages/wc-tier-package-prices-en_US.mo b/languages/wc-tier-package-prices-en_US.mo index 85352a2..e03cc3e 100644 Binary files a/languages/wc-tier-package-prices-en_US.mo and b/languages/wc-tier-package-prices-en_US.mo differ diff --git a/languages/wc-tier-package-prices-en_US.po b/languages/wc-tier-package-prices-en_US.po index e7377f9..d0f10ac 100644 --- a/languages/wc-tier-package-prices-en_US.po +++ b/languages/wc-tier-package-prices-en_US.po @@ -3,7 +3,7 @@ # This file is distributed under the GPL v2 or later. msgid "" msgstr "" -"Project-Id-Version: WooCommerce Tier and Package Prices 1.1.1\n" +"Project-Id-Version: WooCommerce Tier and Package Prices 1.1.2\n" "Report-Msgid-Bugs-To: https://src.bundespruefstelle.ch/wc-tier-package-prices\n" "POT-Creation-Date: 2025-12-21 00:00+0000\n" "PO-Revision-Date: 2025-12-21 00:00+0000\n" @@ -235,3 +235,11 @@ msgstr "this product" #: includes/class-wc-tpp-cart.php:128 msgid "The quantity %1$d is not available for %2$s. Please choose from the available package sizes: %3$s" msgstr "The quantity %1$d is not available for %2$s. Please choose from the available package sizes: %3$s" + +#: includes/class-wc-tpp-frontend.php:173 +msgid "View Options" +msgstr "View Options" + +#: includes/class-wc-tpp-frontend.php:178 +msgid "View options for %s" +msgstr "View options for %s" diff --git a/languages/wc-tier-package-prices.pot b/languages/wc-tier-package-prices.pot index 8f58d1a..c5473c4 100644 --- a/languages/wc-tier-package-prices.pot +++ b/languages/wc-tier-package-prices.pot @@ -2,7 +2,7 @@ # This file is distributed under the GPL v2 or later. msgid "" msgstr "" -"Project-Id-Version: WooCommerce Tier and Package Prices 1.1.1\n" +"Project-Id-Version: WooCommerce Tier and Package Prices 1.1.2\n" "Report-Msgid-Bugs-To: https://src.bundespruefstelle.ch/wc-tier-package-prices\n" "POT-Creation-Date: 2025-12-21 00:00+0000\n" "MIME-Version: 1.0\n" @@ -222,3 +222,11 @@ msgstr "" #: includes/class-wc-tpp-cart.php:128 msgid "The quantity %1$d is not available for %2$s. Please choose from the available package sizes: %3$s" msgstr "" + +#: includes/class-wc-tpp-frontend.php:173 +msgid "View Options" +msgstr "" + +#: includes/class-wc-tpp-frontend.php:178 +msgid "View options for %s" +msgstr "" diff --git a/releases/RELEASE-INFO-1.1.1.md b/releases/RELEASE-INFO-1.1.1.md new file mode 100644 index 0000000..2ab7ed1 --- /dev/null +++ b/releases/RELEASE-INFO-1.1.1.md @@ -0,0 +1,272 @@ +# WooCommerce Tier and Package Prices - Release 1.1.1 + +**Release Date:** December 21, 2025 +**Version:** 1.1.1 +**Package Size:** 403 KB +**Git Tag:** v1.1.1 + +## Download + +**File:** `wc-tier-and-package-prices-1.1.1.zip` + +### Checksums + +**SHA256:** +``` +b951f8b7ddd2bad6b3415d4583709fdf88f66aea4eae70110c903757ff53e045 +``` + +**MD5:** +``` +51c4f8a7c3ccede2d2005f2fe3ebe44e +``` + +## What's New in 1.1.1 + +This is a **patch release** that enhances the package quantity restriction feature introduced in v1.1.0 by preventing cart quantity bypass. + +### Security Enhancement +- **Fixed:** Cart quantity bypass vulnerability for package-restricted products + - Customers could previously modify quantities in the cart to bypass package restrictions + - This patch ensures restrictions are enforced throughout the entire purchase flow + +### New Features +- **Cart Quantity Field Hiding** - NEW + - Automatic hiding of quantity input field in cart when restrictions are enabled + - Cart displays quantity as read-only text for restricted products + - Prevents manual quantity modification in shopping cart + - Seamless integration with existing restriction settings + +### Technical Improvements +- Added `maybe_hide_cart_quantity_input()` method in WC_TPP_Cart class +- Extended `woocommerce_cart_item_quantity` filter hook +- New CSS class: `wc-tpp-cart-quantity` for styled quantity display +- Enhanced cart validation and display consistency + +## What's Changed + +### Added +- Cart quantity field hiding when package restriction is enabled +- Automatic read-only quantity display in cart for restricted products + +### Changed +- Cart quantity input replaced with plain text when restrictions apply +- Enhanced cart display to prevent quantity modification for restricted products + +### Fixed +- Cart quantity bypass vulnerability for package-restricted products + +## Installation + +### New Installation + +1. Download the ZIP file: `wc-tier-and-package-prices-1.1.1.zip` +2. Log in to your WordPress admin panel +3. Navigate to **Plugins > Add New > Upload Plugin** +4. Choose the downloaded ZIP file +5. Click **Install Now** +6. After installation, click **Activate Plugin** +7. Go to **WooCommerce > Settings > Tier & Package Prices** to configure + +### Upgrade from 1.1.0 + +This is a **patch release** with a security fix. No configuration changes needed. + +**Steps:** +1. Deactivate version 1.1.0 +2. Upload and activate version 1.1.1 +3. All existing settings and data will be automatically preserved +4. No additional configuration required + +### Upgrade from 1.0.x + +Safe to upgrade directly. This version includes all features from v1.1.0 plus the cart quantity hiding enhancement. + +**Steps:** +1. Deactivate the current version +2. Upload and activate version 1.1.1 +3. All existing settings and data will be automatically preserved +4. Review the new package restriction features if desired + +### Requirements + +- **WordPress:** 6.0 or higher +- **PHP:** 7.4 or higher +- **WooCommerce:** 8.0 or higher + +## Complete Package Restriction Feature (v1.1.0 + v1.1.1) + +The package quantity restriction feature now provides complete enforcement across all touchpoints: + +### Product Page (v1.1.0) +- ✅ Quantity field automatically hidden when restriction enabled +- ✅ "Choose a package size below" notice displayed +- ✅ Visual package selection with highlighted states +- ✅ JavaScript validation prevents form submission without package selection + +### Add to Cart Validation (v1.1.0) +- ✅ Server-side validation on add-to-cart +- ✅ User-friendly error messages showing available package sizes +- ✅ Prevents manual quantity manipulation via form fields + +### Cart Page (v1.1.1 - NEW) +- ✅ Quantity field hidden/replaced with read-only text +- ✅ Prevents cart quantity modification +- ✅ Consistent restriction enforcement +- ✅ No bypass via cart updates + +### Settings +- ✅ Global setting to enable restrictions site-wide +- ✅ Per-product override for individual products +- ✅ Located in: WooCommerce > Settings > Tier & Package Prices + +## Use Cases + +### Scenario 1: Bulk-Only Sales +Enable restriction globally to sell products only in bulk quantities. + +**Example:** +- Package 1: 100 units at $500 +- Package 2: 250 units at $1,100 +- Package 3: 500 units at $2,000 + +Customers can only purchase these exact quantities on both product page and in cart. + +### Scenario 2: Sample Packs +Create fixed sample packs with no custom quantities. + +**Example:** +- Starter Pack: 10 items +- Trial Pack: 25 items +- Full Pack: 50 items + +Quantity cannot be changed in cart - customers must return to product page to select a different package. + +### Scenario 3: Promotional Bundles +Offer promotional pricing only for specific bundle sizes with no modifications allowed. + +**Example:** +- Holiday Bundle: 12 units (seasonal pricing) +- Party Pack: 24 units (bulk discount) +- Wholesale Bundle: 100 units (wholesale pricing) + +## Modified Files in 1.1.1 + +### Core Files Updated +- `wc-tier-and-package-prices.php` - Version updated to 1.1.1 +- `composer.json` - Version updated to 1.1.1 +- `CHANGELOG.md` - Added v1.1.1 section + +### PHP Classes Modified +- `includes/class-wc-tpp-cart.php` - Added `maybe_hide_cart_quantity_input()` method + +### Translation Files Updated +- `languages/wc-tier-package-prices.pot` - Version updated to 1.1.1 +- `languages/wc-tier-package-prices-en_US.po` - Version updated to 1.1.1 +- `languages/wc-tier-package-prices-de_DE.po` - Version updated to 1.1.1 +- `languages/wc-tier-package-prices-de_CH_informal.po` - Version updated to 1.1.1 + +## Complete Feature Set + +### Tier Pricing +- ✅ Quantity-based discount tiers +- ✅ Automatic price calculation +- ✅ Volume discount display + +### Package Pricing +- ✅ Fixed-price bundles +- ✅ Custom package labels +- ✅ Multiple package options per product +- ✅ Quantity restriction to packages only (v1.1.0) +- ✅ Cart quantity enforcement (v1.1.1 - NEW) + +### Admin Features +- ✅ WooCommerce Settings integration +- ✅ Easy-to-use product meta boxes +- ✅ Configurable display positions +- ✅ Native WooCommerce UI +- ✅ Global restriction setting +- ✅ Per-product restriction override + +### Frontend Features +- ✅ Beautiful pricing tables (Twig templates) +- ✅ Real-time cart updates +- ✅ Responsive design +- ✅ 3 languages supported +- ✅ Package-only selection mode +- ✅ Automatic quantity field hiding (product page & cart) +- ✅ Visual package selection +- ✅ Read-only cart quantity display (NEW) + +### Validation & Security +- ✅ Client-side JavaScript validation +- ✅ Server-side cart validation +- ✅ Cart quantity bypass prevention (NEW) +- ✅ User-friendly error messages +- ✅ WooCommerce HPOS compatible + +## Breaking Changes + +**None.** This release is fully backward compatible with v1.1.0 and v1.0.x. + +## Migration Notes + +### From 1.1.0 +- No migration needed +- Cart quantity hiding is automatic when restrictions are enabled +- No new settings or configuration required + +### From 1.0.x +- All v1.1.0 features included plus cart enhancement +- New restriction features are disabled by default +- Must be explicitly enabled in settings + +### Settings Location +All settings remain in: **WooCommerce > Settings > Tier & Package Prices** + +### Data Preservation +- All existing tier pricing data preserved +- All existing package pricing data preserved +- All product meta data preserved +- No database changes required + +## Known Limitations + +### Current Version +1. Restriction only works when packages are defined +2. Cannot restrict to tier quantities (only packages) +3. Restriction applies to entire product (no variation-level control) +4. Cart quantity is read-only text (not a dropdown of package options) + +### Future Enhancements +These features may be added in future versions: +- Cart package quantity dropdown selector +- Variation-level restriction control +- Restrict to tier quantities option +- Minimum/maximum package selection limits + +## Changelog Summary + +### Version History +- **v1.1.1** (2025-12-21) - Cart quantity bypass fix +- **v1.1.0** (2025-12-21) - Package quantity restriction feature +- **v1.0.2** (2025-12-21) - WooCommerce Settings integration +- **v1.0.1** (2025-12-21) - Twig template engine integration +- **v1.0.0** (2025-12-21) - Initial release + +## Support + +- **Documentation:** See README.md and CHANGELOG.md +- **Previous Release:** See RELEASE-INFO-1.1.0.md +- **Issues:** https://src.bundespruefstelle.ch/wc-tier-package-prices/issues +- **Author:** Marco Graetsch + +## License + +GPL v2 or later - https://www.gnu.org/licenses/gpl-2.0.html + +--- + +**Production Ready:** This package includes optimized autoloader and no development dependencies. + +**Recommended Update:** Version 1.1.1 is recommended for all users of v1.1.0 to ensure complete package restriction enforcement. Users on v1.0.x can safely upgrade to gain both the restriction feature and this security enhancement. diff --git a/releases/wc-tier-and-package-prices-1.1.1.zip b/releases/wc-tier-and-package-prices-1.1.1.zip new file mode 100644 index 0000000..4b8053b Binary files /dev/null and b/releases/wc-tier-and-package-prices-1.1.1.zip differ diff --git a/releases/wc-tier-and-package-prices-1.1.1.zip.md5 b/releases/wc-tier-and-package-prices-1.1.1.zip.md5 new file mode 100644 index 0000000..33b83c6 --- /dev/null +++ b/releases/wc-tier-and-package-prices-1.1.1.zip.md5 @@ -0,0 +1 @@ +51c4f8a7c3ccede2d2005f2fe3ebe44e wc-tier-and-package-prices-1.1.1.zip diff --git a/releases/wc-tier-and-package-prices-1.1.1.zip.sha256 b/releases/wc-tier-and-package-prices-1.1.1.zip.sha256 new file mode 100644 index 0000000..3b848e4 --- /dev/null +++ b/releases/wc-tier-and-package-prices-1.1.1.zip.sha256 @@ -0,0 +1 @@ +b951f8b7ddd2bad6b3415d4583709fdf88f66aea4eae70110c903757ff53e045 wc-tier-and-package-prices-1.1.1.zip diff --git a/wc-tier-and-package-prices.php b/wc-tier-and-package-prices.php index 1f70ad0..a6e98d0 100644 --- a/wc-tier-and-package-prices.php +++ b/wc-tier-and-package-prices.php @@ -4,7 +4,7 @@ * Plugin Name: WooCommerce Tier and Package Prices * Plugin URI: https://src.bundespruefstelle.ch/wc-tier-package-prices * Description: Add tier pricing and package prices to WooCommerce products with configurable quantities at fixed prices - * Version: 1.1.1 + * Version: 1.1.2 * Author: Marco Graetsch * Author URI: https://src.bundespruefstelle.ch/magdev * Text Domain: wc-tier-package-prices @@ -22,7 +22,7 @@ if (!defined('ABSPATH')) { } // Define plugin constants -define('WC_TPP_VERSION', '1.1.1'); +define('WC_TPP_VERSION', '1.1.2'); define('WC_TPP_PLUGIN_DIR', plugin_dir_path(__FILE__)); define('WC_TPP_PLUGIN_URL', plugin_dir_url(__FILE__)); define('WC_TPP_PLUGIN_BASENAME', plugin_basename(__FILE__));