Skip to content

Retrieve WC_Order from WP_Post#73

Open
sanderjn wants to merge 1 commit into
dpdconnect:masterfrom
sanderjn:bug/DownloadLabelBox-orderID
Open

Retrieve WC_Order from WP_Post#73
sanderjn wants to merge 1 commit into
dpdconnect:masterfrom
sanderjn:bug/DownloadLabelBox-orderID

Conversation

@sanderjn
Copy link
Copy Markdown

Function is expecting WC_Order, but is passed WP_Post.

This causes a Fatal error:

Fatal error: Uncaught Error: Call to undefined method WP_Post::get_id() in .../wp-content/plugins/dpdconnect/classes/Handlers/DownloadLabelBox.php on line 32

This PR retrieves a WC_Order object from the passed WP_Post, and fixed the error.

Function is expecting WC_Order, but is passed WP_Post.
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