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

Works for Woocommerce product categories? #17

Open
veptune opened this issue Dec 27, 2023 · 0 comments
Open

Works for Woocommerce product categories? #17

veptune opened this issue Dec 27, 2023 · 0 comments

Comments

@veptune
Copy link

veptune commented Dec 27, 2023

Hello,

I need to add those rest fields to woocommerce product category, so I added this code 👍

// Product cat
register_rest_field( 'product_cat',
'yoast_meta',
array(
'get_callback' => array( $this, 'wp_api_encode_yoast_tag' ),
'update_callback' => null,
'schema' => null,
)
);

In the add_yoast_data function but it did not work, I can't fill those fields from the rest API (it works with posts, pages..)

Did I miss something ?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant