Skip to content

Commit 55f01f9

Browse files
authored
Merge pull request #152 from saucal/add/private-beta-messaging
Show a notice to warn merchants that integration is invite-only
2 parents eaa8b6f + 7632bf6 commit 55f01f9

7 files changed

Lines changed: 68 additions & 10 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/**
2+
* External dependencies
3+
*/
4+
import { __ } from '@wordpress/i18n';
5+
import { Notice } from '@wordpress/components';
6+
7+
const PrelaunchNotice = () => {
8+
return (
9+
<Notice
10+
status="warning"
11+
isDismissible={ false }
12+
className="pinterest-for-woocommerce-prelaunch-notice"
13+
>
14+
<h3>
15+
{ __(
16+
'Pinterest for WooCommerce is a limited beta.',
17+
'pinterest-for-woocommerce'
18+
) }
19+
</h3>
20+
<p>
21+
{ __(
22+
'The integration is only available to approved stores participating in the beta program.',
23+
'pinterest-for-woocommerce'
24+
) }
25+
</p>
26+
<p>
27+
<a
28+
href="https://help.pinterest.com/en-gb/business/article/get-a-business-profile"
29+
target="_blank"
30+
rel="noreferrer"
31+
>
32+
{ __(
33+
'Click here for more information.',
34+
'pinterest-for-woocommerce'
35+
) }
36+
</a>
37+
</p>
38+
</Notice>
39+
);
40+
};
41+
42+
export default PrelaunchNotice;

assets/source/setup-guide/app/style.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,15 @@ $root: ".woocommerce-setup-guide";
389389
}
390390
}
391391

392+
.pinterest-for-woocommerce-prelaunch-notice {
393+
max-width: 824px;
394+
margin: auto auto;
395+
padding: 1em 2em;
396+
}
397+
392398
.pinterest-for-woocommerce-landing-page {
393399
max-width: 824px;
394-
margin: 0 auto;
400+
margin: 24px auto;
395401

396402
.components-flex {
397403
flex-direction: column;

assets/source/setup-guide/app/views/LandingPageApp.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
/**
1919
* Internal dependencies
2020
*/
21+
import PrelaunchNotice from '../../../components/prelaunch-notice';
2122

2223
const WelcomeSection = () => {
2324
return (
@@ -195,14 +196,22 @@ const FaqQuestion = ( { question, answer } ) => {
195196
};
196197

197198
const LandingPageApp = () => {
198-
return (
199-
<div className="pinterest-for-woocommerce-landing-page">
200-
<WelcomeSection />
199+
const { pluginVersion } = wcSettings.pinterest_for_woocommerce;
201200

202-
<FeaturesSection />
201+
// Only show the pre-launch beta notice if the plugin version is a beta.
202+
const prelaunchNotice = pluginVersion.includes( 'beta' ) ? (
203+
<PrelaunchNotice />
204+
) : null;
203205

204-
<FaqSection />
205-
</div>
206+
return (
207+
<>
208+
{ prelaunchNotice }
209+
<div className="pinterest-for-woocommerce-landing-page">
210+
<WelcomeSection />
211+
<FeaturesSection />
212+
<FaqSection />
213+
</div>
214+
</>
206215
);
207216
};
208217

class-pinterest-for-woocommerce.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ final class Pinterest_For_Woocommerce {
5959
*
6060
* @var string
6161
*/
62-
public $version = '0.9.0';
62+
public $version = '1.0.0-beta.1';
6363

6464
/**
6565
* The single instance of the class.

includes/admin/class-pinterest-for-woocommerce-admin.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ public function load_settings() {
378378
private function get_component_settings() {
379379

380380
return array(
381+
'pluginVersion' => PINTEREST_FOR_WOOCOMMERCE_VERSION,
381382
'adminUrl' => esc_url(
382383
add_query_arg(
383384
array(

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "pinterest-for-woocommerce",
33
"description": "Pinterest for WooCommerce",
4-
"version": "0.0.1",
4+
"version": "1.0.0-beta.1",
55
"main": "gulpfile.js",
66
"dependencies": {
77
"@woocommerce/components": "^5.1.2",

pinterest-for-woocommerce.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Plugin Name: Pinterest for WooCommerce
1414
* Plugin URI: https://woocommerce.com/products/pinterest-for-woocommerce/
1515
* Description: Grow your business on Pinterest! Use this official plugin to allow shoppers to Pin products while browsing your store, track conversions, and advertise on Pinterest.
16-
* Version: 0.9.0
16+
* Version: 1.0.0-beta.1
1717
* Author: WooCommerce
1818
* Author URI: https://woocommerce.com
1919
* License: GPL-2.0+

0 commit comments

Comments
 (0)