From 62729e05bdfe78eec117514c55e7fd0fd400a205 Mon Sep 17 00:00:00 2001 From: David Stone Date: Sat, 15 Feb 2025 09:36:25 -0700 Subject: [PATCH 1/3] Only enqueue style when needed --- inc/class-whitelabel.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/inc/class-whitelabel.php b/inc/class-whitelabel.php index 6cf4a75..76c5370 100644 --- a/inc/class-whitelabel.php +++ b/inc/class-whitelabel.php @@ -61,7 +61,7 @@ class Whitelabel { */ public function init(): void { - add_action('wp_ultimo_load', [$this, 'add_settings'], 20); + add_action('init', [$this, 'add_settings'], 20); add_action('admin_init', [$this, 'clear_footer_texts']); @@ -85,9 +85,6 @@ class Whitelabel { add_action('wp_dashboard_setup', [$this, 'remove_dashboard_widgets'], 11); - add_action('admin_enqueue_scripts', [$this, 'enqueue_styles']); - - add_action('wp_enqueue_scripts', [$this, 'enqueue_styles']); } if (wu_get_setting('hide_sites_menu', true)) { @@ -291,6 +288,7 @@ class Whitelabel { global $wp_admin_bar; $wp_admin_bar->remove_menu('wp-logo'); + $this->enqueue_styles(); } /** From ea22717edd4d8965e214803c9361cc901a040a89 Mon Sep 17 00:00:00 2001 From: Marcus Quinn Date: Sun, 6 Apr 2025 23:26:29 +0100 Subject: [PATCH 2/3] Add clear installation instructions to fix issues #7 and #16 --- README.md | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ readme.txt | 62 +++++++++++++++++++++++++++++++++++++++----- 2 files changed, 131 insertions(+), 7 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..cb1c768 --- /dev/null +++ b/README.md @@ -0,0 +1,76 @@ +# WP Multisite WaaS + +The WordPress Multisite Website as a Service (WaaS) plugin, now community maintained. + +## Description + +WP Multisite WaaS helps you transform your WordPress Multisite installation into a powerful Website as a Service (WaaS) platform. This plugin enables you to offer website creation, hosting, and management services to your customers through a streamlined interface. + +## Installation + +There are two ways to install WP Multisite WaaS: + +### Method 1: Using the pre-packaged release (Recommended) + +1. Download the latest release ZIP from the [Releases page](https://github.com/superdav42/wp-multisite-waas/releases) +2. Log in to your WordPress Network Admin dashboard +3. Navigate to Plugins > Add New > Upload Plugin +4. Choose the downloaded ZIP file and click "Install Now" +5. Network Activate the plugin +6. Follow the setup wizard to complete the installation + +### Method 2: Using Git and Composer (For developers) + +This method requires command-line access to your server and familiarity with Git and Composer. + +1. Clone the repository to your plugins directory: + ``` + cd wp-content/plugins/ + git clone https://github.com/superdav42/wp-multisite-waas.git + cd wp-multisite-waas + ``` + +2. Install the required dependencies using Composer: + ``` + composer install + ``` + +3. Network Activate the plugin in your WordPress Network Admin dashboard +4. Follow the setup wizard to complete the installation + +## Common Installation Issues + +### "Failed opening required [...]/vendor/autoload_packages.php" + +This error occurs when the required vendor files are missing. This typically happens when: +- You've downloaded the repository directly from GitHub without using a release package +- The composer dependencies haven't been installed + +**Solution**: Use the pre-packaged release from the [Releases page](https://github.com/superdav42/wp-multisite-waas/releases) or run `composer install` in the plugin directory. + +### "Cannot declare class ComposerAutoloaderInitWPUltimoDependencies, because the name is already in use" + +This error usually occurs when updating from an older version of WP Ultimo or when multiple versions of the plugin are installed. + +**Solution**: Deactivate and remove any older versions of WP Ultimo or WP Multisite WaaS before activating the new version. + +### "Class 'WP_Ultimo\Database\Sites\Site_Query' not found" + +This error can occur if the plugin's autoloader isn't properly loading all the necessary classes. + +**Solution**: Use the pre-packaged release from the [Releases page](https://github.com/superdav42/wp-multisite-waas/releases) which includes all required files. + +## Requirements + +- WordPress Multisite 5.3 or higher +- PHP 7.4.30 or higher +- MySQL 5.6 or higher +- HTTPS enabled (recommended for secure checkout) + +## Support + +For support, please open an issue on the [GitHub repository](https://github.com/superdav42/wp-multisite-waas/issues). + +## License + +WP Multisite WaaS is licensed under the GPLv2 or later. \ No newline at end of file diff --git a/readme.txt b/readme.txt index 39b9228..e340742 100644 --- a/readme.txt +++ b/readme.txt @@ -16,9 +16,57 @@ The WordPress Multisite Website as a Service (Waas) plugin. Now community mainta == Installation == -1. Upload 'wp-multisite-waas' to the '/wp-content/plugins/' directory -2. Activate the plugin through the 'Plugins' menu in WordPress -3. Follow the step by step Wizard to set the plugin up +There are two recommended ways to install WP Multisite WaaS: + += Method 1: Using the pre-packaged release (Recommended) = + +1. Download the latest release ZIP from the [Releases page](https://github.com/superdav42/wp-multisite-waas/releases) +2. Log in to your WordPress Network Admin dashboard +3. Navigate to Plugins > Add New > Upload Plugin +4. Choose the downloaded ZIP file and click "Install Now" +5. Network Activate the plugin through the 'Plugins' menu in WordPress +6. Follow the step by step Wizard to set the plugin up + += Method 2: Using Git and Composer (For developers) = + +This method requires command-line access to your server and familiarity with Git and Composer. + +1. Clone the repository to your plugins directory: + ``` + cd wp-content/plugins/ + git clone https://github.com/superdav42/wp-multisite-waas.git + cd wp-multisite-waas + ``` + +2. Install the required dependencies using Composer: + ``` + composer install + ``` + +3. Network Activate the plugin in your WordPress Network Admin dashboard +4. Follow the setup wizard to complete the installation + += Common Installation Issues = + +**"Failed opening required [...]/vendor/autoload_packages.php"** + +This error occurs when the required vendor files are missing. This typically happens when: +- You've downloaded the repository directly from GitHub without using a release package +- The composer dependencies haven't been installed + +Solution: Use the pre-packaged release from the [Releases page](https://github.com/superdav42/wp-multisite-waas/releases) or run `composer install` in the plugin directory. + +**"Cannot declare class ComposerAutoloaderInitWPUltimoDependencies, because the name is already in use"** + +This error usually occurs when updating from an older version of WP Ultimo or when multiple versions of the plugin are installed. + +Solution: Deactivate and remove any older versions of WP Ultimo or WP Multisite WaaS before activating the new version. + +**"Class 'WP_Ultimo\Database\Sites\Site_Query' not found"** + +This error can occur if the plugin's autoloader isn't properly loading all the necessary classes. + +Solution: Use the pre-packaged release from the [Releases page](https://github.com/superdav42/wp-multisite-waas/releases) which includes all required files. == Upgrade Notice == @@ -384,7 +432,7 @@ Version 2.0.20 - Released on 2022-09-30 * Added: Security mode to deactivate all plugins except WP Ultimo and mu-plugins at once and reactivate after disable; * Added: Allow customers to update the membership to plans and variations with different periods; * Added: Allow customers to select one of their sites when creating a new one; -* Added: Error message when customers access the “add user” page over users limit; +* Added: Error message when customers access the "add user" page over users limit; * Added: wu_return_url filter, allowing custom redirections after checkout process; * Improvement: New payments from manual gateway are now generated by current membership; * Improvement: Elementor compatibility on mapped sites; @@ -463,8 +511,8 @@ Version 2.0.15 - Released on 2022-06-15 * Added: Currency Saudi Riyal * Improvement: Removes unlisted countries from the billing address checkout field when using the "Restrict by country" option; * Improvement: Disables the "Restrict by country" toggle when saving the form without allowed countries; -* Improvement: Improves the addition of billing address fields by allowing the removal of fields through the “wu_billing_address_fields” filter and avoiding error in the use of this filter; -* Improvement: Checks if payment status is completed when building the cart to prevent error with Ultimo defining the cart as “retry”; +* Improvement: Improves the addition of billing address fields by allowing the removal of fields through the "wu_billing_address_fields" filter and avoiding error in the use of this filter; +* Improvement: Checks if payment status is completed when building the cart to prevent error with Ultimo defining the cart as "retry"; * Improvement: Verifies if the cart has a future value to be paid to better handle downgrades; * Improvement: Checks if subscription is not already cancelled on Stripe and Stripe Checkout gateways before trying to cancel; * Improvement: Improvement: Changes stripe.js handlers to better code readability and to follow Stripe recommendations; @@ -485,7 +533,7 @@ Version 2.0.15 - Released on 2022-06-15 * Fix: SSO not working on wp-admin page with mapped domains; * Fix: Stripe saved cards not working; * Fix: Downgrade cart not being correctly built when new plan is not free; -* Fix: Correctly define a cart as “retry” and postpone the payment verification when building it to prevent some errors on checkout validation process; +* Fix: Correctly define a cart as "retry" and postpone the payment verification when building it to prevent some errors on checkout validation process; * Fix: Get the enable multiple membership value config from settings value; * Fix: Allow updates with current plan on trial period; * Fix: Stripe Checkout gateway id with wrong value on get_or_create_customer method; From 4966b6aa290d902315b7bee141186abf579b89e4 Mon Sep 17 00:00:00 2001 From: Marcus Quinn Date: Sun, 6 Apr 2025 23:31:37 +0100 Subject: [PATCH 3/3] Consolidate documentation in readme.txt and remove redundant README.md --- README.md | 76 ------------------------------------------------------ readme.txt | 17 +++++++++--- 2 files changed, 14 insertions(+), 79 deletions(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index cb1c768..0000000 --- a/README.md +++ /dev/null @@ -1,76 +0,0 @@ -# WP Multisite WaaS - -The WordPress Multisite Website as a Service (WaaS) plugin, now community maintained. - -## Description - -WP Multisite WaaS helps you transform your WordPress Multisite installation into a powerful Website as a Service (WaaS) platform. This plugin enables you to offer website creation, hosting, and management services to your customers through a streamlined interface. - -## Installation - -There are two ways to install WP Multisite WaaS: - -### Method 1: Using the pre-packaged release (Recommended) - -1. Download the latest release ZIP from the [Releases page](https://github.com/superdav42/wp-multisite-waas/releases) -2. Log in to your WordPress Network Admin dashboard -3. Navigate to Plugins > Add New > Upload Plugin -4. Choose the downloaded ZIP file and click "Install Now" -5. Network Activate the plugin -6. Follow the setup wizard to complete the installation - -### Method 2: Using Git and Composer (For developers) - -This method requires command-line access to your server and familiarity with Git and Composer. - -1. Clone the repository to your plugins directory: - ``` - cd wp-content/plugins/ - git clone https://github.com/superdav42/wp-multisite-waas.git - cd wp-multisite-waas - ``` - -2. Install the required dependencies using Composer: - ``` - composer install - ``` - -3. Network Activate the plugin in your WordPress Network Admin dashboard -4. Follow the setup wizard to complete the installation - -## Common Installation Issues - -### "Failed opening required [...]/vendor/autoload_packages.php" - -This error occurs when the required vendor files are missing. This typically happens when: -- You've downloaded the repository directly from GitHub without using a release package -- The composer dependencies haven't been installed - -**Solution**: Use the pre-packaged release from the [Releases page](https://github.com/superdav42/wp-multisite-waas/releases) or run `composer install` in the plugin directory. - -### "Cannot declare class ComposerAutoloaderInitWPUltimoDependencies, because the name is already in use" - -This error usually occurs when updating from an older version of WP Ultimo or when multiple versions of the plugin are installed. - -**Solution**: Deactivate and remove any older versions of WP Ultimo or WP Multisite WaaS before activating the new version. - -### "Class 'WP_Ultimo\Database\Sites\Site_Query' not found" - -This error can occur if the plugin's autoloader isn't properly loading all the necessary classes. - -**Solution**: Use the pre-packaged release from the [Releases page](https://github.com/superdav42/wp-multisite-waas/releases) which includes all required files. - -## Requirements - -- WordPress Multisite 5.3 or higher -- PHP 7.4.30 or higher -- MySQL 5.6 or higher -- HTTPS enabled (recommended for secure checkout) - -## Support - -For support, please open an issue on the [GitHub repository](https://github.com/superdav42/wp-multisite-waas/issues). - -## License - -WP Multisite WaaS is licensed under the GPLv2 or later. \ No newline at end of file diff --git a/readme.txt b/readme.txt index e340742..25b5f85 100644 --- a/readme.txt +++ b/readme.txt @@ -6,13 +6,13 @@ License: GPLv2 License URI: http://www.gnu.org/licenses/gpl-2.0.html Contributors: aanduque, superdav42 -The Complete Network Solution. +The Complete Network Solution for transforming your WordPress Multisite into a Website as a Service (WaaS) platform. == Description == -WP Multisite WaaS +WP Multisite WaaS helps you transform your WordPress Multisite installation into a powerful Website as a Service (WaaS) platform. This plugin enables you to offer website creation, hosting, and management services to your customers through a streamlined interface. -The WordPress Multisite Website as a Service (Waas) plugin. Now community maintained. +Now community maintained. == Installation == @@ -68,6 +68,17 @@ This error can occur if the plugin's autoloader isn't properly loading all the n Solution: Use the pre-packaged release from the [Releases page](https://github.com/superdav42/wp-multisite-waas/releases) which includes all required files. +== Requirements == + +- WordPress Multisite 5.3 or higher +- PHP 7.4.30 or higher +- MySQL 5.6 or higher +- HTTPS enabled (recommended for secure checkout) + +== Support == + +For support, please open an issue on the [GitHub repository](https://github.com/superdav42/wp-multisite-waas/issues). + == Upgrade Notice == We recommend running this in a staging environment before updating your production environment.