WordPress at Your Fingertips
function is not described

WC_Customer_Download_Data_Store::update_user_by_order_id() public WC 1.0

Update user prop for downloads based on order id.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Customer_Download_Data_Store = new WC_Customer_Download_Data_Store();
$WC_Customer_Download_Data_Store->update_user_by_order_id( $order_id, $customer_id, $email );
$order_id(int) (required)
Order ID.
$customer_id(int) (required)
Customer ID.
$email(string) (required)
Customer email address.

Code of WC_Customer_Download_Data_Store::update_user_by_order_id() WC 5.6.0

public function update_user_by_order_id( $order_id, $customer_id, $email ) {
	global $wpdb;
	$wpdb->update(
		$wpdb->prefix . 'woocommerce_downloadable_product_permissions',
		array(
			'user_id'    => $customer_id,
			'user_email' => $email,
		),
		array(
			'order_id' => $order_id,
		),
		array(
			'%d',
			'%s',
		),
		array(
			'%d',
		)
	);
}