Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include sharable link in "favorite sessions" email #1056

Open
wants to merge 4 commits into
base: production
Choose a base branch
from

Conversation

timiwahalahti
Copy link
Collaborator

The "favorite sessions" email includes the sessions the user chose, it'd be helpful to include the link, so that they can easily apply those sessions to their phone or other device, and so that they can easily get a much better view of their personalized schedule on the website.

This PR adds that link to that email.

For ease, let's get the schedule page by slug. This way we do not need to pass the page ID just for this, but we neither blindly trust the input sent to REST API as a URL that belongs to the WordCamp site.

Fixes #186

Props @iandunn

Screenshots

CleanShot 2023-09-21 at 17 09 11@2x

How to test the changes in this Pull Request:

  1. Go to WordCamp website schedule page
  2. Favorite some sessions
  3. Send the email
  4. Open the link in email, favorite sessions should be indicated

@timiwahalahti timiwahalahti added [Priority] 3 [Component] WC-Post-Types Organizers, Speakers, Sessions, Schedule, Sponsors, Volunteers labels Sep 21, 2023
@timiwahalahti
Copy link
Collaborator Author

Lint errors (phpcs) are coming from rule that I don't get.

'validate_callback' => function( $value, $request, $param ) { is way better than
'validate_callback' => function ( $value, $request, $param ) { 🤔

@pkevan
Copy link
Contributor

pkevan commented Nov 30, 2023

Lint errors (phpcs) are coming from rule that I don't get.

'validate_callback' => function( $value, $request, $param ) { is way better than 'validate_callback' => function ( $value, $request, $param ) { 🤔

For some reason PHPCS is treating the function keyword as a function declaration instead of being an anonymous function as it is in this case.

I can see two ways of this being used in the wc-post-types/inc/rest-api.php file, including one with a space, perhaps to get over this error.

@renintw renintw added [Type] Good First Issue Straightforward, self-contained, doesn't require deep knowledge of codebase [Priority] Medium [Type] Enhancement and removed [Priority] 3 labels Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] WC-Post-Types Organizers, Speakers, Sessions, Schedule, Sponsors, Volunteers [Priority] Medium [Type] Enhancement [Type] Good First Issue Straightforward, self-contained, doesn't require deep knowledge of codebase
Projects
Status: 👀 In review (PRs only)
Development

Successfully merging this pull request may close these issues.

Include sharable link in "favorite sessions" email
3 participants