Docblocks
This commit is contained in:
parent
07f3f33566
commit
707067e255
|
@ -345,6 +345,12 @@ class WC_Admin_Reports_Coupons_Data_Store extends WC_Admin_Reports_Data_Store im
|
|||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* Fires when coupon's reports are updated.
|
||||
*
|
||||
* @param int $coupon_id Coupon ID.
|
||||
* @param int $order_id Order ID.
|
||||
*/
|
||||
do_action( 'woocommerce_update_reports_coupon', $coupon_id, $order_id );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -436,6 +436,11 @@ class WC_Admin_Reports_Customers_Data_Store extends WC_Admin_Reports_Data_Store
|
|||
);
|
||||
$customer_id = $wpdb->insert_id;
|
||||
|
||||
/**
|
||||
* Fires when customser's reports are created.
|
||||
*
|
||||
* @param int $customer_id Customer ID.
|
||||
*/
|
||||
do_action( 'woocommerce_new_reports_customer', $customer_id );
|
||||
|
||||
return $result ? $customer_id : false;
|
||||
|
@ -562,6 +567,11 @@ class WC_Admin_Reports_Customers_Data_Store extends WC_Admin_Reports_Data_Store
|
|||
|
||||
$results = $wpdb->replace( $wpdb->prefix . self::TABLE_NAME, $data, $format );
|
||||
|
||||
/**
|
||||
* Fires when customser's reports are updated.
|
||||
*
|
||||
* @param int $customer_id Customer ID.
|
||||
*/
|
||||
do_action( 'woocommerce_update_reports_customer', $customer_id );
|
||||
return $results;
|
||||
}
|
||||
|
|
|
@ -447,6 +447,11 @@ class WC_Admin_Reports_Orders_Stats_Data_Store extends WC_Admin_Reports_Data_Sto
|
|||
// Update or add the information to the DB.
|
||||
$results = $wpdb->replace( $table_name, $data, $format );
|
||||
|
||||
/**
|
||||
* Fires when order's stats reports are updated.
|
||||
*
|
||||
* @param int $order_id Order ID.
|
||||
*/
|
||||
do_action( 'woocommerce_update_reports_order_stats', $order->get_id() );
|
||||
return $results;
|
||||
}
|
||||
|
|
|
@ -343,6 +343,13 @@ class WC_Admin_Reports_Products_Data_Store extends WC_Admin_Reports_Data_Store i
|
|||
array( 'order_item_id' => $order_item_id ),
|
||||
array( '%d' )
|
||||
);
|
||||
|
||||
/**
|
||||
* Fires when product's reports are deleted.
|
||||
*
|
||||
* @param int $order_item_id Order Item ID.
|
||||
* @param int $order_id Order ID.
|
||||
*/
|
||||
do_action( 'woocommerce_delete_reports_product', $order_item_id, $order->get_id() );
|
||||
} else {
|
||||
$wpdb->replace(
|
||||
|
@ -369,6 +376,12 @@ class WC_Admin_Reports_Products_Data_Store extends WC_Admin_Reports_Data_Store i
|
|||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* Fires when product's reports are updated.
|
||||
*
|
||||
* @param int $order_item_id Order Item ID.
|
||||
* @param int $order_id Order ID.
|
||||
*/
|
||||
do_action( 'woocommerce_update_reports_product', $order_item_id, $order->get_id() );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -285,6 +285,12 @@ class WC_Admin_Reports_Taxes_Data_Store extends WC_Admin_Reports_Data_Store impl
|
|||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* Fires when tax's reports are updated.
|
||||
*
|
||||
* @param int $tax_rate_id Tax Rate ID.
|
||||
* @param int $order_id Order ID.
|
||||
*/
|
||||
do_action( 'woocommerce_update_reports_tax', $tax_item->get_rate_id(), $order->get_id() );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue