Fix: Constant Redefinition Error
Problem
When the plugin file was loaded multiple times (e.g., during updates or due to caching), PHP threw:
- "Warning: Constant BROODLE_ENGAGE_VERSION already defined"
- "Fatal error: Cannot declare class Broodle_Engage_Connector, because the name is already in use"
Solution
All plugin constants now use if (!defined()) guards before defining:
if ( ! defined( 'BROODLE_ENGAGE_VERSION' ) ) {
define( 'BROODLE_ENGAGE_VERSION', '3.2.3' );
}Also Fixed
- Uninstall HPOS support: Now properly cleans up
wc_orders_metatable for HPOS orders - Version bumped to 3.2.3
Files Changed
- broodle-engage-connector.php (constant guards)
- uninstall.php (HPOS cleanup)
- readme.txt (changelog)