Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Commit 93d227c

Browse files
authored
Merge pull request #2971 from wordpress-mobile/release/2.70.1
Merge Release 2.70.1 into trunk
2 parents 4d0dc56 + 24c6e1b commit 93d227c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpcom/theme/ThemeRestClient.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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;

fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpcom/theme/WPComThemeResponse.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)