-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Enabling users feature breaks customers REST endpoint #2424
Comments
Hmm, just remove the strong |
@lkraav When I remove the |
The orders endpoint also returns an empty array when enabling the |
Hey @anoblet , I actually get the same empty array with ElasticPress turned off, can you confirm/deny the same on your end? As for wp-json/wc/v3/orders with protected content enabled I don't have any problems. I am using the latest version of ElasticPress and latest version of Woocommerce. Can you try updating Woocommerce? as it seems it is far behind 5.8.0 |
I removed the strong type from Users feature enabled:
Protected Content feature enabled:
If either feature is disabled, or the |
@lkraav That's a great find! I wonder if a similar fix could work for the orders endpoint? |
@lkraav I tried the fix in that PR and still got an empty result set when using the |
I can confirm the bug happens with the orderby parameter! |
Hi @anoblet , Long story short, the problem seems to be related to Woocommerce. I have opened woocommerce/woocommerce#31294 in regard. This ends up adding You could probably use something like this as a workaround until that issue is fixed:
|
Describe the bug
After enabling the users feature, when trying to
GET
from the/customers
REST endpoint we receive the error:Disabling the users feature allow us to perform this request without error.
Steps to Reproduce
wp elasticpress activate-feature users
wp elasticpress index
/wp-json/wc/v3/customers
Expected behavior
We get a list of customers
Screenshots
Environment information
Site Health Info:
` ### wp-core ###version: 5.7
site_language: en_US
user_language: en_US
timezone: +00:00
permalink: /%postname%/
https_status: false
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: open
environment_type: production
user_count: 80
dotorg_communication: true
wp-paths-sizes
wordpress_path: /workspaces/cxl-wpstarter/public/wp
wordpress_size: 50.28 MB (52718585 bytes)
uploads_path: /workspaces/cxl-wpstarter/public/wp-content/uploads
uploads_size: 0.00 B (0 bytes)
themes_path: /workspaces/cxl-wpstarter/public/wp-content/themes
themes_size: 288.02 MB (302008984 bytes)
plugins_path: /workspaces/cxl-wpstarter/public/wp-content/plugins
plugins_size: 234.93 MB (246341939 bytes)
database_size: 134.73 MB (141278734 bytes)
total_size: 707.96 MB (742348242 bytes)
wp-active-theme
name: CXL Institute (conversionxl-institute)
version: 2021.03.04
author: leho@cxl.com
author_website: (undefined)
parent_theme: Hybrid Base Dynamic (CXL Institute) (hybrid-base-dynamic-conversionxl-institute)
theme_features: core-block-patterns, theme-layouts, hybrid-core-template-hierarchy, get-the-image, breadcrumb-trail, cleaner-gallery, automatic-feed-links, post-formats, post-thumbnails, menus, pure-css, align-wide, sensei, woocommerce, woocommerce-subscriptions, title-tag, html5, widgets
theme_path: /workspaces/cxl-wpstarter/public/wp-content/themes/conversionxl-institute
wp-parent-theme
name: Hybrid Base Dynamic (CXL Institute) (hybrid-base-dynamic-conversionxl-institute)
version: 2020.09.17
author: Justin Tadlock, Leho Kraav
author_website: https://conversionxl.com/institute/
theme_path: /workspaces/cxl-wpstarter/public/wp-content/themes/hybrid-base-dynamic-conversionxl-institute
wp-plugins-active (26)
AutomateWoo: version: 5.3.0, author: WooCommerce
CXL Institute: version: 2020.08.23, author: Leho Kraav
Debug Bar ElasticPress: version: 2.1.0, author: 10up
Disable All WordPress Updates: version: 1.6.7, author: Oliver Schlöbe
Disable Emojis (GDPR friendly): version: 1.7.2, author: Ryan Hellyer
ElasticPress: version: 3.6.3, author: 10up
FacetWP: version: 3.7.4, author: FacetWP, LLC
Hybrid Core (4.0) - restore schema.org support: version: 2017.12.21, author: Leho Kraav
Less Rewrite Rules: version: 2015.05.01, author: Leho Kraav
Nav Menu Collapse: version: 2.1.0, author: Robert Noakes
Post Meta Inspector: version: 1.1.1, author: Daniel Bachhuber, Automattic
Pure CSS Theme Features: version: 1.6.2pl20161003, author: Leho Kraav
Query Monitor: version: 3.6.7, author: John Blackbourn
Remove jQuery Migrate: version: 1.0.2, author: Hendy Tarnando
REST API Log: version: 1.6.8, author: Pete Nelson
Sensei LMS: version: 2.4.0, author: Automattic
Sensei LMS Course Progress: version: 2.0.3, author: Automattic
Stream: version: 3.6.2, author: XWP
Teams for WooCommerce Memberships: version: 1.5.2, author: SkyVerge
User Switching: version: 1.5.6, author: John Blackbourn & contributors
WooCommerce: version: 4.9.2, author: Automattic
WooCommerce Memberships: version: 1.21.4, author: SkyVerge
WooCommerce Sequential Order Numbers: version: 1.9.5, author: SkyVerge
WooCommerce Stripe Gateway: version: 4.9.0, author: WooCommerce
WooCommerce Subscriptions: version: 3.0.13, author: WooCommerce
WordPress Bug #14050 Hotfix: version: 2016.03.15, author: Leho Kraav
wp-plugins-inactive (12)
BadgeOS (git): version: 1.4.11, author: LearningTimes
BadgeOS Sensei Add-On: version: 1.0.4, author: Credly
Classic Editor: version: 1.6, author: WordPress Contributors
CXL JWPlayer: version: 2020.06.02, author: Kyle Brodeur, Paul Kirspuu, Leho Kraav
FacetWP - Relevanssi integration: version: 0.7.2, author: FacetWP, LLC
Gutenberg: version: 10.1.1, author: Gutenberg Team
Pco Kint: version: 1.0.10, author: Peytz & Co (Patrick Hesselberg)
Relevanssi Always Exclude Private Posts: version: 2016.08.30, author: Leho Kraav
Relevanssi Premium: version: 2.14.4, author: Mikko Saari
Rename wp-login.php: version: 2.6.0, author: Ella van Durpe
Toolbar Theme Switcher: version: 1.4, author: Andrey "Rarst" Savchenko
Yoast SEO Premium: version: 15.9, author: Team Yoast
wp-media
image_editor: false
imagick_module_version: Not available
imagemagick_version: Not available
file_uploads: File uploads is turned off
post_max_size: 8M
upload_max_filesize: 2M
max_effective_size: 2 MB
max_file_uploads: 20
gd_version: not available
ghostscript_version: not available
wp-server
server_architecture: Linux 5.4.72-microsoft-standard-WSL2 x86_64
httpd_software: PHP 7.4.21 Development Server
php_version: 7.4.21 64bit
php_sapi: cli-server
max_input_variables: 1000
time_limit: 30
memory_limit: -1
max_input_time: 60
upload_max_filesize: 2M
php_post_max_size: 8M
curl_version: 7.64.0 OpenSSL/1.1.1d
suhosin: false
imagick_availability: false
pretty_permalinks: false
wp-database
extension: mysqli
server_version: 10.3.29-MariaDB-0+deb10u1
client_version: mysqlnd 7.4.21
wp-constants
WP_HOME: http://localhost:8080
WP_SITEURL: http://localhost:8080/wp
WP_CONTENT_DIR: /workspaces/cxl-wpstarter/public/wp-content
WP_PLUGIN_DIR: /workspaces/cxl-wpstarter/public/wp-content/plugins
WP_MEMORY_LIMIT: 40M
WP_MAX_MEMORY_LIMIT: -1
WP_DEBUG: false
WP_DEBUG_DISPLAY: false
WP_DEBUG_LOG: true
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_LOCAL_DEV: undefined
DB_CHARSET: utf8
DB_COLLATE: undefined
wp-filesystem
wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
epio_autosuggest
wp-starter
autoload-path: /workspaces/cxl-wpstarter/public/vendor/autoload.php
base-path: /workspaces/cxl-wpstarter
env-cache-file: /workspaces/cxl-wpstarter/.env.cached.php
env-cache-enabled: true
cached-env: true
env-type: development
env-php-file: undefined
early-hooks-file: undefined
wp-env-type: production
ssl_fix: false
register-core-themes: false
`
Additional context
The text was updated successfully, but these errors were encountered: