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

Version 1.10.7 #186

Merged
merged 2 commits into from
Aug 19, 2024
Merged

Version 1.10.7 #186

merged 2 commits into from
Aug 19, 2024

Conversation

mntzrr
Copy link
Collaborator

@mntzrr mntzrr commented Aug 19, 2024

  • Fix - Fixed an issue related to 'woocommerce_new_order_item' where calling save() would result in the order ID being set to 0. This should improve compatibility with other third-party plugins that hook onto this action.

mntzrr added 2 commits August 14, 2024 10:44
Calling save() causes the order ID to return 0 (or sometimes `null`) in the `woocommerce_new_order_item` action hook if the priority is too low. This has caused a compatibility issue with plugins that rely on the order ID to be available.

Since the save() is not necessary when processing order items (it is however required for orders), we can safely remove it.

Furthermore, we don't need to call `update_meta_data` since the order line is only added once. Instead `add_meta_data` suffices.

Tested w/wo HPOS.
@mntzrr mntzrr self-assigned this Aug 19, 2024
@mntzrr mntzrr merged commit 5d93c18 into master Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant