Skip to content

Conversation

@remyperona
Copy link
Contributor

@remyperona remyperona commented Dec 19, 2025

Description

Fixes #1001

Type of change

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

Detailed scenario

What was tested

  • Tested hiding of the our plugins section when the option imagify_partner_hide_our_pluginsis set

How to test

There is 2 ways to test the flow:

  • When creating a new user from the plugin, with the partner ID option imagifyp_id set
    or
  • If the user already exists, saving the API key, with the partner ID option imagifyp_id set

In both of those cases, if the partner ID is extendify, the Our Plugins section on the settings page should be hidden.

This is done through an option called imagify_partner_hide_our_plugins which is saved when deleting the partner ID option after one of the 2 above flow happened, if the partner corresponds to extendify (for now).

Affected Features & Quality Assurance Scope

  • Affected is the settings page, our plugins section

Technical description

Documentation

This PR implements functionality to hide the "Our Plugins" section in the settings page for specific partners. When users sign up through partner, the plugin family section will not be displayed to them.

Key changes:

  • Adds a new function to save partner IDs that require hiding the plugins section
  • Integrates this function into both API key setup and user creation flows
  • Conditionally renders the "Our Plugins" section based on stored partner information

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.

Unticked items justification

TBD

@remyperona remyperona self-assigned this Dec 19, 2025
@codacy-production
Copy link

codacy-production bot commented Dec 19, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for cbb604d1 35.29% (target: 50.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (cbb604d) Report Missing Report Missing Report Missing
Head commit (183cb8e) 14253 54 0.38%

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 (#1002) 17 6 35.29%

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.

@Mai-Saad
Copy link

Mai-Saad commented Jan 6, 2026

@remyperona Thanks for the PR. Please find exploratory test notes below.

  • UI is corrupted at bulk optimization view #1003 => same on develop
  • If we use snippet to simulate partner
    add_filter( 'pre_option_imagifyp_id', function() { return 'wp-rocket'; } ); ===> plugins section won't be displayed as expected ✔️
  • If we disabled the snippet above, then did fresh install of PR ==> the plugins section wouldn't be displayed, shouldn't it be displayed?

@remyperona remyperona marked this pull request as ready for review January 6, 2026 17:04
@remyperona remyperona requested a review from Copilot January 6, 2026 17:05
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 PR implements functionality to hide the "Our Plugins" section in the settings page for specific partners. When users sign up through partner ID 18 (Extendify), the plugin family section will not be displayed to them.

Key changes:

  • Adds a new function to save partner IDs that require hiding the plugins section
  • Integrates this function into both API key setup and user creation flows
  • Conditionally renders the "Our Plugins" section based on stored partner information

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
inc/functions/partners.php Adds new function imagify_save_partner_hide_our_plugins() to store partner IDs that should hide the plugins section
inc/common/partners.php Integrates partner hiding logic when API key is first added
inc/classes/class-imagify.php Integrates partner hiding logic during user creation
inc/classes/class-imagify-views.php Retrieves the stored partner option to pass to the settings template
views/page-settings.php Conditionally renders the "Our Plugins" section based on partner setting

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

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

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


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

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.

Feedback;:

  • CI (coverage) not passing
  • Partner ID or slug usage?
  • We need What was tested and How to test please 🙏

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.

As a partner, I want to install imagify on websites with the "our plugins" tab disabled

4 participants