New actions for when deleting objects from database

This commit is contained in:
Claudio Sanches 2019-02-01 16:29:14 -02:00
parent 68e0c98828
commit cd55051da3
3 changed files with 24 additions and 0 deletions

View File

@ -362,6 +362,14 @@ class WC_Admin_Reports_Coupons_Data_Store extends WC_Admin_Reports_Data_Store im
$order_id
)
);
/**
* Fires when coupon's reports are removed from database.
*
* @param int $coupon_id Coupon ID.
* @param int $order_id Order ID.
*/
do_action( 'woocommerce_delete_reports_coupon', 0, $order_id );
}
}

View File

@ -411,5 +411,13 @@ class WC_Admin_Reports_Products_Data_Store extends WC_Admin_Reports_Data_Store i
$order_id
)
);
/**
* Fires when product's reports are removed from database.
*
* @param int $product_id Product ID.
* @param int $order_id Order ID.
*/
do_action( 'woocommerce_delete_reports_product', 0, $order_id );
}
}

View File

@ -304,5 +304,13 @@ class WC_Admin_Reports_Taxes_Data_Store extends WC_Admin_Reports_Data_Store impl
$order_id
)
);
/**
* Fires when tax's reports are removed from database.
*
* @param int $tax_rate_id Tax Rate ID.
* @param int $order_id Order ID.
*/
do_action( 'woocommerce_delete_reports_tax', 0, $order_id );
}
}