WordPress at Your Fingertips
function is not described


DataStore::set_customer_first_order() protected WC 1.0

Set a customer's first order and all others to returning.

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

No Hooks.


null. Nothing.


$result = DataStore::set_customer_first_order( $customer_id, $order_id );
$customer_id(int) (required)
Customer ID.
$order_id(int) (required)
Order ID.

Code of DataStore::set_customer_first_order() WC 6.1.1

protected static function set_customer_first_order( $customer_id, $order_id ) {
	global $wpdb;
	$orders_stats_table = self::get_db_table_name();

			"UPDATE ${orders_stats_table} SET returning_customer = CASE WHEN order_id = %d THEN false ELSE true END WHERE customer_id = %d",