@automattic/newspack-blocks 4.19.0 → 4.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/languages/newspack-blocks-de_DE.po +9 -9
- package/languages/newspack-blocks-es_ES.po +9 -9
- package/languages/newspack-blocks-fr_BE.po +9 -9
- package/languages/newspack-blocks-nb_NO.po +9 -9
- package/languages/newspack-blocks-pt_PT.po +9 -9
- package/languages/newspack-blocks.pot +9 -9
- package/newspack-blocks.php +2 -2
- package/package.json +1 -1
- package/src/blocks/carousel/view.php +6 -0
- package/src/modal-checkout/templates/thankyou.php +52 -56
- package/vendor/composer/installed.php +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [4.20.0](https://github.com/Automattic/newspack-blocks/compare/v4.19.0...v4.20.0) (2026-01-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* avoid redeclaration of global function ([#2264](https://github.com/Automattic/newspack-blocks/issues/2264)) ([3af1ea7](https://github.com/Automattic/newspack-blocks/commit/3af1ea720849058e4fea15aa4adb498c8aa564a0))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* supress carousel block from feeds ([#2263](https://github.com/Automattic/newspack-blocks/issues/2263)) ([d0c6ad1](https://github.com/Automattic/newspack-blocks/commit/d0c6ad1cacc0c6aebfaec584de598dcc9e91294d))
|
|
12
|
+
|
|
1
13
|
# [4.19.0](https://github.com/Automattic/newspack-blocks/compare/v4.18.0...v4.19.0) (2025-12-08)
|
|
2
14
|
|
|
3
15
|
|
|
@@ -2,7 +2,7 @@ msgid ""
|
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Newspack Blocks\n"
|
|
4
4
|
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/project\n"
|
|
5
|
-
"POT-Creation-Date: 2025-
|
|
5
|
+
"POT-Creation-Date: 2025-12-03T17:31:19+00:00\n"
|
|
6
6
|
"PO-Revision-Date: 2024-08-30 08:45-0700\n"
|
|
7
7
|
"Last-Translator: \n"
|
|
8
8
|
"Language-Team: \n"
|
|
@@ -496,24 +496,24 @@ msgid "Subscribe Pattern 7"
|
|
|
496
496
|
msgstr ""
|
|
497
497
|
|
|
498
498
|
#. translators: %d: Slide number.
|
|
499
|
-
#: src/blocks/carousel/view.php:
|
|
499
|
+
#: src/blocks/carousel/view.php:227
|
|
500
500
|
#, php-format
|
|
501
501
|
msgid "Go to slide %d"
|
|
502
502
|
msgstr "Gehe zu Bild %d"
|
|
503
503
|
|
|
504
|
-
#: src/blocks/carousel/view.php:
|
|
504
|
+
#: src/blocks/carousel/view.php:248
|
|
505
505
|
msgid "Previous Slide"
|
|
506
506
|
msgstr "Vorheriger Slide"
|
|
507
507
|
|
|
508
|
-
#: src/blocks/carousel/view.php:
|
|
508
|
+
#: src/blocks/carousel/view.php:249
|
|
509
509
|
msgid "Next Slide"
|
|
510
510
|
msgstr "Nächste Folie"
|
|
511
511
|
|
|
512
|
-
#: src/blocks/carousel/view.php:
|
|
512
|
+
#: src/blocks/carousel/view.php:293
|
|
513
513
|
msgid "Pause Slideshow"
|
|
514
514
|
msgstr "Diashow pausieren"
|
|
515
515
|
|
|
516
|
-
#: src/blocks/carousel/view.php:
|
|
516
|
+
#: src/blocks/carousel/view.php:294
|
|
517
517
|
msgid "Play Slideshow"
|
|
518
518
|
msgstr "Diashow abspielen"
|
|
519
519
|
|
|
@@ -657,17 +657,17 @@ msgstr ""
|
|
|
657
657
|
msgid "Recipient: "
|
|
658
658
|
msgstr ""
|
|
659
659
|
|
|
660
|
-
#: src/modal-checkout/templates/thankyou.php:
|
|
660
|
+
#: src/modal-checkout/templates/thankyou.php:78
|
|
661
661
|
msgid ""
|
|
662
662
|
"Unfortunately your order cannot be processed. Please attempt your purchase "
|
|
663
663
|
"again."
|
|
664
664
|
msgstr ""
|
|
665
665
|
|
|
666
|
-
#: src/modal-checkout/templates/thankyou.php:
|
|
666
|
+
#: src/modal-checkout/templates/thankyou.php:81
|
|
667
667
|
msgid "Pay"
|
|
668
668
|
msgstr ""
|
|
669
669
|
|
|
670
|
-
#: src/modal-checkout/templates/thankyou.php:
|
|
670
|
+
#: src/modal-checkout/templates/thankyou.php:83
|
|
671
671
|
msgid "My account"
|
|
672
672
|
msgstr ""
|
|
673
673
|
|
|
@@ -2,7 +2,7 @@ msgid ""
|
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Newspack Blocks 1.0.0-alpha.20\n"
|
|
4
4
|
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/project\n"
|
|
5
|
-
"POT-Creation-Date: 2025-
|
|
5
|
+
"POT-Creation-Date: 2025-12-03T17:31:19+00:00\n"
|
|
6
6
|
"PO-Revision-Date: 2025-08-12T14:56:45+00:00\n"
|
|
7
7
|
"Last-Translator: \n"
|
|
8
8
|
"Language-Team: \n"
|
|
@@ -488,24 +488,24 @@ msgid "Subscribe Pattern 7"
|
|
|
488
488
|
msgstr ""
|
|
489
489
|
|
|
490
490
|
#. translators: %d: Slide number.
|
|
491
|
-
#: src/blocks/carousel/view.php:
|
|
491
|
+
#: src/blocks/carousel/view.php:227
|
|
492
492
|
#, php-format
|
|
493
493
|
msgid "Go to slide %d"
|
|
494
494
|
msgstr ""
|
|
495
495
|
|
|
496
|
-
#: src/blocks/carousel/view.php:
|
|
496
|
+
#: src/blocks/carousel/view.php:248
|
|
497
497
|
msgid "Previous Slide"
|
|
498
498
|
msgstr ""
|
|
499
499
|
|
|
500
|
-
#: src/blocks/carousel/view.php:
|
|
500
|
+
#: src/blocks/carousel/view.php:249
|
|
501
501
|
msgid "Next Slide"
|
|
502
502
|
msgstr ""
|
|
503
503
|
|
|
504
|
-
#: src/blocks/carousel/view.php:
|
|
504
|
+
#: src/blocks/carousel/view.php:293
|
|
505
505
|
msgid "Pause Slideshow"
|
|
506
506
|
msgstr ""
|
|
507
507
|
|
|
508
|
-
#: src/blocks/carousel/view.php:
|
|
508
|
+
#: src/blocks/carousel/view.php:294
|
|
509
509
|
msgid "Play Slideshow"
|
|
510
510
|
msgstr ""
|
|
511
511
|
|
|
@@ -649,17 +649,17 @@ msgstr ""
|
|
|
649
649
|
msgid "Recipient: "
|
|
650
650
|
msgstr ""
|
|
651
651
|
|
|
652
|
-
#: src/modal-checkout/templates/thankyou.php:
|
|
652
|
+
#: src/modal-checkout/templates/thankyou.php:78
|
|
653
653
|
msgid ""
|
|
654
654
|
"Unfortunately your order cannot be processed. Please attempt your purchase "
|
|
655
655
|
"again."
|
|
656
656
|
msgstr ""
|
|
657
657
|
|
|
658
|
-
#: src/modal-checkout/templates/thankyou.php:
|
|
658
|
+
#: src/modal-checkout/templates/thankyou.php:81
|
|
659
659
|
msgid "Pay"
|
|
660
660
|
msgstr ""
|
|
661
661
|
|
|
662
|
-
#: src/modal-checkout/templates/thankyou.php:
|
|
662
|
+
#: src/modal-checkout/templates/thankyou.php:83
|
|
663
663
|
msgid "My account"
|
|
664
664
|
msgstr ""
|
|
665
665
|
|
|
@@ -2,7 +2,7 @@ msgid ""
|
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Newspack Blocks 1.0.0-alpha.25\n"
|
|
4
4
|
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/project\n"
|
|
5
|
-
"POT-Creation-Date: 2025-
|
|
5
|
+
"POT-Creation-Date: 2025-12-03T17:31:19+00:00\n"
|
|
6
6
|
"PO-Revision-Date: 2024-08-30 08:46-0700\n"
|
|
7
7
|
"Last-Translator: \n"
|
|
8
8
|
"Language-Team: \n"
|
|
@@ -486,24 +486,24 @@ msgid "Subscribe Pattern 7"
|
|
|
486
486
|
msgstr ""
|
|
487
487
|
|
|
488
488
|
#. translators: %d: Slide number.
|
|
489
|
-
#: src/blocks/carousel/view.php:
|
|
489
|
+
#: src/blocks/carousel/view.php:227
|
|
490
490
|
#, php-format
|
|
491
491
|
msgid "Go to slide %d"
|
|
492
492
|
msgstr "Allez à la diapositive %d"
|
|
493
493
|
|
|
494
|
-
#: src/blocks/carousel/view.php:
|
|
494
|
+
#: src/blocks/carousel/view.php:248
|
|
495
495
|
msgid "Previous Slide"
|
|
496
496
|
msgstr "Diapositive précédente"
|
|
497
497
|
|
|
498
|
-
#: src/blocks/carousel/view.php:
|
|
498
|
+
#: src/blocks/carousel/view.php:249
|
|
499
499
|
msgid "Next Slide"
|
|
500
500
|
msgstr "Diapositive suivante"
|
|
501
501
|
|
|
502
|
-
#: src/blocks/carousel/view.php:
|
|
502
|
+
#: src/blocks/carousel/view.php:293
|
|
503
503
|
msgid "Pause Slideshow"
|
|
504
504
|
msgstr "Mettre le diaporama en pause"
|
|
505
505
|
|
|
506
|
-
#: src/blocks/carousel/view.php:
|
|
506
|
+
#: src/blocks/carousel/view.php:294
|
|
507
507
|
msgid "Play Slideshow"
|
|
508
508
|
msgstr "Démarrer le diaporama"
|
|
509
509
|
|
|
@@ -648,17 +648,17 @@ msgstr ""
|
|
|
648
648
|
msgid "Recipient: "
|
|
649
649
|
msgstr ""
|
|
650
650
|
|
|
651
|
-
#: src/modal-checkout/templates/thankyou.php:
|
|
651
|
+
#: src/modal-checkout/templates/thankyou.php:78
|
|
652
652
|
msgid ""
|
|
653
653
|
"Unfortunately your order cannot be processed. Please attempt your purchase "
|
|
654
654
|
"again."
|
|
655
655
|
msgstr ""
|
|
656
656
|
|
|
657
|
-
#: src/modal-checkout/templates/thankyou.php:
|
|
657
|
+
#: src/modal-checkout/templates/thankyou.php:81
|
|
658
658
|
msgid "Pay"
|
|
659
659
|
msgstr ""
|
|
660
660
|
|
|
661
|
-
#: src/modal-checkout/templates/thankyou.php:
|
|
661
|
+
#: src/modal-checkout/templates/thankyou.php:83
|
|
662
662
|
msgid "My account"
|
|
663
663
|
msgstr ""
|
|
664
664
|
|
|
@@ -2,7 +2,7 @@ msgid ""
|
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Newspack Blocks 1.0.0-alpha.20\n"
|
|
4
4
|
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/project\n"
|
|
5
|
-
"POT-Creation-Date: 2025-
|
|
5
|
+
"POT-Creation-Date: 2025-12-03T17:31:19+00:00\n"
|
|
6
6
|
"PO-Revision-Date: 2024-08-30 08:46-0700\n"
|
|
7
7
|
"Last-Translator: \n"
|
|
8
8
|
"Language-Team: \n"
|
|
@@ -486,24 +486,24 @@ msgid "Subscribe Pattern 7"
|
|
|
486
486
|
msgstr ""
|
|
487
487
|
|
|
488
488
|
#. translators: %d: Slide number.
|
|
489
|
-
#: src/blocks/carousel/view.php:
|
|
489
|
+
#: src/blocks/carousel/view.php:227
|
|
490
490
|
#, php-format
|
|
491
491
|
msgid "Go to slide %d"
|
|
492
492
|
msgstr ""
|
|
493
493
|
|
|
494
|
-
#: src/blocks/carousel/view.php:
|
|
494
|
+
#: src/blocks/carousel/view.php:248
|
|
495
495
|
msgid "Previous Slide"
|
|
496
496
|
msgstr ""
|
|
497
497
|
|
|
498
|
-
#: src/blocks/carousel/view.php:
|
|
498
|
+
#: src/blocks/carousel/view.php:249
|
|
499
499
|
msgid "Next Slide"
|
|
500
500
|
msgstr ""
|
|
501
501
|
|
|
502
|
-
#: src/blocks/carousel/view.php:
|
|
502
|
+
#: src/blocks/carousel/view.php:293
|
|
503
503
|
msgid "Pause Slideshow"
|
|
504
504
|
msgstr ""
|
|
505
505
|
|
|
506
|
-
#: src/blocks/carousel/view.php:
|
|
506
|
+
#: src/blocks/carousel/view.php:294
|
|
507
507
|
msgid "Play Slideshow"
|
|
508
508
|
msgstr ""
|
|
509
509
|
|
|
@@ -647,17 +647,17 @@ msgstr ""
|
|
|
647
647
|
msgid "Recipient: "
|
|
648
648
|
msgstr ""
|
|
649
649
|
|
|
650
|
-
#: src/modal-checkout/templates/thankyou.php:
|
|
650
|
+
#: src/modal-checkout/templates/thankyou.php:78
|
|
651
651
|
msgid ""
|
|
652
652
|
"Unfortunately your order cannot be processed. Please attempt your purchase "
|
|
653
653
|
"again."
|
|
654
654
|
msgstr ""
|
|
655
655
|
|
|
656
|
-
#: src/modal-checkout/templates/thankyou.php:
|
|
656
|
+
#: src/modal-checkout/templates/thankyou.php:81
|
|
657
657
|
msgid "Pay"
|
|
658
658
|
msgstr ""
|
|
659
659
|
|
|
660
|
-
#: src/modal-checkout/templates/thankyou.php:
|
|
660
|
+
#: src/modal-checkout/templates/thankyou.php:83
|
|
661
661
|
msgid "My account"
|
|
662
662
|
msgstr ""
|
|
663
663
|
|
|
@@ -2,7 +2,7 @@ msgid ""
|
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Newspack Blocks 1.0.0-alpha.25\n"
|
|
4
4
|
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/project\n"
|
|
5
|
-
"POT-Creation-Date: 2025-
|
|
5
|
+
"POT-Creation-Date: 2025-12-03T17:31:19+00:00\n"
|
|
6
6
|
"PO-Revision-Date: 2024-08-30 08:46-0700\n"
|
|
7
7
|
"Last-Translator: \n"
|
|
8
8
|
"Language-Team: \n"
|
|
@@ -486,24 +486,24 @@ msgid "Subscribe Pattern 7"
|
|
|
486
486
|
msgstr ""
|
|
487
487
|
|
|
488
488
|
#. translators: %d: Slide number.
|
|
489
|
-
#: src/blocks/carousel/view.php:
|
|
489
|
+
#: src/blocks/carousel/view.php:227
|
|
490
490
|
#, php-format
|
|
491
491
|
msgid "Go to slide %d"
|
|
492
492
|
msgstr ""
|
|
493
493
|
|
|
494
|
-
#: src/blocks/carousel/view.php:
|
|
494
|
+
#: src/blocks/carousel/view.php:248
|
|
495
495
|
msgid "Previous Slide"
|
|
496
496
|
msgstr "Slide Anterior"
|
|
497
497
|
|
|
498
|
-
#: src/blocks/carousel/view.php:
|
|
498
|
+
#: src/blocks/carousel/view.php:249
|
|
499
499
|
msgid "Next Slide"
|
|
500
500
|
msgstr "Próximo Slide"
|
|
501
501
|
|
|
502
|
-
#: src/blocks/carousel/view.php:
|
|
502
|
+
#: src/blocks/carousel/view.php:293
|
|
503
503
|
msgid "Pause Slideshow"
|
|
504
504
|
msgstr "Pausa na apresentação"
|
|
505
505
|
|
|
506
|
-
#: src/blocks/carousel/view.php:
|
|
506
|
+
#: src/blocks/carousel/view.php:294
|
|
507
507
|
msgid "Play Slideshow"
|
|
508
508
|
msgstr ""
|
|
509
509
|
|
|
@@ -647,17 +647,17 @@ msgstr ""
|
|
|
647
647
|
msgid "Recipient: "
|
|
648
648
|
msgstr ""
|
|
649
649
|
|
|
650
|
-
#: src/modal-checkout/templates/thankyou.php:
|
|
650
|
+
#: src/modal-checkout/templates/thankyou.php:78
|
|
651
651
|
msgid ""
|
|
652
652
|
"Unfortunately your order cannot be processed. Please attempt your purchase "
|
|
653
653
|
"again."
|
|
654
654
|
msgstr ""
|
|
655
655
|
|
|
656
|
-
#: src/modal-checkout/templates/thankyou.php:
|
|
656
|
+
#: src/modal-checkout/templates/thankyou.php:81
|
|
657
657
|
msgid "Pay"
|
|
658
658
|
msgstr ""
|
|
659
659
|
|
|
660
|
-
#: src/modal-checkout/templates/thankyou.php:
|
|
660
|
+
#: src/modal-checkout/templates/thankyou.php:83
|
|
661
661
|
msgid "My account"
|
|
662
662
|
msgstr ""
|
|
663
663
|
|
|
@@ -9,7 +9,7 @@ msgstr ""
|
|
|
9
9
|
"MIME-Version: 1.0\n"
|
|
10
10
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
11
11
|
"Content-Transfer-Encoding: 8bit\n"
|
|
12
|
-
"POT-Creation-Date: 2025-
|
|
12
|
+
"POT-Creation-Date: 2025-12-03T17:31:19+00:00\n"
|
|
13
13
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
14
14
|
"X-Generator: WP-CLI 2.12.0\n"
|
|
15
15
|
"X-Domain: newspack-blocks\n"
|
|
@@ -480,24 +480,24 @@ msgid "Subscribe Pattern 7"
|
|
|
480
480
|
msgstr ""
|
|
481
481
|
|
|
482
482
|
#. translators: %d: Slide number.
|
|
483
|
-
#: src/blocks/carousel/view.php:
|
|
483
|
+
#: src/blocks/carousel/view.php:227
|
|
484
484
|
#, php-format
|
|
485
485
|
msgid "Go to slide %d"
|
|
486
486
|
msgstr ""
|
|
487
487
|
|
|
488
|
-
#: src/blocks/carousel/view.php:
|
|
488
|
+
#: src/blocks/carousel/view.php:248
|
|
489
489
|
msgid "Previous Slide"
|
|
490
490
|
msgstr ""
|
|
491
491
|
|
|
492
|
-
#: src/blocks/carousel/view.php:
|
|
492
|
+
#: src/blocks/carousel/view.php:249
|
|
493
493
|
msgid "Next Slide"
|
|
494
494
|
msgstr ""
|
|
495
495
|
|
|
496
|
-
#: src/blocks/carousel/view.php:
|
|
496
|
+
#: src/blocks/carousel/view.php:293
|
|
497
497
|
msgid "Pause Slideshow"
|
|
498
498
|
msgstr ""
|
|
499
499
|
|
|
500
|
-
#: src/blocks/carousel/view.php:
|
|
500
|
+
#: src/blocks/carousel/view.php:294
|
|
501
501
|
msgid "Play Slideshow"
|
|
502
502
|
msgstr ""
|
|
503
503
|
|
|
@@ -638,15 +638,15 @@ msgstr ""
|
|
|
638
638
|
msgid "Recipient: "
|
|
639
639
|
msgstr ""
|
|
640
640
|
|
|
641
|
-
#: src/modal-checkout/templates/thankyou.php:
|
|
641
|
+
#: src/modal-checkout/templates/thankyou.php:78
|
|
642
642
|
msgid "Unfortunately your order cannot be processed. Please attempt your purchase again."
|
|
643
643
|
msgstr ""
|
|
644
644
|
|
|
645
|
-
#: src/modal-checkout/templates/thankyou.php:
|
|
645
|
+
#: src/modal-checkout/templates/thankyou.php:81
|
|
646
646
|
msgid "Pay"
|
|
647
647
|
msgstr ""
|
|
648
648
|
|
|
649
|
-
#: src/modal-checkout/templates/thankyou.php:
|
|
649
|
+
#: src/modal-checkout/templates/thankyou.php:83
|
|
650
650
|
msgid "My account"
|
|
651
651
|
msgstr ""
|
|
652
652
|
|
package/newspack-blocks.php
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Author URI: https://newspack.com/
|
|
8
8
|
* Text Domain: newspack-blocks
|
|
9
9
|
* Domain Path: /languages
|
|
10
|
-
* Version: 4.
|
|
10
|
+
* Version: 4.20.0
|
|
11
11
|
*
|
|
12
12
|
* @package Newspack_Blocks
|
|
13
13
|
*/
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
define( 'NEWSPACK_BLOCKS__PLUGIN_FILE', __FILE__ );
|
|
16
16
|
define( 'NEWSPACK_BLOCKS__BLOCKS_DIRECTORY', 'dist/' );
|
|
17
17
|
define( 'NEWSPACK_BLOCKS__PLUGIN_DIR', plugin_dir_path( NEWSPACK_BLOCKS__PLUGIN_FILE ) );
|
|
18
|
-
define( 'NEWSPACK_BLOCKS__VERSION', '4.
|
|
18
|
+
define( 'NEWSPACK_BLOCKS__VERSION', '4.20.0' );
|
|
19
19
|
|
|
20
20
|
require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks.php';
|
|
21
21
|
require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks-api.php';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/newspack-blocks",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.20.0",
|
|
4
4
|
"author": "Automattic",
|
|
5
5
|
"description": "=== Newspack Blocks === Contributors: (this should be a list of wordpress.org userid's) Donate link: https://example.com/ Tags: comments, spam Requires at least: 4.5 Tested up to: 5.1.1 Stable tag: 0.1.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html",
|
|
6
6
|
"repository": {
|
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
* @return string Returns the post content with latest posts added.
|
|
14
14
|
*/
|
|
15
15
|
function newspack_blocks_render_block_carousel( $attributes ) {
|
|
16
|
+
|
|
17
|
+
// Don't output the block inside RSS feeds.
|
|
18
|
+
if ( is_feed() ) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
|
|
16
22
|
static $newspack_blocks_carousel_id = 0;
|
|
17
23
|
global $newspack_blocks_post_id;
|
|
18
24
|
|
|
@@ -29,63 +29,59 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
|
29
29
|
* order-received.php template with an order details summary so the experience
|
|
30
30
|
* matches whether or not the email address used is already associated with an
|
|
31
31
|
* existing customer account.
|
|
32
|
+
* phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
|
|
32
33
|
*/
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
$key = isset( $_GET['key'] ) ? \wc_clean( \sanitize_text_field( \wp_unslash( $_GET['key'] ) ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
|
36
|
-
$is_valid = $order && is_a( $order, 'WC_Order' ) && hash_equals( $order->get_order_key(), $key ); // Validate order key to prevent CSRF.
|
|
34
|
+
$key = isset( $_GET['key'] ) ? \wc_clean( \sanitize_text_field( \wp_unslash( $_GET['key'] ) ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
|
35
|
+
$is_valid = $order && is_a( $order, 'WC_Order' ) && hash_equals( $order->get_order_key(), $key ); // Validate order key to prevent CSRF.
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
$is_success = ! $order->has_status( 'failed' );
|
|
43
|
-
$after_success_behavior = isset( $_GET['after_success_behavior'] ) ? \sanitize_text_field( \wp_unslash( $_GET['after_success_behavior'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
|
44
|
-
$after_success_url = isset( $_GET['after_success_url'] ) ? esc_url( \sanitize_url( \wp_unslash( $_GET['after_success_url'] ) ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
|
45
|
-
$after_success_label = isset( $_GET['after_success_button_label'] ) ? \sanitize_text_field( \wp_unslash( $_GET['after_success_button_label'] ) ) : \Newspack_Blocks\Modal_Checkout::get_modal_checkout_labels( 'after_success' ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
|
46
|
-
$checkout_data = Checkout_Data::get_checkout_data( $order );
|
|
47
|
-
?>
|
|
48
|
-
<div class="woocommerce-order">
|
|
49
|
-
<?php if ( $is_success ) : ?>
|
|
50
|
-
<div class="newspack-ui__box newspack-ui__box--success newspack-ui__box--text-center">
|
|
51
|
-
<span class="newspack-ui__icon newspack-ui__icon--success">
|
|
52
|
-
<?php // TODO: Replace with newspack-ui icons when available. ?>
|
|
53
|
-
<svg aria-hidden="true" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
54
|
-
<path d="M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"></path>
|
|
55
|
-
</svg>
|
|
56
|
-
</span>
|
|
57
|
-
<p id="modal-checkout-product-details" data-checkout='<?php echo wp_json_encode( $checkout_data ); ?>'>
|
|
58
|
-
<strong>
|
|
59
|
-
<?php
|
|
60
|
-
echo esc_html( Modal_Checkout::get_post_checkout_success_text() );
|
|
61
|
-
?>
|
|
62
|
-
</strong>
|
|
63
|
-
</p>
|
|
64
|
-
</div>
|
|
65
|
-
<form>
|
|
66
|
-
<?php if ( $after_success_behavior ) : ?>
|
|
67
|
-
<input type="hidden" name="after_success_behavior" value="<?php echo esc_attr( $after_success_behavior ); ?>">
|
|
68
|
-
<?php endif; ?>
|
|
69
|
-
<?php if ( $after_success_behavior ) : ?>
|
|
70
|
-
<input type="hidden" name="after_success_url" value="<?php echo esc_attr( $after_success_url ); ?>">
|
|
71
|
-
<?php endif; ?>
|
|
72
|
-
<button class="newspack-ui__button newspack-ui__button--primary newspack-ui__button--wide" id="checkout-after-success" onclick="parent.newspackCloseModalCheckout();">
|
|
73
|
-
<?php echo esc_html( $after_success_label ); ?>
|
|
74
|
-
</button>
|
|
75
|
-
</form>
|
|
76
|
-
<?php else : ?>
|
|
77
|
-
<div class="newspack-ui__box newspack-ui__box__error newspack-ui__box--text-center">
|
|
78
|
-
<p>
|
|
79
|
-
<?php esc_html_e( 'Unfortunately your order cannot be processed. Please attempt your purchase again.', 'newspack-blocks' ); ?>
|
|
80
|
-
</p>
|
|
81
|
-
</div>
|
|
82
|
-
<a href="<?php echo esc_url( $order->get_checkout_payment_url() ); ?>" class="newspack-blocks-ui__button newspack-ui__button--primary newspack-ui__button--wide"><?php esc_html_e( 'Pay', 'newspack-blocks' ); ?></a>
|
|
83
|
-
<?php if ( is_user_logged_in() ) : ?>
|
|
84
|
-
<a href="<?php echo esc_url( wc_get_page_permalink( 'myaccount' ) ); ?>" class="newspack-blocks-ui__button newspack-ui__button--ghost newspack-ui__button--wide"><?php esc_html_e( 'My account', 'newspack-blocks' ); ?></a>
|
|
85
|
-
<?php endif; ?>
|
|
86
|
-
<?php
|
|
87
|
-
endif;
|
|
88
|
-
do_action( 'newpack_blocks_modal_checkout_thankyou' );
|
|
37
|
+
if ( ! $is_valid ) {
|
|
38
|
+
return;
|
|
89
39
|
}
|
|
90
40
|
|
|
91
|
-
|
|
41
|
+
$is_success = ! $order->has_status( 'failed' );
|
|
42
|
+
$after_success_behavior = isset( $_GET['after_success_behavior'] ) ? \sanitize_text_field( \wp_unslash( $_GET['after_success_behavior'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
|
43
|
+
$after_success_url = isset( $_GET['after_success_url'] ) ? esc_url( \sanitize_url( \wp_unslash( $_GET['after_success_url'] ) ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
|
44
|
+
$after_success_label = isset( $_GET['after_success_button_label'] ) ? \sanitize_text_field( \wp_unslash( $_GET['after_success_button_label'] ) ) : \Newspack_Blocks\Modal_Checkout::get_modal_checkout_labels( 'after_success' ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
|
45
|
+
$checkout_data = Checkout_Data::get_checkout_data( $order );
|
|
46
|
+
?>
|
|
47
|
+
<div class="woocommerce-order">
|
|
48
|
+
<?php if ( $is_success ) : ?>
|
|
49
|
+
<div class="newspack-ui__box newspack-ui__box--success newspack-ui__box--text-center">
|
|
50
|
+
<span class="newspack-ui__icon newspack-ui__icon--success">
|
|
51
|
+
<?php // TODO: Replace with newspack-ui icons when available. ?>
|
|
52
|
+
<svg aria-hidden="true" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
53
|
+
<path d="M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"></path>
|
|
54
|
+
</svg>
|
|
55
|
+
</span>
|
|
56
|
+
<p id="modal-checkout-product-details" data-checkout='<?php echo wp_json_encode( $checkout_data ); ?>'>
|
|
57
|
+
<strong>
|
|
58
|
+
<?php
|
|
59
|
+
echo esc_html( Modal_Checkout::get_post_checkout_success_text() );
|
|
60
|
+
?>
|
|
61
|
+
</strong>
|
|
62
|
+
</p>
|
|
63
|
+
</div>
|
|
64
|
+
<form>
|
|
65
|
+
<?php if ( $after_success_behavior ) : ?>
|
|
66
|
+
<input type="hidden" name="after_success_behavior" value="<?php echo esc_attr( $after_success_behavior ); ?>">
|
|
67
|
+
<?php endif; ?>
|
|
68
|
+
<?php if ( $after_success_behavior ) : ?>
|
|
69
|
+
<input type="hidden" name="after_success_url" value="<?php echo esc_attr( $after_success_url ); ?>">
|
|
70
|
+
<?php endif; ?>
|
|
71
|
+
<button class="newspack-ui__button newspack-ui__button--primary newspack-ui__button--wide" id="checkout-after-success" onclick="parent.newspackCloseModalCheckout();">
|
|
72
|
+
<?php echo esc_html( $after_success_label ); ?>
|
|
73
|
+
</button>
|
|
74
|
+
</form>
|
|
75
|
+
<?php else : ?>
|
|
76
|
+
<div class="newspack-ui__box newspack-ui__box__error newspack-ui__box--text-center">
|
|
77
|
+
<p>
|
|
78
|
+
<?php esc_html_e( 'Unfortunately your order cannot be processed. Please attempt your purchase again.', 'newspack-blocks' ); ?>
|
|
79
|
+
</p>
|
|
80
|
+
</div>
|
|
81
|
+
<a href="<?php echo esc_url( $order->get_checkout_payment_url() ); ?>" class="newspack-blocks-ui__button newspack-ui__button--primary newspack-ui__button--wide"><?php esc_html_e( 'Pay', 'newspack-blocks' ); ?></a>
|
|
82
|
+
<?php if ( is_user_logged_in() ) : ?>
|
|
83
|
+
<a href="<?php echo esc_url( wc_get_page_permalink( 'myaccount' ) ); ?>" class="newspack-blocks-ui__button newspack-ui__button--ghost newspack-ui__button--wide"><?php esc_html_e( 'My account', 'newspack-blocks' ); ?></a>
|
|
84
|
+
<?php endif; ?>
|
|
85
|
+
<?php
|
|
86
|
+
endif;
|
|
87
|
+
do_action( 'newpack_blocks_modal_checkout_thankyou' );
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
'name' => 'automattic/newspack-blocks',
|
|
4
4
|
'pretty_version' => 'dev-trunk',
|
|
5
5
|
'version' => 'dev-trunk',
|
|
6
|
-
'reference' => '
|
|
6
|
+
'reference' => '3c63c5a6c937d11a6ce0cd7670e0c3f099f8856f',
|
|
7
7
|
'type' => 'wordpress-plugin',
|
|
8
8
|
'install_path' => __DIR__ . '/../../',
|
|
9
9
|
'aliases' => array(),
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
'automattic/newspack-blocks' => array(
|
|
14
14
|
'pretty_version' => 'dev-trunk',
|
|
15
15
|
'version' => 'dev-trunk',
|
|
16
|
-
'reference' => '
|
|
16
|
+
'reference' => '3c63c5a6c937d11a6ce0cd7670e0c3f099f8856f',
|
|
17
17
|
'type' => 'wordpress-plugin',
|
|
18
18
|
'install_path' => __DIR__ . '/../../',
|
|
19
19
|
'aliases' => array(),
|