Skip to content

Commit 3c6e13b

Browse files
author
Marco Pereirinha
committed
Update wording
1 parent 7be78a9 commit 3c6e13b

2 files changed

Lines changed: 44 additions & 9 deletions

File tree

php/class-special-offer.php

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ public function register_hooks() {
4444
* @return array
4545
*/
4646
public function filtered_settings( $settings ) {
47-
if ( ! $this->is_29_offer_available() ) {
47+
if ( ! $this->is_special_offer_available() ) {
4848
return $settings;
4949
}
5050

5151
$settings[0][] = array(
5252
array(
5353
'type' => 'tag',
5454
'element' => 'div',
55-
'content' => __( 'Special offer', 'cloudinary' ),
55+
'content' => __( 'Special Offer', 'cloudinary' ),
5656
'attributes' => array(
5757
'class' => array(
5858
'cld-special-offer',
@@ -61,17 +61,17 @@ public function filtered_settings( $settings ) {
6161
),
6262
array(
6363
'type' => 'panel',
64-
'title' => __( 'Get a $29 plan', 'cloudinary' ),
64+
'title' => __( 'Get a small $29 plan', 'cloudinary' ),
6565
'description' => __( 'Contact us', 'cloudinary' ),
6666
'collapsible' => 'closed',
6767
array(
6868
'type' => 'tag',
69-
'element' => 'p',
70-
'content' => __( 'Get 100GB for $29.', 'cloudinary' ),
69+
'element' => 'div',
70+
'content' => $this->get_special_offer_content(),
7171
),
7272
array(
7373
'type' => 'link',
74-
'content' => __( 'Lets get it started', 'cloudinary' ),
74+
'content' => __( 'Get started', 'cloudinary' ),
7575
'url' => static function () {
7676
$current_user = wp_get_current_user();
7777
$plugin = get_plugin_instance();
@@ -83,8 +83,8 @@ public function filtered_settings( $settings ) {
8383
'tf_22246877' => $current_user->display_name,
8484
'tf_360007219560' => $cloud_name,
8585
'tf_360017815680' => 'help_with_plans',
86-
'tf_subject' => __( 'Special offer for $29 plan', 'cloudinary' ),
87-
'tf_description' => __( 'I would like to get the $29 plan', 'cloudinary' ),
86+
'tf_subject' => __( 'Request to Purchase the Small Plan', 'cloudinary' ),
87+
'tf_description' => __( "Hello,\n\nI'm interested in purchasing the Small plan for $29. Could you please provide me with the next steps to complete the purchase?\n\nThank you!", 'cloudinary' ),
8888
),
8989
'https://support.cloudinary.com/hc/en-us/requests/new'
9090
);
@@ -102,9 +102,21 @@ public function filtered_settings( $settings ) {
102102
*
103103
* @return bool
104104
*/
105-
protected function is_29_offer_available() {
105+
protected function is_special_offer_available() {
106106
$last_usage = get_option( Connect::META_KEYS['last_usage'], array( 'plan' => '' ) );
107107

108108
return 'free' !== strtolower( $last_usage['plan'] );
109109
}
110+
111+
/**
112+
* Get Special Offer content.
113+
*
114+
* @return string
115+
*/
116+
protected function get_special_offer_content() {
117+
ob_start();
118+
include $this->plugin->dir_path . 'php/templates/special-offer.php'; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingVariable
119+
120+
return ob_get_clean();
121+
}
110122
}

php/templates/special-offer.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
/**
3+
* The Special Offer contents.
4+
*
5+
* @package Cloudinary
6+
*/
7+
8+
?>
9+
10+
<p><?php esc_html_e( 'Running out of space on your free account? Upgrade for just $29 and supercharge your WordPress site with Cloudinary for unlimited awesomeness!', 'cloudinary' ); ?></p>
11+
12+
<p>
13+
<?php esc_html_e( 'As a note:', 'cloudinary' ); ?>
14+
<br>
15+
<?php esc_html_e( 'This offer is exclusive to free users. Existing paying users will continue with their current plan and pricing.', 'cloudinary' ); ?>
16+
</p>
17+
18+
<strong><?php esc_html_e( 'Includes:', 'cloudinary' ); ?></strong>
19+
<ul>
20+
<li><?php esc_html_e( '3 users', 'cloudinary' ); ?></li>
21+
<li><?php esc_html_e( '1 product environment', 'cloudinary' ); ?></li>
22+
<li><?php esc_html_e( '60 monthly credits', 'cloudinary' ); ?></li>
23+
</ul>

0 commit comments

Comments
 (0)