-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Purchases: Add cancel/remove option for expired domain registrations and mappings #470
Conversation
052a2af
to
342fdea
Compare
@mikeshelton1503: even when we fixed domain Cancel and Refund flow, we still se the same error message for expired domains. Let's display user message with prompt to contact support for now, and fix it in v2, what do you think? Can you provide full message text? |
Is it really "cancel" in this case? Or should we stick to "remove" as planned for the full feature? |
Yes, sorry you're right, it should be:
|
@mikeshelton1503 I replace the word domain with purchase in the message displayed to the user. We need to keep in mind that this message can be displayed also for domain mapping. There is opacity filter applied on expired purchase's page: I'm waiting for approval from your side :) |
36d8308
to
aa9592d
Compare
I think we can merge this without mike's sign off given he's AFK. When he's back he can open an issue if he wants changes. |
Yes, let's do that this way. |
return false; | ||
} | ||
|
||
return ( isExpired( purchase ) && purchase.isCancelable ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we accessing the isCancelable
property here rather than using the isCancelable
function? I think that creates some confusion. I'm confused anyway!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We display only message at the moment, I think we can remove purchase.isCancelable
check. I wanted to keep it similar to /my-upgrades
, but as we can't cancel manually expired purchases we need to wait with this until v2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed method definition to make it clearer. Commiting soon 👍
@@ -431,6 +432,32 @@ const ManagePurchase = React.createClass( { | |||
} | |||
}, | |||
|
|||
renderRemovePurchaseInformation() { | |||
const purchase = getPurchase( this.props ), | |||
contactSupportUrl = 'https://support.wordpress.com/'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be https://en.support.wordpress.com/contact/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is really no standard way, there are urls with locale and without. Both work properly. When there is no locale provided it redirects to your lang version, so in long run this seems to be better approach to let server decide which locale load.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch 👍
d2be109
to
949f522
Compare
Nice addition of 949f522. LGTM 👍 |
Thanks for help on that one @scruffian! |
Purchases: Add cancel/remove option for expired domain registrations and mappings
Fixes #241.
This PR adds remove information on
Manage Purchase
page for purchases that are expired and can be cancelled.Expected view:
Testing