Skip to content

Commit d074b91

Browse files
committed
Various fixes
1 parent 472f357 commit d074b91

File tree

7 files changed

+13
-8
lines changed

7 files changed

+13
-8
lines changed

.github/workflows/release-plugin-zip.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ jobs:
88
name: Release new tagged version
99
runs-on: ubuntu-latest
1010
steps:
11+
- uses: actions/checkout@master
1112
# Build Release Zip for GitHub
1213
- name: ZIP Release
1314
uses: thedoctor0/zip-release@master
@@ -27,7 +28,7 @@ jobs:
2728
release_name: ${{ github.ref }}
2829
body: Follow the development on https://github.com/ouun/zammad-wp
2930
draft: false
30-
prerelease: false
31+
prerelease: true
3132

3233
# One ZIP upload directly to Release
3334
- name: Upload Release Asset

assets/js/shared/chat.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ jQuery(function initForm($) {
150150
// Close the session
151151
return chat.sessionClose();
152152
};
153+
} else if (!form.length) {
154+
zammadDebugMessage('The Fallback Form is missing. Maybe a caching issue?');
153155
}
154156
}
155157
} else {

dist/js/chat.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

includes/functions/chat.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function zammad_init_chat($chat_id = 1, $args = array())
8787
);
8888

8989
// Localize Script
90-
wp_add_inline_script('zammad_wp_chat', 'const chatOptions =' . json_encode($settings));
90+
wp_add_inline_script('zammad_wp_chat', 'const chatOptions =' . json_encode($settings), 'before');
9191

9292
// Enqueue styles
9393
wp_enqueue_style('zammad_wp_chat');

includes/functions/form.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,14 @@ function zammad_init_form($form_element = '#feedback-form', $args = array())
4545
'showTitle' => true,
4646
'messageTitle' => 'Contact us',
4747
'messageSubmit' => 'Submit',
48-
'messageThankYou' => 'Thank you for your inquiry (#%s)! We\'ll contact you as soon as possible.',
4948
'modal' => true,
5049
'attachmentSupport' => true,
5150
'noCSS' => true, # Loading the CSS from the plugin
5251
)
5352
);
5453

5554
// Localize Script
56-
wp_add_inline_script('zammad_wp_chat', 'const formOptions =' . json_encode(wp_parse_args($args, $defaults)));
55+
wp_add_inline_script('zammad_wp_form', 'const formOptions =' . json_encode( wp_parse_args($args, $defaults), JSON_UNESCAPED_UNICODE ), 'before');
5756

5857
// Enqueue styles
5958
wp_enqueue_style('zammad_wp_form');

plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414

1515
// Useful global constants.
16-
define('ZAMMAD_WP_VERSION', '0.3.0');
16+
define('ZAMMAD_WP_VERSION', '0.4.0');
1717
define('ZAMMAD_WP_URL', plugin_dir_url(__FILE__));
1818
define('ZAMMAD_WP_PATH', plugin_dir_path(__FILE__));
1919
define('ZAMMAD_WP_INC', ZAMMAD_WP_PATH . 'includes/');

readme.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
Contributors: werepack, philippmuenchen
33
Donate link: https://www.paypal.me/ouun
44
Tags: zammad, live-chat, ticketing, forms, feedback
5-
Requires at least: 4.0
5+
Requires at least: 4.5
66
Tested up to: 5.5
7-
Stable tag: 0.3.0
7+
Stable tag: 0.4.0
88

99
This plugin helps you embed Zammad Chats & Forms into your WordPress site and gives you access to the Zammad API if required.
1010

@@ -25,6 +25,9 @@ Use `composer require ouun/zammad-wp` to install
2525

2626
== Changelog ==
2727

28+
= 0.4.0 =
29+
* Various fixes
30+
2831
= 0.3.0 =
2932
* Fixes Chat Fallback to Form
3033
* Fixes missing form in backend

0 commit comments

Comments
 (0)