Skip to content

Commit

Permalink
Merge pull request #810 from woocommerce/fix/settings-array-placement
Browse files Browse the repository at this point in the history
Setting: Retain Stripe Data, place in correct spot settings array
  • Loading branch information
roykho authored Mar 12, 2019
2 parents 26b006b + 4d6fe21 commit 5c2fb4e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
13 changes: 12 additions & 1 deletion includes/admin/class-wc-stripe-privacy.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,18 @@ public function account_settings( $settings ) {
),
);

array_splice( $settings, ( count( $settings ) - 1 ), 0, $insert_setting );
$index = null;

foreach ( $settings as $key => $value) {
if ( 'sectionend' === $value[ 'type' ] && 'personal_data_retention' === $value[ 'id' ] ) {
$index = $key;
break;
}
}

if ( ! is_null( $index ) ) {
array_splice( $settings, $index, 0, $insert_setting );
}

return $settings;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "woocommerce-gateway-stripe",
"title": "WooCommerce Gateway Stripe",
"version": "4.1.10",
"version": "4.1.15",
"license": "GPL-3.0",
"homepage": "http://wordpress.org/plugins/woocommerce-gateway-stripe/",
"repository": {
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ If you get stuck, you can ask for help in the Plugin Forum.

= 4.1.15 - 2019-03-12 =
* Fix - Prevent canceled webhook from processing non Stripe payments.
* Fix - "Retain Stripe Data" setting placement on WooCommerce settings page.
* Tweak - Stripe API version updated to support 2019-02-19.

[See changelog for all versions](https://raw.githubusercontent.com/woothemes/woocommerce-gateway-stripe/master/changelog.txt).
Expand Down

0 comments on commit 5c2fb4e

Please sign in to comment.