WordPress at Your Fingertips
function is not described

WC_Order_Data_Store_CPT::get_unpaid_orders() public WC 1.0

Get unpaid orders after a certain date,

{} It's a method of the class: WC_Order_Data_Store_CPT{}

No Hooks.

Return

Array.

Usage

$WC_Order_Data_Store_CPT = new WC_Order_Data_Store_CPT();
$WC_Order_Data_Store_CPT->get_unpaid_orders( $date );
$date(int) (required)
Timestamp.

Code of WC_Order_Data_Store_CPT::get_unpaid_orders() WC 5.6.0

public function get_unpaid_orders( $date ) {
	global $wpdb;

	$unpaid_orders = $wpdb->get_col(
		$wpdb->prepare(
			// @codingStandardsIgnoreStart
			"SELECT posts.ID
			FROM {$wpdb->posts} AS posts
			WHERE   posts.post_type   IN ('" . implode( "','", wc_get_order_types() ) . "')
			AND     posts.post_status = 'wc-pending'
			AND     posts.post_modified < %s",
			// @codingStandardsIgnoreEnd
			gmdate( 'Y-m-d H:i:s', absint( $date ) )
		)
	);

	return $unpaid_orders;
}