Introduces woocommerce_update_new_customer_past_order action, closes #9078

This commit is contained in:
Claudio Sanches 2015-09-15 19:56:59 -03:00
parent 9865e04c8a
commit f447a66281
1 changed files with 4 additions and 2 deletions

View File

@ -165,11 +165,13 @@ function wc_update_new_customer_past_orders( $customer_id ) {
foreach ( $customer_orders as $order_id ) {
update_post_meta( $order_id, '_customer_user', $customer->ID );
do_action( 'woocommerce_update_new_customer_past_order', $order_id, $customer );
if ( get_post_status( $order_id ) === 'wc-completed' ) {
$complete ++;
$complete++;
}
$linked ++;
$linked++;
}
}