From 3557e89bd87633571e826cf860676d994249e75b Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Fri, 4 Oct 2024 09:30:08 -0300 Subject: [PATCH 1/3] Remove lite upgrade page in plugin --- classes/controllers/FrmAddonsController.php | 213 +------------------- classes/views/addons/upgrade_to_pro.php | 86 +------- 2 files changed, 12 insertions(+), 287 deletions(-) diff --git a/classes/controllers/FrmAddonsController.php b/classes/controllers/FrmAddonsController.php index 45d535d3a6..e6b084226e 100644 --- a/classes/controllers/FrmAddonsController.php +++ b/classes/controllers/FrmAddonsController.php @@ -866,213 +866,22 @@ protected static function set_addon_status( &$addon ) { } /** + * Handle when the Upgrade submenu item is clicked. + * + * @since x.x This function was changed to no longer render a page, redirecting directly to the upgrade page instead. + * * @return void */ public static function upgrade_to_pro() { - FrmAppHelper::include_svg(); - - $link_parts = array( - 'medium' => 'upgrade', - 'content' => 'button', - ); - - $features = array( - 'Display Entries' => array( - array( - 'label' => 'Display form data with virtually limitless views', - 'link' => array( - 'content' => 'views', - 'param' => 'views-display-form-data', - ), - 'lite' => false, - ), - array( - 'label' => 'Generate graphs and stats based on your submitted data', - 'link' => array( - 'content' => 'graphs', - 'param' => 'statistics-graphs-wordpress-forms', - ), - 'lite' => false, - ), - ), - 'Entry Management' => array( - array( - 'label' => 'Import entries from a CSV', - 'link' => array( - 'content' => 'import-entries', - 'param' => 'importing-exporting-wordpress-forms', - ), - 'lite' => false, - ), - array( - 'label' => 'Logged-in users can save drafts and return later', - 'link' => array( - 'content' => 'save-drafts', - 'param' => 'save-drafts-wordpress-form', - ), - 'lite' => false, - ), - array( - 'label' => 'Flexibly and powerfully view, edit, and delete entries from anywhere on your site', - 'link' => array( - 'content' => 'front-edit', - 'param' => 'wordpress-front-end-editing', - ), - 'lite' => false, - ), - array( - 'label' => 'View form submissions from the back-end', - 'lite' => true, - ), - array( - 'label' => 'Export your entries to a CSV', - 'lite' => true, - ), - ), - 'Form Building' => array( - array( - 'label' => 'Save a calculated value into a field', - 'link' => array( - 'content' => 'calculations', - 'param' => 'field-calculations-wordpress-form', - ), - 'lite' => false, - ), - array( - 'label' => 'Allow multiple file uploads', - 'link' => array( - 'content' => 'file-uploads', - 'param' => 'wordpress-multi-file-upload-fields', - ), - 'lite' => false, - ), - array( - 'label' => 'Repeat sections of fields', - 'link' => array( - 'content' => 'repeaters', - 'param' => 'repeatable-sections-forms', - ), - 'lite' => false, - ), - array( - 'label' => 'Hide and show fields conditionally based on other fields or the user\'s role', - 'link' => array( - 'content' => 'conditional-logic', - 'param' => 'conditional-logic-wordpress-forms', - ), - 'lite' => false, - ), - array( - 'label' => 'Confirmation fields', - 'link' => array( - 'content' => 'confirmation-fields', - 'param' => 'confirmation-fields-wordpress-forms', - ), - 'lite' => false, - ), - array( - 'label' => 'Multi-paged forms', - 'link' => array( - 'content' => 'page-breaks', - 'param' => 'wordpress-multi-page-forms', - ), - 'lite' => false, - ), - array( - 'label' => 'Include section headings, page breaks, rich text, dates, times, scales, star ratings, sliders, toggles, dynamic fields populated from other forms, passwords, and tags in advanced forms.', - 'lite' => false, - ), - array( - 'label' => 'Include text, email, url, paragraph text, radio, checkbox, dropdown fields, hidden fields, user ID fields, and HTML blocks in your form.', - 'lite' => true, - ), - array( - 'label' => 'Drag & Drop Form building', - 'link' => array( - 'content' => 'drag-drop', - 'param' => 'drag-drop-forms', - ), - 'lite' => true, - ), - array( - 'label' => 'Create forms from Templates', - 'link' => array( - 'content' => 'form-templates', - 'param' => 'wordpress-form-templates', - ), - 'lite' => true, - ), - array( - 'label' => 'Import and export forms with XML', - 'link' => array( - 'content' => 'import', - 'param' => 'importing-exporting-wordpress-forms', - ), - 'lite' => true, - ), - array( - 'label' => 'Use input placeholder text in your fields that clear when typing starts.', - 'lite' => true, - ), - ), - 'Form Actions' => array( - array( - 'label' => 'Conditionally send your email notifications based on values in your form', - 'link' => array( - 'content' => 'conditional-emails', - ), - 'lite' => false, - ), + wp_redirect( + FrmAppHelper::admin_upgrade_link( array( - 'label' => 'Create and edit WordPress posts or custom posts from the front-end', - 'link' => array( - 'content' => 'create-posts', - 'param' => 'create-posts-pages-wordpress-forms', - ), - 'lite' => false, - ), - array( - 'label' => 'Send multiple emails and autoresponders', - 'link' => array( - 'content' => 'multiple-emails', - 'param' => 'virtually-unlimited-emails', - ), - 'lite' => true, - ), - ), - 'Form Appearance' => array( - array( - 'label' => 'Create Multiple styles for different forms', - 'link' => array( - 'content' => 'multiple-styles', - 'param' => 'wordpress-visual-form-styler', - ), - 'lite' => false, - ), - array( - 'label' => 'Customizable layout with CSS classes', - 'link' => array( - 'content' => 'form-layout', - 'param' => 'wordpress-mobile-friendly-forms', - ), - 'lite' => true, - ), - array( - 'label' => 'Customize the HTML for your forms', - 'link' => array( - 'content' => 'custom-html', - 'param' => 'customizable-html-wordpress-form', - ), - 'lite' => true, - ), - array( - 'label' => 'Style your form with the Visual Form Styler', - 'lite' => true, - ), - ), + 'medium' => 'upgrade', + 'content' => 'submenu-upgrade', + ) + ) ); - - include FrmAppHelper::plugin_path() . '/classes/views/addons/upgrade_to_pro.php'; + die(); } /** diff --git a/classes/views/addons/upgrade_to_pro.php b/classes/views/addons/upgrade_to_pro.php index 52c13ace8d..83f9383ac9 100644 --- a/classes/views/addons/upgrade_to_pro.php +++ b/classes/views/addons/upgrade_to_pro.php @@ -2,88 +2,4 @@ if ( ! defined( 'ABSPATH' ) ) { die( 'You are not allowed to call this page directly.' ); } -?> -
-

- Upgrade to Pro - Take on bigger projects, earn more clients and grow your business.
- Upgrade to Pro.
- -

- -
- -

Are you outgrowing your basic forms? You can add a ton more field types and features, create advanced forms, and even build form-based solutions in no time at all.

-

Are you currently collecting data offline? Streamline your business by using your forms to get online. Whether you need surveys, polls, client contracts, mortgage calculators, or directories, we've got you covered. Save time by allowing clients to return and make changes to their own submissions, or let them contribute content to your site. Generate more leads by adding headings and page breaks, only showing the fields you need, and letting your clients repeat a section of fields as many times as they need.

-

Projects that once seemed impossible are within your reach with Pro. That project you’ve been dreaming of pursuing? Chances are Formidable Pro can handle it.


- - -

- - - -

-
- - - - - - - - - - - - - $group ) { ?> - - - - - - - - - - -

Lite

Pro

- - - - - - - - - - - - - - - - - - - -
- -
-

- - - -

-
+_deprecated_file( esc_html( basename( __FILE__ ) ), 'x.x' ); From 9882e530c151ae3a59fdaacc02a17af65d9ece38 Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Fri, 4 Oct 2024 09:42:18 -0300 Subject: [PATCH 2/3] Remove upgrade page accessibility test (no longer required) --- tests/cypress/e2e/admin-a11y.cy.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/tests/cypress/e2e/admin-a11y.cy.js b/tests/cypress/e2e/admin-a11y.cy.js index cad48a8fb4..1a8f08860d 100644 --- a/tests/cypress/e2e/admin-a11y.cy.js +++ b/tests/cypress/e2e/admin-a11y.cy.js @@ -103,18 +103,6 @@ describe('Run some accessibility tests', function() { cy.checkA11y(); }); - it('Check the upgrade page is accessible', () => { - cy.visit('/wp-admin/admin.php?page=formidable-pro-upgrade'); - cy.injectAxe(); - configureAxeWithIgnoredRuleset([ - ...baselineRules, - { id: 'empty-table-header', enabled: false }, - { id: 'heading-order', enabled: false } - - ]); - cy.checkA11y(); - }); - it('Check the SMTP page is accessible', () => { cy.visit('/wp-admin/admin.php?page=formidable-smtp'); cy.injectAxe(); From 38f62d87335b51b791d4adff7ca3b6414135ca01 Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Fri, 4 Oct 2024 09:45:00 -0300 Subject: [PATCH 3/3] Remove old references to the upgrade page --- classes/controllers/FrmAppController.php | 1 - css/frm_admin.css | 1 - 2 files changed, 2 deletions(-) diff --git a/classes/controllers/FrmAppController.php b/classes/controllers/FrmAppController.php index a89109ce69..6bf94e207d 100644 --- a/classes/controllers/FrmAppController.php +++ b/classes/controllers/FrmAppController.php @@ -204,7 +204,6 @@ private static function is_white_page() { 'formidable-entries', 'formidable-views', 'formidable-views-editor', - 'formidable-pro-upgrade', 'formidable-addons', 'formidable-import', 'formidable-settings', diff --git a/css/frm_admin.css b/css/frm_admin.css index 5b053cfbca..0eb8b36b2f 100644 --- a/css/frm_admin.css +++ b/css/frm_admin.css @@ -230,7 +230,6 @@ body.frm-white-body:not(.frm-full-screen) .mce-fullscreen { border: none; } -body.formidable_page_formidable-pro-upgrade, body.post-type-frm_display.edit-php, body.frm-white-body { background: #fff;