Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
pacotole committed Mar 30, 2022
2 parents 84342ce + 2549e0d commit 05c35ed
Show file tree
Hide file tree
Showing 26 changed files with 811 additions and 269 deletions.
12 changes: 11 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: Chat, Click to Chat, Facebook Messenger, WhatsApp, Telegram, Whatsapp Busi
Requires at least: 3.5.0
Tested up to: 5.9
Requires PHP: 5.3
Stable tag: 4.4.1
Stable tag: 4.4.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -256,6 +256,8 @@ If your site don't have standard names for UA tracker ('ga') or data layer ('dat
return $settings;
} );`

Joinchat is compatible with plugins **MonsterInsights – Google Analytics Dashboard for WordPress** and **Google Tag Manager for WordPress** custom names.

= Google Tag Manager integration =

Join.chat sends a `'JoinChat'` event if GTM is detected when user launch WhatsApp:
Expand Down Expand Up @@ -329,6 +331,14 @@ Join.chat save two localStorage variables for proper operation:

== Changelog ==

= 4.4.2 =
* **NEW Optimized CSS** for only button without Call to Action (only 2.5kB).
* **NEW** Compatible with **Perfect Brands for WooCommerce** for brand custom settings.
* **NEW** Compatible with **Google Tag Manager for WordPress** custom DataLayer name.
* **NEW** Don't load on Elementor Site Builder previews.
* FIX badge animation don't show error introduced in v4.4.0.
* CHANGED optimized render without unused elements.

= 4.4.1 =
* FIX Google Ads conversion field is too short.

Expand Down
34 changes: 32 additions & 2 deletions admin/class-joinchat-woo-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ public function init( $joinchat ) {
$loader->add_filter( 'joinchat_help_tab_styles_and_vars', $this, 'help_tab_vars' );
$loader->add_filter( 'joinchat_metabox_vars', $this, 'metabox_vars', 10, 2 );
$loader->add_filter( 'joinchat_metabox_placeholders', $this, 'metabox_placeholders', 10, 3 );

if ( defined( 'PWB_PLUGIN_FILE' ) ) { // Perfect Brands for WooCommerce
$loader->add_filter( 'joinchat_term_metabox_output', $this, 'term_metabox_fix', 10, 4 );
}

}

/**
Expand Down Expand Up @@ -129,7 +134,13 @@ public function custom_post_types( $custom_post_types ) {
*/
public function custom_taxonomies( $taxonomies ) {

return array_merge( $taxonomies, array( 'product_cat', 'product_tag' ) );
$product_taxs = array( 'product_cat', 'product_tag' );

if ( defined( 'PWB_PLUGIN_FILE' ) ) {
$product_taxs[] = 'pwb-brand';
}

return array_merge( $taxonomies, $product_taxs );

}

Expand Down Expand Up @@ -375,7 +386,6 @@ public function metabox_vars( $vars, $obj ) {
return $vars;
}


/**
* Add Product metabox placeholders info.
*
Expand All @@ -401,4 +411,24 @@ public function metabox_placeholders( $placeholders, $obj, $settings ) {

return $placeholders;
}

/**
* Fix term meteabox for Brands
*
* @since 4.4.2
* @param string $metabox_output
* @param WP_Term $term Current taxonomy term object
* @param array $metadata
* @param string $taxonomy Current taxonomy slug
* @return string
*/
public function term_metabox_fix( $metabox_output, $term, $metadata, $taxonomy ) {

if ( 'pwb-brand' === $taxonomy ) {
$metabox_output = '<table class="form-table">' . $metabox_output;
}

return $metabox_output;

}
}
4 changes: 2 additions & 2 deletions joinchat.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Plugin Name: Join.chat
* Plugin URI: https://join.chat
* Description: Connects a WordPress chat with WhatsApp. The best solution for marketing and support. Stop losing customers and increase your sales.
* Version: 4.4.1
* Version: 4.4.2
* Author: Creame
* Author URI: https://crea.me
* License: GPL-2.0+
Expand All @@ -26,7 +26,7 @@
/**
* Define constants.
*/
define( 'JOINCHAT_VERSION', '4.4.1' );
define( 'JOINCHAT_VERSION', '4.4.2' );
define( 'JOINCHAT_FILE', __FILE__ );
define( 'JOINCHAT_DIR', plugin_dir_path( JOINCHAT_FILE ) );
define( 'JOINCHAT_BASENAME', plugin_basename( JOINCHAT_FILE ) );
Expand Down
Loading

0 comments on commit 05c35ed

Please sign in to comment.