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

Incorrect logic for querying if blog's plan is free #579

@guarani

Description

@guarani

Expected behavior

RemoteBlog.hasPaidPlan should return true on WP.com sites that have a paid plan, false otherwise.

Actual behavior

The logic of RemoteBlog.hasPaidPlan is reversed. It returns true on WP.com sites that have a free plan, otherwise true.

Steps to reproduce the behavior

I noticed this when calling hasPaidPlans in wordpress-mobile/WordPress-iOS#20163. It unexpectedly returned false on a site that has a paid plan.

WordPressKit Environment
  • WordPressKit Version 6.1.0-beta
  • OS: iOS 16.2
  • Device: iPhone 14 Pro Max
  • Xcode Version: Xcode 14.2
Additional Context

In #558, it appears that the refactor inadvertently flipped the logic on the hasPaidPlan bool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions