Skip to content

Comments

Don't render error message on front-end#16

Merged
dkotter merged 3 commits intodevelopfrom
tweak/10
Apr 15, 2025
Merged

Don't render error message on front-end#16
dkotter merged 3 commits intodevelopfrom
tweak/10

Conversation

@faisal-alvi
Copy link
Contributor

Description of the Change

This PR returns nothing when an error is encountered on the front-end to avoid user confusion.

Closes #10

How to test the Change

  1. Add the Jobber form on the page.
  2. Get disconnected WP from Jobber (maybe delete settings from the DB)
  3. Try to see the form on the front end. Nothing should show.

Changelog Entry

Changed - Instead of showing error messages, show nothing on front-end

Credits

Props @dkotter @faisal-alvi

Checklist:

@faisal-alvi faisal-alvi self-assigned this Apr 15, 2025
@faisal-alvi faisal-alvi requested a review from dkotter April 15, 2025 14:32
'<p class="jobber-error">%s</p>',
esc_html( $response->get_error_message() )
);
// if we encounter an error when rendering on the front-end,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to add the same thing on line 81 below, if we end up in a situation where no iframe URL is returned

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I added the same comment with a little tweak. Please feel free to update it if needed.
b70f9d0

@faisal-alvi faisal-alvi requested a review from dkotter April 15, 2025 16:38
@dkotter dkotter marked this pull request as ready for review April 15, 2025 17:10
@dkotter dkotter merged commit df369bc into develop Apr 15, 2025
7 checks passed
@dkotter dkotter deleted the tweak/10 branch April 15, 2025 17:10
@dkotter dkotter added this to the 1.0.0 milestone Apr 15, 2025
@github-actions github-actions bot added the needs:code-review This requires code review. label Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:code-review This requires code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't render error message on front-end

2 participants