diff --git a/includes/admin/class-wc-stripe-privacy.php b/includes/admin/class-wc-stripe-privacy.php index 9459a514c..f63826abb 100644 --- a/includes/admin/class-wc-stripe-privacy.php +++ b/includes/admin/class-wc-stripe-privacy.php @@ -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; } diff --git a/package.json b/package.json index 879d551cd..8453937c9 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/readme.txt b/readme.txt index 6a91cc3ec..4fdf9b59b 100644 --- a/readme.txt +++ b/readme.txt @@ -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).