updated plugin Easy Digital Downloads version 3.1.2

This commit is contained in:
2023-06-28 12:45:44 +00:00
committed by Gitium
parent 44df590080
commit f710fa7de2
120 changed files with 5556 additions and 3347 deletions

View File

@ -65,6 +65,10 @@ add_action( 'edd_order_item_deleted', 'edd_recalculate_order_item_download' );
*/
function edd_recalculate_order_item_download( $order_item_id, $data = array(), $previous_order_item = false ) {
if ( get_option( '_edd_v30_doing_order_migration', false ) ) {
return;
}
// Recalculations do not need to run when the order item is first being added to the database if it's pending.
if ( 'edd_order_item_added' === current_action() && ( empty( $data['status'] ) || 'pending' === $data['status'] ) ) {
return;
@ -119,6 +123,10 @@ add_action( 'edd_order_adjustment_updated', 'edd_recalculate_order_adjustment_do
* @return void
*/
function edd_recalculate_order_adjustment_download( $order_adjustment_id, $data = array(), $previous_order_adjustment = false ) {
if ( get_option( '_edd_v30_doing_order_migration', false ) ) {
return;
}
if ( $previous_order_adjustment instanceof EDD\Orders\Order_Adjustment ) {
$columns_affecting_stats = array( 'total', 'subtotal', 'object_id', 'object_type' );