Skip to content

PHP Deprecated: Hook woocommerce_rest_api_option_permissions is deprecated since version 6.3.0 #7864

@ldr2273

Description

@ldr2273

Describe the bug

After the update to WooCommerce Payments 6.9.1, the following notice is triggered:

PHP Deprecated:  Hook woocommerce_rest_api_option_permissions is deprecated since version 6.3.0 with no alternative available. in /wordpress/core/6.4.2/wp-includes/functions.php on line 6031

To Reproduce

  1. Enable WP_DEBUG_LOG
  2. Update WooCommerce Payments to version 6.9.1.
  3. Debug logs reveal the notice

Actual behavior

The notice is triggered after the update.

Most likely because of this: https://github.com/Automattic/woocommerce-payments/blob/6.9.0/includes/class-wc-payments.php#L581

Which has been deprecated by WooCommerce Admin here: https://github.com/woocommerce/woocommerce/blob/8.3.1/plugins/woocommerce/src/Admin/API/Options.php#L149

Screenshots

Replicated:

Screenshot 2023-12-08 at 7 30 08 AM

Expected behavior

We would migrate to the new version of that hook and the notice would not be triggered.

Desktop (please complete the following information):

  • OS: Sonoma
  • Browser: Chrome

Metadata

Metadata

Assignees

Labels

category: coreWC Payments core related issues, where it’s obvious.component: settingsIssues related to Settingsfocus: account lifecyclestatus: blockedThe issue is blocked from progressing, waiting for another piece of work to be done.type: bugThe issue is a confirmed bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions