python-wordpress-xmlrpc icon indicating copy to clipboard operation
python-wordpress-xmlrpc copied to clipboard

Custom Fields starting with an underscore

Open Anko59 opened this issue 8 years ago • 1 comments

Hello,

I am using a plugin( theeventscalendar.com ) that stores post meta fields stating with an underscore. From what I understand, I should be able to access those fields in the custom_fields data of the posts in python. But they are not shown. My code: client = Client('http://actandcare.fr/xmlrpc.php', 'account', 'password') events = client.call(posts.GetPosts({'post_type': 'tribe_events','number':10000})) for e in events: print(e, e.id, e.custom_fields) The result: Journée Urgentiste à Cavaillon 2965 [{'id': '26529', 'key': 'vantage_panels_no_legacy', 'value': 'true'}] Nuit Urgentiste à Cavaillon 2966 [{'id': '26553', 'key': 'vantage_panels_no_legacy', 'value': 'true'}] Nuit Urgentiste à Cavaillon 2967 [{'id': '26577', 'key': 'vantage_panels_no_legacy', 'value': 'true'}] The databases: image

As we can see in the database'screenshot, many fields (_EventCost, _EventStartDate...) are not printed in the python console.

Anko59 avatar Aug 29 '17 09:08 Anko59

Sorry this is not an answer. I had to go for the REST API to interact with that plugin https://theeventscalendar.com/knowledgebase/introduction-events-calendar-rest-api/

n3storm avatar Jul 14 '18 08:07 n3storm