Customizing the Freemius WordPress SDK Integration with Constants
The Freemius WordPress SDK provides a collection of constants that allow developers to customize and extend the functionality of their WordPress plugins or themes.
Defining Constants
To use these constants, simply define them in your WordPress website's wp-config.php file before the line:
/* That's all, stop editing! Happy publishing. */
This allows you to modify the behavior of the SDK without altering its core files. You can refer to the official handbook to learn more.
Available Constants
Sets the timeout for API requests made by the Freemius WordPress SDK.
You can modify it by defining as:
// Set API timeout to 60 seconds
define( 'WP_FS__API_TIMEOUT', 60 );
Enables the development mode for the Freemius WordPress SDK.
When set to true, it allows developers to test and debug their integration without affecting live data or transactions.
define( 'WP_FS__DEV_MODE', true );
Skips email activation when a user with the same email already opted-in. This requires the SDK to be loaded in development mode and the secret key of the product to be defined. See the usage for more details.
define( 'WP_FS__SKIP_EMAIL_ACTIVATION', true );