updated plugin Easy Digital Downloads
version 3.1.1.4.2
This commit is contained in:
@ -127,12 +127,6 @@ function edd_trash_order( $order_id ) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Update the customer records when an order is trashed.
|
||||
if ( ! empty( $order->customer_id ) ) {
|
||||
$customer = new EDD_Customer( $order->customer_id );
|
||||
$customer->recalculate_stats();
|
||||
}
|
||||
}
|
||||
|
||||
return filter_var( $trashed, FILTER_VALIDATE_BOOLEAN );
|
||||
@ -362,14 +356,8 @@ function edd_destroy_order( $order_id = 0 ) {
|
||||
*/
|
||||
function edd_update_order( $order_id = 0, $data = array() ) {
|
||||
$orders = new EDD\Database\Queries\Order();
|
||||
$update = $orders->update_item( $order_id, $data );
|
||||
|
||||
if ( ! empty( $data['customer_id'] ) ) {
|
||||
$customer = new EDD_Customer( $data['customer_id'] );
|
||||
$customer->recalculate_stats();
|
||||
}
|
||||
|
||||
return $update;
|
||||
return $orders->update_item( $order_id, $data );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user