Skip to content

Conversation

@remyperona
Copy link
Contributor

@remyperona remyperona commented Jan 12, 2026

Description

Modify the compatibility with Extendify to use an option instead of the partner ID

Type of change

  • Enhancement (non-breaking change which improves an existing functionality).

Detailed scenario

What was tested

Tested the display of the Our Plugins section, based on the existance of the option extendify_site_id

How to test

You can simulate the option using:

add_filter( 'pre_option_extendify_site_id', function() {
	return 1;
});

Affected Features & Quality Assurance Scope

Imagify settings page, our plugins section

Technical description

Documentation

This pull request refactors the Extendify compatibility mechanism from a partner ID-based system to an option-based approach. Instead of checking a custom imagify_partner_hide_our_plugins option, the plugin now checks for the existence of Extendify's own extendify_site_id option to determine whether to hide the "Our Plugins" section.

Changes:

  • Removed the legacy partner-based hiding system including the imagify_save_partner_hide_our_plugins function and related calls
  • Introduced a new Extendify subscriber class that hooks into the imagify_hide_plugin_family filter
  • Replaced direct option checking with a filter-based approach using wpm_apply_filters_typed

Mandatory Checklist

Code validation

  • I validated all the Acceptance Criteria. If possible, provide screenshots or videos.
  • I triggered all changed lines of code at least once without new errors/warnings/notices.
  • I implemented built-in tests to cover the new/changed code.

Code style

  • I wrote a self-explanatory code about what it does.
  • I protected entry points against unexpected inputs.
  • I did not introduce unnecessary complexity.

@codacy-production
Copy link

codacy-production bot commented Jan 12, 2026

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for c3d67161 0.00% (target: 50.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (c3d6716) Report Missing Report Missing Report Missing
Head commit (bd83e80) 14243 48 0.34%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1007) 1 0 0.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request refactors the Extendify compatibility mechanism from a partner ID-based system to an option-based approach. Instead of checking a custom imagify_partner_hide_our_plugins option, the plugin now checks for the existence of Extendify's own extendify_site_id option to determine whether to hide the "Our Plugins" section.

Changes:

  • Removed the legacy partner-based hiding system including the imagify_save_partner_hide_our_plugins function and related calls
  • Introduced a new Extendify subscriber class that hooks into the imagify_hide_plugin_family filter
  • Replaced direct option checking with a filter-based approach using wpm_apply_filters_typed

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
uninstall.php Removed cleanup of deprecated imagify_partner_hide_our_plugins option
inc/functions/partners.php Removed the imagify_save_partner_hide_our_plugins function
inc/common/partners.php Removed calls to imagify_save_partner_hide_our_plugins during option updates
inc/classes/class-imagify.php Removed calls to imagify_save_partner_hide_our_plugins during user creation
inc/classes/class-imagify-views.php Changed from direct option check to filter-based approach using wpm_apply_filters_typed
classes/ThirdParty/ServiceProvider.php Registered the new Extendify subscriber class
classes/ThirdParty/Hostings/Extendify.php New subscriber class that checks for extendify_site_id option
Tests/Unit/inc/functions/Partners/ImagifySavePartnerHideOurPluginsTest.php Removed obsolete tests for deleted function
Tests/Unit/classes/ThirdParty/Hostings/Extendify/HidePluginFamilyTest.php Added new test for Extendify subscriber
Tests/Fixtures/inc/functions/Partners/ImagifySavePartnerHideOurPluginsTest.php Removed obsolete test fixtures
Tests/Fixtures/classes/ThirdParty/Hostings/Extendify/HidePluginFamilyTest.php Added new test fixtures for Extendify subscriber

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Mai-Saad Mai-Saad self-requested a review January 13, 2026 06:22
@Mai-Saad Mai-Saad added this to the 2.2.7 milestone Jan 13, 2026
@Mai-Saad Mai-Saad removed their request for review January 13, 2026 06:23
@Mai-Saad
Copy link
Contributor

Mai-Saad commented Jan 13, 2026

@remyperona Thanks for the PR. Here is exploratory test notes

  • For the mentioned filter add_filter( 'pre_option_extendify_site_id', function() { return 1; }); any other values will work and hide the plugins section i.e -1, 0, 6, null ===> is this expected?
  • If we disable the snippet, the plugins section will be displayed with no need to reinstall plugin, ok?
  • When deactivate plugin, can see this console error, any idea how can we gaurd that?
Screenshot from 2026-01-13 11-10-08

Copy link
Contributor

@nicomollet nicomollet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving

For @Mai-Saad

  • Any value in extendify_site_id would hide the plugin family, it is expected.
  • The error in screenshot ERR_QUIC_PROTOCOL doesn't seem related to Imagify: can you retry again?

@Mai-Saad
Copy link
Contributor

The error in screenshot ERR_QUIC_PROTOCOL doesn't seem related to Imagify: can you retry again?

@nicomollet yes working fine now 🙏

@remyperona remyperona added this pull request to the merge queue Jan 13, 2026
Merged via the queue into develop with commit 6f43ee5 Jan 13, 2026
11 of 12 checks passed
@remyperona remyperona deleted the enhancement/extendify branch January 13, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants