$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.
An example:
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.https://github.com/wp-e-commerce/WP-e-Commerce/blob/4ea716c80c874833bd909ca7c56581b654807b35/wpsc-includes/purchase-log.class.php#L1005-L1008