Share on facebook
Share on twitter
Share on linkedin

Sneak peek – All new WAme

WAme 3.0 beta

We have been working really hard for a month and a half to launch a new version of WAme to set a new beginning in the development of the plugin. The reason is that the project has gained a lot of traction, we are closer to the 100K active installations and the growth rate is overwhelming, exceeding 2,500 weekly installations.

The next step for us was to make a complete integration with WooCommerce to address a more specialised public and gradually launch a collection of Add-ons so that each user can vitamin WAme with what they really need. And we want to do it without loosing the simplicity of the plugin.

To achieve all this we needed the plugin to be robust in its foundations and at the same time more open and flexible. We have rewritten much of the code to make it more modular and extensible. The basic functionality is still intact but now you can add new functions or integrate it with other plugins.

This update is of special interest for developers who can modify or extend the WAme functionalities thanks to the powerful set of “filters” and “actions” that have been included (check this example). We want to involve other developers in the growth of WAme, and create community around it, because that is what we have seen in each WordCamp: community and users creating value together.

You can download this new version from WordPress > https://wordpress.org/plugins/creame-whatsapp-me/

Thank you all!! 👋


How to add your own code to WAme:

With this code we can add to the plugin a new configuration to add a new field to create a specific CTA for registered users. You can compress this PHP as a ZIP and upload it to WP as is done with any plugin, activate it and everything is ready 😇

<?php
/*
Plugin Name: WAme logged CTA
Plugin URI: https://crea.me/
Description: Different CTA for logged users
Version: 1.0.0
Author: Creame
Author URI: https://crea.me/
License: MIT License
*/


// Add admin CTA logged setting
function logged_cta_setting( $settings ) {
$settings['message_text_logged'] = '';
return $settings;
}
add_filter( 'whatsappme_extra_settings', 'logged_cta_setting' );

// Add admin CTA logged section field
function add_logged_cta_field( $sections ) {
$sections['chat']['message_text_logged'] = __( 'Call To Action', 'creame-whatsapp-me' ) . ' (Logged)';
return $sections;
}
add_filter( 'whatsappme_tab_general_sections', 'add_logged_cta_field' );

// Admin CTA logged field output
function logged_cta_field( $output, $field_id, $settings ) {
$value = isset( $settings[ $field_id ] ) ? $settings[ $field_id ] : '';
if ( 'message_text_logged' === $field_id ) {
$output = '<textarea id="whatsappme_message_text_logged" name="whatsappme[message_text_logged]" rows="4" class="regular-text">' . $value . '</textarea>';
}
return $output;
}
add_filter( 'whatsappme_field_output', 'logged_cta_field', 10, 3 );

// Admin CTA logged field validation
function logged_cta_field_validate( $input ) {
$input['message_text_logged'] = WhatsAppMe_Admin::clean_input( $input['message_text_logged'] );
return $input;
}
add_filter( 'whatsappme_settings_validate', 'logged_cta_field_validate' );

// Replace CTA for logged users
function replace_cta_if_logged( $settings ) {
if ( is_user_logged_in() ) {
$settings['message_text'] = $settings['message_text_logged'];
}
unset( $settings['message_text_logged'] );
return $settings;
}
add_filter( 'whatsappme_get_settings_site', 'replace_cta_if_logged' );
5/5

80.000 + users love WAme for Wordpress

Add a WhatsApp chatbox to your WordPress site

Invitar a un amigo

Share on email
Por Email
Share on whatsapp
Por WhatsApp