Skip to content

Commit

Permalink
Merge pull request #99 from sendsmaily/release/1.8.0
Browse files Browse the repository at this point in the history
Release 1.8.0
  • Loading branch information
marispulk authored Jun 28, 2021
2 parents d245bc8 + 7ee37de commit 181ea82
Show file tree
Hide file tree
Showing 32 changed files with 1,681 additions and 356 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

### 1.8.0
- Feature - user can customize the appearance of the subscription form. [[#97](https://github.com/sendsmaily/smaily-woocommerce-plugin/pull/97)], [[#92](https://github.com/sendsmaily/smaily-woocommerce-plugin/pull/92)], [[#85](https://github.com/sendsmaily/smaily-woocommerce-plugin/issues/85)]

### 1.7.2
- Rework admin settings form [[#94](https://github.com/sendsmaily/smaily-woocommerce-plugin/pull/94)]

Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Automatically synchronize customers to Smaily, easily import products into templ
- Option to limit generated RSS-feed products amount with prefered value
- Option to order generated RSS-feed products by several categories

### Subscribtion Widget
### Subscription Widget

- Smaily subscriber sign up form with built in captcha
- Easy to use form
Expand Down Expand Up @@ -82,12 +82,16 @@ All development for Smaily for WooCommerce is [handled via GitHub](https://githu
2. Move to **Appearance -> Widget** menu from admin page sidepanel.
3. Add Smaily for WooCommerce Form to your prefered location on page.
4. If you want you can select Title for your subscribe newsletter form.
5. Optional autoresponder:

If you have added Form Submitted automation triggers from Smaily site under Automation tab you can see all availabe autoresponders in your widget settings.

There is no need to select autoresponder for widget form, but if you want to customize different approach from opt-in automation trigger you can do that.

When no autoresponder selected regular opt-in workflow will run. You can add delay, filter by field and send email after subscription. For that edit settings in Smaily automation page.
6. Optional layout design modifications:

Change layout, email field text, name field text, button text, button color and button text color.

### Why RSS-feed is displaying "page not found"?

Expand Down
Binary file modified assets/screenshot-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/screenshot-8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
116 changes: 0 additions & 116 deletions inc/Base/Activate.php

This file was deleted.

25 changes: 0 additions & 25 deletions inc/Base/Deactivate.php

This file was deleted.

60 changes: 46 additions & 14 deletions inc/Base/Enqueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public function register() {
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_front_scripts' ) );
// Must have low priority to dequeue successfully.
add_action( 'admin_enqueue_scripts', array( $this, 'dequeue_admin_styles' ), 100 );

}

/**
Expand All @@ -32,7 +31,7 @@ public function register() {
public function enqueue_admin_scripts() {

wp_register_script(
'smailypluginscript',
'smaily_for_woocommerce-admin_settings',
SMAILY_PLUGIN_URL . 'static/javascript.js',
array(
'jquery',
Expand All @@ -42,23 +41,48 @@ public function enqueue_admin_scripts() {
true
);

// enque css and js.
wp_enqueue_script(
'smailypluginscript',
SMAILY_PLUGIN_URL . 'static/javascript.js',
wp_register_script(
'smaily_for_woocommerce-admin_widget',
SMAILY_PLUGIN_URL . 'static/admin-widget.js',
array(
'jquery',
'jquery-ui-tabs',
'smaily_for_woocommerce-jscolor',
),
SMAILY_PLUGIN_VERSION,
true
);
wp_enqueue_style(
'smailypluginstyle',

// Register jscolor.min.js.
wp_register_script(
'smaily_for_woocommerce-jscolor',
SMAILY_PLUGIN_URL . 'static/jscolor.min.js',
array(),
SMAILY_PLUGIN_VERSION,
true
);

// Register styles.
wp_register_style(
'smaily_for_woocommerce-admin_settings',
SMAILY_PLUGIN_URL . 'static/admin-style.css',
array(),
SMAILY_PLUGIN_VERSION
);
wp_register_style(
'smaily_for_woocommerce-admin_widget',
SMAILY_PLUGIN_URL . 'static/admin-widget-style.css',
array(),
SMAILY_PLUGIN_VERSION
);

// Enqueue scripts.
wp_enqueue_script( 'smaily_for_woocommerce-jscolor' );
wp_enqueue_script( 'smaily_for_woocommerce-admin_settings' );
wp_enqueue_script( 'smaily_for_woocommerce-admin_widget' );

// Enqueue styles.
wp_enqueue_style( 'smaily_for_woocommerce-admin_settings' );
wp_enqueue_style( 'smaily_for_woocommerce-admin_widget' );

$translations = array(
'went_wrong' => __( 'Something went wrong connecting to Smaily!', 'smaily' ),
Expand All @@ -67,7 +91,7 @@ public function enqueue_admin_scripts() {
);
// Translations for frontend JS.
wp_localize_script(
'smailypluginscript',
'smaily_for_woocommerce-admin_settings',
'smaily_translations',
$translations
);
Expand All @@ -76,7 +100,7 @@ public function enqueue_admin_scripts() {
$default_settings = array();
$settings = apply_filters( 'smaily_settings', $default_settings );
wp_add_inline_script(
'smailypluginscript',
'smaily_for_woocommerce-inline',
'var smaily_settings = ' . wp_json_encode( $settings ) . ';'
);
}
Expand All @@ -87,8 +111,15 @@ public function enqueue_admin_scripts() {
* @return void
*/
public function enqueue_front_scripts() {
// enque css and js.
wp_enqueue_style( 'smailypluginstyle', SMAILY_PLUGIN_URL . 'static/front-style.css', array(), SMAILY_PLUGIN_VERSION );
// Register style
wp_register_style(
'smaily_for_woocommerce-front_style',
SMAILY_PLUGIN_URL . 'static/front-style.css',
array(),
SMAILY_PLUGIN_VERSION
);
// Enqueue CSS.
wp_enqueue_style( 'smaily_for_woocommerce-front_style' );
}

/**
Expand All @@ -107,7 +138,7 @@ public function dequeue_admin_styles() {
$plugins_dir_url = content_url( 'plugins' );
$wp_styles = wp_styles();
foreach ( $wp_styles->queue as $style_handle ) {
if ( $style_handle === 'smailypluginstyle' ) {
if ( strpos( $style_handle, 'smaily_for_woocommerce' ) === 0 ) {
continue;
}
$style_src_path = $wp_styles->registered[ $style_handle ]->src;
Expand All @@ -117,4 +148,5 @@ public function dequeue_admin_styles() {
}
}
}

}
1 change: 1 addition & 0 deletions inc/Init.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ final class Init {
*/
public static function get_services() {
return array(
Lifecycle::class,
Pages\Admin::class,
Pages\ProfileSettings::class,
Base\Upgrade::class,
Expand Down
Loading

0 comments on commit 181ea82

Please sign in to comment.