Track usage of captcha on register setting in Mixpanel
[MAILPOET-6326]
This commit is contained in:
committed by
Aschepikov
parent
cbd8355806
commit
74d71a54b2
@@ -161,11 +161,10 @@ class Reporter {
|
|||||||
'WP_MAX_MEMORY_LIMIT' => WP_MAX_MEMORY_LIMIT,
|
'WP_MAX_MEMORY_LIMIT' => WP_MAX_MEMORY_LIMIT,
|
||||||
'PHP memory_limit' => ini_get('memory_limit'),
|
'PHP memory_limit' => ini_get('memory_limit'),
|
||||||
'PHP max_execution_time' => ini_get('max_execution_time'),
|
'PHP max_execution_time' => ini_get('max_execution_time'),
|
||||||
'users_can_register' => $this->wp->getOption('users_can_register') ? 'yes' : 'no',
|
|
||||||
'MailPoet Free version' => MAILPOET_VERSION,
|
'MailPoet Free version' => MAILPOET_VERSION,
|
||||||
'MailPoet Premium version' => (defined('MAILPOET_PREMIUM_VERSION')) ? MAILPOET_PREMIUM_VERSION : 'N/A',
|
'MailPoet Premium version' => (defined('MAILPOET_PREMIUM_VERSION')) ? MAILPOET_PREMIUM_VERSION : 'N/A',
|
||||||
'Total number of subscribers' => $this->subscribersFeature->getSubscribersCount(),
|
'Total number of subscribers' => $this->subscribersFeature->getSubscribersCount(),
|
||||||
'Sending Method' => isset($mta['method']) ? $mta['method'] : null,
|
'Sending Method' => $mta['method'] ?? null,
|
||||||
"Send all site's emails with" => $this->settings->get('send_transactional_emails') ? 'current sending method' : 'default WordPress sending method',
|
"Send all site's emails with" => $this->settings->get('send_transactional_emails') ? 'current sending method' : 'default WordPress sending method',
|
||||||
'Date of plugin installation' => $this->settings->get('installed_at'),
|
'Date of plugin installation' => $this->settings->get('installed_at'),
|
||||||
'Subscribe in comments' => (boolean)$this->settings->get('subscribe.on_comment.enabled', false),
|
'Subscribe in comments' => (boolean)$this->settings->get('subscribe.on_comment.enabled', false),
|
||||||
@@ -191,6 +190,9 @@ class Reporter {
|
|||||||
'Site is using block theme' => $this->wp->wpIsBlockTheme(),
|
'Site is using block theme' => $this->wp->wpIsBlockTheme(),
|
||||||
'Stop sending to inactive subscribers' => $inactiveSubscribersStatus,
|
'Stop sending to inactive subscribers' => $inactiveSubscribersStatus,
|
||||||
'CAPTCHA setting' => $this->settings->get(CaptchaConstants::TYPE_SETTING_NAME, '') ?: 'disabled',
|
'CAPTCHA setting' => $this->settings->get(CaptchaConstants::TYPE_SETTING_NAME, '') ?: 'disabled',
|
||||||
|
'Is CAPTCHA on register forms enabled' => $this->settings->get(CaptchaConstants::ON_REGISTER_FORMS_SETTING_NAME, false) ? 'yes' : 'no',
|
||||||
|
'users_can_register' => $this->wp->getOption('users_can_register') ? 'yes' : 'no',
|
||||||
|
'Is WooCommerce account creation on "My account" enabled' => $this->wp->getOption('woocommerce_enable_myaccount_registration') ?? 'no',
|
||||||
'Plugin > MailPoet Premium' => $this->wp->isPluginActive('mailpoet-premium/mailpoet-premium.php'),
|
'Plugin > MailPoet Premium' => $this->wp->isPluginActive('mailpoet-premium/mailpoet-premium.php'),
|
||||||
'Plugin > bounce add-on' => $this->wp->isPluginActive('mailpoet-bounce-handler/mailpoet-bounce-handler.php'),
|
'Plugin > bounce add-on' => $this->wp->isPluginActive('mailpoet-bounce-handler/mailpoet-bounce-handler.php'),
|
||||||
'Plugin > Bloom' => $this->wp->isPluginActive('bloom-for-publishers/bloom.php'),
|
'Plugin > Bloom' => $this->wp->isPluginActive('bloom-for-publishers/bloom.php'),
|
||||||
|
@@ -8,6 +8,7 @@ class CaptchaConstants {
|
|||||||
const TYPE_RECAPTCHA_INVISIBLE = 'recaptcha-invisible';
|
const TYPE_RECAPTCHA_INVISIBLE = 'recaptcha-invisible';
|
||||||
const TYPE_DISABLED = null;
|
const TYPE_DISABLED = null;
|
||||||
const TYPE_SETTING_NAME = 'captcha.type';
|
const TYPE_SETTING_NAME = 'captcha.type';
|
||||||
|
const ON_REGISTER_FORMS_SETTING_NAME = 'captcha.on_register_forms.enabled';
|
||||||
|
|
||||||
public static function isReCaptcha(?string $captchaType) {
|
public static function isReCaptcha(?string $captchaType) {
|
||||||
return in_array($captchaType, [self::TYPE_RECAPTCHA, self::TYPE_RECAPTCHA_INVISIBLE]);
|
return in_array($captchaType, [self::TYPE_RECAPTCHA, self::TYPE_RECAPTCHA_INVISIBLE]);
|
||||||
|
Reference in New Issue
Block a user