In this example, We have shared how are partial refunds stored in the WooCommerce Database?
Partial refund orders are stored in database like normal ones: In
wp_posts table with a
'post_type' = 'shop_order_refund' and a
'post_parent' = order_ID (number), where the
order_ID is the reference to the original
To find out which one of this refunds are partial, you need the
_refund_amount amount value that you can find under
wp_post_meta for this
'refund_order' and his corresponding
'shop_order' with the
_order_total value too:
_refund_amount ) != (
_order_total ) : then it’s partial.
_refund_amount ) == (
_order_total ) : then it’s normal (not partial).
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.