This support ticket is created hace 1 año, 7 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.
Este tema contiene 21 respuestas, tiene 3 mensajes.
Quick update. The support team at GiveWP says they are not likely to fix this on their side as it is the only reported problem related to how they do things and they'd have to go through all of their code to make sure they don't break anything in their core plugin and all their add-ons plus 3rd party code if they did change it. I asked them to reconsider but right now it looks like I, and about 20 of my clients, are caught in the middle of Toolset and GiveWP each saying the other should fix this issue.
Thank you for informing us. As mentioned, the development team's decision was to set this one as won't fix due to reasoning already mentioned by my colleague.
The only thing that I can suggest here is to keep track of the workaround on your client's website whenever there is a new update.
Thanks Christopher. I understand the developers' decision. I just wanted them to know that GiveWP is making a similar decision for similar logic on their side and we customers are stuck in the middle without a real solution to this problem. I've told GiveWP's support the same thing. I have over 20 clients that I've used Toolset and Give for. If neither company is willing to fix this issue, I will likely have to figure out how to remove one or both of your products from those sites as the cost of me having to watch for updates and re-apply a work-around over and over again will either destroy any profit I have in my maintenance plans or push the cost of those plans too high for these nonprofit customers.
An empty string is only expected in the case where a "valid but non-existing post ID is passed".
That doesn't apply when a valid post ID is passed, when an empty array is expected.
Without GiveWP that's exactly what is returned.
GiveWP modifies this core behaviour by hooking in to the get_post_metadata filter and changing what is returned in this scenario to an empty string from the standard empty array.
When we raised this with them they replied "we should be respecting the return types of WP API hooks and I'll bring this to the team so that we can incorporate this into our work on 8.0 compatibility", so our understanding is that they will fix this in a future update.
So far they are still saying they won't fix it so we're stuck in the middle of both companies pointing at each other with neither solving the customer's problem. I understand the logic in both cases but it doesn't make things any better for my clients.
I'm sorry to hear that, given that GiveWP led us to believe they would fix this as part of their work on PHP 8 compatibility, and the case for not modifying core WordPress functions seems unarguable. In which case you'll need to patch either Toolset—as described previously—or GiveWP, so that it returns an empty array as expected rather than an empty string".
If you decide to do it on WP Give side you can change the file:
plugins/givewp/includes/database/class-give-db-meta.php lines 151 to 153