Skip to content
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

List all attribute terms (API) #18

Open
erikdemarco opened this issue Aug 5, 2019 · 1 comment

Comments

@erikdemarco
Copy link

@erikdemarco erikdemarco commented Aug 5, 2019

when using this api
/wp-json/wc/v3/products/attributes/1/terms

It show correct data,
but when I change to '1' to any other :
/wp-json/wc/v3/products/attributes/2/terms

it still show 'attributeid:1' data, not 'attributeid:2' data that i want. I try using nonexistent attribute_id, still it shows 'attributeid:1' data. why is that?

edit:
I found the problem, If I remove this part from line 794 (wc-rest-terms-controller.php):

		// Check if taxonomy is defined.
		// Prevents check for attribute taxonomy more than one time for each query.
		if ( '' !== $this->taxonomy ) {
			return $this->taxonomy;
		}

it works OK. I think we need to add filter here, so this feature can be turned off manually.

@claudiosanches claudiosanches transferred this issue from woocommerce/woocommerce Aug 5, 2019
@issue-label-bot

This comment has been minimized.

Copy link

@issue-label-bot issue-label-bot bot commented Aug 5, 2019

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.