WP-for-Church / Sermon-Manager

Sermon Manager for WordPress is the #1 plugin for churches who want to manage their sermons easily and missionally.
https://wordpress.org/plugins/sermon-manager-for-wordpress/
GNU General Public License v2.0
43 stars 36 forks source link

using api sermon_video_embed not being added #271

Open PeteEdley-EdleyIT opened 4 years ago

PeteEdley-EdleyIT commented 4 years ago

Expected Behaviour

when using sermon_video_embed in the json for an api call that the corrosponding fields would be filled.

Actual Behaviour

it is left blank

Steps To Reproduce

use the following code

`import requests import json import base64

user = 'admin' pythonapp = 'removed for security' url = 'http://domain.com/wp-json/wp/v2'

token = base64.standard_b64encode((user + ':' + pythonapp).encode('utf-8')) headers = {'Authorization': 'Basic ' + token.decode('utf-8')}

media = { 'file': open('audio-intro-2020-05-14.mp3', 'rb') }

mp3 = requests.post(url + '/media', headers=headers, files=media) mp3Url = str(json.loads(mp3.content)['source_url'])

print (mp3Url)

post = { "title": "This is an upload test", "sermon_audio": mp3Url, "bible_passage": "John 3:16-20", "sermon_description": "This is an upload description", "sermon_video_embed": '', "wpfc_preacher": 7, "wpfc_sermon_series": 3, "wpfc_bible_book": 5 } print (post) sermon = requests.post(url + '/wpfc_sermon', headers=headers, json=post) print(str(json.loads(sermon.content)))`

Platform

Sermon Manager Version: 2.15.17 WordPress Version: 5.4.1–en_GB PHP Version: 7.2

PeteEdley-EdleyIT commented 4 years ago

ok so further info when I run the above code there is an entry created in wp_postmeta for sermon_video_embed for that sermon id.

But it does not show up in interface or on the page.

if I add the embed code after the post is created via the webinterface then it create an entry on wp_postmeta called sermon_video.

if I change my json to sermon_video this does not create an entry in wp_postmeta at all.

jasonmwestbrook commented 4 years ago

@PeteEdley-EdleyIT, We appreciate your help with our plugin. The company has recently been acquired by a new owner. We look forward to further developing this legacy plugin and building new solutions. We are in the middle of the transition and hope to have everything sorted out soon. We look forward to your continued input and look forward to working with you.