Skip to content

Commit 041cc09

Browse files
author
Kristófer R
committed
Merge remote-tracking branch 'origin/release/6.4.0' into trunk
2 parents 4516575 + 14cfd32 commit 041cc09

File tree

11 files changed

+42
-33
lines changed

11 files changed

+42
-33
lines changed

.github/workflows/compatibility.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
matrix:
1212
woocommerce: [ 'beta' ]
1313
wordpress: [ 'latest' ]
14-
php: [ '7.0', '7.4', '8.0' ]
14+
php: [ '7.2', '7.4', '8.0' ]
1515

1616

1717
name: Beta (PHP=${{ matrix.php }}, WP=${{ matrix.wordpress }}, WC=${{ matrix.woocommerce }})

.github/workflows/php-tests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ jobs:
1616
include:
1717
# WooCommerce
1818
- woocommerce_support_policy: L
19-
woocommerce: '6.2.0'
19+
woocommerce: '6.5.0'
2020
- woocommerce_support_policy: L-1
21-
woocommerce: '6.1.0'
21+
woocommerce: '6.4.1'
2222
- woocommerce_support_policy: L-2
23-
woocommerce: '6.0.0'
23+
woocommerce: '6.3.1'
2424
# WordPress
2525
- wordpress_support_policy: L
2626
wordpress: '5.9'
@@ -35,6 +35,9 @@ jobs:
3535
php: '7.4'
3636
- php_support_policy: L-2
3737
php: '7.0'
38+
exclude:
39+
- woocommerce_support_policy: L
40+
php_support_policy: L-2
3841

3942
name: Stable (PHP=${{ matrix.php_support_policy }}, WP=${{ matrix.wordpress_support_policy }}, WC=${{ matrix.woocommerce_support_policy }})
4043
env:

changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
*** Changelog ***
22

3+
= 6.4.0 - 2022-05-20 =
4+
* Fix - Changed logic for how 'Enabled/Disabled' statuses are shown for payments and payouts capabilities in settings.
5+
* Tweak - Updated the minimum supported versions of WordPress and WooCommerce.
6+
37
= 6.3.0 - 2022-03-10 =
48
* Tweak - Remove html from translatable strings.
59
* Tweak - Revert the deprecation of the 'wc_stripe_hide_payment_request_on_product_page', 'wc_stripe_show_payment_request_on_checkout', and 'wc_stripe_show_payment_request_on_cart' filters.

