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

Add a filter woocommerce_admin_terms_metabox_datalimit to change the data-limit value for the attributes term box #45506

Merged
merged 5 commits into from Mar 12, 2024

Conversation

lsinger
Copy link
Contributor

@lsinger lsinger commented Mar 12, 2024

Submission Review Guidelines:

Changes proposed in this Pull Request:

This is a copy of #41411. Based on the discussion I preferred to take the PR over to get the CI checks sorted. All props to @Babylon1999.

Closes #37548.

The current attribute term list in the product editor imposes a limitation of 50 terms creating inconvenience for merchants with attributes exceeding this limit. Consequently, they are unable to search for terms from the drop-down menu.

This proposed solution allows for a flexible adjustment of the term limit by introducing a filter, woocommerce_admin_terms_metabox_datalimit, which will allow to modify the data-limit variable. This approach eliminates the need to edit the plugin files directly, providing a more streamlined and customizable solution.

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Add a product with 60 terms
  2. If you check the drop-down list in All Product > Product > Attributes, it will be limited to 50
  3. To increase the limit to 60 or more, add the following in the functions.php file:
function example_callback() {
    return 60;
}
add_filter( 'woocommerce_admin_terms_metabox_datalimit', 'example_callback' );

Testing instructions and PR description taken over from the original PR.

Changelog entry

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Comment

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Mar 12, 2024
Copy link
Contributor

github-actions bot commented Mar 12, 2024

Test Results Summary

Commit SHA: a433b05

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 37s
E2E Tests800027103517m 18s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

@lsinger lsinger force-pushed the add/woocommerce-terms-metabox-datalimit branch from e5f9ae4 to a433b05 Compare March 12, 2024 12:47
@lsinger lsinger enabled auto-merge (squash) March 12, 2024 12:52
@lsinger lsinger requested review from nathanss, a team and coreymckrill and removed request for a team March 12, 2024 12:52
Copy link
Contributor

github-actions bot commented Mar 12, 2024

Hi @jorgeatorres, @coreymckrill, @nathanss,

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

@lsinger lsinger merged commit 15855b5 into trunk Mar 12, 2024
40 of 41 checks passed
@lsinger lsinger deleted the add/woocommerce-terms-metabox-datalimit branch March 12, 2024 13:22
@github-actions github-actions bot added this to the 8.8.0 milestone Mar 12, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Mar 12, 2024
@alopezari alopezari added needs: internal testing Indicates if the PR requires further testing conducted by Solaris status: analysis complete Indicates if a PR has been analysed by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels Mar 12, 2024
Konamiman pushed a commit that referenced this pull request Mar 13, 2024
…e data-limit value for the attributes term box (#45506)

* Update html-product-attribute-inner.php

Add a new filter `woocommerce_admin_terms_metabox_datalimit` to change the value of data-limit. See #37548 for more context.

* Update html-product-attribute-inner.php

* Creating a changelog file again

* update @SInCE tag

* tweak changelog file wording

---------

Co-authored-by: Saif H. Hassan <67080558+Babylon1999@users.noreply.github.com>
@nigeljamesstevenson nigeljamesstevenson added the release: highlight Issues that have a high user impact and need to be discussed/paid attention to. label Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: internal testing Indicates if the PR requires further testing conducted by Solaris plugin: woocommerce Issues related to the WooCommerce Core plugin. release: highlight Issues that have a high user impact and need to be discussed/paid attention to. status: analysis complete Indicates if a PR has been analysed by Solaris
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The attribute term list only renders 50 variations in product settings
5 participants