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

Error in refund event #6

Closed
gjportegies opened this issue Apr 25, 2024 · 1 comment
Closed

Error in refund event #6

gjportegies opened this issue Apr 25, 2024 · 1 comment
Assignees
Milestone

Comments

@gjportegies
Copy link

The refund event falsely assumes the product on the order line_item still exists.
In our case the product does not exists in the store anymore resulting in the following error:

Error: Call to a member function get_id() on bool in /wp-content/plugins/taggrs-wordpress-plugin/includes/events/refund.php:12

The event should check if the product exists before using the object.

@BruceKristelijn
Copy link
Collaborator

Thank you for reporting this issue.

In the foreach loop I have added a empty check to skip empty / non existing products. I also noticed the category logging not working properly so I've added this aswell.

Feel free to test it on this branch to make sure it works for you aswell.

@BruceKristelijn BruceKristelijn added this to the 1.0.3 milestone Apr 27, 2024
@ITaggrs ITaggrs closed this as completed Aug 22, 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

When branches are created from issues, their pull requests are automatically linked.

3 participants