diff --git a/CHANGELOG.md b/CHANGELOG.md index 67637ed9..7f12bb3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +## v2.7.3 - 09/01/2026 + +- Fix: Direct Content Control Pro customers to the appropriate product review form. + ## v2.7.2 - 08/26/2026 - Improvement: Refined request-scoped upgrade stream initialization for broader hosting compatibility. diff --git a/classes/Controllers/Admin/Reviews.php b/classes/Controllers/Admin/Reviews.php index f9879032..36ba6298 100644 --- a/classes/Controllers/Admin/Reviews.php +++ b/classes/Controllers/Admin/Reviews.php @@ -271,7 +271,7 @@ public function triggers( $group = null, $code = null ) { static $triggers; if ( ! isset( $triggers ) ) { - $link = 'https://wordpress.org/support/plugin/content-control/reviews/?rate=5#rate-response'; + $link = $this->get_review_link(); // Translators: 1. emoji, 2. html tag, 3. html tag, 4. the number of days, 5. html tag, 6. html tag. $time_message = __( 'Hi there! %1$s You\'ve been using the %2$sContent Control%3$s plugin on your site for %4$s now - We hope it\'s been helpful. If you\'re enjoying the plugin, would you mind rating it %5$s5-stars%6$s to help spread the word?', 'content-control' ); @@ -358,6 +358,23 @@ public function triggers( $group = null, $code = null ) { return $triggers; } + /** + * Get the review destination for the installed product. + * + * Free users go directly to WordPress.org's unselected review form. Sites + * with Pro installed use the first-party landing page, which routes them to + * the verified-purchaser review form for the commercial product. + * + * @since 2.7.3 + * + * @return string + */ + public function get_review_link() { + return $this->container->is_pro_installed() + ? 'https://contentcontrolplugin.com/leave-a-review/?product=pro' + : 'https://wordpress.org/support/plugin/content-control/reviews/#rate-response'; + } + /** * Render admin notices if available. * diff --git a/content-control.php b/content-control.php index 4b5ea54f..d4481230 100644 --- a/content-control.php +++ b/content-control.php @@ -3,7 +3,7 @@ * Plugin Name: Content Control * Plugin URI: https://contentcontrolplugin.com/?utm_campaign=plugin-info&utm_source=php-file-header&utm_medium=plugin-ui&utm_content=plugin-uri * Description: Restrict content to logged in/out users or specific user roles. Restrict access to certain parts of a page/post. Control the visibility of widgets. - * Version: 2.7.2 + * Version: 2.7.3 * Author: Code Atlantic * Author URI: https://code-atlantic.com/?utm_campaign=plugin-info&utm_source=php-file-header&utm_medium=plugin-ui&utm_content=author-uri * Donate link: https://code-atlantic.com/donate/?utm_campaign=donations&utm_source=php-file-header&utm_medium=plugin-ui&utm_content=donate-link @@ -32,7 +32,7 @@ function get_plugin_config() { return [ 'name' => 'Content Control', 'slug' => 'content-control', - 'version' => '2.7.2', + 'version' => '2.7.3', 'option_prefix' => 'content_control', // Maybe remove this and simply prefix `name` with `'Popup Maker'`. 'text_domain' => 'content-control', diff --git a/package-lock.json b/package-lock.json index ca19694e..95d0e09c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "content-control", - "version": "2.7.2", + "version": "2.7.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "content-control", - "version": "2.7.2", + "version": "2.7.3", "license": "GPL-2.0-or-later", "workspaces": [ "./packages/*" diff --git a/package.json b/package.json index 3793258f..c3408dd0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "content-control", - "version": "2.7.2", + "version": "2.7.3", "description": "", "author": "Code Atlantic LLC", "license": "GPL-2.0-or-later", diff --git a/readme.txt b/readme.txt index 39d4bd29..0a0409a0 100644 --- a/readme.txt +++ b/readme.txt @@ -6,7 +6,7 @@ Donate link: https://code-atlantic.com/donate/?utm_campaign=donations&utm_source Tags: membership, access control, members only, content restriction, maintenance mode Requires at least: 6.2 Tested up to: 7.1 -Stable tag: 2.7.2 +Stable tag: 2.7.3 Requires PHP: 7.4 License: GPL-2.0-or-later @@ -110,6 +110,10 @@ Bugs can be reported either in our support forum or we are happy to accept PRs o == Changelog == += v2.7.3 - 09/01/2026 = + +* Fix: Direct Content Control Pro customers to the appropriate product review form. + = v2.7.2 - 08/26/2026 = * Improvement: Refined request-scoped upgrade stream initialization for broader hosting compatibility. diff --git a/tests/unit/Classes/AdminReviews.php b/tests/unit/Classes/AdminReviews.php new file mode 100644 index 00000000..8076d44a --- /dev/null +++ b/tests/unit/Classes/AdminReviews.php @@ -0,0 +1,77 @@ +create_container( false ) ); + + $this->assertSame( + 'https://wordpress.org/support/plugin/content-control/reviews/#rate-response', + $controller->get_review_link() + ); + } + + /** + * Pro installations use the first-party verified-customer review route. + */ + public function test_pro_review_link_uses_product_landing_page() { + $controller = new Reviews( $this->create_container( true ) ); + + $this->assertSame( + 'https://contentcontrolplugin.com/leave-a-review/?product=pro', + $controller->get_review_link() + ); + } + + /** + * Create the minimum Core container contract required by the controller. + * + * @param bool $pro_installed Whether Pro is installed. + * + * @return object + */ + private function create_container( $pro_installed ) { + return new class( $pro_installed ) { + /** + * Whether Pro is installed. + * + * @var bool + */ + private $pro_installed; + + /** + * Constructor. + * + * @param bool $pro_installed Whether Pro is installed. + */ + public function __construct( $pro_installed ) { + $this->pro_installed = $pro_installed; + } + + /** + * Match the Core container API. + * + * @return bool + */ + public function is_pro_installed() { + return $this->pro_installed; + } + }; + } +}