patch( "/api/v1/recoveries/$emailId/carts/$cartId/unsubscribed" ); $url = home_url(); $unsubscribePageId = get_option( 'acr_kit_unsubscribe_page_id' ); if ( ! empty( $unsubscribePageId ) ) { $pageUrl = get_permalink( $unsubscribePageId ); if ( ! empty( $pageUrl ) ) { $url = $pageUrl; } } wp_safe_redirect( $url ); exit; } public static function getEmailAttrs(): array { return array( 'unsubscribe_page_id', 'from_email', 'from_name', 'reply_to_email', 'reply_to_name', ); } }