Skip to content

Commit

Permalink
fix(ras): handle RAS disabled in newsletters signup handling
Browse files Browse the repository at this point in the history
  • Loading branch information
adekbadek committed May 27, 2024
1 parent c6cc10e commit 3d70a1d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions includes/reader-activation/class-reader-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ public static function api_delete_item( $request ) {
* @param array $data Data.
*/
public static function update_newsletter_subscribed_lists( $timestamp, $data ) {
if ( ! isset( $data['user_id'] ) ) {
return;
}
if ( ! empty( $data['lists'] ) ) {
self::update_item( $data['user_id'], 'is_newsletter_subscriber', true );
self::update_item( $data['user_id'], 'newsletter_subscribed_lists', wp_json_encode( $data['lists'] ) );
Expand Down

0 comments on commit 3d70a1d

Please sign in to comment.