Skip to content
This repository was archived by the owner on Nov 17, 2021. It is now read-only.

Commit 089b403

Browse files
committed
Merge branch 'release/1.2.2'
2 parents a30cc94 + e2b5963 commit 089b403

File tree

6 files changed

+34
-46
lines changed

6 files changed

+34
-46
lines changed

CHANGELOG.md

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

3+
## [1.2.2](https://github.com/rvola/woo-stripe-fee-in-report/tree/1.2.2) - 2019-10-23
4+
[Full Changelog](https://github.com/rvola/woo-stripe-fee-in-report/compare/1.2.1...1.2.2)
5+
6+
* FIX / Load languages files
7+
* escape i18n
8+
* FIX / Series incorrect for legend + escape i18n
9+
* ✔︎ Compatibility WOO 3.8
10+
* ✔︎ Compatibility WP 5.3
11+
312
## [1.2.1](https://github.com/rvola/woo-stripe-fee-in-report/tree/1.2.1) - 2019-04-03
413
[Full Changelog](https://github.com/rvola/woo-stripe-fee-in-report/compare/1.2.0...1.2.1)
514

includes/class-report.php

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,8 @@ public function chart_add_legend() {
195195
return;
196196
}
197197
$link = sprintf(
198-
'<li style="border-color: %1$s" class="highlight_series" data-series="%2$d">%3$s</li>',
198+
'<li style="border-color: %s" class="highlight_series" data-series="9">%s</li>',
199199
self::COLOR,
200-
$this->get_serie( 'stripe_fees' ),
201200
sprintf(
202201
// translators: %s is Stripe fees.
203202
_x( '%s Stripe fees', 'number', 'woo-stripe-fee-in-report' ),
@@ -214,30 +213,14 @@ public function chart_add_legend() {
214213

215214
}
216215

217-
/**
218-
* Retrieves the key number of the table to add the values to the chart.
219-
*
220-
* @param string $name The name of the key to search for.
221-
*
222-
* @return int
223-
*/
224-
private function get_serie( $name ) {
225-
if ( ! $this->chart_data ) {
226-
return false;
227-
}
228-
229-
return array_search( $name, array_keys( $this->chart_data ), true ) - 1;
230-
}
231-
232216
/**
233217
* Replaces hover text for legend.
234218
* In our case, I use it to change the text concerning the net commands taking into account the Stripes fees.
235219
*/
236220
public function chart_update_legend_placeholder() {
237221
$update_legend = array(
238-
$this->get_serie( 'net_order_amounts' ) => __( 'This is the sum of the order totals after any refunds and excluding shipping, taxes and Stripe fees.', 'woo-stripe-fee-in-report' ),
222+
7 => esc_html__( 'This is the sum of the order totals after any refunds and excluding shipping, taxes and Stripe fees.', 'woo-stripe-fee-in-report' ), // Net sales amount
239223
);
240-
241224
echo '<script type="text/javascript">';
242225
foreach ( $update_legend as $serie => $text ) {
243226
printf(
@@ -301,7 +284,7 @@ public function chart_draw() {
301284

302285
// Stripe serie.
303286
var stripe_series = {
304-
label: "<?php echo esc_js( __( 'Stripe fees', 'woo-stripe-fee-in-report' ) ) ?>",
287+
label: "<?php echo esc_js( esc_html__( 'Stripe fees', 'woo-stripe-fee-in-report' ) ) ?>",
305288
data: <?php echo $stripe_fees;?>,
306289
yaxis: 3,
307290
color: '<?php echo self::COLOR; ?>',

includes/class-wp.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ public static function instance() {
5555
*/
5656
public function load_languages() {
5757

58-
load_plugin_textdomain( 'woo-stripe-fee-in-report', false, dirname( __FILE__ ) . '/languages' );
59-
load_plugin_textdomain( 'woo-stripe-fee-in-report', false, plugin_basename( WOOSFR_FILE ) . '/languages' );
58+
load_plugin_textdomain( 'woo-stripe-fee-in-report', false, plugin_basename( dirname( WOOCAO_FILE ) ) . '/languages' );
6059
}
6160

6261
/**
@@ -73,7 +72,7 @@ public function plugin_row_meta( $plugin_meta, $plugin_file ) {
7372
$plugin_meta,
7473
sprintf(
7574
'<a href="https://www.paypal.me/rvola" target="_blank">%s</a>',
76-
__( 'Donate', 'woo-stripe-fee-in-report' )
75+
esc_html__( 'Donate', 'woo-stripe-fee-in-report' )
7776
)
7877
);
7978
}
Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,31 @@
11
#, fuzzy
22
msgid ""
33
msgstr ""
4-
"Project-Id-Version: WooCommerce Stripe fee in Report - 1.1.X\n"
5-
"POT-Creation-Date: 2018-03-20 11:31+0100\n"
4+
"Project-Id-Version: WooCommerce Stripe fee in Report - 1.2.X\n"
5+
"POT-Creation-Date: 2019-10-23 13:56+0200\n"
66
"MIME-Version: 1.0\n"
77
"Content-Type: text/plain; charset=UTF-8\n"
88
"Content-Transfer-Encoding: 8bit\n"
99
"Language-Team: \n"
10-
"X-Generator: Poedit 2.0.6\n"
11-
"X-Poedit-KeywordsList: __;_e;_x:1,2c\n"
10+
"X-Generator: Poedit 2.2.4\n"
11+
"X-Poedit-KeywordsList: esc_html__\n"
1212
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
1313
"X-Poedit-SourceCharset: UTF-8\n"
1414
"X-Poedit-Basepath: ..\n"
1515
"PO-Revision-Date: \n"
1616
"Last-Translator: \n"
1717
"X-Poedit-SearchPath-0: .\n"
1818

19-
#: includes/class-report.php:203
20-
#, php-format
21-
msgctxt "number"
22-
msgid "%s Stripe fees"
23-
msgstr ""
24-
25-
#: includes/class-report.php:238
19+
#: includes/class-report.php:222
2620
msgid ""
2721
"This is the sum of the order totals after any refunds and excluding "
2822
"shipping, taxes and Stripe fees."
2923
msgstr ""
3024

31-
#: includes/class-report.php:295
32-
msgid "Shipping amount"
33-
msgstr ""
34-
35-
#: includes/class-report.php:304
25+
#: includes/class-report.php:287
3626
msgid "Stripe fees"
3727
msgstr ""
3828

39-
#: includes/class-wp.php:76
29+
#: includes/class-wp.php:75
4030
msgid "Donate"
4131
msgstr ""

readme.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Donate link: https://www.paypal.me/rvola
44
Tags: stripe, woocommerce, woocommerce-plugin, woocommerce-extension, wordpress-plugin, wordpress, chart, reporting, report, stripe-payments, stripe-gateway
55
Requires PHP: 7.0
66
Requires at least: 4.4
7-
Tested up to: 5.2
8-
Stable tag: 1.2.1
7+
Tested up to: 5.3
8+
Stable tag: 1.2.2
99
License: GPLv3
1010
License URI: https://www.gnu.org/licenses/gpl-3.0.html
1111

@@ -41,6 +41,13 @@ The GIT repository is available here [https://github.com/rvola/woo-stripe-fee-in
4141

4242
== Changelog ==
4343

44+
= 1.2.2 / 2019-10-23 =
45+
* FIX / Load languages files
46+
* escape i18n
47+
* FIX / Series incorrect for legend + escape i18n
48+
* ✔︎ Compatibility WOO 3.8
49+
* ✔︎ Compatibility WP 5.3
50+
4451
= 1.2.1 / 2019-04-03 =
4552
* ✔︎ Compatibility WP 5.2
4653
* ✔︎ Compatibility WOO 3.6

woo-stripe-fee-in-report.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*
66
* Description: Shows Stripe fees in WooCommerce charts. Calculates a correct net total.
77
*
8-
* Version: 1.2.1
9-
* Revision: 2019-04-03
8+
* Version: 1.2.2
9+
* Revision: 2019-10-23
1010
* Creation: 2018-02-24
1111
*
1212
* Author: studio RVOLA
@@ -16,10 +16,10 @@
1616
* Domain Path: /languages
1717
*
1818
* Requires at least: 4.4
19-
* Tested up to: 5.2
19+
* Tested up to: 5.3
2020
* Requires PHP: 7.0
2121
* WC requires at least: 3.1
22-
* WC tested up to: 3.6
22+
* WC tested up to: 3.8
2323
*
2424
* License: GNU General Public License v3.0
2525
* License URI: https://www.gnu.org/licenses/gpl-3.0.html

0 commit comments

Comments
 (0)