-
Notifications
You must be signed in to change notification settings - Fork 212
Open
Description
An example:
$order = new WPSC_Purchase_Log( $log_id );
$order->set( 'my_custom_data', '1' )->save();
throws a notice since my_custom_data is not a field in the purchase log table but the value does get saved as a meta field.
save() would normally do that on it’s own, but it supposes that you’re updating something on the purchase table as well.
Seems to me that somewhere in here, we should be validating the $data. If it’s empty, we’ve got nothing to update, and should bail.
WP-e-Commerce/wpsc-includes/purchase-log.class.php
Lines 1005 to 1008 in 4ea716c
| $data = apply_filters( 'wpsc_purchase_log_update_data', $this->data ); | |
| $format = $this->get_data_format( $data ); | |
| $result = $wpdb->update( WPSC_TABLE_PURCHASE_LOGS, $data, array( $where_col => $where_val ), $format, array( $where_format ) ); | |
| do_action( 'wpsc_purchase_log_update', $this ); |
Metadata
Metadata
Assignees
Labels
No labels