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

Use isset to address the deprecated message related to $check_key_exists parameter from AssetDataRegistry #46349

Open
nefeline opened this issue Apr 8, 2024 · 2 comments
Labels
plugin: woocommerce Issues related to the WooCommerce Core plugin. team: Kirigami & Origami type: enhancement The issue is a request for an enhancement.

Comments

@nefeline
Copy link
Member

nefeline commented Apr 8, 2024

Reported by @roykho on #46139, opening this issue so we can circle back and ensure that:

For this since we're deprecating the parameter, what do you think if we check for isset instead. This way, the caller will get a deprecated feedback whether they passed 'true' or 'false' there.

@shameemreza
Copy link

Posibly Another report here: 8131880-zen
Thread link: https://wordpress.org/support/topic/log-messages-the-automatticwoocommerceblocksassetsassetdataregistry/

The Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry::add() argument is deprecated since version 8.9. The $check_key_exists parameter is no longer used: all duplicate data will be ignored if the key exists by default
  • WC Version: 8.8.3
  • WP Version: 6.5.2
  • HP Version: 8.0.30

@nefeline
Copy link
Member Author

nefeline commented May 2, 2024

Hi @shameemreza 👋 !

Could you please refer to #46744 (comment) ? That issue has further details on this.

In summary, the decision to deprecate the $check_key_exists parameter was deliberate, and here on this issue we are just considering expanding the notice to all use-cases.

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. team: Kirigami & Origami type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

No branches or pull requests

2 participants