Download permissions; Convert dates to timestamp on read so UTC is preserved.
Fixes #14163
This commit is contained in:
parent
d81493cc52
commit
510adc652c
|
@ -79,7 +79,18 @@ class WC_Customer_Download_Data_Store implements WC_Customer_Download_Data_Store
|
|||
throw new Exception( __( 'Invalid download.', 'woocommerce' ) );
|
||||
}
|
||||
|
||||
$download->set_props( $raw_download );
|
||||
$download->set_props( array(
|
||||
'download_id' => $raw_download->download_id,
|
||||
'product_id' => $raw_download->product_id,
|
||||
'user_id' => $raw_download->user_id,
|
||||
'user_email' => $raw_download->user_email,
|
||||
'order_id' => $raw_download->order_id,
|
||||
'order_key' => $raw_download->order_key,
|
||||
'downloads_remaining' => $raw_download->downloads_remaining,
|
||||
'access_granted' => strtotime( $raw_download->access_granted ),
|
||||
'download_count' => $raw_download->download_count,
|
||||
'access_expires' => is_null( $raw_download->access_expires ) ? null : strtotime( $raw_download->access_expires ),
|
||||
) );
|
||||
$download->set_object_read( true );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue