🔒

Link expired

This preferences link has expired or is invalid. Please click the link from your most recent reminder email, or log in to update your preferences from your garden dashboard.

Go to My Garden →
} // ═══════════════════════════════════════════════════════════════════════════ // 3. APPLY PREFERENCE ACTION // ═══════════════════════════════════════════════════════════════════════════ function askbloomer_prefs_apply_action( int $user_id, string $action ): bool { $valid_actions = [ 'weekly', 'monthly', 'pause' ]; if ( ! in_array( $action, $valid_actions, true ) ) return false; $cadence = $action === 'pause' ? 'paused' : $action; update_user_meta( $user_id, 'askbloomer_cadence', $cadence ); // Log the preference change $log = get_option( 'askbloomer_prefs_log', [] ); $log[] = [ 'time' => current_time( 'mysql' ), 'user_id' => $user_id, 'action' => $action, ]; update_option( 'askbloomer_prefs_log', array_slice( $log, -200 ) ); return true; } // ═══════════════════════════════════════════════════════════════════════════ // 4. ADD "RESUME REMINDERS" TO MY GARDEN PAGE // Hooked into the My Garden shortcode output for paused users. // The shortcode in askbloomer-my-garden.php outputs the garden page. // We inject a banner at the top for paused users via the // askbloomer_my_garden_before_plants action. // ═══════════════════════════════════════════════════════════════════════════ add_action( 'wp_head', function () { if ( ! is_page( 'my-garden' ) ) return; if ( ! is_user_logged_in() ) return; $user_id = get_current_user_id(); $cadence = get_user_meta( $user_id, 'askbloomer_cadence', true ); if ( $cadence !== 'paused' ) return; $resume_url = esc_url( add_query_arg( [ 'uid' => $user_id, 'token' => askbloomer_prefs_generate_token( $user_id ), 'action' => 'weekly', ], home_url( '/email-preferences/' ) ) ); echo ''; echo '