Version Description
- Jul 13, 2022 =
- Improved security of handling plugin settings with the WordPress plugin marketplace requirements. Ecwid ecommerce shopping cart plugin update is recommended.
Download this release
Release Info
Developer | Ecwid |
Plugin | Ecwid Ecommerce Shopping Cart |
Version | 6.10.24 |
Comparing to | |
See all releases |
Code changes from version 6.10.23 to 6.10.24
- ecwid-shopping-cart.php +10 -6
- includes/class-ecwid-help-page.php +33 -30
- readme.txt +4 -1
- templates/admin-params.php +27 -15
- templates/help.php +51 -19
ecwid-shopping-cart.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.ecwid.com?partner=wporg
|
|
5 |
Description: Ecwid is a free full-featured shopping cart. It can be easily integrated with any Wordpress blog and takes less than 5 minutes to set up.
|
6 |
Text Domain: ecwid-shopping-cart
|
7 |
Author: Ecwid Ecommerce
|
8 |
-
Version: 6.10.
|
9 |
Author URI: https://ecwid.to/ecwid-site
|
10 |
License: GPLv2 or later
|
11 |
*/
|
@@ -1722,7 +1722,7 @@ EOT;
|
|
1722 |
add_action( 'activated_plugin', 'ecwid_plugin_activation_redirect' );
|
1723 |
function ecwid_plugin_activation_redirect( $plugin ) {
|
1724 |
|
1725 |
-
$is_nonce_set = isset($_POST['_wpnonce']) && wp_verify_nonce( $_POST['_wpnonce'], 'bulk-plugins' );
|
1726 |
|
1727 |
$is_bulk_activation = $is_nonce_set
|
1728 |
&& isset($_POST['action'])
|
@@ -1966,7 +1966,11 @@ function ecwid_update_plugin_params()
|
|
1966 |
wp_die( __( 'Sorry, you are not allowed to access this page.' ) );
|
1967 |
}
|
1968 |
|
1969 |
-
|
|
|
|
|
|
|
|
|
1970 |
wp_die( __( 'Sorry, you are not allowed to access this page.' ) );
|
1971 |
}
|
1972 |
|
@@ -2103,7 +2107,7 @@ function ecwid_plugin_actions($links) {
|
|
2103 |
|
2104 |
function ecwid_settings_api_init() {
|
2105 |
|
2106 |
-
if ( isset( $_POST['settings_section'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'ecwid_options_page-options' ) ) {
|
2107 |
|
2108 |
switch ( $_POST['settings_section'] ) {
|
2109 |
case 'general':
|
@@ -2131,7 +2135,7 @@ function ecwid_settings_api_init() {
|
|
2131 |
}
|
2132 |
}
|
2133 |
|
2134 |
-
if ( isset( $_POST['ecwid_store_id'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'ecwid_options_page-options' ) ) {
|
2135 |
|
2136 |
$new_store_id = sanitize_text_field(wp_unslash($_POST['ecwid_store_id']));
|
2137 |
|
@@ -2423,7 +2427,7 @@ function ecwid_admin_post_connect()
|
|
2423 |
return;
|
2424 |
}
|
2425 |
|
2426 |
-
if ( isset($_GET['force_store_id']) && wp_verify_nonce($_GET['_wpnonce'], 'ec_admin') ) {
|
2427 |
|
2428 |
$force_store_id = sanitize_text_field(wp_unslash($_GET['force_store_id']));
|
2429 |
|
5 |
Description: Ecwid is a free full-featured shopping cart. It can be easily integrated with any Wordpress blog and takes less than 5 minutes to set up.
|
6 |
Text Domain: ecwid-shopping-cart
|
7 |
Author: Ecwid Ecommerce
|
8 |
+
Version: 6.10.24
|
9 |
Author URI: https://ecwid.to/ecwid-site
|
10 |
License: GPLv2 or later
|
11 |
*/
|
1722 |
add_action( 'activated_plugin', 'ecwid_plugin_activation_redirect' );
|
1723 |
function ecwid_plugin_activation_redirect( $plugin ) {
|
1724 |
|
1725 |
+
$is_nonce_set = isset($_POST['_wpnonce']) && wp_verify_nonce( wp_unslash( $_POST['_wpnonce'] ), 'bulk-plugins' ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
|
1726 |
|
1727 |
$is_bulk_activation = $is_nonce_set
|
1728 |
&& isset($_POST['action'])
|
1966 |
wp_die( __( 'Sorry, you are not allowed to access this page.' ) );
|
1967 |
}
|
1968 |
|
1969 |
+
if ( ! isset( $_POST['_wpnonce'] ) ) {
|
1970 |
+
wp_die( __( 'Sorry, you are not allowed to access this page.' ) );
|
1971 |
+
}
|
1972 |
+
|
1973 |
+
if ( ! wp_verify_nonce( wp_unslash( $_POST['_wpnonce'] ), ecwid_get_update_params_action() ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
|
1974 |
wp_die( __( 'Sorry, you are not allowed to access this page.' ) );
|
1975 |
}
|
1976 |
|
2107 |
|
2108 |
function ecwid_settings_api_init() {
|
2109 |
|
2110 |
+
if ( isset( $_POST['settings_section'] ) && wp_verify_nonce( wp_unslash( $_POST['_wpnonce'] ), 'ecwid_options_page-options' ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
|
2111 |
|
2112 |
switch ( $_POST['settings_section'] ) {
|
2113 |
case 'general':
|
2135 |
}
|
2136 |
}
|
2137 |
|
2138 |
+
if ( isset( $_POST['ecwid_store_id'] ) && wp_verify_nonce( wp_unslash( $_POST['_wpnonce'] ), 'ecwid_options_page-options' ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
|
2139 |
|
2140 |
$new_store_id = sanitize_text_field(wp_unslash($_POST['ecwid_store_id']));
|
2141 |
|
2427 |
return;
|
2428 |
}
|
2429 |
|
2430 |
+
if ( isset($_GET['force_store_id']) && wp_verify_nonce( wp_unslash( $_GET['_wpnonce'] ), 'ec_admin' ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
|
2431 |
|
2432 |
$force_store_id = sanitize_text_field(wp_unslash($_GET['force_store_id']));
|
2433 |
|
includes/class-ecwid-help-page.php
CHANGED
@@ -3,59 +3,62 @@
|
|
3 |
class Ecwid_Help_Page {
|
4 |
const CONTACT_US_ACTION_NAME = 'ecwid_contact_us';
|
5 |
public function __construct() {
|
6 |
-
add_action('wp_ajax_' . self::CONTACT_US_ACTION_NAME, array( $this, 'submit_contact_us') );
|
7 |
}
|
8 |
|
9 |
public function submit_contact_us() {
|
10 |
|
11 |
-
if ( !current_user_can('administrator') ) {
|
12 |
-
header('403 Access Denied');
|
13 |
-
|
14 |
die();
|
15 |
}
|
16 |
|
17 |
-
if ( !isset(
|
18 |
-
header('403 Access Denied');
|
|
|
|
|
19 |
|
|
|
|
|
20 |
die();
|
21 |
}
|
22 |
|
23 |
$to = get_option( 'ecwid_support_email' );
|
24 |
|
25 |
$body_lines = array();
|
26 |
-
if ( !ecwid_is_demo_store() ) {
|
27 |
$body_lines[] = 'Store ID: ' . get_ecwid_store_id();
|
28 |
}
|
29 |
$body_lines[] = 'Store URL: ' . Ecwid_Store_Page::get_store_url();
|
30 |
$body_lines[] = 'Wp theme: ' . ecwid_get_theme_name();
|
31 |
-
$body_lines[] = 'Ecwid plugin version: ' . get_option('ecwid_plugin_version');
|
32 |
-
$body_lines[] = '
|
33 |
$body_lines[] = '';
|
34 |
$body_lines[] = 'Message:';
|
35 |
$body_lines[] = '';
|
36 |
-
$body_lines[] = (isset($_POST['body'])) ? sanitize_textarea_field(wp_unslash( $_POST['body'] )) : '';
|
37 |
|
38 |
global $current_user;
|
39 |
$reply_to = $current_user->user_email;
|
40 |
|
41 |
$result = wp_mail(
|
42 |
$to,
|
43 |
-
(isset($_POST['subject'])) ? sanitize_text_field(wp_unslash($_POST['subject'])) : '',
|
44 |
-
implode(PHP_EOL, $body_lines),
|
45 |
'Reply-To:' . $reply_to
|
46 |
);
|
47 |
|
48 |
-
if ($result) {
|
49 |
$nonce = wp_create_nonce( self::CONTACT_US_ACTION_NAME );
|
50 |
|
51 |
echo json_encode(
|
52 |
array(
|
53 |
-
'nonce' => $nonce
|
54 |
)
|
55 |
);
|
56 |
wp_die();
|
57 |
} else {
|
58 |
-
header('500 Send mail failed');
|
59 |
die();
|
60 |
}
|
61 |
}
|
@@ -71,41 +74,41 @@ class Ecwid_Help_Page {
|
|
71 |
|
72 |
foreach ( $faqs as $idx => $faq ) {
|
73 |
if ( isset( $faq['priority'] ) && $faq['priority'] == 'guaranteed_3' ) {
|
74 |
-
$guaranteed_3
|
75 |
$guaranteed_3[] = $faq;
|
76 |
-
unset( $faqs[$idx] );
|
77 |
break;
|
78 |
}
|
79 |
}
|
80 |
-
|
81 |
$result = array();
|
82 |
foreach ( $faqs as $idx => $faq ) {
|
83 |
-
if ( isset($faq['priority']) && $faq['priority'] == 'newbie_with_woo' ) {
|
84 |
$installed_within_two_weeks = time() - get_option( 'ecwid_installation_date' ) < 60 * 60 * 24 * 14;
|
85 |
|
86 |
if ( ecwid_get_woocommerce_status() && $installed_within_two_weeks ) {
|
87 |
$result[] = $faq;
|
88 |
-
unset($faqs[$idx]);
|
89 |
}
|
90 |
}
|
91 |
}
|
92 |
-
$faqs = array_values($faqs);
|
93 |
|
94 |
-
while ( count($result) < $max + ( $guaranteed_3 ? 1 : 0 ) ) {
|
95 |
-
$rand
|
96 |
-
$result[] = $faqs[$rand];
|
97 |
|
98 |
-
unset($faqs[$rand]);
|
99 |
-
$faqs = array_values($faqs);
|
100 |
}
|
101 |
|
102 |
array_splice( $result, 2, 0, $guaranteed_3 );
|
103 |
-
|
104 |
$faqs = $result;
|
105 |
|
106 |
$result = array();
|
107 |
-
foreach ($faqs as $faq) {
|
108 |
-
$faq['body'] = preg_replace('!<img alt="" src="([^"]*)"!', '<img alt="" src="' . ECWID_PLUGIN_URL . '/images/help/' . '$1"', $faq['body']);
|
109 |
|
110 |
$result[] = (object) $faq;
|
111 |
}
|
@@ -114,4 +117,4 @@ class Ecwid_Help_Page {
|
|
114 |
}
|
115 |
}
|
116 |
|
117 |
-
$ecwid_help_page = new Ecwid_Help_Page();
|
3 |
class Ecwid_Help_Page {
|
4 |
const CONTACT_US_ACTION_NAME = 'ecwid_contact_us';
|
5 |
public function __construct() {
|
6 |
+
add_action( 'wp_ajax_' . self::CONTACT_US_ACTION_NAME, array( $this, 'submit_contact_us' ) );
|
7 |
}
|
8 |
|
9 |
public function submit_contact_us() {
|
10 |
|
11 |
+
if ( ! current_user_can( 'administrator' ) ) {
|
12 |
+
header( '403 Access Denied' );
|
|
|
13 |
die();
|
14 |
}
|
15 |
|
16 |
+
if ( ! isset( $_POST['_wpnonce'] ) ) {
|
17 |
+
header( '403 Access Denied' );
|
18 |
+
die();
|
19 |
+
}
|
20 |
|
21 |
+
if ( ! wp_verify_nonce( wp_unslash( $_POST['_wpnonce'] ), self::CONTACT_US_ACTION_NAME ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
|
22 |
+
header( '403 Access Denied' );
|
23 |
die();
|
24 |
}
|
25 |
|
26 |
$to = get_option( 'ecwid_support_email' );
|
27 |
|
28 |
$body_lines = array();
|
29 |
+
if ( ! ecwid_is_demo_store() ) {
|
30 |
$body_lines[] = 'Store ID: ' . get_ecwid_store_id();
|
31 |
}
|
32 |
$body_lines[] = 'Store URL: ' . Ecwid_Store_Page::get_store_url();
|
33 |
$body_lines[] = 'Wp theme: ' . ecwid_get_theme_name();
|
34 |
+
$body_lines[] = 'Ecwid plugin version: ' . get_option( 'ecwid_plugin_version' );
|
35 |
+
$body_lines[] = 'WordPress version: ' . get_bloginfo( 'version' );
|
36 |
$body_lines[] = '';
|
37 |
$body_lines[] = 'Message:';
|
38 |
$body_lines[] = '';
|
39 |
+
$body_lines[] = ( isset( $_POST['body'] ) ) ? sanitize_textarea_field( wp_unslash( $_POST['body'] ) ) : '';
|
40 |
|
41 |
global $current_user;
|
42 |
$reply_to = $current_user->user_email;
|
43 |
|
44 |
$result = wp_mail(
|
45 |
$to,
|
46 |
+
( isset( $_POST['subject'] ) ) ? sanitize_text_field( wp_unslash( $_POST['subject'] ) ) : '',
|
47 |
+
implode( PHP_EOL, $body_lines ),
|
48 |
'Reply-To:' . $reply_to
|
49 |
);
|
50 |
|
51 |
+
if ( $result ) {
|
52 |
$nonce = wp_create_nonce( self::CONTACT_US_ACTION_NAME );
|
53 |
|
54 |
echo json_encode(
|
55 |
array(
|
56 |
+
'nonce' => $nonce,
|
57 |
)
|
58 |
);
|
59 |
wp_die();
|
60 |
} else {
|
61 |
+
header( '500 Send mail failed' );
|
62 |
die();
|
63 |
}
|
64 |
}
|
74 |
|
75 |
foreach ( $faqs as $idx => $faq ) {
|
76 |
if ( isset( $faq['priority'] ) && $faq['priority'] == 'guaranteed_3' ) {
|
77 |
+
$guaranteed_3 = array();
|
78 |
$guaranteed_3[] = $faq;
|
79 |
+
unset( $faqs[ $idx ] );
|
80 |
break;
|
81 |
}
|
82 |
}
|
83 |
+
|
84 |
$result = array();
|
85 |
foreach ( $faqs as $idx => $faq ) {
|
86 |
+
if ( isset( $faq['priority'] ) && $faq['priority'] == 'newbie_with_woo' ) {
|
87 |
$installed_within_two_weeks = time() - get_option( 'ecwid_installation_date' ) < 60 * 60 * 24 * 14;
|
88 |
|
89 |
if ( ecwid_get_woocommerce_status() && $installed_within_two_weeks ) {
|
90 |
$result[] = $faq;
|
91 |
+
unset( $faqs[ $idx ] );
|
92 |
}
|
93 |
}
|
94 |
}
|
95 |
+
$faqs = array_values( $faqs );
|
96 |
|
97 |
+
while ( count( $result ) < $max + ( $guaranteed_3 ? 1 : 0 ) ) {
|
98 |
+
$rand = rand( 0, count( $faqs ) - 1 );
|
99 |
+
$result[] = $faqs[ $rand ];
|
100 |
|
101 |
+
unset( $faqs[ $rand ] );
|
102 |
+
$faqs = array_values( $faqs );
|
103 |
}
|
104 |
|
105 |
array_splice( $result, 2, 0, $guaranteed_3 );
|
106 |
+
|
107 |
$faqs = $result;
|
108 |
|
109 |
$result = array();
|
110 |
+
foreach ( $faqs as $faq ) {
|
111 |
+
$faq['body'] = preg_replace( '!<img alt="" src="([^"]*)"!', '<img alt="" src="' . ECWID_PLUGIN_URL . '/images/help/' . '$1"', $faq['body'] );
|
112 |
|
113 |
$result[] = (object) $faq;
|
114 |
}
|
117 |
}
|
118 |
}
|
119 |
|
120 |
+
$ecwid_help_page = new Ecwid_Help_Page();
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: Ecwid
|
|
3 |
Tags: ecommerce, e-commerce, storefront, shopping cart, online store
|
4 |
Requires at least: 4.4
|
5 |
Tested up to: 6.0
|
6 |
-
Stable tag: 6.10.
|
7 |
|
8 |
Powerful, easy to use ecommerce shopping cart for WordPress. Sell on Facebook and Instagram. iPhone & Android apps. Superb support. Free plan available.
|
9 |
|
@@ -152,6 +152,9 @@ You can use Ecwid’s built-in import tools to copy your store products from any
|
|
152 |
|
153 |
== Changelog ==
|
154 |
|
|
|
|
|
|
|
155 |
= 6.10.23 - Jul 10, 2022 =
|
156 |
- **Improved security of handling storefront settings. Ecwid ecommerce shopping cart plugin update is recommended.**
|
157 |
- Farmin theme improved compatibility. Even though Ecwid is compatible with every WordPress theme by design, some slight fixes and improvements are sometimes needed to make storefront look better. That’s why we are always monitoring how Ecwid pages look and behave in WordPress ecommerce themes.
|
3 |
Tags: ecommerce, e-commerce, storefront, shopping cart, online store
|
4 |
Requires at least: 4.4
|
5 |
Tested up to: 6.0
|
6 |
+
Stable tag: 6.10.24
|
7 |
|
8 |
Powerful, easy to use ecommerce shopping cart for WordPress. Sell on Facebook and Instagram. iPhone & Android apps. Superb support. Free plan available.
|
9 |
|
152 |
|
153 |
== Changelog ==
|
154 |
|
155 |
+
= 6.10.24 - Jul 13, 2022 =
|
156 |
+
- Improved security of handling plugin settings with the WordPress plugin marketplace requirements. Ecwid ecommerce shopping cart plugin update is recommended.
|
157 |
+
|
158 |
= 6.10.23 - Jul 10, 2022 =
|
159 |
- **Improved security of handling storefront settings. Ecwid ecommerce shopping cart plugin update is recommended.**
|
160 |
- Farmin theme improved compatibility. Even though Ecwid is compatible with every WordPress theme by design, some slight fixes and improvements are sometimes needed to make storefront look better. That’s why we are always monitoring how Ecwid pages look and behave in WordPress ecommerce themes.
|
templates/admin-params.php
CHANGED
@@ -4,13 +4,13 @@
|
|
4 |
<b style="color: red">WARNING: ADVANCED CONFIGURATION AHEAD!</b> Changing these settings may significantly affect the plugin functionality, including admin settings and storefront. You should only continue if you are sure of what you are doing.
|
5 |
<br />
|
6 |
<br />
|
7 |
-
|
8 |
</div>
|
9 |
<br />
|
10 |
|
11 |
<form method="POST" type="multipart/form-data" action="admin-post.php?action=<?php echo ecwid_get_update_params_action(); ?>">
|
12 |
|
13 |
-
<input type="hidden" name="
|
14 |
|
15 |
<style type="text/css">
|
16 |
#ec-params-table { border-collapse: collapse; border-spacing: 0; margin-bottom: 5px; }
|
@@ -21,28 +21,40 @@
|
|
21 |
|
22 |
<table id="ec-params-table">
|
23 |
|
24 |
-
<?php foreach ( ecwid_get_update_params_options() as $key => $option ): ?>
|
25 |
<tr style="padding: 0 0 5px;">
|
26 |
<td><?php echo $key; ?>: </td>
|
27 |
<td>
|
28 |
-
<?php if ( @$option['type'] == 'bool' ): ?>
|
29 |
<select name="option[<?php echo $key; ?>]">
|
30 |
-
<option value=""
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
</select>
|
33 |
-
<?php elseif ( @$option['type'] == 'string'): ?>
|
34 |
-
<input type="text" name="option[<?php echo $key; ?>]" value="<?php echo esc_attr(get_option( $key )); ?>">
|
35 |
-
<?php elseif ( @$option['type'] == 'html'): ?>
|
36 |
-
|
37 |
-
|
38 |
<select name="option[<?php echo $key; ?>]">
|
39 |
-
<?php foreach ( @$option['values'] as $value ): ?>
|
40 |
-
<option value="<?php echo $value; ?>"
|
|
|
|
|
|
|
|
|
41 |
<?php endforeach; ?>
|
42 |
</select>
|
43 |
<?php endif; ?>
|
44 |
|
45 |
-
<?php echo esc_attr( get_option($key) ); ?>
|
46 |
|
47 |
</td>
|
48 |
</tr>
|
@@ -55,4 +67,4 @@
|
|
55 |
|
56 |
<br />
|
57 |
<h2>Clear plugin cache</h2>
|
58 |
-
<a href="?<?php echo ecwid_get_clear_all_cache_action(); ?>&redirect_back">Clear all caches</a>
|
4 |
<b style="color: red">WARNING: ADVANCED CONFIGURATION AHEAD!</b> Changing these settings may significantly affect the plugin functionality, including admin settings and storefront. You should only continue if you are sure of what you are doing.
|
5 |
<br />
|
6 |
<br />
|
7 |
+
Having a problem working with the Online store plugin? Visit our <a target="_blank" href="https://support.ecwid.com">Help center</a> if you haven't yet.
|
8 |
</div>
|
9 |
<br />
|
10 |
|
11 |
<form method="POST" type="multipart/form-data" action="admin-post.php?action=<?php echo ecwid_get_update_params_action(); ?>">
|
12 |
|
13 |
+
<input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce( ecwid_get_update_params_action() ); ?>" />
|
14 |
|
15 |
<style type="text/css">
|
16 |
#ec-params-table { border-collapse: collapse; border-spacing: 0; margin-bottom: 5px; }
|
21 |
|
22 |
<table id="ec-params-table">
|
23 |
|
24 |
+
<?php foreach ( ecwid_get_update_params_options() as $key => $option ) : ?>
|
25 |
<tr style="padding: 0 0 5px;">
|
26 |
<td><?php echo $key; ?>: </td>
|
27 |
<td>
|
28 |
+
<?php if ( @$option['type'] == 'bool' ) : ?>
|
29 |
<select name="option[<?php echo $key; ?>]">
|
30 |
+
<option value=""
|
31 |
+
<?php
|
32 |
+
if ( get_option( $key ) == '' ) :
|
33 |
+
?>
|
34 |
+
selected="selected"<?php endif; ?>>off</option>
|
35 |
+
<option value="Y"
|
36 |
+
<?php
|
37 |
+
if ( get_option( $key ) ) :
|
38 |
+
?>
|
39 |
+
selected="selected"<?php endif; ?>>on</option>
|
40 |
</select>
|
41 |
+
<?php elseif ( @$option['type'] == 'string' ) : ?>
|
42 |
+
<input type="text" name="option[<?php echo $key; ?>]" value="<?php echo esc_attr( get_option( $key ) ); ?>">
|
43 |
+
<?php elseif ( @$option['type'] == 'html' ) : ?>
|
44 |
+
<textarea name="option[<?php echo $key; ?>]" style="width:500px"><?php echo htmlentities( get_option( $key ) ); ?></textarea>
|
45 |
+
<?php elseif ( @$option['values'] ) : ?>
|
46 |
<select name="option[<?php echo $key; ?>]">
|
47 |
+
<?php foreach ( @$option['values'] as $value ) : ?>
|
48 |
+
<option value="<?php echo $value; ?>"
|
49 |
+
<?php
|
50 |
+
if ( $value == get_option( $key ) ) :
|
51 |
+
?>
|
52 |
+
selected="selected"<?php endif; ?>><?php echo $value; ?></option>
|
53 |
<?php endforeach; ?>
|
54 |
</select>
|
55 |
<?php endif; ?>
|
56 |
|
57 |
+
<?php echo esc_attr( get_option( $key ) ); ?>
|
58 |
|
59 |
</td>
|
60 |
</tr>
|
67 |
|
68 |
<br />
|
69 |
<h2>Clear plugin cache</h2>
|
70 |
+
<a href="?<?php echo ecwid_get_clear_all_cache_action(); ?>&redirect_back">Clear all caches</a>
|
templates/help.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
|
13 |
<div class="hds-container">
|
14 |
<div class="hds-wrapper">
|
15 |
-
<form class="hds-form" method="get" target="_blank" data-action="<?php _e( 'https://support.ecwid.com/hc/en-us/search', 'ecwid-shopping-cart'); ?>" onsubmit="help-page searchquerysubmited">
|
16 |
<div class="input-wrapper input-prepend">
|
17 |
<input type="text" class="form-control q" value="" id="q" placeholder="<?php _e( 'E.g. How to set up shipping', 'ecwid-shopping-cart' ); ?> " autocomplete="off"/>
|
18 |
<span class="hds-loader"></span>
|
@@ -24,17 +24,25 @@
|
|
24 |
</form>
|
25 |
</div>
|
26 |
</div>
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
</div>
|
31 |
|
32 |
<div class="block-faq">
|
33 |
<h2><?php _e( 'Frequently Asked Questions', 'ecwid-shopping-cart' ); ?> </h2>
|
34 |
<div class="block-faq-wrap">
|
35 |
<ul class="block-faq-list">
|
36 |
-
<?php
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
<a class="index-article-title" href="#" onclick="return false;">
|
39 |
<i class="icon-down"></i><?php echo $faq->title; ?>
|
40 |
</a>
|
@@ -43,12 +51,23 @@
|
|
43 |
</div>
|
44 |
</li>
|
45 |
|
46 |
-
|
|
|
|
|
|
|
47 |
</ul>
|
48 |
|
49 |
<ul class="block-faq-list">
|
50 |
-
<?php
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
<a class="index-article-title" href="#" onclick="return false;">
|
53 |
<i class="icon-down"></i><?php echo $faq->title; ?>
|
54 |
</a>
|
@@ -56,7 +75,10 @@
|
|
56 |
<?php echo $faq->body; ?>
|
57 |
</div>
|
58 |
</li>
|
59 |
-
|
|
|
|
|
|
|
60 |
</ul>
|
61 |
|
62 |
</div>
|
@@ -181,19 +203,29 @@
|
|
181 |
</div>
|
182 |
</div>
|
183 |
|
184 |
-
<?php if (isset($_SERVER['REMOTE_ADDR']) && !in_array($_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1'))): ?>
|
185 |
<div class="block-contact">
|
186 |
<h2><?php _e( 'Send a message to our support team', 'ecwid-shopping-cart' ); ?> </h2>
|
187 |
|
188 |
<div class="contact-form">
|
189 |
<form action="admin-post.php" enctype="multipart/form-data" class="new_email" id="new_email" method="post" novalidate="novalidate">
|
190 |
<input type="hidden" name="action" value="ecwid_contact_us" />
|
191 |
-
<input type="hidden" name="
|
192 |
-
<input id="email_subject" maxlength="100" name="email[subject]" type="text" class="form-control" value="
|
193 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
<div class="btn-container">
|
195 |
<button id="contact-ecwid-support" class="btn btn-medium btn-aqua" type="submit">
|
196 |
-
<span class="btn-text"><?php _e( 'Send Message', 'ecwid-shopping-cart'); ?></span>
|
197 |
<div class="loader">
|
198 |
<div class="ecwid-spinner spin-right">
|
199 |
<svg width="60px" height="60px" viewBox="0 0 60 60" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
@@ -204,15 +236,15 @@
|
|
204 |
</div>
|
205 |
</div>
|
206 |
</button>
|
207 |
-
<div class="send-error"><?php _e('Send message failed', 'ecwid-shopping-cart'); ?></div>
|
208 |
</div>
|
209 |
</form>
|
210 |
</div>
|
211 |
</div>
|
212 |
<div class="block-sent">
|
213 |
-
<h2><?php _e( 'Your email has been sent', 'ecwid-shopping-cart'); ?></h2>
|
214 |
-
<p><?php _e(' Thank you very much for contacting us! We will get back to you shortly.', 'ecwid-shopping-cart'); ?></p>
|
215 |
-
<p><a id="show-ecwid-contact-again" href="#"><?php _e( 'You can send a new request here.', 'ecwid-shopping-cart'); ?></a></p>
|
216 |
|
217 |
</div>
|
218 |
<?php endif; ?>
|
12 |
|
13 |
<div class="hds-container">
|
14 |
<div class="hds-wrapper">
|
15 |
+
<form class="hds-form" method="get" target="_blank" data-action="<?php _e( 'https://support.ecwid.com/hc/en-us/search', 'ecwid-shopping-cart' ); ?>" onsubmit="help-page searchquerysubmited">
|
16 |
<div class="input-wrapper input-prepend">
|
17 |
<input type="text" class="form-control q" value="" id="q" placeholder="<?php _e( 'E.g. How to set up shipping', 'ecwid-shopping-cart' ); ?> " autocomplete="off"/>
|
18 |
<span class="hds-loader"></span>
|
24 |
</form>
|
25 |
</div>
|
26 |
</div>
|
27 |
+
<div class="block-search block-search-kb-link">
|
28 |
+
<?php echo sprintf( __( 'or <a %s>Browse the Help Center', 'ecwid-shopping-cart' ), 'href="https://support.ecwid.com/"' ); ?>
|
29 |
+
</div>
|
30 |
</div>
|
31 |
|
32 |
<div class="block-faq">
|
33 |
<h2><?php _e( 'Frequently Asked Questions', 'ecwid-shopping-cart' ); ?> </h2>
|
34 |
<div class="block-faq-wrap">
|
35 |
<ul class="block-faq-list">
|
36 |
+
<?php
|
37 |
+
foreach ( $faqs as $idx => $faq ) :
|
38 |
+
if ( $idx % 2 == 0 ) :
|
39 |
+
?>
|
40 |
+
<li class="index-article
|
41 |
+
<?php
|
42 |
+
if ( $idx >= $col_size ) {
|
43 |
+
echo ' index-article--hidden';}
|
44 |
+
?>
|
45 |
+
">
|
46 |
<a class="index-article-title" href="#" onclick="return false;">
|
47 |
<i class="icon-down"></i><?php echo $faq->title; ?>
|
48 |
</a>
|
51 |
</div>
|
52 |
</li>
|
53 |
|
54 |
+
<?php
|
55 |
+
endif;
|
56 |
+
endforeach;
|
57 |
+
?>
|
58 |
</ul>
|
59 |
|
60 |
<ul class="block-faq-list">
|
61 |
+
<?php
|
62 |
+
foreach ( $faqs as $idx => $faq ) :
|
63 |
+
if ( $idx % 2 == 1 ) :
|
64 |
+
?>
|
65 |
+
<li class="index-article
|
66 |
+
<?php
|
67 |
+
if ( $idx >= $col_size ) {
|
68 |
+
echo ' index-article--hidden';}
|
69 |
+
?>
|
70 |
+
">
|
71 |
<a class="index-article-title" href="#" onclick="return false;">
|
72 |
<i class="icon-down"></i><?php echo $faq->title; ?>
|
73 |
</a>
|
75 |
<?php echo $faq->body; ?>
|
76 |
</div>
|
77 |
</li>
|
78 |
+
<?php
|
79 |
+
endif;
|
80 |
+
endforeach;
|
81 |
+
?>
|
82 |
</ul>
|
83 |
|
84 |
</div>
|
203 |
</div>
|
204 |
</div>
|
205 |
|
206 |
+
<?php if ( isset( $_SERVER['REMOTE_ADDR'] ) && ! in_array( $_SERVER['REMOTE_ADDR'], array( '127.0.0.1', '::1' ) ) ) : ?>
|
207 |
<div class="block-contact">
|
208 |
<h2><?php _e( 'Send a message to our support team', 'ecwid-shopping-cart' ); ?> </h2>
|
209 |
|
210 |
<div class="contact-form">
|
211 |
<form action="admin-post.php" enctype="multipart/form-data" class="new_email" id="new_email" method="post" novalidate="novalidate">
|
212 |
<input type="hidden" name="action" value="ecwid_contact_us" />
|
213 |
+
<input type="hidden" name="_wpnonce" id="wp-nonce" value="<?php echo wp_create_nonce( Ecwid_Help_Page::CONTACT_US_ACTION_NAME ); ?>" />
|
214 |
+
<input id="email_subject" maxlength="100" name="email[subject]" type="text" class="form-control" value="
|
215 |
+
<?php
|
216 |
+
if ( ! empty( $_GET['contact_us_subject'] ) ) {
|
217 |
+
echo __( sanitize_text_field( wp_unslash( $_GET['contact_us_subject'] ) ) );}
|
218 |
+
?>
|
219 |
+
" placeholder="<?php _e( 'Subject', 'ecwid-shopping-cart' ); ?> ">
|
220 |
+
<textarea id="email_body" name="email[body]" class="form-control" placeholder="<?php _e( 'Type in your message here', 'ecwid-shopping-cart' ); ?> ">
|
221 |
+
<?php
|
222 |
+
if ( ! empty( $_GET['contact_us_message'] ) ) {
|
223 |
+
echo sanitize_text_field( wp_unslash( $_GET['contact_us_message'] ) );}
|
224 |
+
?>
|
225 |
+
</textarea>
|
226 |
<div class="btn-container">
|
227 |
<button id="contact-ecwid-support" class="btn btn-medium btn-aqua" type="submit">
|
228 |
+
<span class="btn-text"><?php _e( 'Send Message', 'ecwid-shopping-cart' ); ?></span>
|
229 |
<div class="loader">
|
230 |
<div class="ecwid-spinner spin-right">
|
231 |
<svg width="60px" height="60px" viewBox="0 0 60 60" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
236 |
</div>
|
237 |
</div>
|
238 |
</button>
|
239 |
+
<div class="send-error"><?php _e( 'Send message failed', 'ecwid-shopping-cart' ); ?></div>
|
240 |
</div>
|
241 |
</form>
|
242 |
</div>
|
243 |
</div>
|
244 |
<div class="block-sent">
|
245 |
+
<h2><?php _e( 'Your email has been sent', 'ecwid-shopping-cart' ); ?></h2>
|
246 |
+
<p><?php _e( ' Thank you very much for contacting us! We will get back to you shortly.', 'ecwid-shopping-cart' ); ?></p>
|
247 |
+
<p><a id="show-ecwid-contact-again" href="#"><?php _e( 'You can send a new request here.', 'ecwid-shopping-cart' ); ?></a></p>
|
248 |
|
249 |
</div>
|
250 |
<?php endif; ?>
|