Skip to content

v1.1.1

Choose a tag to compare

@dbltoe dbltoe released this 03 Aug 22:53

A bugfix release, fixing three real issues found while investigating two user reports. Recommended for everyone currently running v1.1.0 or v1.0.0.

Fixes

  • "Call to undefined function zen_config()"wholesaleEnabled() called core's zen_config() helper, which is only available since ZC v3.0.0. On any earlier version, this fataled outright. Reported by a user on v2.1.0/PHP 8.2.1. Replaced with a defined()/constant() check — the same fallback zen_config() itself uses internally — so behavior is now identical across the whole v2.0.0–v3.0.0 range, not just the versions where zen_config() happens to exist.

  • Plugin "won't install" / activation link broken, on v2.0.0/v2.1.0 specifically — a plugin's own root-level filenames.php is only auto-loaded by Zen Cart core starting at v2.2.0 (confirmed directly against core's own bootstrap source at the v2.0.0, v2.1.0, v2.2.0, v2.2.1, and v2.2.2 tags). On v2.0.0/v2.1.0, this meant FILENAME_ADD_CUSTOMERS, BOX_CUSTOMERS_ADD_CUSTOMERS, and TABLE_ADMIN_ADD_USER_TOKENS never got defined on the admin side — breaking the admin menu right after install — and FILENAME_ADMIN_ADD_USER_ACTIVATE never got defined on the storefront side, breaking the activation link in every welcome email. admin/includes/extra_datafiles/ and catalog/includes/extra_datafiles/, unlike root-level filenames.php, have been auto-loaded per-plugin since v2.0.0, so a small file now lives in each (simply requiring the original filenames.php), closing the gap on every version this plugin supports.

  • "Call to undefined function create_coupon_code()" on stores with the New Signup Gift Voucher setting on — found while auditing every other core function this plugin calls, prompted by the two fixes above. On any store with NEW_SIGNUP_GIFT_VOUCHER_AMOUNT configured, every single customer creation (single-entry or CSV) fataled outright — that function never existed under that name in Zen Cart core, on any version. Replaced with Coupon::generateRandomCouponCode(), core's own current replacement, @since exactly the v2.0.0 floor this plugin targets.

No database schema changes from v1.1.0.

See readme.html for full installation instructions and the complete version history.