Messenger Customer Chat - Version 1.6

Version Description

  • Bug fixes
Download this release

Release Info

Developer Facebook
Plugin Icon 128x128 Messenger Customer Chat
Version 1.6
Comparing to
See all releases

Code changes from version 1.5 to 1.6

facebook-messenger-customer-chat.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: The Official Facebook Chat Plugin
4
  Description: With one click, you can add the Facebook Chat Plugin to your website, enabling customers to message you while browsing your website. To see and reply to those messages, simply use the same messaging tools you use for your Facebook messaging, on desktop at facebook.com, Facebook Page Manager App (available on iOS and Android), or by adding your page account to Messenger. It’s free, easy to install and comes with a user interface your customers are already familiar with.
5
  Author: Facebook
6
  Author URI: https://developers.facebook.com
7
- Version: 1.5
8
 
9
  * Copyright (C) 2017-present, Facebook, Inc.
10
  *
4
  Description: With one click, you can add the Facebook Chat Plugin to your website, enabling customers to message you while browsing your website. To see and reply to those messages, simply use the same messaging tools you use for your Facebook messaging, on desktop at facebook.com, Facebook Page Manager App (available on iOS and Android), or by adding your page account to Messenger. It’s free, easy to install and comes with a user interface your customers are already familiar with.
5
  Author: Facebook
6
  Author URI: https://developers.facebook.com
7
+ Version: 1.6
8
 
9
  * Copyright (C) 2017-present, Facebook, Inc.
10
  *
options.php CHANGED
@@ -51,9 +51,12 @@ add_action( 'admin_enqueue_scripts', 'fmcc_localize_ajax' );
51
  add_action( 'wp_ajax_update_options', 'fbmcc_update_options');
52
 
53
  function fbmcc_update_options() {
54
- check_ajax_referer( 'update_fmcc_code' );
55
- update_option( 'fbmcc_pageID', sanitize_text_field($_POST['pageID']));
56
- update_option( 'fbmcc_locale', sanitize_text_field($_POST['locale']));
 
 
 
57
  wp_die();
58
  }
59
 
@@ -68,13 +71,17 @@ function fbmcc_add_styles() {
68
  }
69
 
70
  function fmcc_localize_ajax() {
71
- $ajax_object = array(
72
- 'nonce' => wp_create_nonce( 'update_fmcc_code' )
73
- );
74
 
75
- wp_register_script( 'code_script', plugin_dir_url( __FILE__ ) . 'script.js' );
76
- wp_localize_script( 'code_script', 'ajax_object', $ajax_object );
77
- wp_enqueue_script( 'code_script' );
 
 
 
 
 
 
 
78
  }
79
 
80
  function fbmcc_integration_settings() {
51
  add_action( 'wp_ajax_update_options', 'fbmcc_update_options');
52
 
53
  function fbmcc_update_options() {
54
+
55
+ if ( current_user_can( 'manage_options' ) ) {
56
+ check_ajax_referer( 'update_fmcc_code' );
57
+ update_option( 'fbmcc_pageID', sanitize_text_field($_POST['pageID']));
58
+ update_option( 'fbmcc_locale', sanitize_text_field($_POST['locale']));
59
+ }
60
  wp_die();
61
  }
62
 
71
  }
72
 
73
  function fmcc_localize_ajax() {
 
 
 
74
 
75
+ if ( current_user_can( 'manage_options' ) ) {
76
+ $ajax_object = array(
77
+ 'nonce' => wp_create_nonce( 'update_fmcc_code' )
78
+ );
79
+
80
+ wp_register_script( 'code_script', plugin_dir_url( __FILE__ ) . 'script.js' );
81
+ wp_localize_script( 'code_script', 'ajax_object', $ajax_object );
82
+ wp_enqueue_script( 'code_script' );
83
+ }
84
+
85
  }
86
 
87
  function fbmcc_integration_settings() {
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: facebook
3
  Tags: Facebook, Messenger, Customer Care, Chat, Messaging, Chat Plugin
4
  Requires at least: 3.9
5
  Tested up to: 5.4.1
6
- Stable tag: 1.5
7
  Requires PHP: 5.2.4
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -54,7 +54,7 @@ After navigating to the Chat Plugin settings page, click on 'Setup Customer Chat
54
  That's it! You're all set. Now all visitors to your WordPress website will see the Messenger customer chat plugin and can message you.
55
 
56
  = Support =
57
- If you get stuck, or have any questions, you can ask for help in the [Messenger Customer Chat plugin forum](https://wordpress.org/support/plugin/facebook-messenger-customer-chat).
58
 
59
  == Screenshots ==
60
  1. Messenger customer chat on your website
@@ -82,13 +82,13 @@ You need be an administrator of the Page.
82
  On the desktop, go to your Facebook page, and click on Insights on the Navigation bar. On the left hand side, click on Messaging to see your messaging analytics.
83
 
84
  = Where can I find support? =
85
- If you get stuck, or have any questions, you can ask for help in the [Official Facebook Chat Plugin forum](https://wordpress.org/support/plugin/facebook-messenger-customer-chat). If you would like to file a bug, please use the Facebook Bug tool found [here](https://developers.facebook.com/support/bugs/).
86
-
87
- = I am a developer. Can I help improve the plugin? =
88
- Of course! This plugin is open sourced on the Facebook Incubator GitHub. You can find the code and contribution instructions in the [WordPress Messenger customer chat plugin repository](https://github.com/facebookincubator/wordpress-messenger-customer-chat-plugin).
89
 
90
  == Changelog ==
91
 
 
 
 
92
  = 1.5 - April 29, 2020 =
93
  * Fix undefined variable error message
94
 
@@ -114,6 +114,9 @@ Of course! This plugin is open sourced on the Facebook Incubator GitHub. You can
114
 
115
  == Upgrade Notice ==
116
 
 
 
 
117
  = 1.5 =
118
  * Fix undefined variable error message
119
 
3
  Tags: Facebook, Messenger, Customer Care, Chat, Messaging, Chat Plugin
4
  Requires at least: 3.9
5
  Tested up to: 5.4.1
6
+ Stable tag: 1.6
7
  Requires PHP: 5.2.4
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
54
  That's it! You're all set. Now all visitors to your WordPress website will see the Messenger customer chat plugin and can message you.
55
 
56
  = Support =
57
+ If you get stuck, or have any questions, you can ask for help in the [Messenger Platform Developer Community](https://www.facebook.com/groups/messengerplatform).
58
 
59
  == Screenshots ==
60
  1. Messenger customer chat on your website
82
  On the desktop, go to your Facebook page, and click on Insights on the Navigation bar. On the left hand side, click on Messaging to see your messaging analytics.
83
 
84
  = Where can I find support? =
85
+ If you get stuck, or have any questions, you can ask for help in the [Messenger Platform Developer Community](https://www.facebook.com/groups/messengerplatform). If you would like to file a bug, please use the Facebook Bug tool found [here](https://developers.facebook.com/support/bugs/).
 
 
 
86
 
87
  == Changelog ==
88
 
89
+ = 1.6 - July 27, 2020 =
90
+ * Bug fixes
91
+
92
  = 1.5 - April 29, 2020 =
93
  * Fix undefined variable error message
94
 
114
 
115
  == Upgrade Notice ==
116
 
117
+ = 1.6 =
118
+ * Bug fixes
119
+
120
  = 1.5 =
121
  * Fix undefined variable error message
122