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

Remove deprecated calls in class-wc-checkout.php #41567

Closed
wants to merge 1 commit into from

Conversation

tivnet
Copy link
Contributor

@tivnet tivnet commented Nov 19, 2023

$item->legacy_... result in "Something went wrong. Please contact us to get assistance." error message in the Cart block (PHP 8.2)

PHP Deprecated: Creation of dynamic property WC_Order_Item_Product::$legacy_values is deprecated
PHP Deprecated: Creation of dynamic property WC_Order_Item_Product::$legacy_cart_item_key is deprecated
PHP Deprecated: Creation of dynamic property WC_Order_Item_Shipping::$legacy_package_key is deprecated

$item->legacy_... result in "Something went wrong. Please contact us to get assistance." error message in the Cart block
(PHP 8.2)

PHP Deprecated:  Creation of dynamic property WC_Order_Item_Product::$legacy_values is deprecated
PHP Deprecated:  Creation of dynamic property WC_Order_Item_Product::$legacy_cart_item_key is deprecated
PHP Deprecated:  Creation of dynamic property WC_Order_Item_Shipping::$legacy_package_key is deprecated
@github-actions github-actions bot added plugin: woocommerce Issues related to the WooCommerce Core plugin. type: community contribution labels Nov 19, 2023
@woocommercebot woocommercebot requested review from a team and coreymckrill and removed request for a team November 19, 2023 21:12
Copy link
Contributor

Hi ,

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

@tivnet
Copy link
Contributor Author

tivnet commented Nov 19, 2023

image

Copy link
Collaborator

@coreymckrill coreymckrill left a comment

Choose a reason for hiding this comment

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

@tivnet Thanks for the PR. Even though these properties are "legacy" and have been deprecated, it seems like just removing them will probably cause something to break for someone without warning. A safer approach to eliminating those dynamic property notices might be to define these properties in the WC_Checkout class so they aren't dynamic anymore.

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.

None yet

2 participants