File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
src/Umbraco.Commerce.Checkout/Events Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections . Generic ;
3
+ using System . Linq ;
4
+ using System . Text . Json ;
3
5
using System . Threading . Tasks ;
4
6
using Umbraco . Cms . Core . Models ;
5
7
using Umbraco . Cms . Core . Routing ;
@@ -42,7 +44,18 @@ private static bool IsConfirmationPageType(IContent content)
42
44
return false ;
43
45
}
44
46
45
- return content . ContentType . Alias == UmbracoCommerceCheckoutConstants . ContentTypes . Aliases . CheckoutStepPage && content . GetValue < string > ( "uccStepType" ) == "Confirmation" ;
47
+ if ( content . ContentType . Alias != UmbracoCommerceCheckoutConstants . ContentTypes . Aliases . CheckoutStepPage )
48
+ {
49
+ return false ;
50
+ }
51
+
52
+ var stepValue = content . GetValue < string > ( "uccStepType" ) ;
53
+ if ( stepValue != null && stepValue . StartsWith ( '[' ) && stepValue . EndsWith ( ']' ) )
54
+ {
55
+ stepValue = JsonSerializer . Deserialize < string [ ] > ( stepValue ) ? . FirstOrDefault ( ) ;
56
+ }
57
+
58
+ return stepValue == "Confirmation" ;
46
59
}
47
60
48
61
private async Task DoSyncZeroValuePaymentProviderContinueUrlAsync ( IContent content )
You can’t perform that action at this time.
0 commit comments