This repository was archived by the owner on Feb 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpcom/theme Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -229,7 +229,8 @@ public void fetchCurrentTheme(@NonNull final SiteModel site) {
229229
230230 @ NonNull
231231 private static ThemeModel createThemeFromWPComResponse (@ NonNull WPComThemeResponse response ) {
232- boolean free = TextUtils .isEmpty (response .price );
232+ boolean free = response .theme_tier == null || response .theme_tier .slug == null
233+ || response .theme_tier .slug .equalsIgnoreCase ("free" );
233234 String priceText = null ;
234235 if (!free ) {
235236 priceText = response .price ;
Original file line number Diff line number Diff line change @@ -23,6 +23,12 @@ public static class WPComThemeTaxonomies {
2323 @ Nullable public WPComThemeMobileFriendlyTaxonomy [] theme_mobile_friendly ;
2424 }
2525
26+ public static class WPComThemeTier {
27+ @ Nullable public String slug ;
28+ @ Nullable public String feature ;
29+ @ Nullable public String platform ;
30+ }
31+
2632 @ NonNull public String id ;
2733 @ Nullable public String slug ;
2834 @ Nullable public String stylesheet ;
@@ -38,4 +44,5 @@ public static class WPComThemeTaxonomies {
3844 @ Nullable public String download_uri ;
3945 @ Nullable public String price ;
4046 @ Nullable public WPComThemeTaxonomies taxonomies ;
47+ @ Nullable public WPComThemeTier theme_tier ;
4148}
You can’t perform that action at this time.
0 commit comments