File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
includes/reader-revenue/my-account Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1030,13 +1030,16 @@ public static function handle_cancel_email_change() {
10301030 * @param string $email New email.
10311031 */
10321032 public static function maybe_sync_email_change_with_stripe ( $ user_id , $ email ) {
1033- $ request = Stripe_Connection::update_customer_data (
1033+ $ result = Stripe_Connection::update_customer_data (
10341034 $ user_id ,
10351035 [
10361036 'email ' => $ email ,
10371037 ]
10381038 );
1039- if ( \is_wp_error ( $ request ) ) {
1039+ if ( false === $ result ) {
1040+ Logger::log ( 'Skipping Stripe email update: no Stripe customer found for user ' . $ email );
1041+ }
1042+ if ( \is_wp_error ( $ result ) ) {
10401043 Logger::error ( 'Error updating Stripe customer email: ' . $ result ->get_error_message () );
10411044 }
10421045 }
You can’t perform that action at this time.
0 commit comments