Problem: I would like to delete a post when a User's WooCommerce Subscription is canceled or expires.
Solution: Toolset does not have any hooks that will help you respond to WooCommerce Subscription events, so I would ask WooCommerce Subscriptions' support team if they offer an API that will allow you to perform some action when a subscription is canceled or expires. If so, then you can use some custom code to set the post to "draft" status, which would effectively remove it from the front-end of the site. You could reinstate the post at any time if the subscription is renewed. Here's an example ticket on stackoverflow that modifies a post's status:
https://wordpress.stackexchange.com/questions/12512/how-to-update-page-status-from-publish-to-draft-and-draft-to-publish
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 |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
Este tema contiene 1 respuesta, tiene 2 mensajes.
Última actualización por hace 6 años, 7 meses.
Asistido por: Christian Cox.