Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ras-acc): add reader account creation and login improvements #3582

Merged
merged 354 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
354 commits
Select commit Hold shift + click to select a range
ad5d911
feat: update buttons and add destructive
thomasguillot Apr 18, 2024
71490d6
feat: add outline class to button
thomasguillot Apr 18, 2024
59e2362
fix: wrong classes
thomasguillot Apr 18, 2024
b5ade4f
feat(ras-acc): add subscription cancellation email template (#3056)
chickenn00dle Apr 18, 2024
6a2d731
feat: add Button icon
thomasguillot Apr 18, 2024
0dfcd18
fix: modal header stickyness
thomasguillot Apr 18, 2024
58424b9
feat(ras-acc): dynamically set otp email text color (#3033)
chickenn00dle Apr 18, 2024
2ee4d9d
fix(demo): modal class width
thomasguillot Apr 18, 2024
bccb560
feat(ras-acc): add faq section to otp email (#3034)
chickenn00dle Apr 18, 2024
731eed2
fix: add baseline line height
laurelfulford Apr 19, 2024
75bd158
fix: add blanket fixed layout to tables for cell width consistency
laurelfulford Apr 19, 2024
9e7bdd4
feat: update icon button, update button classes, fix helper text
laurelfulford Apr 19, 2024
507fd5a
feat(ras-acc): make auth flow UI text filterable (#3070)
chickenn00dle Apr 20, 2024
130b79a
feat: merge in updates from epic/ras-acc
laurelfulford Apr 21, 2024
8e78408
Merge pull request #3037 from Automattic/feat/update-ui-components-co…
laurelfulford Apr 24, 2024
153e596
Merge branch 'trunk' into epic/ras-acc
dkoo Apr 24, 2024
1570790
feat(ras-acc): update all transactional email template designs (#3075)
chickenn00dle Apr 25, 2024
0a4f253
Merge branch 'trunk' into epic/ras-acc
chickenn00dle Apr 25, 2024
169e784
feat: update error state, form labels, checkbox layouts, and demo con…
laurelfulford Apr 25, 2024
a3094af
feat: re-add button example I accidentally removed
laurelfulford Apr 25, 2024
f3b717b
feat: build out more woo override styles
laurelfulford Apr 25, 2024
41a60ea
feat: rename 'badge' element and break into own SCSS file
laurelfulford Apr 25, 2024
78d4659
fix: correcting some vertical spacing issues
laurelfulford Apr 25, 2024
8c1a9b1
feat: update badge styles
laurelfulford Apr 25, 2024
381b785
feat: add "default" style to badge and fix outline
thomasguillot Apr 26, 2024
fb5d4c5
fix: text gray
thomasguillot Apr 26, 2024
55136c2
feat: adjust some spacing, font styles
laurelfulford May 8, 2024
54fd12e
feat: make button styles more specific
laurelfulford May 8, 2024
0f66bf5
feat: update variation styles
laurelfulford May 9, 2024
7be8adb
feat: add mixin for media queries
laurelfulford May 10, 2024
007763d
feat: fixing some spacing issues
laurelfulford May 13, 2024
790b903
fix: update privacy policy text
laurelfulford May 14, 2024
995fbc5
feat: add segment control
laurelfulford May 14, 2024
ace1946
feat: add different styles for small, medium icon buttons
laurelfulford May 14, 2024
9052168
feat: add loading styles
laurelfulford May 14, 2024
476043f
fix: roll back Google icon
laurelfulford May 14, 2024
a1dd13f
feat: tweak segment control styles
laurelfulford May 15, 2024
6782be0
Merge branch 'feat/additional-button-styles' of github.com:Automattic…
laurelfulford May 15, 2024
96f7cd2
feat: make sales price absolutely positioned
laurelfulford May 15, 2024
4080242
feat: consolidate Newspack UI SVGs
laurelfulford May 15, 2024
5cbc335
feat: consolidate Newspack UI SVGs
laurelfulford May 15, 2024
d80f087
Merge pull request #3091 from Automattic/feat/components-update-ii
laurelfulford May 16, 2024
a5cecff
chore: update from the epic branch
laurelfulford May 16, 2024
98e1172
feat: update markup to match component updates
laurelfulford May 16, 2024
0810ec9
Merge branch 'epic/ras-acc' into feat/basic-svg-system
laurelfulford May 16, 2024
3c750d0
Merge branch 'epic/ras-acc' into feat/variable-product-styles
laurelfulford May 16, 2024
4ddeff6
feat: updating line height, spacing
laurelfulford May 16, 2024
66e3548
fix: correct line-height for h2 and h3
thomasguillot May 17, 2024
434e9ad
fix: remove text colour style
laurelfulford May 17, 2024
6d0bdbd
Merge pull request #3107 from Automattic/feat/variable-product-styles
laurelfulford May 17, 2024
9558443
fix: spinner/loading
thomasguillot May 18, 2024
628f1fe
fix: input wrong padding
thomasguillot May 18, 2024
cb3462f
feat: add 2xs border-radius
thomasguillot May 18, 2024
031a11c
fix: svg missing colour (block theme)
thomasguillot May 18, 2024
5edf83b
feat: update segmented control button hover/focus styles
thomasguillot May 18, 2024
4ef953e
feat(ras-acc): use newsletters subscription lists setting to manage p…
chickenn00dle May 20, 2024
3232c1a
Merge pull request #3114 from Automattic/feat/additional-button-styles
laurelfulford May 20, 2024
a8a1f19
feat(ras-acc): update newsletters palette on theme primary color upda…
chickenn00dle May 20, 2024
50052f6
feat: merge in epic branch and tidy
laurelfulford May 21, 2024
9560d70
feat: update fonts; tweak woo styles
laurelfulford May 21, 2024
583aefe
ci: always build distributable
adekbadek May 22, 2024
45919d4
Merge branch 'trunk' into epic/ras-acc
laurelfulford May 22, 2024
ddd82b5
fix: correcting style linting error
laurelfulford May 22, 2024
4a4fa4e
fix: tweaking button, woo spacing issues
laurelfulford May 23, 2024
671256c
fix: avoid resetting modal config via #register_modal hash from insid…
dkoo May 23, 2024
fb896cd
feat: cleaning up some ui elements
laurelfulford May 23, 2024
e935821
fix: make close button spacing more specific
laurelfulford May 24, 2024
437ca6f
fix: make close button spacing more specific
laurelfulford May 24, 2024
300d0ed
fix(ras-acc): handle cancelled accounts with active subs (#3133)
chickenn00dle May 24, 2024
fd405c1
feat: update Newspack UI font to Inter
laurelfulford May 24, 2024
3b356fe
Merge pull request #3135 from Automattic/fix/register-hash-inside-aut…
dkoo May 24, 2024
f4ce86a
feat: update select2 styles
laurelfulford May 24, 2024
7d12f68
fix: disable body scroll when auth modal is open (#3134)
chickenn00dle May 29, 2024
b5ab80c
Merge branch 'trunk' into epic/ras-acc
laurelfulford May 29, 2024
c636318
chore: fixing linting errors
laurelfulford May 29, 2024
15e6df0
Merge pull request #3118 from Automattic/feat/basic-svg-system
laurelfulford May 29, 2024
deee7ed
fix: correct Google login button styles
laurelfulford May 29, 2024
d5621e6
fix: correct checkbox, radio focus styles
laurelfulford May 29, 2024
c02b739
Merge pull request #3149 from Automattic/fix/correct-display-issues
laurelfulford May 30, 2024
487c7e4
Merge branch 'epic/ras-acc' into fix/misc-ui-tweaks
laurelfulford May 30, 2024
9549d73
fix: correct coupon error spacing
laurelfulford May 30, 2024
6dd645c
Merge pull request #3130 from Automattic/fix/misc-ui-tweaks
laurelfulford May 31, 2024
245f675
fix: remove product variation styles
laurelfulford May 31, 2024
ab00ef3
fix: move WC styles to the newspack block plugin
laurelfulford May 31, 2024
4937b82
fix: move WC styles to the newspack block plugin
laurelfulford Jun 1, 2024
0474ec5
feat: improving keyboard navigation
laurelfulford Jun 3, 2024
da61f0b
feat(ras-acc): add standalone newsletter signup form (#3120)
chickenn00dle Jun 5, 2024
412c4a0
Merge branch 'trunk' into epic/ras-acc
laurelfulford Jun 5, 2024
9dbd0c3
Merge branch 'epic/ras-acc' of github.com:Automattic/newspack-plugin …
laurelfulford Jun 5, 2024
25acc5e
Merge branch 'epic/ras-acc' into feat/accessibility-improvements-2
laurelfulford Jun 5, 2024
d93ac01
Merge pull request #3158 from Automattic/fix/reorg-checkout-styles
laurelfulford Jun 6, 2024
1ef109d
Merge branch 'epic/ras-acc' into feat/accessibility-improvements-2
laurelfulford Jun 6, 2024
5ce87ee
Merge branch 'trunk' into epic/ras-acc
laurelfulford Jun 12, 2024
830843f
Merge branch 'trunk' into epic/ras-acc
chickenn00dle Jun 19, 2024
8289ff0
fix(ras-acc): fix incorrect closing tag (#3189)
chickenn00dle Jun 19, 2024
65db746
Merge branch 'epic/ras-acc' into feat/accessibility-improvements-2
laurelfulford Jun 21, 2024
8e80f37
Merge branch 'trunk' into epic/ras-acc
laurelfulford Jun 26, 2024
21bcfd0
feat(ras-acc) add welcome email template for checkout registration (#…
chickenn00dle Jun 26, 2024
e59e1eb
feat: focus back on button that opened modal
laurelfulford Jun 27, 2024
3a61562
feat: get focus working for OTP screen
laurelfulford Jun 27, 2024
079f033
Merge branch 'epic/ras-acc' into feat/accessibility-improvements-2
laurelfulford Jun 27, 2024
4d92bf4
feat(ras-acc): remain on current page after signin via account link (…
chickenn00dle Jun 28, 2024
8d92798
chore: merge trunk into epic/ras-acc (#3220)
chickenn00dle Jul 8, 2024
3725542
fix: merge conflicts w/ `trunk` (#3234)
dkoo Jul 10, 2024
d8d457e
feat(ras-acc): add notice styles to newspack ui (#3235)
chickenn00dle Jul 11, 2024
40c7800
fix: merge trunk into epic/ras-acc
laurelfulford Jul 11, 2024
4b08067
Merge pull request #3239 from Automattic/fix/merge-in-trunk
laurelfulford Jul 12, 2024
2567cd2
fix: reader registration empty div styles applying outside block (#3252)
chickenn00dle Jul 17, 2024
e834ba4
Merge branch 'trunk' into epic/ras-acc
chickenn00dle Jul 17, 2024
f24538a
Merge branch 'epic/ras-acc' into feat/accessibility-improvements-2
laurelfulford Jul 23, 2024
7ec42e1
Merge branch 'trunk' into epic/ras-acc
laurelfulford Jul 24, 2024
36399b3
fix(ras-acc): update auth modal button spacing (#3267)
chickenn00dle Jul 24, 2024
20f7597
fix(ras-acc): qa testing design feedback (#3266)
chickenn00dle Jul 24, 2024
5be703b
fix(ras-acc): add newsletter modal to register flow (#3269)
chickenn00dle Jul 24, 2024
db105dc
fix(ras-acc): correctly update myaccount link after signing in (#3271)
chickenn00dle Jul 24, 2024
53a772a
fix(ras-acc): adjust newsletters modal spacing and always display ema…
chickenn00dle Jul 26, 2024
a4553d5
Merge branch 'trunk' into epic/ras-acc
dkoo Jul 26, 2024
6439079
chore: remove duplicate files that were moved and renamed to auth-form
dkoo Jul 26, 2024
ff14fab
fix(ras-acc): handle invalid removechild js error (#3281)
chickenn00dle Jul 29, 2024
733d5cb
fix(ras-acc): correctly render auth modal response message and succes…
chickenn00dle Jul 29, 2024
311665d
fix(ras-acc): redirect to homepage after logging out via my account (…
chickenn00dle Jul 29, 2024
68077ea
fix: set max width for in-page sign-in form
laurelfulford Jul 29, 2024
be41225
Merge pull request #3292 from Automattic/fix/registration-max-width-r…
laurelfulford Jul 29, 2024
08030f0
fix: fix order of elements in registration block
laurelfulford Jul 29, 2024
c0c45c0
fix: update block order in editor
laurelfulford Jul 29, 2024
e88f754
Merge pull request #3293 from Automattic/fix/reorder-block
laurelfulford Jul 30, 2024
78b670e
feat: start ga4 events fresh
laurelfulford Jul 31, 2024
d96b18d
fix(ras-acc): handle content gate auth checkout flow (#3294)
chickenn00dle Jul 31, 2024
4e049d3
Merge branch 'trunk' into epic/ras-acc
chickenn00dle Jul 31, 2024
9cb1c4b
feat: add heading to inline sign-in form
laurelfulford Aug 1, 2024
380fa3d
fix(ras-acc): recognize active non release newspack plugins (#3300)
chickenn00dle Aug 2, 2024
33cb637
fix(ras-acc): ensure all headings are 600 font weight (#3296)
chickenn00dle Aug 2, 2024
0ee55c1
Merge branch 'epic/ras-acc' into feat/ga4-events-redo
laurelfulford Aug 2, 2024
f70a4b9
fix: apply code feedback
laurelfulford Aug 2, 2024
d20f85f
Merge pull request #3301 from Automattic/feat/add-loginpage-header
laurelfulford Aug 2, 2024
33bd3ba
fix: update max-height for modal styles
laurelfulford Aug 6, 2024
4f160f1
fix: remove nowrap from tables
laurelfulford Aug 6, 2024
1c55a38
fix: tweak approach and get rid of errors
laurelfulford Aug 6, 2024
7500c2b
Merge branch 'epic/ras-acc' into feat/ga4-events-redo
laurelfulford Aug 7, 2024
afd4ab5
fix: tweak approach and get rid of errors
laurelfulford Aug 7, 2024
8883244
refactor(modal-checkout): move front-end GA4 events to Blocks repo
dkoo Aug 7, 2024
05c16da
Merge pull request #3317 from Automattic/fix/transaction-details-table
laurelfulford Aug 8, 2024
9f41014
Merge pull request #3318 from Automattic/fix/hide-create-account-error
laurelfulford Aug 8, 2024
192420b
Merge branch 'trunk' into fix/merge-in-trunk
laurelfulford Aug 8, 2024
2277450
Merge pull request #3316 from Automattic/fix/modal-height
laurelfulford Aug 8, 2024
a619afe
fix: fix merge conflict
laurelfulford Aug 9, 2024
b8267f9
Merge pull request #3324 from Automattic/fix/merge-in-trunk
laurelfulford Aug 9, 2024
b997fd5
fix(ras-acc): remove redundant alt values from email templates (#3322)
chickenn00dle Aug 9, 2024
0c371f2
feat: moving most of the front-end events to the blocks
laurelfulford Aug 9, 2024
42c8b5e
fix(ras-acc): re-add missing webpack entrypoints (#3329)
chickenn00dle Aug 9, 2024
d1ec3fe
Merge branch 'epic/ras-acc' into feat/ga4-events-redo
laurelfulford Aug 9, 2024
62a9436
fix: correct password reset email typo
laurelfulford Aug 10, 2024
5b4c83e
fix(ras-acc): only trigger update_checkout when cover fee option sele…
chickenn00dle Aug 12, 2024
93629de
fix(ras-acc): update transactional email fonts to sans serif (#3326)
chickenn00dle Aug 12, 2024
5f00cbb
fix(ras-acc): transactional emails helper text and template updates (…
chickenn00dle Aug 12, 2024
b322598
Merge pull request #3331 from Automattic/fix/reset-password-email-typo
laurelfulford Aug 12, 2024
69cab55
fix(ras-acc): reset otp flow on sign in modal close (#3305)
chickenn00dle Aug 14, 2024
687344c
Merge branch 'trunk' into epic/ras-acc
chickenn00dle Aug 14, 2024
a21eb6f
fix(ras-acc): respect transactional email social icons alignment (#3339)
chickenn00dle Aug 15, 2024
6d85549
fix(ras-acc): various transactional email fixes (#3335)
chickenn00dle Aug 16, 2024
a034cf6
Merge branch 'epic/ras-acc' into feat/accessibility-improvements-2
laurelfulford Aug 19, 2024
e379411
feat: trap focus in the newsletter modal
laurelfulford Aug 19, 2024
575da6e
fix: remove some duplication from selectors
laurelfulford Aug 20, 2024
edb89fc
fix: add check for focusable elements
laurelfulford Aug 20, 2024
b2b62cf
Merge pull request #3164 from Automattic/feat/accessibility-improveme…
laurelfulford Aug 20, 2024
9c781a2
fix: remove unused action
laurelfulford Aug 20, 2024
7fb5855
Merge branch 'trunk' into epic/ras-acc
laurelfulford Aug 21, 2024
d032d7e
fix: correct linting error
laurelfulford Aug 21, 2024
2fde535
Merge pull request #3356 from Automattic/fix/remove-incorrect-newslet…
laurelfulford Aug 21, 2024
6dcf30f
Merge branch 'epic/ras-acc' into feat/ga4-events-redo
laurelfulford Aug 23, 2024
72faf82
feat(ras-acc): handle checkout redirect params (#3343)
chickenn00dle Aug 26, 2024
2ffc5e2
fix: don't close modal when redirecting
laurelfulford Aug 26, 2024
4ec56a9
fix: improve variable naming for clarity
laurelfulford Aug 27, 2024
824e885
fix(ras-acc): reCAPTCHA v2 + v3 for RAS-ACC flows (#3283)
dkoo Aug 27, 2024
0f08df5
Merge pull request #3369 from Automattic/fix/dont-close-modal-on-redi…
laurelfulford Aug 27, 2024
d451afa
Merge branch 'trunk' into epic/ras-acc
chickenn00dle Aug 28, 2024
65bab87
fix: update GA4 handle function for modal checkout
laurelfulford Aug 28, 2024
26d8720
fix: correct referrer formatting
laurelfulford Aug 29, 2024
3bebdbd
fix: update text domain in updated files
laurelfulford Aug 30, 2024
df5d8ca
feat: update plugin .pot file
laurelfulford Aug 30, 2024
a86f682
fix(ras-acc): handle recaptcha errors (#3377)
chickenn00dle Sep 2, 2024
4c43b54
Merge pull request #3382 from Automattic/feat/update-translation-files
laurelfulford Sep 3, 2024
c4b50b8
Merge branch 'trunk' into epic/ras-acc
laurelfulford Sep 4, 2024
c9208c8
fix(ras-acc): undo bad merge updates (#3390)
chickenn00dle Sep 4, 2024
6a3478b
fix: add check before making openAuthModal available
laurelfulford Sep 5, 2024
e3ca60b
fix: undo code format change
laurelfulford Sep 5, 2024
7bc618f
fix: correct referrer spelling
laurelfulford Sep 6, 2024
4a120d0
fix: update variable name
laurelfulford Sep 6, 2024
67b3d25
Merge branch 'fix/checkout-without-ras-redo' of github.com:Automattic…
laurelfulford Sep 6, 2024
f2bd366
Merge pull request #3396 from Automattic/fix/checkout-without-ras-redo
laurelfulford Sep 6, 2024
fd6accd
fix: recaptcha badge side-scroll
laurelfulford Sep 6, 2024
f7b78de
fix: correct comment typo
laurelfulford Sep 6, 2024
4dbaf64
fix: adapting to a more general fix
laurelfulford Sep 6, 2024
f45331f
fix: close newsletter on complete
laurelfulford Sep 6, 2024
39b2ef6
Merge branch 'epic/ras-acc' into feat/ga4-events-redo
laurelfulford Sep 6, 2024
fbc9082
fix(ras-acc): performance enhancements and small fixes (#3391)
chickenn00dle Sep 8, 2024
94f3311
fix(ras-acc): prevent invalid auth flow errors (#3397)
chickenn00dle Sep 8, 2024
12e1dab
Merge pull request #3401 from Automattic/fix/recaptcha-badge-scroll
laurelfulford Sep 9, 2024
9c67e0f
fix(ras-acc): add config flag to skip newsletters signup (#3404)
chickenn00dle Sep 9, 2024
5f2109b
fix: move closeOnSuccess config setting
laurelfulford Sep 9, 2024
d837f48
fix: update location of closeOnSuccess
laurelfulford Sep 10, 2024
8857b7b
Merge pull request #3402 from Automattic/fix/close-newsletter-modal
laurelfulford Sep 10, 2024
9831add
fix: remove check to prevent credit card field reset
laurelfulford Sep 10, 2024
2d2984f
Merge branch 'trunk' into epic/ras-acc
laurelfulford Sep 11, 2024
877e3ac
Merge branch 'epic/ras-acc' into feat/ga4-events-redo
laurelfulford Sep 11, 2024
3f8fdcd
Merge pull request #3297 from Automattic/feat/ga4-events-redo
laurelfulford Sep 11, 2024
572691b
Merge branch 'trunk' into epic/ras-acc
chickenn00dle Sep 18, 2024
dc42153
Merge pull request #3413 from Automattic/fix/credit-card-field-resetting
laurelfulford Sep 19, 2024
4077bc5
fix: make some newspack UI styles more specific
laurelfulford Sep 20, 2024
196715d
Merge pull request #3441 from Automattic/fix/hardening-newspack-ui-css
laurelfulford Sep 24, 2024
dc347c5
Merge branch 'trunk' into epic/ras-acc
laurelfulford Sep 25, 2024
7ba6620
Merge branch 'trunk' into epic/ras-acc
chickenn00dle Oct 2, 2024
7b04880
fix(ras-acc): clear user tokens on logout (#3451)
chickenn00dle Oct 3, 2024
c8da2f2
Merge branch 'trunk' into epic/ras-acc
laurelfulford Oct 9, 2024
bfab5b7
feat: update reader registration block to use newspack-ui (#3199)
thomasguillot Oct 10, 2024
bfe0b87
fix(auth): simplify pending checkout (#3471)
miguelpeixe Oct 11, 2024
68d1c76
fix(ras-acc): replace email param with secret for magic links (#3476)
chickenn00dle Oct 15, 2024
c9e9174
Merge branch 'trunk' into epic/ras-acc
chickenn00dle Oct 16, 2024
b81bcbd
feat(auth-modal): onSuccess, onDismiss, and onError callbacks (#3481)
miguelpeixe Oct 18, 2024
f163510
fix(ras-acc): add onSuccess/onError callbacks to recaptcha render met…
chickenn00dle Oct 22, 2024
ccb8653
Merge branch 'trunk' into epic/ras-acc
laurelfulford Oct 23, 2024
dfdc572
fix: override button, text styles
laurelfulford Oct 23, 2024
2e2aed3
fix: make font size classes more specific
laurelfulford Oct 24, 2024
a42970d
fix: improve CSS class structure
laurelfulford Oct 25, 2024
f4aecfe
Merge pull request #3496 from Automattic/fix/tweak-newspack-ui-css-2
laurelfulford Oct 25, 2024
0614ea0
fix(ras): update email logo default size (#3506)
chickenn00dle Oct 29, 2024
44bedf1
fix(ras): update reset password email template text (#3505)
chickenn00dle Oct 29, 2024
513d8c7
Merge branch 'trunk' into epic/ras-acc
chickenn00dle Oct 30, 2024
6a78988
feat(ras): login reader after successful password reset (#3510)
chickenn00dle Oct 30, 2024
d50bb78
feat(ras): add toggle to force checkout registration (#3509)
chickenn00dle Oct 30, 2024
6defb48
fix(ras): redirect to home when registering via my-account page (#3513)
chickenn00dle Nov 5, 2024
ce02e12
fix(ras): update checkout setting text and add privacy policy text fi…
chickenn00dle Nov 5, 2024
065c2da
Merge branch 'trunk' into epic/ras-acc
laurelfulford Nov 6, 2024
d5d05cb
feat(ras): add post checkout ras settings (#3533)
chickenn00dle Nov 8, 2024
21a237d
fix: get secondary color updating in RAS-ACC emails
laurelfulford Nov 12, 2024
d123474
fix: update variation names
laurelfulford Nov 12, 2024
8657289
fix: correct linting errors
laurelfulford Nov 12, 2024
43b9dad
fix: merge release into epic (#3543)
chickenn00dle Nov 12, 2024
60d35f5
fix(newspack-ui): prevent overrides on label display
chickenn00dle Nov 13, 2024
1c1184a
Merge pull request #3546 from Automattic/fix/after-billing-form-check…
laurelfulford Nov 13, 2024
7e11432
fix: correct color names
laurelfulford Nov 14, 2024
cd24af5
Merge pull request #3539 from Automattic/fix/email-colours
laurelfulford Nov 14, 2024
0f45b88
fix(auth): verify otp hash cookie when checking user token meta (#3558)
chickenn00dle Nov 19, 2024
8bff5d6
Merge branch 'release' into epic/ras-acc
laurelfulford Nov 20, 2024
409e9aa
feat: add constant to disable Google OAuth in RAS
laurelfulford Nov 23, 2024
30cbcfc
fix(auth): remove pw meta on admin pw update (#3579)
chickenn00dle Nov 25, 2024
82bbf2f
chore: update FILTER_SANITIZE_STRING to FILTER_SANITIZE_SPECIAL_CHARS
adekbadek Nov 25, 2024
770b633
Merge pull request #3570 from Automattic/fix/add-google-oauth-override
laurelfulford Nov 26, 2024
3911e66
Merge branch 'release' into epic/ras-acc
laurelfulford Nov 26, 2024
8467990
Merge branch 'trunk' into epic/ras-acc
chickenn00dle Nov 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@ ress/* packages

# [4.4.0](https://github.com/Automattic/newspack-plugin/compare/v4.3.4...v4.4.0) (2024-07-01)


### Bug Fixes

* add modified check before updating donation product ([#3183](https://github.com/Automattic/newspack-plugin/issues/3183)) ([208c55e](https://github.com/Automattic/newspack-plugin/commit/208c55e21ac8f6a4b6736f89c25cf12994f2cbaf))
Expand Down Expand Up @@ -563,6 +562,13 @@ ress/* packages

* **ia:** back to `trunk` ([69b2ba0](https://github.com/Automattic/newspack-plugin/commit/69b2ba09a222e7c1b84b9cba0b97c36881cda63f))

## [4.3.4](https://github.com/Automattic/newspack-plugin/compare/v4.3.3...v4.3.4) (2024-06-27)

### Bug Fixes

* variable name > constant ([#3203](https://github.com/Automattic/newspack-plugin/issues/3203)) ([46c5651](https://github.com/Automattic/newspack-plugin/commit/46c5651cf48e88abef3b8f3855b8fd3f5860c2a3))


## [4.3.3](https://github.com/Automattic/newspack-plugin/compare/v4.3.2...v4.3.3) (2024-06-24)


Expand Down
2 changes: 1 addition & 1 deletion includes/class-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static function enqueue_block_editor_assets() {
'has_reader_activation' => Reader_Activation::is_enabled(),
'newsletters_url' => Wizards::get_wizard( 'engagement' )->newsletters_settings_url(),
'has_google_oauth' => Google_OAuth::is_oauth_configured(),
'google_logo_svg' => file_get_contents( dirname( NEWSPACK_PLUGIN_FILE ) . '/src/blocks/reader-registration/icons/google.svg' ),
'google_logo_svg' => \Newspack\Newspack_UI_Icons::get_svg( 'google' ),
'reader_activation_terms' => Reader_Activation::get_setting( 'terms_text' ),
'reader_activation_url' => Reader_Activation::get_setting( 'terms_url' ),
'has_recaptcha' => Recaptcha::can_use_captcha(),
Expand Down
68 changes: 53 additions & 15 deletions includes/class-donations.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,24 @@ class Donations {
* @codeCoverageIgnore
*/
public static function init() {
self::$donation_product_name = __( 'Donate', 'newspack' );
if ( ! is_admin() ) {
add_action( 'wp_loaded', [ __CLASS__, 'process_donation_form' ], 99 );
add_action( 'woocommerce_checkout_update_order_meta', [ __CLASS__, 'woocommerce_checkout_update_order_meta' ] );
add_filter( 'woocommerce_billing_fields', [ __CLASS__, 'woocommerce_billing_fields' ] );
add_filter( 'pre_option_woocommerce_enable_guest_checkout', [ __CLASS__, 'disable_guest_checkout' ] );
add_action( 'woocommerce_check_cart_items', [ __CLASS__, 'handle_cart' ] );
add_filter( 'amp_skip_post', [ __CLASS__, 'should_skip_amp' ], 10, 2 );
add_filter( 'newspack_blocks_donate_billing_fields_keys', [ __CLASS__, 'get_billing_fields' ] );
add_action( 'woocommerce_checkout_create_order_line_item', [ __CLASS__, 'checkout_create_order_line_item' ], 10, 4 );
add_action( 'woocommerce_coupons_enabled', [ __CLASS__, 'disable_coupons' ] );
}
self::$donation_product_name = __( 'Donate', 'newspack-plugin' );

// Process donation request.
add_action( 'wp_ajax_modal_checkout_request', [ __CLASS__, 'process_donation_request' ] );
add_action( 'wp_ajax_nopriv_modal_checkout_request', [ __CLASS__, 'process_donation_request' ] );
add_action( 'wp_loaded', [ __CLASS__, 'process_donation_request' ], 99 );

add_action( 'woocommerce_checkout_update_order_meta', [ __CLASS__, 'woocommerce_checkout_update_order_meta' ] );
add_filter( 'woocommerce_billing_fields', [ __CLASS__, 'woocommerce_billing_fields' ] );
add_filter( 'pre_option_woocommerce_enable_guest_checkout', [ __CLASS__, 'disable_guest_checkout' ] );
add_action( 'woocommerce_check_cart_items', [ __CLASS__, 'handle_cart' ] );
add_filter( 'amp_skip_post', [ __CLASS__, 'should_skip_amp' ], 10, 2 );
add_filter( 'newspack_blocks_donate_billing_fields_keys', [ __CLASS__, 'get_billing_fields' ] );
add_action( 'woocommerce_checkout_create_order_line_item', [ __CLASS__, 'checkout_create_order_line_item' ], 10, 4 );
add_filter( 'woocommerce_coupons_enabled', [ __CLASS__, 'disable_coupons' ] );
add_filter( 'wcs_place_subscription_order_text', [ __CLASS__, 'order_button_text' ], 9 );
add_filter( 'woocommerce_order_button_text', [ __CLASS__, 'order_button_text' ], 9 );
add_filter( 'option_woocommerce_subscriptions_order_button_text', [ __CLASS__, 'order_button_text' ], 9 );
}

/**
Expand Down Expand Up @@ -647,7 +653,11 @@ public static function is_platform_other() {
/**
* Handle submission of the donation form.
*/
public static function process_donation_form() {
public static function process_donation_request() {
if ( is_admin() && ! defined( 'DOING_AJAX' ) ) {
return;
}

$is_wc = self::is_platform_wc();

$donation_form_submitted = filter_input( INPUT_GET, 'newspack_donate', FILTER_SANITIZE_NUMBER_INT );
Expand Down Expand Up @@ -737,6 +747,11 @@ function ( $item ) {
[],
$cart_item_data
);

// Set checkout registration flag if user is not logged in.
if ( ! is_user_logged_in() && class_exists( '\Newspack_Blocks\Modal_Checkout' ) ) {
\Newspack_Blocks\Modal_Checkout::set_checkout_registration_flag();
}
}

$query_args = [];
Expand Down Expand Up @@ -771,8 +786,16 @@ function ( $item ) {
);

// Redirect to checkout.
\wp_safe_redirect( apply_filters( 'newspack_donation_checkout_url', $checkout_url, $donation_value, $donation_frequency ) );
exit;
$checkout_url = apply_filters( 'newspack_donation_checkout_url', $checkout_url, $donation_value, $donation_frequency );

if ( defined( 'DOING_AJAX' ) ) {
echo wp_json_encode( [ 'url' => $checkout_url ] );
exit;
} else {
// Redirect to checkout.
\wp_safe_redirect( $checkout_url );
exit;
}
}

/**
Expand Down Expand Up @@ -1085,6 +1108,9 @@ public static function update_billing_fields( $billing_fields ) {
* @return bool
*/
public static function disable_coupons( $enabled ) {
if ( is_admin() ) {
return $enabled;
}
$cart = WC()->cart;
if ( ! $cart ) {
return $enabled;
Expand All @@ -1094,5 +1120,17 @@ public static function disable_coupons( $enabled ) {
}
return false;
}

/**
* Set the "Place order" button text.
*
* @param string $text The button text.
*/
public static function order_button_text( $text ) {
if ( self::is_donation_cart() ) {
return __( 'Donate now', 'newspack-plugin' );
}
return $text;
}
}
Donations::init();
Loading