Skip to content

Conversation

@chihsuan
Copy link
Member

@chihsuan chihsuan commented May 6, 2022

All Submissions:

Changes proposed in this Pull Request:

Closes #32863.

Looks like we deprecated the get_options function in this PR and only allow API requests to fetch options in woocommerce_permissions list.

The Reminder bar was added in #32320 and it fetch the reminderBarHiddenOption option, but didn't add it to woocommerce_permissions.

How to test the changes in this Pull Request:

  1. Use a JN site
  2. Build zip via pnpm nx build:zip woocommerce
  3. Upload and activate Woocommerce
  4. Go to WooCommerce > Settings
  5. Confirm no deprecation notice in the PHP error log - WC 6.5 RC: The Automattic\WooCommerce\Admin\API\Options::get_options function is deprecated since version 3.1

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 successfully run tests with your changes locally?
  • Have you created a changelog file by running pnpm nx affected --target=changelog?

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 focus: react admin plugin: woocommerce Issues related to the WooCommerce Core plugin. labels May 6, 2022
@chihsuan chihsuan self-assigned this May 6, 2022
@chihsuan chihsuan requested a review from a team May 6, 2022 03:27
Copy link
Contributor

@rjchow rjchow left a comment

Choose a reason for hiding this comment

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

Thanks! Error is gone now

@chihsuan chihsuan merged commit 211e0f9 into trunk May 6, 2022
@chihsuan chihsuan deleted the fix/32863-get-option-deprecated-notices branch May 6, 2022 08:00
@github-actions github-actions bot added this to the 6.6.0 milestone May 6, 2022
@github-actions
Copy link
Contributor

github-actions bot commented May 6, 2022

Hi @chihsuan, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:

  • Add the release: add testing instructions label

@chihsuan chihsuan added the release: add testing instructions PRs that have not had testing instructions added to the wiki. [auto] label May 6, 2022
@grgsllnd
Copy link

grgsllnd commented Jun 7, 2022

I still have the deprecation warning error whaen using the importer in admin > products

@chihsuan
Copy link
Member Author

chihsuan commented Jun 8, 2022

I still have the deprecation warning error whaen using the importer in admin > products

@GregoireSailland Are you using WC 6.6?

@KoolPal
Copy link
Contributor

KoolPal commented May 12, 2023

@chihsuan Notice still seen in WooCommerce version: 7.7.0!!
Please fix
Thanks

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. release: add testing instructions PRs that have not had testing instructions added to the wiki. [auto]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WC 6.5 RC: The Automattic\WooCommerce\Admin\API\Options::get_options function is deprecated since version 3.1.

5 participants