parent parameter in wc_get_orders arguments WooCommerce

Viewed 17

In WooCommerce wc_get_orders() documentation there is an argument called parent which as following description: Accepts an integer: post ID of the order parent.

What is the order parent and what is the use case of this argument?

1 Answers

parent argument is the same as other post types. for example, we generally see in the page hierarchy.

I might be wrong at some point but, with orders, it's used with shop_order_refund post type, whenever you have a partial refund a new post will generate with post type shop_order_refund, and the post parent id will be assigned on this post data.

Related