Version Description
- 23/09/2014 =
- New Feature - General - Another custom CSS tool.
- Dev - Orders - Minimum order amount -
textarea
instead oftext
option type. Now can add tags (e.g.<span class="your_class"></span>
) to customers messages.
Download this release
Release Info
Developer | algoritmika |
Plugin | Booster for WooCommerce |
Version | 1.6.1 |
Comparing to | |
See all releases |
Code changes from version 1.6.0 to 1.6.1
- includes/class-wcj-general.php +124 -0
- includes/class-wcj-orders.php +3 -3
- readme.txt +5 -1
- woocommerce-jetpack.php +3 -1
includes/class-wcj-general.php
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* WooCommerce Jetpack General
|
4 |
+
*
|
5 |
+
* The WooCommerce Jetpack General class.
|
6 |
+
*
|
7 |
+
* @class WCJ_General
|
8 |
+
* @version 1.0.0
|
9 |
+
* @category Class
|
10 |
+
* @author Algoritmika Ltd.
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
14 |
+
|
15 |
+
if ( ! class_exists( 'WCJ_General' ) ) :
|
16 |
+
|
17 |
+
class WCJ_General {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Constructor.
|
21 |
+
*/
|
22 |
+
public function __construct() {
|
23 |
+
|
24 |
+
// Main hooks
|
25 |
+
if ( 'yes' === get_option( 'wcj_general_enabled' ) ) {
|
26 |
+
if ( '' != get_option( 'wcj_general_custom_css' ) ) {
|
27 |
+
add_action( 'wp_head', array( $this, 'hook_custom_css' ) );
|
28 |
+
}
|
29 |
+
if ( '' != get_option( 'wcj_general_custom_admin_css' ) ) {
|
30 |
+
add_action( 'admin_head', array( $this, 'hook_custom_admin_css' ) );
|
31 |
+
}
|
32 |
+
}
|
33 |
+
|
34 |
+
// Settings hooks
|
35 |
+
add_filter( 'wcj_settings_sections', array( $this, 'settings_section' ) );
|
36 |
+
add_filter( 'wcj_settings_general', array( $this, 'get_settings' ), 100 );
|
37 |
+
add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* hook_custom_css.
|
42 |
+
*/
|
43 |
+
public function hook_custom_css() {
|
44 |
+
$output = '<style>' . get_option( 'wcj_general_custom_css' ) . '</style>';
|
45 |
+
echo $output;
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* hook_custom_admin_css.
|
50 |
+
*/
|
51 |
+
public function hook_custom_admin_css() {
|
52 |
+
$output = '<style>' . get_option( 'wcj_general_custom_admin_css' ) . '</style>';
|
53 |
+
echo $output;
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* add_enabled_option.
|
58 |
+
*/
|
59 |
+
public function add_enabled_option( $settings ) {
|
60 |
+
|
61 |
+
$all_settings = $this->get_settings();
|
62 |
+
$settings[] = $all_settings[1];
|
63 |
+
|
64 |
+
return $settings;
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* get_settings.
|
69 |
+
*/
|
70 |
+
function get_settings() {
|
71 |
+
|
72 |
+
$settings = array(
|
73 |
+
|
74 |
+
array( 'title' => __( 'General Options', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => __( '', 'woocommerce-jetpack' ), 'id' => 'wcj_general_options' ),
|
75 |
+
|
76 |
+
array(
|
77 |
+
'title' => __( 'General', 'woocommerce-jetpack' ),
|
78 |
+
'desc' => __( 'Enable the General feature', 'woocommerce-jetpack' ),
|
79 |
+
'desc_tip' => __( 'Separate custom CSS for front and back end.', 'woocommerce-jetpack' ),
|
80 |
+
'id' => 'wcj_general_enabled',
|
81 |
+
'default' => 'yes',
|
82 |
+
'type' => 'checkbox',
|
83 |
+
),
|
84 |
+
|
85 |
+
array( 'type' => 'sectionend', 'id' => 'wcj_general_options' ),
|
86 |
+
|
87 |
+
array( 'title' => __( 'Custom CSS Options', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => __( 'Another custom CSS, if you need one.', 'woocommerce-jetpack' ), 'id' => 'wcj_general_custom_css_options' ),
|
88 |
+
|
89 |
+
array(
|
90 |
+
'title' => __( 'Custom CSS - Front end (Customers)', 'woocommerce-jetpack' ),
|
91 |
+
'id' => 'wcj_general_custom_css',
|
92 |
+
'default' => '',
|
93 |
+
'type' => 'textarea',
|
94 |
+
'css' => 'width:66%;min-width:300px;min-height:300px;',
|
95 |
+
),
|
96 |
+
|
97 |
+
array(
|
98 |
+
'title' => __( 'Custom CSS - Back end (Admin)', 'woocommerce-jetpack' ),
|
99 |
+
'id' => 'wcj_general_custom_admin_css',
|
100 |
+
'default' => '',
|
101 |
+
'type' => 'textarea',
|
102 |
+
'css' => 'width:66%;min-width:300px;min-height:300px;',
|
103 |
+
),
|
104 |
+
|
105 |
+
array( 'type' => 'sectionend', 'id' => 'wcj_general_custom_css_options' ),
|
106 |
+
);
|
107 |
+
|
108 |
+
return $settings;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* settings_section.
|
113 |
+
*/
|
114 |
+
function settings_section( $sections ) {
|
115 |
+
|
116 |
+
$sections['general'] = __( 'General', 'woocommerce-jetpack' );
|
117 |
+
|
118 |
+
return $sections;
|
119 |
+
}
|
120 |
+
}
|
121 |
+
|
122 |
+
endif;
|
123 |
+
|
124 |
+
return new WCJ_General();
|
includes/class-wcj-orders.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* The WooCommerce Jetpack Orders class.
|
6 |
*
|
7 |
* @class WCJ_Orders
|
8 |
-
* @version 1.3.
|
9 |
* @category Class
|
10 |
* @author Algoritmika Ltd.
|
11 |
*/
|
@@ -447,7 +447,7 @@ class WCJ_Orders {
|
|
447 |
'desc_tip' => __( 'Message to customer if order is below minimum amount. Default: You must have an order with a minimum of %s to place your order, your current order total is %s.', 'woocommerce-jetpack' ),
|
448 |
'id' => 'wcj_order_minimum_amount_error_message',
|
449 |
'default' => 'You must have an order with a minimum of %s to place your order, your current order total is %s.',
|
450 |
-
'type' => '
|
451 |
'custom_attributes'
|
452 |
=> apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
|
453 |
'css' => 'width:50%;min-width:300px;',
|
@@ -467,7 +467,7 @@ class WCJ_Orders {
|
|
467 |
'desc_tip' => __( 'Message to customer if order is below minimum amount. Default: You must have an order with a minimum of %s to place your order, your current order total is %s.', 'woocommerce-jetpack' ),
|
468 |
'id' => 'wcj_order_minimum_amount_cart_notice_message',
|
469 |
'default' => 'You must have an order with a minimum of %s to place your order, your current order total is %s.',
|
470 |
-
'type' => '
|
471 |
'custom_attributes'
|
472 |
=> apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
|
473 |
'css' => 'width:50%;min-width:300px;',
|
5 |
* The WooCommerce Jetpack Orders class.
|
6 |
*
|
7 |
* @class WCJ_Orders
|
8 |
+
* @version 1.3.3
|
9 |
* @category Class
|
10 |
* @author Algoritmika Ltd.
|
11 |
*/
|
447 |
'desc_tip' => __( 'Message to customer if order is below minimum amount. Default: You must have an order with a minimum of %s to place your order, your current order total is %s.', 'woocommerce-jetpack' ),
|
448 |
'id' => 'wcj_order_minimum_amount_error_message',
|
449 |
'default' => 'You must have an order with a minimum of %s to place your order, your current order total is %s.',
|
450 |
+
'type' => 'textarea',
|
451 |
'custom_attributes'
|
452 |
=> apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
|
453 |
'css' => 'width:50%;min-width:300px;',
|
467 |
'desc_tip' => __( 'Message to customer if order is below minimum amount. Default: You must have an order with a minimum of %s to place your order, your current order total is %s.', 'woocommerce-jetpack' ),
|
468 |
'id' => 'wcj_order_minimum_amount_cart_notice_message',
|
469 |
'default' => 'You must have an order with a minimum of %s to place your order, your current order total is %s.',
|
470 |
+
'type' => 'textarea',
|
471 |
'custom_attributes'
|
472 |
=> apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
|
473 |
'css' => 'width:50%;min-width:300px;',
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://algoritmika.com/donate/
|
|
4 |
Tags: woocommerce,woocommerce jetpack,custom price labels,call for price,currency symbol,remove sorting,remove old product slugs,add to cart text,order number,sequential order numbering,email pdf invoice,pdf invoice,pdf invoices,already in cart,empty cart,redirect to checkout,minimum order amount,customize checkout fields,checkout fields,email,customize product tabs,product tabs,related products number,empty cart,redirect add to cart,redirect to checkout,product already in cart,custom payment gateway,payment gateway icon,auto-complete all orders,custom order statuses,custom order status,remove text from price
|
5 |
Requires at least: 3.9.1
|
6 |
Tested up to: 4.0
|
7 |
-
Stable tag: 1.6.
|
8 |
License: GNU General Public License v3.0
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -106,6 +106,10 @@ If you wish that some task would go up the queue to make it faster, please conta
|
|
106 |
|
107 |
== Changelog ==
|
108 |
|
|
|
|
|
|
|
|
|
109 |
= 1.6.0 - 22/09/2014 =
|
110 |
* Fix - PDF Invoices - Wrong headers for PDF sent, fixed.
|
111 |
This was previously causing a bug when `.html` file extension was wrongly added to PDF. Suggested by Pete (reported from Safari, Mac).
|
4 |
Tags: woocommerce,woocommerce jetpack,custom price labels,call for price,currency symbol,remove sorting,remove old product slugs,add to cart text,order number,sequential order numbering,email pdf invoice,pdf invoice,pdf invoices,already in cart,empty cart,redirect to checkout,minimum order amount,customize checkout fields,checkout fields,email,customize product tabs,product tabs,related products number,empty cart,redirect add to cart,redirect to checkout,product already in cart,custom payment gateway,payment gateway icon,auto-complete all orders,custom order statuses,custom order status,remove text from price
|
5 |
Requires at least: 3.9.1
|
6 |
Tested up to: 4.0
|
7 |
+
Stable tag: 1.6.1
|
8 |
License: GNU General Public License v3.0
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
106 |
|
107 |
== Changelog ==
|
108 |
|
109 |
+
= 1.6.1 - 23/09/2014 =
|
110 |
+
* New Feature - General - Another custom CSS tool.
|
111 |
+
* Dev - Orders - Minimum order amount - `textarea` instead of `text` option type. Now can add tags (e.g. `<span class="your_class"></span>`) to customers messages.
|
112 |
+
|
113 |
= 1.6.0 - 22/09/2014 =
|
114 |
* Fix - PDF Invoices - Wrong headers for PDF sent, fixed.
|
115 |
This was previously causing a bug when `.html` file extension was wrongly added to PDF. Suggested by Pete (reported from Safari, Mac).
|
woocommerce-jetpack.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WooCommerce Jetpack
|
4 |
Plugin URI: http://woojetpack.com
|
5 |
Description: Supercharge your WooCommerce site with these awesome powerful features.
|
6 |
-
Version: 1.6.
|
7 |
Author: Algoritmika Ltd
|
8 |
Author URI: http://www.algoritmika.com
|
9 |
Copyright: © 2014 Algoritmika Ltd.
|
@@ -161,6 +161,8 @@ final class WC_Jetpack {
|
|
161 |
include_once( 'includes/admin/tools/class-wcj-tools.php' );
|
162 |
|
163 |
$settings = array();
|
|
|
|
|
164 |
|
165 |
$settings[] = include_once( 'includes/class-wcj-price-labels.php' );
|
166 |
$settings[] = include_once( 'includes/class-wcj-call-for-price.php' );
|
3 |
Plugin Name: WooCommerce Jetpack
|
4 |
Plugin URI: http://woojetpack.com
|
5 |
Description: Supercharge your WooCommerce site with these awesome powerful features.
|
6 |
+
Version: 1.6.1
|
7 |
Author: Algoritmika Ltd
|
8 |
Author URI: http://www.algoritmika.com
|
9 |
Copyright: © 2014 Algoritmika Ltd.
|
161 |
include_once( 'includes/admin/tools/class-wcj-tools.php' );
|
162 |
|
163 |
$settings = array();
|
164 |
+
|
165 |
+
$settings[] = include_once( 'includes/class-wcj-general.php' );
|
166 |
|
167 |
$settings[] = include_once( 'includes/class-wcj-price-labels.php' );
|
168 |
$settings[] = include_once( 'includes/class-wcj-call-for-price.php' );
|