Skip to content

Conversation

@malayladu
Copy link
Contributor

Context

⛑️ Ticket(s): https://secure.helpscout.net/conversation/2819363473/76665

Summary

This snippet works only if the Minimum Date or Maximum Date field is set in the GP Limit Dates perk.

The issue arises when neither date is set, as the gp-limit-dates JavaScript is not enqueued, causing it to not function.

To resolve this, add the following filter to ensure the JavaScript is enqueued for the form and field.

@malayladu malayladu self-assigned this Jan 23, 2025
Copy link
Contributor

@saifsultanc saifsultanc left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@claygriffiths to have 1 final look 👀

@malayladu malayladu requested a review from spivurno January 23, 2025 13:12
@github-actions
Copy link

Fails
🚫

Commit message '~ Code improvements.' does match the correct format. See our Snippet Library Commit Messages Guidelines in Notion.

Generated by 🚫 dangerJS against 731d6f0

Copy link
Contributor

@spivurno spivurno left a comment

Choose a reason for hiding this comment

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

💯

@claygriffiths claygriffiths changed the title gpld-conditional-limits.php: Fixed conditional limit dates snippet not working issue. gpld-conditional-limits.php: Fixed issue where GP Limit Dates' frontend assets were not being enqueued when using snippet. Jan 23, 2025
Copy link
Contributor

@claygriffiths claygriffiths left a comment

Choose a reason for hiding this comment

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

LGTM! S&M with the following:

`gpld-conditional-limits.php`: Fixed issue where GP Limit Dates' frontend assets were not being enqueued when using snippet.

When you S&M and a commit name/message/note is provided, put it into Commit header and clear out Commit message like so:

CleanShot 2025-01-23 at 09 11 20

After:

CleanShot 2025-01-23 at 09 11 50

@malayladu malayladu merged commit b2580db into master Jan 23, 2025
3 of 5 checks passed
@saifsultanc saifsultanc deleted the malay/fix/76665-conditional-limit-dates-snippet-not-working branch January 23, 2025 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants