Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allows developers to add their own filters to the active filters list #36705

Merged
merged 5 commits into from Mar 6, 2023

Conversation

webdados
Copy link
Contributor

Fixes #36704

All Submissions:

Changes proposed in this Pull Request:

Closes #36704 allowing developers to add their own custom filters to the active filters widget

  • This PR is a very minor change/addition and does not require testing instructions

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you created a changelog file for each project being changed, ie pnpm --filter=<project> changelog add?

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@github-actions github-actions bot added plugin: woocommerce Issues related to the WooCommerce Core plugin. type: community contribution labels Jan 31, 2023
@woocommercebot woocommercebot requested review from a team and rrennick and removed request for a team January 31, 2023 19:05
@rrennick
Copy link
Contributor

@webdados Sorry for the delay in reviewing. Thanks for submitting this. This looks okay except it is missing doc blocks on the hooks and doesn't have a changelog entry. You can add the changelog entry with

pnpm --filter=plugins/woocommerce run changelog add

@webdados
Copy link
Contributor Author

Sorry, not sure what you mean by "missing doc blocks on the hooks".
Also, any way to add the changelog here, thought the web interface?

@rrennick
Copy link
Contributor

Sorry, not sure what you mean by "missing doc blocks on the hooks".

I meant PHPDocs. An example. We follow the WordPress docs standard for this.

any way to add the changelog here, thought the web interface?

No, but if you have composer set up you can create it using composer exec -- changelogger in the plugins/woocommerce folder.

@rrennick
Copy link
Contributor

rrennick commented Mar 2, 2023

any way to add the changelog here, thought the web interface?

@webdados If you add the docblocs on the hooks, I'll add the changelog entry.

Add params and docblocks to the new proposed hooks woocommerce_widget_layered_nav_filters_start and woocommerce_widget_layered_nav_filters_end
@webdados
Copy link
Contributor Author

webdados commented Mar 3, 2023

@webdados If you add the docblocs on the hooks, I'll add the changelog entry.

@rrennick Done. I omitted the "since" tag as I have no idea when this is going to be merged.
I also took the liberty to add the $args and $instance params as the 3rd party developers might have a use for it.

@rrennick
Copy link
Contributor

rrennick commented Mar 3, 2023

I omitted the "since" tag as I have no idea when this is going to be merged.

I've added the changelog. Could you add them for 7.6.0, ping me, and I'll merge shortly after?

@webdados
Copy link
Contributor Author

webdados commented Mar 6, 2023

Done

Copy link
Contributor

@rrennick rrennick left a comment

Choose a reason for hiding this comment

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

Move the changelog to the correct folder.

Copy link
Contributor

@rrennick rrennick left a comment

Choose a reason for hiding this comment

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

@webdados Thanks for your patience with this.

@rrennick rrennick merged commit 7d62529 into woocommerce:trunk Mar 6, 2023
19 of 20 checks passed
@github-actions github-actions bot added this to the 7.6.0 milestone Mar 6, 2023
@webdados webdados deleted the patch-4 branch March 6, 2023 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: woocommerce Issues related to the WooCommerce Core plugin. type: community contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: 3rd party developers should be able to add items to the "Active filters" widget
2 participants