From 1d1af97a4afd2a635e2bb437ee2c1a76b2dcafc4 Mon Sep 17 00:00:00 2001 From: Tim Carr Date: Thu, 27 Oct 2022 12:45:04 +0100 Subject: [PATCH] WLM: Include initial configuration in dump.sql to prevent test failure due to WLM changing UI --- tests/_data/dump.sql | 317 ++++++++++++++++++ .../integrations/WishListMemberCest.php | 49 --- 2 files changed, 317 insertions(+), 49 deletions(-) diff --git a/tests/_data/dump.sql b/tests/_data/dump.sql index c7e5ea1d0..04cc8f22e 100644 --- a/tests/_data/dump.sql +++ b/tests/_data/dump.sql @@ -407,4 +407,321 @@ CREATE TABLE `wp_users` ( INSERT INTO `wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES (1, 'admin', '$P$BFWXNjd4ZSQJ5WZbwremiLvJgoQKU4/', 'admin', 'dev-email@flywheel.local', 'http://convertkit.local', '2022-01-26 12:34:01', '', 0, 'admin'); +-- WLM + +CREATE TABLE `wp_wlm_api_queue` ( + `ID` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL, + `value` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL, + `notes` varchar(500) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL, + `tries` int(11) NOT NULL, + `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; + +CREATE TABLE `wp_wlm_contentlevel_options` ( + `ID` bigint(20) NOT NULL AUTO_INCREMENT, + `contentlevel_id` bigint(20) NOT NULL, + `option_name` varchar(64) COLLATE utf8mb4_unicode_520_ci NOT NULL, + `option_value` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL, + `autoload` varchar(20) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT 'yes', + PRIMARY KEY (`ID`), + UNIQUE KEY `contentlevel_id` (`contentlevel_id`,`option_name`), + KEY `autoload` (`autoload`), + KEY `contentlevel_id2` (`contentlevel_id`), + KEY `option_name` (`option_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; + +CREATE TABLE `wp_wlm_contentlevels` ( + `ID` bigint(20) NOT NULL AUTO_INCREMENT, + `content_id` bigint(20) NOT NULL, + `level_id` varchar(32) COLLATE utf8mb4_unicode_520_ci NOT NULL, + `type` varchar(21) COLLATE utf8mb4_unicode_520_ci NOT NULL, + PRIMARY KEY (`ID`), + UNIQUE KEY `content_id` (`content_id`,`level_id`,`type`), + KEY `content_id2` (`content_id`), + KEY `level_id` (`level_id`), + KEY `type` (`type`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; + +CREATE TABLE `wp_wlm_email_queue` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `broadcastid` int(9) NOT NULL, + `userid` bigint(20) NOT NULL, + `failed` int(1) NOT NULL DEFAULT '0', + `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + UNIQUE KEY `id` (`id`), + KEY `broadcastid` (`broadcastid`), + CONSTRAINT `wp_wlm_email_queue_ibfk_1` FOREIGN KEY (`broadcastid`) REFERENCES `wp_wlm_emailbroadcast` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; + +CREATE TABLE `wp_wlm_emailbroadcast` ( + `id` int(9) NOT NULL AUTO_INCREMENT, + `from_name` varchar(200) COLLATE utf8mb4_unicode_520_ci NOT NULL, + `from_email` varchar(200) COLLATE utf8mb4_unicode_520_ci NOT NULL, + `subject` varchar(400) COLLATE utf8mb4_unicode_520_ci NOT NULL, + `text_body` text COLLATE utf8mb4_unicode_520_ci NOT NULL, + `footer` text COLLATE utf8mb4_unicode_520_ci, + `send_to` varchar(15) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL, + `mlevel` text COLLATE utf8mb4_unicode_520_ci NOT NULL, + `sent_as` varchar(5) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL, + `status` varchar(10) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT 'Queueing', + `otheroptions` text COLLATE utf8mb4_unicode_520_ci, + `total_queued` int(11) DEFAULT '0', + `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + UNIQUE KEY `id` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; + +CREATE TABLE `wp_wlm_level_options` ( + `ID` bigint(20) NOT NULL AUTO_INCREMENT, + `level_id` bigint(20) NOT NULL, + `option_name` varchar(64) COLLATE utf8mb4_unicode_520_ci NOT NULL, + `option_value` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL, + `autoload` varchar(20) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT 'yes', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; + +CREATE TABLE `wp_wlm_logs` ( + `ID` bigint(20) NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) NOT NULL, + `log_group` varchar(32) COLLATE utf8mb4_unicode_520_ci NOT NULL, + `log_key` varchar(64) COLLATE utf8mb4_unicode_520_ci NOT NULL, + `date_added` datetime NOT NULL, + `log_value` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL, + PRIMARY KEY (`ID`), + UNIQUE KEY `user_id__log_group__log_key__date_added` (`user_id`,`log_group`,`log_key`,`date_added`), + KEY `user_id` (`user_id`), + KEY `user_id__log_group` (`user_id`,`log_group`), + KEY `user_id__log_group__log_key` (`user_id`,`log_group`,`log_key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; + +CREATE TABLE `wp_wlm_options` ( + `ID` bigint(20) NOT NULL AUTO_INCREMENT, + `option_name` varchar(64) COLLATE utf8mb4_unicode_520_ci NOT NULL, + `option_value` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL, + `autoload` varchar(20) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT 'yes', + PRIMARY KEY (`ID`), + UNIQUE KEY `option_name` (`option_name`), + KEY `autoload` (`autoload`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; + +INSERT INTO `wp_wlm_options` (`ID`, `option_name`, `option_value`, `autoload`) VALUES +(1, 'LicenseKey', '', 'yes'), +(2, 'FormVersion', 'themestyled', 'yes'), +(3, 'paypalec_spb', 'a:1:{s:6:\"enable\";i:1;}', 'yes'), +(4, 'ActiveShoppingCarts', 'a:1:{i:0;s:35:\"integration.shoppingcart.stripe.php\";}', 'yes'), +(5, 'CurrentVersion', '3.20.1', 'yes'), +(6, 'dashboard_checklist_archived_closed', 'closed', 'yes'), +(7, 'onetime_login_link_label', 'Send me a One-Time Login Link', 'yes'), +(8, 'expiring_notification_admin', '0', 'yes'), +(9, 'expiring_notification', '1', 'yes'), +(10, 'requireemailconfirmation_notification', '1', 'yes'), +(11, 'require_admin_approval_free_notification_admin', '1', 'yes'), +(12, 'require_admin_approval_free_notification_user1', '1', 'yes'), +(13, 'require_admin_approval_free_notification_user2', '1', 'yes'), +(14, 'require_admin_approval_paid_notification_admin', '1', 'yes'), +(15, 'require_admin_approval_paid_notification_user1', '1', 'yes'), +(16, 'require_admin_approval_paid_notification_user2', '1', 'yes'), +(17, 'notify_admin_of_newuser', '1', 'yes'), +(18, 'newuser_notification_user', '1', 'yes'), +(19, 'incomplete_notification', '1', 'yes'), +(20, 'cancel_notification', '0', 'yes'), +(21, 'uncancel_notification', '0', 'yes'), +(22, 'recaptcha_public_key', '', 'yes'), +(23, 'recaptcha_private_key', '', 'yes'), +(24, 'menu_on_top', '1', 'yes'), +(25, 'auto_insert_more_at', '50', 'yes'), +(26, 'login_limit', '7', 'yes'), +(27, 'login_limit_error', 'Error: You have reached your daily login limit.', 'yes'), +(28, 'min_passlength', '8', 'yes'), +(29, 'privacy_require_tos_on_registration', '0', 'yes'), +(30, 'privacy_require_tos_checkbox_text', 'By checking this box you confirm that you have read and agree to the Terms of Service.', 'yes'), +(31, 'privacy_require_tos_error_message', 'In order to register for this site you must agree to the Terms of Service by checking the box next to the Terms of Service agreement.', 'yes'), +(32, 'privacy_enable_consent_to_market', '0', 'yes'), +(33, 'privacy_consent_to_market_text', 'By checking this box you agree to receive additional information regarding our products/services, events, news and offers.', 'yes'), +(34, 'privacy_consent_affects_emailbroadcast', '1', 'yes'), +(35, 'privacy_consent_affects_autoresponder', '1', 'yes'), +(36, 'privacy_display_tos_on_footer', '0', 'yes'), +(37, 'privacy_display_pp_on_footer', '0', 'yes'), +(38, 'privacy_email_template_request_subject', 'Confirm your request to [request]', 'yes'), +(39, 'privacy_email_template_request', '

Hi [firstname]

A request has been made to perform the following action on your account at [sitename] ([siteurl])

[request]

To confirm this, please click on the following link:
[confirm_url]

You can safely ignore and delete this email if you do not want to take this action.

This email has been sent to [email]

Thank you.

', 'yes'), +(40, 'privacy_email_template_download_subject', 'Personal Data Export', 'yes'), +(41, 'privacy_email_template_download', '

Hi [firstname]

Your request for an export of personal data has been completed. You may download your personal data by clicking on the link below. For privacy and security, we will automatically delete the file on [expiration], so please download it before then.

[link]

This email has been sent to [email].

Thank you.

', 'yes'), +(42, 'privacy_email_template_delete_subject', 'Erasure Request Fulfilled', 'yes'), +(43, 'privacy_email_template_delete', '

Hi [firstname]

Your request to erase your personal data on [sitename] has been completed.

If you have any follow-up questions or concerns, please contact the site administrator at [siteurl]

Thank you.

', 'yes'), +(44, 'member_unsub_notification', '1', 'yes'), +(45, 'member_unsub_notification_subject', '[sitename] - Unsubscribed From Email Broadcast', 'yes'), +(46, 'member_unsub_notification_body', '

You have been unsubscribed from the Email Broadcasts.

You may use the link below if you would like to subscribe again.

[resubscribeurl]

', 'yes'), +(47, 'show_wp_admin_bar', '1', 'yes'), +(48, 'rss_hide_protected', '1', 'yes'), +(49, 'wpm_levels', 'a:1:{i:1666870828;a:150:{s:4:\"name\";s:6:\"Bronze\";s:2:\"id\";i:1666870828;s:10:\"addToLevel\";N;s:16:\"afterregredirect\";N;s:13:\"allcategories\";N;s:11:\"allcomments\";N;s:8:\"allpages\";N;s:8:\"allposts\";N;s:8:\"calendar\";s:4:\"Days\";s:19:\"disableexistinglink\";i:0;s:20:\"disableprefilledinfo\";N;s:6:\"expire\";i:7;s:13:\"inheritparent\";N;s:6:\"isfree\";N;s:10:\"levelOrder\";i:1666870828;s:13:\"loginredirect\";N;s:21:\"registrationdatereset\";N;s:27:\"registrationdateresetactive\";N;s:15:\"removeFromLevel\";N;s:20:\"requireadminapproval\";N;s:33:\"requireadminapproval_integrations\";N;s:14:\"requirecaptcha\";N;s:24:\"requireemailconfirmation\";N;s:4:\"role\";s:10:\"subscriber\";s:9:\"salespage\";N;s:22:\"uncancelonregistration\";N;s:3:\"url\";s:10:\"FGKNSZa345\";s:14:\"allow_free_reg\";i:1;s:22:\"enable_custom_reg_form\";N;s:16:\"enable_salespage\";N;s:10:\"enable_tos\";N;s:11:\"expire_date\";N;s:13:\"expire_option\";N;s:3:\"tos\";s:46:\"I agree to the following terms and conditions.\";s:5:\"count\";N;s:12:\"upgradeAfter\";N;s:18:\"upgradeAfterPeriod\";N;s:13:\"upgradeMethod\";N;s:13:\"upgradeOnDate\";N;s:15:\"upgradeSchedule\";N;s:9:\"upgradeTo\";N;s:20:\"enable_header_footer\";N;s:14:\"regform_before\";N;s:13:\"regform_after\";N;s:15:\"custom_reg_form\";N;s:24:\"custom_afterreg_redirect\";N;s:22:\"afterreg_redirect_type\";s:7:\"message\";s:16:\"afterreg_message\";s:246:\"

Hey [wlm_firstname]!

Thanks for joining our [wlm_memberlevel] membership!

Below, you\'ll find links to important areas of the site.

Please feel free to explore the site and definitely let us know if you have any questions.

\";s:13:\"afterreg_page\";N;s:12:\"afterreg_url\";N;s:21:\"custom_login_redirect\";N;s:19:\"login_redirect_type\";s:7:\"message\";s:13:\"login_message\";s:248:\"

Hey [wlm_firstname]!

Welcome back! Below, you\'ll find links to all the important areas of your membership site. Please feel free peruse the site and definitely let us know if you have any questions.

[Site admin, place links here]

\";s:10:\"login_page\";N;s:9:\"login_url\";N;s:22:\"custom_logout_redirect\";N;s:20:\"logout_redirect_type\";s:7:\"message\";s:14:\"logout_message\";s:57:\"

You have been successfully logged out of the site.

\";s:11:\"logout_page\";N;s:10:\"logout_url\";N;s:25:\"autocreate_account_enable\";i:0;s:27:\"autocreate_account_username\";s:7:\"{email}\";s:31:\"autocreate_account_enable_delay\";i:0;s:24:\"autocreate_account_delay\";i:15;s:29:\"autocreate_account_delay_type\";i:1;s:27:\"autoadd_other_registrations\";i:0;s:38:\"require_email_confirmation_sender_name\";s:8:\"tim carr\";s:39:\"require_email_confirmation_sender_email\";s:24:\"dev-email@flywheel.local\";s:34:\"require_email_confirmation_subject\";s:32:\"Please confirm your registration\";s:34:\"require_email_confirmation_message\";s:606:\"

Hi [firstname]

Thank You for registering for [memberlevel]

Your registration must be confirmed before it is active.

Confirm by visiting the link below:

[confirmurl]

Once your account is confirmed you will be able to login with the following details.

Your Membership Info:
U: [username]
P: [password]

Login URL: [loginurl]

Please keep this information safe, it is the only email that will include your username and password.

** These login details will only give you proper access after the registration has been confirmed.

Thank You.

\";s:35:\"require_email_confirmation_reminder\";s:1:\"1\";s:32:\"require_email_confirmation_start\";s:1:\"1\";s:37:\"require_email_confirmation_start_type\";s:0:\"\";s:37:\"require_email_confirmation_send_every\";s:2:\"24\";s:34:\"require_email_confirmation_howmany\";s:1:\"3\";s:47:\"require_email_confirmation_reminder_sender_name\";s:8:\"tim carr\";s:48:\"require_email_confirmation_reminder_sender_email\";s:24:\"dev-email@flywheel.local\";s:43:\"require_email_confirmation_reminder_subject\";s:43:\"Reminder - Please confirm your registration\";s:43:\"require_email_confirmation_reminder_message\";s:319:\"

Hi [firstname]

This is a reminder that your registration for [memberlevel] requires confirmation before it is active.

You can confirm by using the link below:

[confirmurl]

Once your account is confirmed, you can login using the following link.

Login URL: [loginurl]

Thank You.

\";s:15:\"email_confirmed\";i:0;s:27:\"email_confirmed_sender_name\";s:8:\"tim carr\";s:28:\"email_confirmed_sender_email\";s:24:\"dev-email@flywheel.local\";s:23:\"email_confirmed_subject\";s:22:\"Registration confirmed\";s:23:\"email_confirmed_message\";s:94:\"

Hi [firstname]

Your registration for [memberlevel] is confirmed.

Thank You.

\";s:46:\"require_admin_approval_free_notification_admin\";s:1:\"1\";s:41:\"require_admin_approval_free_admin_subject\";s:30:\"A New Member Requires Approval\";s:41:\"require_admin_approval_free_admin_message\";s:221:\"

Approval is required for a new member with the following info:

First Name: [firstname]
Last Name: [lastname]
Email: [email]

Username: [username]
Membership Level: [memberlevel]

Thank you.

\";s:46:\"require_admin_approval_free_notification_user1\";s:1:\"1\";s:45:\"require_admin_approval_free_user1_sender_name\";s:8:\"tim carr\";s:46:\"require_admin_approval_free_user1_sender_email\";s:24:\"dev-email@flywheel.local\";s:41:\"require_admin_approval_free_user1_subject\";s:36:\"Registration requires admin approval\";s:41:\"require_admin_approval_free_user1_message\";s:576:\"

Hi [firstname]

Thank You for registering for [memberlevel]

Your registration must be approved first by the admin before your status can be active.

Once your account is approved you will be able to login with the following details.

Your Membership Info:
U: [username]
P: [password]

Login URL: [loginurl]

Please keep this information safe, it is the only email that will include your username and password.

These login details will only give you proper access when the admin has approved your registration.

Thank You.

\";s:46:\"require_admin_approval_free_notification_user2\";s:1:\"1\";s:45:\"require_admin_approval_free_user2_sender_name\";s:8:\"tim carr\";s:46:\"require_admin_approval_free_user2_sender_email\";s:24:\"dev-email@flywheel.local\";s:41:\"require_admin_approval_free_user2_subject\";s:27:\"Registration admin approval\";s:41:\"require_admin_approval_free_user2_message\";s:173:\"

Hi [firstname]

Your registration is now approved by the admin.

Please use the login details were sent in your initial registration email.

Thank You.

\";s:46:\"require_admin_approval_paid_notification_admin\";s:1:\"1\";s:41:\"require_admin_approval_paid_admin_subject\";s:30:\"A New Member Requires Approval\";s:41:\"require_admin_approval_paid_admin_message\";s:221:\"

Approval is required for a new member with the following info:

First Name: [firstname]
Last Name: [lastname]
Email: [email]

Username: [username]
Membership Level: [memberlevel]

Thank you.

\";s:46:\"require_admin_approval_paid_notification_user1\";s:1:\"1\";s:45:\"require_admin_approval_paid_user1_sender_name\";s:8:\"tim carr\";s:46:\"require_admin_approval_paid_user1_sender_email\";s:24:\"dev-email@flywheel.local\";s:41:\"require_admin_approval_paid_user1_subject\";s:36:\"Registration requires admin approval\";s:41:\"require_admin_approval_paid_user1_message\";s:576:\"

Hi [firstname]

Thank You for registering for [memberlevel]

Your registration must be approved first by the admin before your status can be active.

Once your account is approved you will be able to login with the following details.

Your Membership Info:
U: [username]
P: [password]

Login URL: [loginurl]

Please keep this information safe, it is the only email that will include your username and password.

These login details will only give you proper access when the admin has approved your registration.

Thank You.

\";s:46:\"require_admin_approval_paid_notification_user2\";s:1:\"1\";s:45:\"require_admin_approval_paid_user2_sender_name\";s:8:\"tim carr\";s:46:\"require_admin_approval_paid_user2_sender_email\";s:24:\"dev-email@flywheel.local\";s:41:\"require_admin_approval_paid_user2_subject\";s:27:\"Registration admin approval\";s:41:\"require_admin_approval_paid_user2_message\";s:173:\"

Hi [firstname]

Your registration is now approved by the admin.

Please use the login details were sent in your initial registration email.

Thank You.

\";s:23:\"incomplete_notification\";s:1:\"1\";s:16:\"incomplete_start\";s:1:\"1\";s:21:\"incomplete_start_type\";N;s:21:\"incomplete_send_every\";s:2:\"24\";s:18:\"incomplete_howmany\";s:1:\"3\";s:22:\"incomplete_sender_name\";s:8:\"tim carr\";s:23:\"incomplete_sender_email\";s:24:\"dev-email@flywheel.local\";s:18:\"incomplete_subject\";s:33:\"Please Complete Your Registration\";s:18:\"incomplete_message\";s:156:\"

Hi,

Thank you for registering for [memberlevel]

Complete your registration by visiting the link below:

[incregurl]

Thank you.

\";s:26:\"newuser_notification_admin\";s:1:\"1\";s:23:\"newuser_admin_recipient\";s:24:\"dev-email@flywheel.local\";s:21:\"newuser_admin_subject\";s:27:\"A New Member has Registered\";s:21:\"newuser_admin_message\";s:208:\"

A new member has registered with the following info:

First Name: [firstname]
Last Name: [lastname]
Email: [email]
Membership Level: [memberlevel]
Username: [username]

Thank you.

\";s:25:\"newuser_notification_user\";s:1:\"1\";s:24:\"newuser_user_sender_name\";s:8:\"tim carr\";s:25:\"newuser_user_sender_email\";s:24:\"dev-email@flywheel.local\";s:20:\"newuser_user_subject\";s:30:\"Congrats - You are registered!\";s:20:\"newuser_user_message\";s:344:\"

[firstname],

You have successfully registered as a [memberlevel] member.

Please keep this information safe as it contains your username and password.

Your Membership Info:
U: [username]
P: [password]

Login URL: [loginurl]

You are invited to login and check things out.

We hope to see you inside.

\";s:27:\"expiring_notification_admin\";s:1:\"0\";s:19:\"expiring_admin_send\";s:1:\"3\";s:22:\"expiring_admin_subject\";s:41:\"[memberlevel]: Upcoming Member Expiration\";s:22:\"expiring_admin_message\";s:248:\"

There is an upcoming member expiration with the following information:

Membership Level: [memberlevel]
Expiration: [expirydate]

Username: [username]
Name: [firstname] [lastname]
Email: [email]

Login URL: [loginurl]

\";s:26:\"expiring_notification_user\";s:1:\"1\";s:18:\"expiring_user_send\";s:1:\"3\";s:25:\"expiring_user_sender_name\";s:8:\"tim carr\";s:26:\"expiring_user_sender_email\";s:24:\"dev-email@flywheel.local\";s:21:\"expiring_user_subject\";s:41:\"Expiring Membership Subscription Reminder\";s:21:\"expiring_user_message\";s:128:\"

Hi [firstname],

Your Membership Subscription for [memberlevel] is about to expire on [expirydate].

Thank you.

\";s:19:\"cancel_notification\";s:1:\"0\";s:18:\"cancel_sender_name\";s:8:\"tim carr\";s:19:\"cancel_sender_email\";s:24:\"dev-email@flywheel.local\";s:14:\"cancel_subject\";s:23:\"[memberlevel] Cancelled\";s:14:\"cancel_message\";s:112:\"

Hi [firstname],

Your Membership Subscription for [memberlevel] has been cancelled.

Thank you.

\";s:21:\"uncancel_notification\";s:1:\"0\";s:20:\"uncancel_sender_name\";s:8:\"tim carr\";s:21:\"uncancel_sender_email\";s:24:\"dev-email@flywheel.local\";s:16:\"uncancel_subject\";s:25:\"[memberlevel] Uncancelled\";s:16:\"uncancel_message\";s:114:\"

Hi [firstname],

Your Membership Subscription for [memberlevel] has been uncancelled.

Thank you.

\";s:8:\"noexpire\";i:1;s:2:\"ID\";i:1666870828;}}', 'yes'), +(50, 'pending_period', '', 'yes'), +(51, 'rss_secret_key', '496d2f1be254cb1dc74470f81568f293', 'yes'), +(52, 'disable_rss_enclosures', '1', 'yes'), +(53, 'auto_login_after_confirm', '1', 'yes'), +(54, 'reg_cookie_timeout', '600', 'yes'), +(55, 'payperpost_ismember', '0', 'yes'), +(56, 'protect_after_more', '1', 'yes'), +(57, 'auto_insert_more', '0', 'yes'), +(58, 'private_tag_protect_msg', '[Content protected for [level] members only]', 'yes'), +(59, 'reverse_private_tag_protect_msg', '[Content not available for [level] members ]', 'yes'), +(60, 'members_can_update_info', '1', 'yes'), +(61, 'unsub_notification', '1', 'yes'), +(62, 'html_tags_support', '0', 'yes'), +(63, 'incomplete_notification_first', '1', 'yes'), +(64, 'incomplete_notification_add', '3', 'yes'), +(65, 'incomplete_notification_add_every', '24', 'yes'), +(66, 'expiring_notification_days', '3', 'yes'), +(67, 'show_linkback', '0', 'yes'), +(68, 'unsubscribe_expired_members', '0', 'yes'), +(69, 'dont_send_reminder_email_when_unsubscribed', '0', 'yes'), +(70, 'redirect_existing_member', '0', 'yes'), +(71, 'prevent_ppp_deletion', '1', 'yes'), +(72, 'password_hinting', '0', 'yes'), +(73, 'enable_short_registration_links', '0', 'yes'), +(74, 'enable_login_redirect_override', '1', 'yes'), +(75, 'enable_logout_redirect_override', '1', 'yes'), +(76, 'login_limit_notify', '1', 'yes'), +(77, 'enable_retrieve_password_override', '0', 'yes'), +(78, 'strongpassword', '0', 'yes'), +(79, 'disable_legacy_reg_shortcodes', '0', 'yes'), +(80, 'disable_legacy_private_tags', '0', 'yes'), +(81, 'email_per_hour', '100', 'yes'), +(82, 'email_per_minute', '30', 'yes'), +(83, 'WLM_ContentDrip_Option', '', 'yes'), +(84, 'file_protection_ignore', 'jpg, jpeg, png, gif, bmp, css, js', 'yes'), +(85, 'mask_passwords_in_emails', '1', 'yes'), +(86, 'email_conf_send_after', '1', 'yes'), +(87, 'email_conf_how_many', '3', 'yes'), +(88, 'email_conf_send_every', '24', 'yes'), +(89, 'register_email_subject', 'Congrats - You are registered!', 'yes'), +(90, 'register_email_body', '

[firstname],

You have successfully registered as a [memberlevel] member.

Please keep this information safe as it contains your username and password.

Your Membership Info:
U: [username]
P: [password]

Login URL: [loginurl]

You are invited to login and check things out.

We hope to see you inside.

', 'yes'), +(91, 'lostinfo_email_subject', 'Your membership password reset request', 'yes'), +(92, 'lostinfo_email_message', '

Dear [firstname],

Our records show that you recently asked to reset the password for your account.

Your current information is:
Username: [username]
Membership: [memberlevel]

As a security measure all passwords are encrypted in our database and cannot be retrieved. However, you can easily reset it.

To reset your password visit the following URL, otherwise just ignore this email and your membership info will remain the same.

[reseturl]

Thanks again!

', 'yes'), +(93, 'confirm_email_subject', 'Please confirm your registration', 'yes'), +(94, 'confirm_email_message', '

Hi [firstname]

Thank You for registering for [memberlevel]

Your registration must be confirmed before it is active.

Confirm by visiting the link below:

[confirmurl]

Once your account is confirmed you will be able to login with the following details.

Your Membership Info:
U: [username]
P: [password]

Login URL: [loginurl]

Please keep this information safe, it is the only email that will include your username and password.

** These login details will only give you proper access after the registration has been confirmed.

Thank You.

', 'yes'), +(95, 'email_confirmation_reminder_subject', 'Reminder - Please confirm your registration', 'yes'), +(96, 'email_confirmation_reminder_message', '

Hi [firstname]

This is a reminder that your registration for [memberlevel] requires confirmation before it is active.

You can confirm by using the link below:

[confirmurl]

Once your account is confirmed, you can login using the following link.

Login URL: [loginurl]

Thank You.

', 'yes'), +(97, 'email_confirmed_subject', 'Registration confirmed', 'yes'), +(98, 'email_confirmed_message', '

Hi [firstname]

Your registration for [memberlevel] is confirmed.

Thank You.

', 'yes'), +(99, 'requireadminapproval_email_subject', 'Registration requires admin approval', 'yes'), +(100, 'requireadminapproval_email_message', '

Hi [firstname]

Thank You for registering for [memberlevel]

Your registration must be approved first by the admin before your status can be active.

Once your account is approved you will be able to login with the following details.

Your Membership Info:
U: [username]
P: [password]

Login URL: [loginurl]

Please keep this information safe, it is the only email that will include your username and password.

These login details will only give you proper access when the admin has approved your registration.

Thank You.

', 'yes'), +(101, 'registrationadminapproval_email_subject', 'Registration admin approval', 'yes'), +(102, 'registrationadminapproval_email_message', '

Hi [firstname]

Your registration is now approved by the admin.

Please use the login details were sent in your initial registration email.

Thank You.

', 'yes'), +(103, 'requireadminapproval_admin_subject', 'A New Member Requires Approval', 'yes'), +(104, 'requireadminapproval_admin_message', '

Approval is required for a new member with the following info:

First Name: [firstname]
Last Name: [lastname]
Email: [email]

Username: [username]
Membership Level: [memberlevel]

Thank you.

', 'yes'), +(105, 'requireadminapproval_email_paid_subject', 'Registration requires admin approval', 'yes'), +(106, 'requireadminapproval_email_paid_message', '

Hi [firstname]

Thank You for registering for [memberlevel]

Your registration must be approved first by the admin before your status can be active.

Once your account is approved you will be able to login with the following details.

Your Membership Info:
U: [username]
P: [password]

Login URL: [loginurl]

Please keep this information safe, it is the only email that will include your username and password.

These login details will only give you proper access when the admin has approved your registration.

Thank You.

', 'yes'), +(107, 'registrationadminapproval_email_paid_subject', 'Registration admin approval', 'yes'), +(108, 'registrationadminapproval_email_paid_message', '

Hi [firstname]

Your registration is now approved by the admin.

Please use the login details were sent in your initial registration email.

Thank You.

', 'yes'), +(109, 'requireadminapproval_admin_paid_subject', 'A New Member Requires Approval', 'yes'), +(110, 'requireadminapproval_admin_paid_message', '

Approval is required for a new member with the following info:

First Name: [firstname]
Last Name: [lastname]
Email: [email]

Username: [username]
Membership Level: [memberlevel]

Thank you.

', 'yes'), +(111, 'newmembernotice_email_subject', 'A New Member has Registered', 'yes'), +(112, 'newmembernotice_email_message', '

A new member has registered with the following info:

First Name: [firstname]
Last Name: [lastname]
Email: [email]
Membership Level: [memberlevel]
Username: [username]

Thank you.

', 'yes'), +(113, 'unsubscribe_notice_email_subject', 'Member has Unsubscribed', 'yes'), +(114, 'unsubscribe_notice_email_message', '

A member has unsubscribed with the following info:

First Name: [firstname]
Last Name: [lastname]
Email: [email]
Username: [username]

Thank you.

', 'yes'), +(115, 'incnotification_email_subject', 'Please Complete Your Registration', 'yes'), +(116, 'incnotification_email_message', '

Hi,

Thank you for registering for [memberlevel]

Complete your registration by visiting the link below:

[incregurl]

Thank you.

', 'yes'), +(117, 'expiringnotification_email_subject', 'Expiring Membership Subscription Reminder', 'yes'), +(118, 'expiringnotification_email_message', '

Hi [firstname],

Your Membership Subscription for [memberlevel] is about to expire on [expirydate].

Thank you.

', 'yes'), +(119, 'expiring_admin_subject', '[memberlevel]: Upcoming Member Expiration', 'yes'), +(120, 'expiring_admin_message', '

There is an upcoming member expiration with the following information:

Membership Level: [memberlevel]
Expiration: [expirydate]

Username: [username]
Name: [firstname] [lastname]
Email: [email]

Login URL: [loginurl]

', 'yes'), +(121, 'cancel_email_subject', '[memberlevel] Cancelled', 'yes'), +(122, 'cancel_email_message', '

Hi [firstname],

Your Membership Subscription for [memberlevel] has been cancelled.

Thank you.

', 'yes'), +(123, 'uncancel_email_subject', '[memberlevel] Uncancelled', 'yes'), +(124, 'uncancel_email_message', '

Hi [firstname],

Your Membership Subscription for [memberlevel] has been uncancelled.

Thank you.

', 'yes'), +(125, 'onetime_login_link_email_subject', 'Your One-Time Login Link', 'yes'), +(126, 'onetime_login_link_email_message', '

Hi [firstname],

Click the one-time login link below in order to login.

This link can only be used once.

[one_time_login_link redirect=\"\"]

Thank you.

', 'yes'), +(127, 'password_hint_email_subject', 'Your Password Hint', 'yes'), +(128, 'password_hint_email_message', '

Hi [firstname] [lastname],

Your Password Hint is:

[passwordhint]

Click the link below to login
[loginurl]

Thank you.

', 'yes'), +(129, 'reg_instructions_new', '

To complete your registration, please select one of the two options:

\n
    \n
  1. Existing members, please click here.
  2. \n
  3. New members, please fill in the form below to complete
    your [level] application.
  4. \n
', 'yes'), +(130, 'reg_instructions_new_noexisting', '

Please fill in the form below to complete your [level] registration.

', 'yes'), +(131, 'reg_instructions_existing', '

To complete your registration, please select one of the two options:

\n
    \n
  1. New members, please click here.
  2. \n
  3. Existing members, please fill in the form below to complete
    your [level] application.
  4. \n
', 'yes'), +(132, 'sidebar_widget_css', '/* The Main Widget Enclosure */\n.WishListMember_Widget{ }', 'yes'), +(133, 'login_mergecode_css', '/* The Main Login Merge Code Enclosure */\n.WishListMember_LoginMergeCode{ }', 'yes'), +(134, 'reg_form_css', '/* CSS Code for the Registration Form */\n\n/* The Main Registration Form Table */\n.wpm_registration{\n clear:both;\n padding:0;\n margin:10px 0;\n}\n.wpm_registration td{\n text-align:left;\n}\n/*CSS for Existing Members Login Table*/\n.wpm_existing{\n clear:both;\n padding:0;\n margin:10px 0;\n}\n/* CSS for Registration Error Messages */\np.wpm_err{\n color:#f00;\n font-weight:bold;\n}\n\n/* CSS for custom message sent to registration url */\np.wlm_reg_msg_external {\n border: 2px dotted #aaaaaa;\n padding: 10px;\n background: #fff;\n color: #000;\n}\n\n/* CSS Code for the Registration Instructions Box */\n\n/* The Main Instructions Box */\ndiv#wlmreginstructions{\n background:#ffffdd;\n border:1px solid #ff0000;\n padding:0 1em 1em 1em;\n margin:0 auto 1em auto;\n font-size:1em;\n width:450px;\n color:#333333;\n}\n\n/* Links displayed in the Instructions Box */\n#wlmreginstructions a{\n color:#0000ff;\n text-decoration:underline;\n}\n\n/* Numbered Bullets in the Instructions Box */\n#wlmreginstructions ol{\n margin:0 0 0 1em;\n padding:0 0 0 1em;\n list-style:decimal;\n background:none;\n}\n\n/* Each Bullet Entry */\n#wlmreginstructions li{\n margin:0;\n padding:0;\n background:none;\n}', 'yes'), +(135, 'closed_comments_msg', 'You are not allowed to view comments on this post.', 'yes'), +(136, 'active_email_integrations', 'a:0:{}', 'yes'), +(137, 'active_other_integrations', 'a:1:{i:0;s:9:\"gutenberg\";}', 'yes'), +(138, 'login_styling_custom_template', 'default', 'yes'), +(139, 'WLMAPIKey', 'PNoTKaphsZWtY1usg67sX9vC6s0hdma2uCtuirep7MZaxwqAoG', 'yes'), +(140, 'email_sender_name', 'tim carr', 'yes'), +(141, 'email_sender_address', 'dev-email@flywheel.local', 'yes'), +(142, 'newmembernotice_email_recipient', 'dev-email@flywheel.local', 'yes'), +(143, 'cydecthankyou', '', 'yes'), +(144, 'cydecsecret', '', 'yes'), +(145, 'cydec_migrated', '1', 'yes'), +(146, 'file_protection_migrated', '2', 'yes'), +(147, 'parentFolder', '', 'yes'), +(148, 'WishListMemberOptions_MigrateFolderProtectionData', '1', 'yes'), +(149, 'folder_protection_migrated', '1', 'yes'), +(150, 'payperpost', 'a:10:{s:24:\"custom_afterreg_redirect\";N;s:22:\"afterreg_redirect_type\";s:7:\"message\";s:16:\"afterreg_message\";s:104:\"

Hey [wlm_firstname],

You now have access to [wlm_payperpost].

Thanks for registering.

\";s:13:\"afterreg_page\";N;s:12:\"afterreg_url\";N;s:21:\"custom_login_redirect\";N;s:19:\"login_redirect_type\";s:7:\"message\";s:13:\"login_message\";s:248:\"

Hey [wlm_firstname]!

Welcome back! Below, you\'ll find links to all the important areas of your membership site. Please feel free peruse the site and definitely let us know if you have any questions.

[Site admin, place links here]

\";s:10:\"login_page\";N;s:9:\"login_url\";N;}', 'yes'), +(151, 'LicenseLastCheck', '1666870849', 'yes'), +(152, 'LicenseStatus', '1', 'yes'), +(153, 'FixedUserAddress', '1', 'yes'), +(154, 'wpm_levels.backup', 'a:0:{}', 'yes'), +(155, 'magic_page', '1652', 'yes'), +(156, 'import_member_queue_count', '0', 'yes'), +(157, 'expnotification_last_sent', '1666870821', 'yes'), +(158, 'wizard/welcome', '2022-10-27 11:40:24', 'yes'), +(159, 'wizard/membership-levels', '2022-10-27 11:40:28', 'yes'), +(160, 'wizard/integrations', '2022-10-27 11:40:30', 'yes'), +(161, 'wizard/membership-pages', '2022-10-27 11:40:38', 'yes'), +(162, 'wizard_ran', '1', 'yes'), +(163, 'checklist/done/create-membership-level', '1', 'yes'), +(164, 'checklist/done/create-membership-content', '0', 'yes'), +(165, 'checklist/video/shown', '2022-10-27 11:40:40', 'yes'), +(166, 'broadcast_page_pagination', '25', 'yes'); + +CREATE TABLE `wp_wlm_presto_player_visits` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `visit_time` bigint(20) NOT NULL, + `user_id` bigint(20) NOT NULL, + `video_id` bigint(20) NOT NULL, + `percent` bigint(20) NOT NULL, + `created_at` datetime NOT NULL, + `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; + +CREATE TABLE `wp_wlm_user_options` ( + `ID` bigint(20) NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) NOT NULL, + `option_name` varchar(64) COLLATE utf8mb4_unicode_520_ci NOT NULL, + `option_value` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL, + `autoload` varchar(20) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT 'yes', + PRIMARY KEY (`ID`), + UNIQUE KEY `user_id` (`user_id`,`option_name`), + KEY `autoload` (`autoload`), + KEY `user_id2` (`user_id`), + KEY `option_name` (`option_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; + +CREATE TABLE `wp_wlm_userlevel_options` ( + `ID` bigint(20) NOT NULL AUTO_INCREMENT, + `userlevel_id` bigint(20) NOT NULL, + `option_name` varchar(64) COLLATE utf8mb4_unicode_520_ci NOT NULL, + `option_value` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL, + `autoload` varchar(20) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT 'yes', + PRIMARY KEY (`ID`), + UNIQUE KEY `userlevel_id` (`userlevel_id`,`option_name`), + KEY `autoload` (`autoload`), + KEY `userlevel_id2` (`userlevel_id`), + KEY `option_name` (`option_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; + +CREATE TABLE `wp_wlm_userlevels` ( + `ID` bigint(20) NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) NOT NULL, + `level_id` bigint(20) NOT NULL, + PRIMARY KEY (`ID`), + UNIQUE KEY `user_id` (`user_id`,`level_id`), + KEY `user_id2` (`user_id`), + KEY `level_id` (`level_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; + + +-- 2022-10-27 11:41:25 + -- 2022-07-14 12:15:39 \ No newline at end of file diff --git a/tests/acceptance/integrations/WishListMemberCest.php b/tests/acceptance/integrations/WishListMemberCest.php index ec997b9b3..2c2d78588 100644 --- a/tests/acceptance/integrations/WishListMemberCest.php +++ b/tests/acceptance/integrations/WishListMemberCest.php @@ -19,7 +19,6 @@ public function _before(AcceptanceTester $I) $I->activateThirdPartyPlugin($I, 'wishlist-member'); $I->setupConvertKitPlugin($I); $I->enableDebugLog($I); - $this->_setupWishListMemberPlugin($I); } /** @@ -116,54 +115,6 @@ private function _createUser(AcceptanceTester $I, $emailAddress) ); } - /** - * Helper method to setup the WishList Member Plugin. - * - * @since 1.9.6 - * - * @param AcceptanceTester $I Tester. - */ - private function _setupWishListMemberPlugin($I) - { - // Prevent WishList Member from asking for a license key by populating the WLM options table. - $I->updateInDatabase( - $I->grabPrefixedTableNameFor('wlm_options'), - [ - 'option_value' => '1', - ], - [ - 'option_name' => 'LicenseStatus', - ] - ); - - // Load WishList Member Settings screen, which will load the first time configuration wizard. - $I->amOnAdminPage('admin.php?page=WishListMember'); - - // Step 1. - $I->fillField('input[name="name"]', 'Bronze'); - $I->click('.step-1 a[next-screen="step-2"]'); - - // Step 2. - $I->click('.step-2 a[next-screen="step-3"]'); - - // Step 3. - $I->click('.step-3 a[next-screen="step-4"]'); - - // Step 4. - $I->click('.step-4 a[next-screen="step-5"]'); - - // Save. - $I->click('.step-5 a.save-btn'); - - $I->performOn( - '.-congrats-gs', - function($I) { - $I->click('a.next-btn'); - $I->seeInSource('Bronze'); - } - ); - } - /** * Deactivate and reset Plugin(s) after each test, if the test passes. * We don't use _after, as this would provide a screenshot of the Plugin