Skip to content

Commit

Permalink
fix: Bug fix for "Withdrawal current balance is incorrect" (#882)
Browse files Browse the repository at this point in the history
  • Loading branch information
ceefour authored Oct 16, 2020
1 parent 6d5f178 commit 7e42796
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion includes/Withdraw/Hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ public function __construct() {
* @return void
*/
public static function delete_seller_balance_cache( $status, $user_id, $id ) {
wp_cache_delete( 'dokan_seller_balance_' . $user_id );
$cache_group = 'dokan_seller_data_' . $user_id;
$cache_key = 'dokan_seller_balance_' . $user_id;
wp_cache_delete( $cache_key, $cache_group );
}

/**
Expand Down Expand Up @@ -82,5 +84,7 @@ public static function update_vendor_balance( $withdraw ) {
)
);
}

self::delete_seller_balance_cache( $withdraw->get_status(), $withdraw->get_user_id(), $withdraw->get_id() );
}
}

0 comments on commit 7e42796

Please sign in to comment.