Automattic / Automattic/jetpack

Donations block: Button wording carries over to all three payment types once edited

Open
#25,029 2 comments 1 reaction 0 assignees View on GitHub
[Block] Donations [Pri] Low Earn Enhancement Triaged
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

By default, the Donations block provides distinct wording for each type of payment option: One-Time, Monthly, and Yearly. However, once the **button** text is edited in any of the three views, it persists across all three views and cannot be edited separately.

#### Steps to reproduce

1. Insert a donation block
2. Connect Stripe account
3. Click One-Time/Monthly/Yearly tabs at the top to see default button wording in each view:

##### One-Time Donation:

![Edit_Page_‹_Global_Styles_Demo_—_WordPress_com](https://user-images.githubusercontent.com/7662449/93349218-3838e880-f805-11ea-88fa-589ce0827774.png)

For one-time donations, the default button wording says "Donate"

##### Monthly Donation:

![Edit_Page_‹_Global_Styles_Demo_—_WordPress_com](https://user-images.githubusercontent.com/7662449/93349409-70402b80-f805-11ea-9efb-1e3225cf79ad.png)

For monthly donations, the default button wording says "Donate Monthly"

##### Yearly Donation:

![Edit_Page_‹_Global_Styles_Demo_—_WordPress_com](https://user-images.githubusercontent.com/7662449/93349510-8d74fa00-f805-11ea-9e0b-38f942751787.png)

For yearly donations, the default button wording says "Donate Yearly"

4. In the One-Time panel view, change the default button wording from "Donate" to "Donate One Time."
5. Click the Monthly and Yearly panels to view the button wording there, which both now also say "Donate One Time."

#### What I expected

I should be able to modify the button wording separately for One-Time, Monthly, and Yearly options.

#### What happened instead

The moment the button wording is edited, it becomes tied together across all three payment options and cannot be edited separately, so the button says the same thing in every view.

#### Browser / OS version

n/a

#### Video

![donation-block-button](https://user-images.githubusercontent.com/7662449/93351131-556eb680-f807-11ea-8716-b49c8feb816b.gif)

Screencast with audio: https://d.pr/v/5C5Gk5/vhrNbTQZeW

#### Context / Source

#dogfooding, #manual-testing

No user report

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in the Donations block with a connected Stripe account, switching among the One-Time, Monthly, and Yearly tabs. Trace where the button wording is stored when one view is edited. Done means each payment type retains and displays its own button wording.

Written by the indexing model from the issue text.

Assessment

Tech stack
wordpress
Domain
payments
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.