From 24334c6ff4faa1e14b1552ec049f5cbc6eec6fe2 Mon Sep 17 00:00:00 2001 From: artpi Date: Wed, 29 May 2019 16:14:21 +0200 Subject: [PATCH 1/7] Change copy of Memberships to Recurring Payments --- extensions/blocks/membership-button/edit.jsx | 33 ++++++++++--------- extensions/blocks/membership-button/index.js | 2 +- extensions/blocks/membership-button/view.js | 2 +- .../memberships/class-jetpack-memberships.php | 2 +- 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/extensions/blocks/membership-button/edit.jsx b/extensions/blocks/membership-button/edit.jsx index 39f956f5de4f4..e389ba219c3fc 100644 --- a/extensions/blocks/membership-button/edit.jsx +++ b/extensions/blocks/membership-button/edit.jsx @@ -196,7 +196,7 @@ class MembershipsButtonEdit extends Component { isLarge onClick={ () => this.setState( { addingMembershipAmount: PRODUCT_FORM } ) } > - { __( 'Add Memberships Amounts', 'jetpack' ) } + { __( 'Add Recurring Payments Plans', 'jetpack' ) } ); } @@ -306,8 +306,8 @@ class MembershipsButtonEdit extends Component { renderDisclaimer = () => { return (
- - { __( 'Read more about memberships and related fees.', 'jetpack' ) } + + { __( 'Read more about Recurring Payments and related fees.', 'jetpack' ) }
); @@ -321,7 +321,7 @@ class MembershipsButtonEdit extends Component { ( { @@ -331,8 +331,8 @@ class MembershipsButtonEdit extends Component { } ) ) } /> - - + + { __( 'See your earnings, subscriber list, and products.', 'jetpack' ) } @@ -358,11 +358,14 @@ class MembershipsButtonEdit extends Component { { this.state.shouldUpgrade && ( } - label={ __( 'Memberships', 'jetpack' ) } + label={ __( 'Recurring Payments', 'jetpack' ) } notices={ notices } >
- { __( "You'll need to upgrade your plan to use the Membership Button.", 'jetpack' ) } + { __( + "You'll need to upgrade your plan to use the Recurring Payment Button.", + 'jetpack' + ) }

); } diff --git a/extensions/blocks/membership-button/index.js b/extensions/blocks/membership-button/index.js index e76dc12821c25..707309ae9739f 100644 --- a/extensions/blocks/membership-button/index.js +++ b/extensions/blocks/membership-button/index.js @@ -22,7 +22,7 @@ export const icon = ( ); export const settings = { - title: __( 'Recurring Payments', 'jetpack' ), + title: __( 'Recurring Payments button', 'jetpack' ), icon, description: __( 'Button allowing you to sell subscription products.', 'jetpack' ), category: 'jetpack', From 4fb37c01848afe007b7f6e9d08ea1be83e51fc66 Mon Sep 17 00:00:00 2001 From: artpi Date: Wed, 29 May 2019 19:00:07 +0200 Subject: [PATCH 3/7] Change block id to recurring-payment-button --- extensions/blocks/membership-button/index.js | 2 +- extensions/blocks/membership-button/membership-button.php | 2 +- modules/memberships/class-jetpack-memberships.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/blocks/membership-button/index.js b/extensions/blocks/membership-button/index.js index 707309ae9739f..1a73bb53f194c 100644 --- a/extensions/blocks/membership-button/index.js +++ b/extensions/blocks/membership-button/index.js @@ -10,7 +10,7 @@ import { __, _x } from '@wordpress/i18n'; import edit from './edit'; import './editor.scss'; -export const name = 'membership-button'; +export const name = 'recurring-payment-button'; export const icon = ( diff --git a/extensions/blocks/membership-button/membership-button.php b/extensions/blocks/membership-button/membership-button.php index d8488cf22b893..7c2c38914a9f0 100644 --- a/extensions/blocks/membership-button/membership-button.php +++ b/extensions/blocks/membership-button/membership-button.php @@ -11,7 +11,7 @@ require_once JETPACK__PLUGIN_DIR . '/modules/memberships/class-jetpack-memberships.php'; jetpack_register_block( - 'jetpack/membership-button', + 'jetpack/recurring-payment-button', array( 'render_callback' => array( Jetpack_Memberships::get_instance(), 'render_button' ), ) diff --git a/modules/memberships/class-jetpack-memberships.php b/modules/memberships/class-jetpack-memberships.php index ae6b20d4cf125..aa2b7677443ff 100644 --- a/modules/memberships/class-jetpack-memberships.php +++ b/modules/memberships/class-jetpack-memberships.php @@ -34,7 +34,7 @@ class Jetpack_Memberships { * * @var string */ - private static $button_block_name = 'membership-button'; + private static $button_block_name = 'recurring-payment-button'; /** * These are defaults for wp_kses ran on the membership button. From 517c3a25a7e7810ec032d0fad85546545bce6d6b Mon Sep 17 00:00:00 2001 From: artpi Date: Wed, 29 May 2019 19:03:20 +0200 Subject: [PATCH 4/7] Rename dir --- .../blocks/{membership-button => recurring-payments}/edit.jsx | 0 .../blocks/{membership-button => recurring-payments}/editor.js | 0 .../{membership-button => recurring-payments}/editor.scss | 0 .../blocks/{membership-button => recurring-payments}/index.js | 0 .../membership-button.php | 0 .../blocks/{membership-button => recurring-payments}/view.js | 0 .../blocks/{membership-button => recurring-payments}/view.scss | 0 extensions/index.json | 2 +- 8 files changed, 1 insertion(+), 1 deletion(-) rename extensions/blocks/{membership-button => recurring-payments}/edit.jsx (100%) rename extensions/blocks/{membership-button => recurring-payments}/editor.js (100%) rename extensions/blocks/{membership-button => recurring-payments}/editor.scss (100%) rename extensions/blocks/{membership-button => recurring-payments}/index.js (100%) rename extensions/blocks/{membership-button => recurring-payments}/membership-button.php (100%) rename extensions/blocks/{membership-button => recurring-payments}/view.js (100%) rename extensions/blocks/{membership-button => recurring-payments}/view.scss (100%) diff --git a/extensions/blocks/membership-button/edit.jsx b/extensions/blocks/recurring-payments/edit.jsx similarity index 100% rename from extensions/blocks/membership-button/edit.jsx rename to extensions/blocks/recurring-payments/edit.jsx diff --git a/extensions/blocks/membership-button/editor.js b/extensions/blocks/recurring-payments/editor.js similarity index 100% rename from extensions/blocks/membership-button/editor.js rename to extensions/blocks/recurring-payments/editor.js diff --git a/extensions/blocks/membership-button/editor.scss b/extensions/blocks/recurring-payments/editor.scss similarity index 100% rename from extensions/blocks/membership-button/editor.scss rename to extensions/blocks/recurring-payments/editor.scss diff --git a/extensions/blocks/membership-button/index.js b/extensions/blocks/recurring-payments/index.js similarity index 100% rename from extensions/blocks/membership-button/index.js rename to extensions/blocks/recurring-payments/index.js diff --git a/extensions/blocks/membership-button/membership-button.php b/extensions/blocks/recurring-payments/membership-button.php similarity index 100% rename from extensions/blocks/membership-button/membership-button.php rename to extensions/blocks/recurring-payments/membership-button.php diff --git a/extensions/blocks/membership-button/view.js b/extensions/blocks/recurring-payments/view.js similarity index 100% rename from extensions/blocks/membership-button/view.js rename to extensions/blocks/recurring-payments/view.js diff --git a/extensions/blocks/membership-button/view.scss b/extensions/blocks/recurring-payments/view.scss similarity index 100% rename from extensions/blocks/membership-button/view.scss rename to extensions/blocks/recurring-payments/view.scss diff --git a/extensions/index.json b/extensions/index.json index 941a5ba5ba73d..b1b1c68acafe5 100644 --- a/extensions/index.json +++ b/extensions/index.json @@ -8,7 +8,7 @@ "mailchimp", "map", "markdown", - "membership-button", + "recurring-payments", "publicize", "related-posts", "repeat-visitor", From d4ed377abe50602f3ad3f3c86cbac059650a54dc Mon Sep 17 00:00:00 2001 From: artpi Date: Wed, 29 May 2019 19:14:03 +0200 Subject: [PATCH 5/7] Block id change --- extensions/blocks/recurring-payments/index.js | 2 +- .../{membership-button.php => recurring-payments.php} | 2 +- extensions/blocks/recurring-payments/view.js | 2 +- modules/memberships/class-jetpack-memberships.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename extensions/blocks/recurring-payments/{membership-button.php => recurring-payments.php} (91%) diff --git a/extensions/blocks/recurring-payments/index.js b/extensions/blocks/recurring-payments/index.js index 1a73bb53f194c..78634deeee035 100644 --- a/extensions/blocks/recurring-payments/index.js +++ b/extensions/blocks/recurring-payments/index.js @@ -10,7 +10,7 @@ import { __, _x } from '@wordpress/i18n'; import edit from './edit'; import './editor.scss'; -export const name = 'recurring-payment-button'; +export const name = 'recurring-payments'; export const icon = ( diff --git a/extensions/blocks/recurring-payments/membership-button.php b/extensions/blocks/recurring-payments/recurring-payments.php similarity index 91% rename from extensions/blocks/recurring-payments/membership-button.php rename to extensions/blocks/recurring-payments/recurring-payments.php index 7c2c38914a9f0..9aeb25c6ee0cb 100644 --- a/extensions/blocks/recurring-payments/membership-button.php +++ b/extensions/blocks/recurring-payments/recurring-payments.php @@ -11,7 +11,7 @@ require_once JETPACK__PLUGIN_DIR . '/modules/memberships/class-jetpack-memberships.php'; jetpack_register_block( - 'jetpack/recurring-payment-button', + 'jetpack/recurring-payments', array( 'render_callback' => array( Jetpack_Memberships::get_instance(), 'render_button' ), ) diff --git a/extensions/blocks/recurring-payments/view.js b/extensions/blocks/recurring-payments/view.js index b03cccdea9e83..daffa28748a70 100644 --- a/extensions/blocks/recurring-payments/view.js +++ b/extensions/blocks/recurring-payments/view.js @@ -4,7 +4,7 @@ * Internal dependencies */ import './view.scss'; -const name = 'membership-button'; +const name = 'recurring-payments'; const blockClassName = 'wp-block-jetpack-' + name; /** diff --git a/modules/memberships/class-jetpack-memberships.php b/modules/memberships/class-jetpack-memberships.php index aa2b7677443ff..e90826b7ea7bf 100644 --- a/modules/memberships/class-jetpack-memberships.php +++ b/modules/memberships/class-jetpack-memberships.php @@ -34,7 +34,7 @@ class Jetpack_Memberships { * * @var string */ - private static $button_block_name = 'recurring-payment-button'; + private static $button_block_name = 'recurring-payments'; /** * These are defaults for wp_kses ran on the membership button. From 0fadbfce9a3e248e8583c696efd6ff0766a07024 Mon Sep 17 00:00:00 2001 From: artpi Date: Wed, 29 May 2019 22:14:27 +0200 Subject: [PATCH 6/7] Reorder --- extensions/index.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/index.json b/extensions/index.json index b1b1c68acafe5..41306bdf5d88a 100644 --- a/extensions/index.json +++ b/extensions/index.json @@ -8,8 +8,8 @@ "mailchimp", "map", "markdown", - "recurring-payments", "publicize", + "recurring-payments", "related-posts", "repeat-visitor", "sharing", From f34bb05c01c358282fca1584f56884e79a3dd313 Mon Sep 17 00:00:00 2001 From: artpi Date: Wed, 29 May 2019 22:16:03 +0200 Subject: [PATCH 7/7] Settle on one capitalization --- extensions/blocks/recurring-payments/edit.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/blocks/recurring-payments/edit.jsx b/extensions/blocks/recurring-payments/edit.jsx index bcfffceca1d37..4565db9875feb 100644 --- a/extensions/blocks/recurring-payments/edit.jsx +++ b/extensions/blocks/recurring-payments/edit.jsx @@ -363,7 +363,7 @@ class MembershipsButtonEdit extends Component { >
{ __( - "You'll need to upgrade your plan to use the Recurring Payment Button.", + "You'll need to upgrade your plan to use the Recurring Payments button.", 'jetpack' ) }
@@ -393,7 +393,7 @@ class MembershipsButtonEdit extends Component { >
{ __( - 'In order to start selling Recurring Payment plans, you have to connect to Stripe:', + 'In order to start selling Recurring Payments plans, you have to connect to Stripe:', 'jetpack' ) }
@@ -420,7 +420,7 @@ class MembershipsButtonEdit extends Component { notices={ notices } >
- { __( 'Add your first Recurring Payment plan:', 'jetpack' ) } + { __( 'Add your first Recurring Payments plan:', 'jetpack' ) }

{ this.renderAddMembershipAmount() }