• v1.1.5 9765c5f119

    Release version 1.1.5 - Critical bug fix for plugin activation

    magdev released this 2025-12-21 18:49:24 +00:00 | 78 commits to main since this release

    CRITICAL FIX: Resolved fatal error that prevented plugin activation in
    versions 1.1.3 and 1.1.4. The add_cart_quantity_css() method was attempting
    to access WooCommerce cart object during wp_head action, causing failures
    when WooCommerce wasn't fully initialized or on admin pages.

    Fixes:

    • Plugin activation error in v1.1.3 and v1.1.4
    • Fatal error when WooCommerce cart object not available
    • Frontend errors on admin pages
    • Issues during plugin initialization

    Technical Changes:

    • Added function_exists('WC') check before accessing WooCommerce
    • Added is_admin() check to prevent CSS injection on admin pages
    • Enhanced add_cart_quantity_css() with proper guards
    • Line 191: if (!function_exists('WC') || !WC()->cart || is_admin())

    Root Cause:
    The add_cart_quantity_css() method (added in v1.1.3) hooks into wp_head
    but didn't properly check if WooCommerce cart was available, causing
    errors during plugin activation and on admin pages.

    Updated Files:

    • includes/class-wc-tpp-cart.php (enhanced error checking)
    • wc-tier-and-package-prices.php (version 1.1.5)
    • composer.json (version 1.1.5)
    • CHANGELOG.md (v1.1.5 section)
    • All translation files (.pot, .po, .mo) updated to version 1.1.5

    🤖 Generated with Claude Code

    Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

    Downloads