WC_Customer_Download_Log_Data_Store::update( WC_Customer_Download_Log $download_log )
Method to update a download log in the database.
Description Description
Parameters Parameters
- $download_log
-
(Required) Download log object.
Source Source
File: includes/data-stores/class-wc-customer-download-log-data-store.php
public function update( &$download_log ) { global $wpdb; $data = array( 'timestamp' => date( 'Y-m-d H:i:s', $download_log->get_timestamp( 'edit' )->getTimestamp() ), 'permission_id' => $download_log->get_permission_id( 'edit' ), 'user_id' => $download_log->get_user_id( 'edit' ), 'user_ip_address' => $download_log->get_user_ip_address( 'edit' ), ); $format = array( '%s', '%s', '%s', '%s', ); $wpdb->update( $wpdb->prefix . self::get_table_name(), $data, array( 'download_log_id' => $download_log->get_id(), ), $format ); $download_log->apply_changes(); }