Skip to content

Configuration

Colvor plugins are configurable via the WordPress admin UI and via code using WordPress hooks and filters.

After activation, navigate to WooCommerce → Colvor Settings to access:

Setting Description
License Key Your plugin license key
API Mode live or test (for development)
Cache TTL License validation cache duration (default: 3600s)
Debug Mode Enables verbose logging to WooCommerce status log

Colvor exposes a clean PHP API for developers who need programmatic control.

Called before each license validation attempt. Return false to bypass validation (e.g., for staging environments).

add_filter( 'colvor/license/validate', function( bool $should_validate ): bool {
// Skip license check on local/staging environments
if ( defined('WP_ENV') && WP_ENV !== 'production' ) {
return false;
}
return $should_validate;
} );

Override the license validation cache duration (in seconds).

add_filter( 'colvor/license/cache_ttl', fn() => 7200 ); // Cache for 2 hours

Fires after a license is successfully activated.

add_action( 'colvor/license/activated', function( string $license_key, string $domain ): void {
// e.g., log to your monitoring system
error_log( "Colvor license activated: {$license_key} for {$domain}" );
}, 10, 2 );

For headless/CI environments, you can set your license key via a PHP constant in wp-config.php:

define( 'COLVOR_LICENSE_KEY', 'your-license-key-here' );

When this constant is defined, the Settings UI field is hidden and the constant value is used automatically.