maxcutler / python-wordpress-xmlrpc

Python library for WordPress XML-RPC integration
http://python-wordpress-xmlrpc.rtfd.org
MIT License
380 stars 129 forks source link

Custom Fields starting with an underscore #113

Open Anko59 opened 7 years ago

Anko59 commented 7 years ago

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.

n3storm commented 6 years ago

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/