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

Help Hub - Transient issue when installing new plugin #2331

Merged
merged 18 commits into from
Jan 9, 2025

Conversation

redscar
Copy link
Contributor

@redscar redscar commented Dec 19, 2024

🎫 Ticket

TEC-5332

🗒️ Description

1. Initialization Method Added

  • A new init() method was created for the Tribe__PUE__Checker class.
  • This method ensures that the tec_pue_checker_init action is fired only once per unique slug, preventing duplicate initialization.

2. Action Hook Integration

  • The init() method triggers the tec_pue_checker_init action, allowing additional functionality to hook into the initialization process.

3. Active Plugin Monitoring

  • A static method, monitor_active_plugins(), was added to validate and manage plugin license keys.
  • It ensures that license statuses are properly updated in the transient data structure (TEC_IS_ANY_LICENSE_VALID_TRANSIENT).

4. Improved Resource Handling

  • A get_uplink_resource() wrapper method was introduced for safely retrieving uplink resources. This is due to tests causing a fatal when using Promoter.
  • The method uses a try/catch block to handle cases where the get_resource() function may fail, returning null on error.

🎥 Artifacts

✔️ Checklist

  • Ran npm run changelog to add changelog file(s). More info here
  • Code is covered by NEW wpunit or integration tests.
  • Code is covered by EXISTING wpunit or integration tests.
  • Are all the required tests passing?
  • Automated code review comments are addressed.
  • Have you added Artifacts?
  • Check the base branch for your PR.
  • Add your PR to the project board for the release.

@redscar redscar added the hold Status: on hold–do not proceed with other status items. label Dec 19, 2024
@redscar redscar self-assigned this Dec 19, 2024
@redscar redscar changed the base branch from master to bucket/Help_Hub-FF December 19, 2024 14:37
@redscar redscar force-pushed the tweak/TEC-5332_transients branch from d17172c to 10420bc Compare December 19, 2024 15:22
src/Tribe/PUE/Checker.php Outdated Show resolved Hide resolved
@redscar redscar marked this pull request as ready for review January 9, 2025 16:11
@redscar redscar added code review Status: requires a code review. and removed hold Status: on hold–do not proceed with other status items. labels Jan 9, 2025
@redscar redscar merged commit 28237f7 into bucket/Help_Hub-FF Jan 9, 2025
16 of 17 checks passed
@redscar redscar deleted the tweak/TEC-5332_transients branch January 9, 2025 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code review Status: requires a code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants