Skip Navigation

[Resuelto] Allow choosing custom post statuses

This support ticket is created hace 5 años, 11 meses. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Este tema contiene 10 respuestas, tiene 2 mensajes.

Última actualización por Clifford hace 5 años, 11 meses.

Asistido por: Waqar.

Autor
Mensajes
#1164007

If I select a WooCommerce Bookings post type (wc_booking) to edit, I can only choose the default post statuses because they're hard-coded at /wp-content/plugins/cred-frontend-editor/library/toolset/cred/embedded/views/templates/form-settings-meta-box.tpl.php

This should ideally be dependent on the post type (just like the post edit screen) but at the least it should be filterable.

#1164680

Hi Clifford,

Thank you for contacting us and I'll be happy to assist.

The support for custom post statuses is not 100% implemented yet at WordPress level and you can read more on the topic at:
https://codex.wordpress.org/Function_Reference/register_post_status
https://core.trac.wordpress.org/ticket/12706

Meanwhile, you can use "cred_save_data" function ( ref: https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data ), to programmatically update the status, when a form is submitted.

You'll find useful and relevant code examples in the following threads:
https://toolset.com/forums/topic/custom-post-status-not-selectable-in-cred-post-edit-form/#post-604886
https://toolset.com/forums/topic/change-post-status-draft-publish-of-product-on-the-frontend/

I hope this helps.

regards,
Waqar

#1166837

Ah, I see that and https://developer.wordpress.org/reference/functions/get_post_statuses/ is not filterable.

Please make your selection options filterable.

#1167597

Hi Clifford,

Thanks for writing back.

Our development team closely monitors WordPress changes and if a filter for default post statuses is introduced, we'll extend its usage in our plugins as well.

You're welcome to open a new ticket for different question or concern - we're here to help.

regards,
Waqar

#1167875

I want CRED's statuses filterable so, when submitted, I can set to a custom post status without needing to hook into the form upon submission, as I'd have to hook into every single form instead of using a single hook to add my custom statuses.

#1168585

Hi Clifford,

That's an interesting suggestion and can prove useful in a number of situations.

I would suggest submitting this idea here:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

We just changed how feature requests are gathered, and there you will be able to add this suggestion, so Product Management can consider it directly.

regards,
Waqar

#1168890

I think I submitted it but the form's confirmation message says, "We try to respond to as many feature suggestions as we can." It is unclear if my submission was successfully received, but I'll assume it was.

Also, it's goofy/unclear to have to enter a "version". Is this the latest version of whichever plugin I select?

#1169362

Hi Clifford,

Your understanding is correct and the "Version" field is there so that the latest version of the plugin in question can be specified.

This helps in knowing what was the most recent version, at the time of a certain feature request/suggestion was put forward.

I'll pass on your feedback internally to make the feature request form, more clear.

regards,
Waqar

#1170024

OK, great, thanks. It would also be nice if I got the URL right away so I could bookmark it and share it with others I know are wanting it.

#1170285

Hi Clifford,

Thanks for the suggestion and I'll pass this one internally as well.

We're currently in the process of making the feature request submission process, even more, efficient and streamlined and your feedback and suggestions would definitely help.

regards,
Waqar

#1170705

OK, thank you. Please link me once it's posted, assuming they're still publicly-accessible and able to receive votes.