-
Notifications
You must be signed in to change notification settings - Fork 21
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
Notify users when an Ads account is suspended #2540
Comments
@mikkamp In order to implement this one, I think we'll need to update the |
Hi @joemcgill and @mikkamp , starting in Google Ads API v16, which is currently used by Woo, the customer.status tells you the status of the Google Ads account. There are mainly 3 statuses: ENABLED, SUSPENDED, CANCELED. You can check all the statuses here. For canceled accounts, you can't use the API to perform any actions. Let me know if this helped. |
For canceled accounts the API will return with an error message: "The customer account can't be accessed because it is not yet enabled or has been deactivated." Therefore, for canceled accounts you can't get any account info. |
I can confirm what @fblascogarma shared. I've got access to some cancelled accounts (I could manually set my own accounts to cancelled) and this results in a Once I'm able to confirm whether we are able to query the account info when an account is suspended, then we can fill out the technical details for this issue. |
I've been able to have a test account that I control set to suspended, but even so, the From what I'm seeing, all accounts are being returned with a status of |
@mikkamp Can you review the updates I've made to the implementation brief here and let me know if you'd like to see any differences? |
@mikkamp one observation I've made while starting a shallow implementation of the backend changes is that there are several places in the front end where the Ads related components are affected by whether the Ads account is connected, based on the status returned from the API (see this example). To avoid introducing unexpected UI behavior, I think it would be safer to return the The most straightforward for now would be to do something like:
Then later we could rework the functionality that relies on the
|
The implementation brief looks good to me. One thing that we might need to work out though is cancelled accounts. I understand we don't necessarily want to query their status and show it in the banner. However the problem is that querying data from a cancelled account triggers an error. Previously the
I prefer to use the |
Part of #2460
As a merchant, I want to know if my Ads account has been suspended so that I can correct the issues so I can continue getting visibility of my products to drive more sales.
We'll also update the Paid Ads card on the dashboard to show that the account is suspended:
Acceptance Criteria
Implementation Brief
Create a new component called
AdsAccountSuspended
that exports a<Notice status="error" isDismissible={ true }>
component with the text and CTA button from the designs. The component should check for the account status returned from theads/connection
response to see if it's suspended (details to follow).If the account is suspended, return the notice, otherwise return null. Import the component into the Dashboard, Reports, ProductFeed, and Reports pages listed in
/js/src/index.js
. and display the component above the<MainTabNav />
component.To add the suspended status to the
ads/connection
response, we'll update theAdsAccountQuery
to include the 'customer.status' field. Add the status returned from that query to the array returned byAds::get_account_details()
, which will need to be made public so it can be accessed from theAds\AccountService::get_connected_account()
callback used by the API, so suspended can be returned as the 'status' when applicable.To avoid calling the Google Ads API on each REST API request, we'll cache the customer status in a transient for
HOUR_IN_SECONDS
.Test Coverage
The text was updated successfully, but these errors were encountered: