Added support for sending customer emails

This commit is contained in:
Nedim Uka
2018-11-16 17:14:15 +01:00
parent c630452d0b
commit a07c0e4584
5 changed files with 73 additions and 4 deletions

View File

@@ -326,11 +326,12 @@ export const setSupportMessage = (message) => ({
});
export const sendSupportMail = (orderInfo, orderPackages, supportText) => {
let id = orderInfo.id;
return dispatch => {
return htmlClient.fetch({
url: `${API_SERVER}/orders/api/sendSupportMail`,
url: `${API_SERVER}/wp-json/wiaas/support/sendSupportMail`,
method: 'post',
data: {orderInfo, orderPackages, supportText}
data: {id, supportText}
})
.then(response => {
if (typeof response.data !== 'undefined' && 'messages' in response.data) {