Hi Dieter,
Are you on the latest version of our plugin (v2.0.0)? If so, have you changed anything in the Rest Controller since updating? You shouldn’t need to, but if you haven’t done any changes since the update, can you go to the Rest Controller settings page and update everything? I just want to make sure there’s not an issue with our plugin’s data before and after the update.
A few other things… Are your invoices published posts? (i.e. what is the post status of the posts in that CPT?)
Who is responsible for creating the invoice CPT? Is it something you’ve written or is it registered by a plugin?
Is our plugin working for any of your other CPTs?
Let me know.
Thank you,
Kevin.
Hi Kevin,
yes we have the latest plugin version 2.0.0 and we have nothing changes. This is a new plugin installation for testing the custom post endpoints.
Invoices are not published posts. We have try to call with consumer_key and consumer_secret.
It works for example with this cpt
https://demo.einfach-gutschein-verschenken.de/wp-json/wp/v2/product
Thanks & Regards
Dieter
Hi Dieter,
If they’re not published posts, do you know what their post status is? I’m referring to the column in the wp_posts table – this one: https://developer.ww.wp.xz.cn/reference/classes/wp_query/#status-parameters.
Let me know,
Kevin.
Hi Kevin,
the post status for the invoices are wc-gzdp-paid or wc-gzdp-pending.
Thanks & Regards
Dieter
I am not sure what’s happening but I don’t think it’s a result of our plugin. I think there is something in your Invoice post type that is preventing it from being added to the REST API. I’ve tried a few things but I can’t seem to figure it out yet.
Hi Kevin,
maybe it helps i can give you admin access to the site?
Thanks & Regards
Dieter
Sure – feel free to email us at plugins [at] yikesinc [dot] com 🙂
Hi Dieter,
I’ve reviewed your site and I still think the issue is with the post status. I’m trying some things locally and if I have a CPT that doesn’t have published posts, the WP REST API result will return an empty array.
Can you perhaps change one of your invoices to the “publish” status to see if that changes things?
Let me know.
Thank you,
Kevin.
Hi Kevin,
i don’t know how i can change invoices to “publish”.
I will send this to Denis (Woocommerce Germanized Pro Plugin) and ask him where can we do that.
Thanks & Regards
Dieter
Ah, I see.
I think you’re going to need to write a custom query to fetch invoices rather than rely on WordPress’ default REST API behavior.