Closes https://linear.app/a8c/issue/A4A-1987/pending-and-deactivated-agencies-can-create-and-launch-dev-sites
Proposed Changes
This pull request introduces agency approval status checks throughout the A8C for Agencies marketplace and site management UI. The main goal is to prevent users from performing key actions, such as making purchases or creating development sites, when their agency is pending approval or has been rejected. The changes also enhance user experience by providing clear tooltips explaining why certain actions are disabled.
The most important changes are:
Agency Approval Enforcement Across UI:
- Added checks for agency approval status (
PENDING or REJECTED) in key components, disabling actions like checkout, creating dev sites, and adding new sites when the agency is not approved. This logic is now present in checkout flows, shopping cart, hosting plan sections, migration options, and site creation menus. [1] [2] [3] [4] [5] [6]
User Feedback Enhancements:
- Introduced contextual tooltips using the
Tooltip component to inform users why actions are disabled due to agency status, improving clarity and user experience. This is applied to checkout buttons, dev site creation buttons, and site creation menu items. [1] [2] [3] [4] [5]
Redirects and UI Blocking:
- Implemented an automatic redirect to the main marketplace page if a non-client user with a pending or rejected agency tries to access the checkout page, and ensured the UI does not render in such cases.
Component and Type Updates:
- Updated button components and their props to accept an optional
tooltip field, and wrapped actionable buttons in Tooltip components for consistent messaging. [1] [2]
Styling Adjustments:
- Adjusted styling for checkout buttons in the shopping cart to ensure full-width display and consistent alignment with the new tooltip wrappers.
These changes collectively ensure that agency approval status is consistently enforced across the product, with clear communication to users about restrictions and next steps.





Why are these changes being made?
This is causing us problems with our stats and a broken flow for Agencies that are yet to be approved.
Testing Instructions
- Set your agencies status to ‘Pending’ or ‘Rejected’ in the MC tool.
- Use the A4A live link and navigate to the marketplace.
- Confirm you are not able to do checkout.
- Navigate to the Overview page, Sites page, and Migrations page.
- Confirm you are not able to create sites for all access points.
Pre-merge Checklist
- Has the general commit checklist been followed? (PCYsg-hS-p2)
- Have you written new tests for your changes?
- Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
- Have you checked for TypeScript, React or other console errors?
- Have you tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
- Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
- Have we added the “[Status] String Freeze” label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
- For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
- For changes affecting Jetpack: Have we added the “[Status] Needs Privacy Updates” label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?
Unfortunately, no screenshots were provided by the developer.