client/settings/account-details/__tests__/account-details.test.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ jest.mock( 'wcstripe/data/account-keys', () => ( {
1616

1717
describe( 'AccountDetails', () => {
1818
it( 'renders enabled payments and payouts on account', () => {
19-
useGetCapabilities.mockReturnValue( {
20-
card_payments: 'active',
21-
} );
2219
useAccount.mockReturnValue( {
2320
data: {
2421
account: {
@@ -28,6 +25,7 @@ describe( 'AccountDetails', () => {
2825
},
2926
},
3027
payouts_enabled: true,
28+
charges_enabled: true,
3129
},
3230
},
3331
} );
@@ -53,16 +51,14 @@ describe( 'AccountDetails', () => {
5351
} );
5452

5553
it( 'renders disabled payouts and payments on account', () => {
56-
useGetCapabilities.mockReturnValue( {
57-
card_payments: 'disabled',
58-
} );
5954
useAccount.mockReturnValue( {
6055
data: {
6156
account: {
6257
settings: {
6358
payouts: {},
6459
},
6560
payouts_enabled: false,
61+
charges_enabled: false,
6662
},
6763
},
6864
} );

client/settings/account-details/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@ import { Button, ExternalLink } from '@wordpress/components';
66
import interpolateComponents from 'interpolate-components';
77
import useWebhookStateMessage from './use-webhook-state-message';
88
import SectionStatus from './section-status';
9-
import { useAccount, useGetCapabilities } from 'wcstripe/data/account';
9+
import { useAccount } from 'wcstripe/data/account';
1010
import {
1111
useAccountKeysTestWebhookSecret,
1212
useAccountKeysWebhookSecret,
1313
} from 'wcstripe/data/account-keys';
1414
import { WebhookInformation } from 'wcstripe/components/webhook-information';
1515

16-
const useIsCardPaymentsEnabled = () =>
17-
useGetCapabilities().card_payments === 'active';
16+
const useIsCardPaymentsEnabled = () => {
17+
const { data } = useAccount();
18+
19+
return data.account?.charges_enabled;
20+
};
1821

1922
const useArePayoutsEnabled = () => {
2023
const { data } = useAccount();
2124

22-
return (
23-
data.account?.payouts_enabled &&
24-
Boolean( data.account?.settings?.payouts?.schedule?.interval )
25-
);
25+
return data.account?.payouts_enabled;
2626
};
2727

2828
const PaymentsSection = () => {

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "woocommerce-gateway-stripe",
33
"title": "WooCommerce Gateway Stripe",
4-
"version": "6.3.0",
4+
"version": "6.4.0",
55
"license": "GPL-3.0",
66
"homepage": "http://wordpress.org/plugins/woocommerce-gateway-stripe/",
77
"repository": {

readme.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
=== WooCommerce Stripe Payment Gateway ===
22
Contributors: woocommerce, automattic, royho, akeda, mattyza, bor0, woothemes
33
Tags: credit card, stripe, apple pay, payment request, google pay, sepa, sofort, bancontact, alipay, giropay, ideal, p24, woocommerce, automattic
4-
Requires at least: 5.6
4+
Requires at least: 5.7
55
Tested up to: 5.9
66
Requires PHP: 7.0
7-
Stable tag: 6.3.0
7+
Stable tag: 6.4.0
88
License: GPLv3
99
License URI: https://www.gnu.org/licenses/gpl-3.0.html
1010
Attributions: thorsten-stripe
@@ -128,9 +128,8 @@ If you get stuck, you can ask for help in the Plugin Forum.
128128

129129
== Changelog ==
130130

131-
= 6.3.0 - 2022-03-10 =
132-
* Tweak - Remove html from translatable strings.
133-
* Tweak - Revert the deprecation of the 'wc_stripe_hide_payment_request_on_product_page', 'wc_stripe_show_payment_request_on_checkout', and 'wc_stripe_show_payment_request_on_cart' filters.
134-
* Tweak - Address minor styling issues in settings.
131+
= 6.4.0 - 2022-05-20 =
132+
* Fix - Changed logic for how 'Enabled/Disabled' statuses are shown for payments and payouts capabilities in settings.
133+
* Tweak - Updated the minimum supported versions of WordPress and WooCommerce.
135134

136135
[See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce-gateway-stripe/trunk/changelog.txt).

tests/phpunit/setup.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@
33
* Set up shared by all tests.
44
*/
55
update_option( 'woocommerce_default_country', 'US:CA' );
6+
7+
if ( version_compare( WC_VERSION, '6.4.1', '=' ) ) {
8+
\Automattic\WooCommerce\Internal\Admin\Install::create_tables();
9+
\Automattic\WooCommerce\Internal\Admin\Install::create_events();
10+
}

tests/phpunit/test-class-wc-stripe-upe-availability-note.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ public function test_get_note() {
2424
$this->assertSame( 'wc-stripe-upe-availability-note', $enable_upe_action->name );
2525
$this->assertSame( 'Enable in your store', $enable_upe_action->label );
2626
$this->assertSame( '?page=wc-settings&tab=checkout&section=stripe&panel=settings&highlight=enable-upe', $enable_upe_action->query );
27-
$this->assertSame( true, $enable_upe_action->primary );
27+
if ( version_compare( WC_VERSION, '6.5.0', '<' ) ) {
28+
$this->assertSame( true, $enable_upe_action->primary );
29+
}
2830
} else {
2931
$this->markTestSkipped( 'The used WC components are not backward compatible' );
3032
}

0 commit comments

Comments
 (0)