Skip to content

Commit 03e58d4

Browse files
authored
Merge pull request #59 from getdokan/fix/wcct-version-redefined
fix: ensure constants are only defined if not already set
2 parents 60b617c + e68b4d0 commit 03e58d4

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

conversion-tracking.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,12 @@ public function includes() {
152152
* @return void
153153
*/
154154
public function define_constants() {
155-
define( 'WCCT_VERSION', $this->version );
156-
define( 'WCCT_FILE', __FILE__ );
157-
define( 'WCCT_PATH', dirname( WCCT_FILE ) );
158-
define( 'WCCT_INCLUDES', WCCT_PATH . '/includes' );
159-
define( 'WCCT_URL', plugins_url( '', WCCT_FILE ) );
160-
define( 'WCCT_ASSETS', WCCT_URL . '/assets' );
155+
defined( 'WCCT_VERSION' ) || define( 'WCCT_VERSION', $this->version );
156+
defined( 'WCCT_FILE' ) || define( 'WCCT_FILE', __FILE__ );
157+
defined( 'WCCT_PATH' ) || define( 'WCCT_PATH', dirname( WCCT_FILE ) );
158+
defined( 'WCCT_INCLUDES' ) || define( 'WCCT_INCLUDES', WCCT_PATH . '/includes' );
159+
defined( 'WCCT_URL' ) || define( 'WCCT_URL', plugins_url( '', WCCT_FILE ) );
160+
defined( 'WCCT_ASSETS' ) || define( 'WCCT_ASSETS', WCCT_URL . '/assets' );
161161
}
162162

163163
/**

0 commit comments

Comments
 (0)