Skip to content

WP_User_Query: has_published_posts is not working #116

@yarovikov

Description

@yarovikov

Describe the bug

Hi there.
Seems, has_published_posts is not working.
I'm getting different count of users when ep_integrate false and or true. In my case ~9000 users vs ~1 mil

Steps to Reproduce

Use this code

$args = [
  'has_published_posts' => ['post'],
  'ep_integrate' => true,
];

$query = new WP_User_Query($args);

$user_count = $query->get_total(); // check count with ep_integrate  false and true

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress information

WP 6.7.1
ElasticPress 5.4.1
ElasticPress Labs 2.3.1

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions