Version Description
- 16/10/2014 =
- Fix - Custom Price Labels - Hiding price labels on cart page didn't work, fixed. Suggested by Paolo.
Download this release
Release Info
Developer | algoritmika |
Plugin | Booster for WooCommerce |
Version | 1.7.9 |
Comparing to | |
See all releases |
Code changes from version 1.7.8 to 1.7.9
- includes/class-wcj-price-labels.php +3 -3
- includes/class-wcj-product-input-fields.php +73 -0
- readme.txt +5 -1
- woocommerce-jetpack.php +1 -1
includes/class-wcj-price-labels.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* The WooCommerce Jetpack Price Labels class.
|
6 |
*
|
7 |
* @class WCJ_Price_Labels
|
8 |
-
* @version 1.8.
|
9 |
* @category Class
|
10 |
* @author Algoritmika Ltd.
|
11 |
*/
|
@@ -477,10 +477,10 @@ class WCJ_Price_Labels {
|
|
477 |
( ( 'off' === $labels_array['variation_products'] ) && ( is_archive() ) ) ||
|
478 |
( ( 'off' === $labels_array['variation_single'] ) && ( is_single() ) ) ||
|
479 |
( ( 'off' === $labels_array['variation_page'] ) && ( is_page() ) )
|
480 |
-
)
|
481 |
{
|
482 |
//$current_filter_name = current_filter();
|
483 |
-
if ( 'woocommerce_cart_item_price' === $current_filter_name && '
|
484 |
continue;
|
485 |
|
486 |
$variable_filters_array = array(
|
5 |
* The WooCommerce Jetpack Price Labels class.
|
6 |
*
|
7 |
* @class WCJ_Price_Labels
|
8 |
+
* @version 1.8.1
|
9 |
* @category Class
|
10 |
* @author Algoritmika Ltd.
|
11 |
*/
|
477 |
( ( 'off' === $labels_array['variation_products'] ) && ( is_archive() ) ) ||
|
478 |
( ( 'off' === $labels_array['variation_single'] ) && ( is_single() ) ) ||
|
479 |
( ( 'off' === $labels_array['variation_page'] ) && ( is_page() ) )
|
480 |
+
)
|
481 |
{
|
482 |
//$current_filter_name = current_filter();
|
483 |
+
if ( 'woocommerce_cart_item_price' === $current_filter_name && 'on' === $labels_array['variation_cart'] )
|
484 |
continue;
|
485 |
|
486 |
$variable_filters_array = array(
|
includes/class-wcj-product-input-fields.php
CHANGED
@@ -24,6 +24,11 @@ class WCJ_Product_Custom_Input {
|
|
24 |
// Main hooks
|
25 |
if ( 'yes' === get_option( 'wcj_product_custom_input_enabled' ) ) {
|
26 |
|
|
|
|
|
|
|
|
|
|
|
27 |
// Product Add-ons
|
28 |
add_action( 'woocommerce_before_add_to_cart_button', array( $this, 'product_add_ons_add_custom_text_input' ), 100 );
|
29 |
add_filter( 'woocommerce_add_cart_item_data', array( $this, 'product_add_ons_add_cart_item_data' ), 100, 3 );
|
@@ -40,6 +45,74 @@ class WCJ_Product_Custom_Input {
|
|
40 |
add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
|
41 |
}
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
/**
|
45 |
* product_add_ons_validate_values.
|
24 |
// Main hooks
|
25 |
if ( 'yes' === get_option( 'wcj_product_custom_input_enabled' ) ) {
|
26 |
|
27 |
+
// Add meta box
|
28 |
+
add_action( 'add_meta_boxes', array( $this, 'add_custom_input_fields_meta_box' ) );
|
29 |
+
// Save Post
|
30 |
+
add_action( 'save_post_product', array( $this, 'save_custom_input_fields' ), 999, 2 );
|
31 |
+
|
32 |
// Product Add-ons
|
33 |
add_action( 'woocommerce_before_add_to_cart_button', array( $this, 'product_add_ons_add_custom_text_input' ), 100 );
|
34 |
add_filter( 'woocommerce_add_cart_item_data', array( $this, 'product_add_ons_add_cart_item_data' ), 100, 3 );
|
45 |
add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
|
46 |
}
|
47 |
|
48 |
+
/**
|
49 |
+
* Save custom input fields.
|
50 |
+
*/
|
51 |
+
public function save_custom_input_fields( $post_id, $post ) {
|
52 |
+
// Check that we are saving with input fields displayed.
|
53 |
+
if ( ! isset( $_POST['woojetpack_input_fields_save_post'] ) )
|
54 |
+
return;
|
55 |
+
// Option name?
|
56 |
+
$option_name = 'wcj_input_fields_text_1_enabled';
|
57 |
+
// Save
|
58 |
+
if ( isset( $_POST[ $option_name ] ) )
|
59 |
+
update_post_meta( $post_id, '_' . $option_name, $_POST[ $option_name ] );
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* add_custom_input_fields_meta_box.
|
64 |
+
*/
|
65 |
+
public function add_custom_input_fields_meta_box() {
|
66 |
+
add_meta_box( 'wc-jetpack-input-fields', 'WooCommerce Jetpack: Custom Input Fields', array($this, 'create_custom_input_fields_meta_box'), 'product', 'normal', 'high' );
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* create_custom_input_fields_meta_box.
|
71 |
+
*/
|
72 |
+
public function create_custom_input_fields_meta_box() {
|
73 |
+
$html = '<h4>' . __( 'Text Fields', 'woocommerce-jetpack' ) . '</h4>';
|
74 |
+
$html .= '<table style="width:100%;">';
|
75 |
+
|
76 |
+
$is_disabled = '';
|
77 |
+
$current_post_id = 0;
|
78 |
+
|
79 |
+
$option_name = 'wcj_input_fields_text_1_enabled';
|
80 |
+
$is_checked = checked( get_post_meta( $current_post_id, '_' . $option_name, true ), 'on', false );
|
81 |
+
$html .= '<tr>';
|
82 |
+
$html .= '<td>';
|
83 |
+
$html .= __( 'Enable', 'woocommerce-jetpack' );
|
84 |
+
$html .= '</td>';
|
85 |
+
$html .= '<td>';
|
86 |
+
$html .= '<input class="checkbox" type="checkbox" ' . $is_disabled . ' name="' . $option_name . '" id="' . $option_name . '" ' . $is_checked . ' />';
|
87 |
+
$html .= '</td>';
|
88 |
+
$html .= '</tr>';
|
89 |
+
|
90 |
+
$option_name = 'wcj_input_fields_text_1_requred';
|
91 |
+
$is_checked = checked( get_post_meta( $current_post_id, '_' . $option_name, true ), 'on', false );
|
92 |
+
$html .= '<tr>';
|
93 |
+
$html .= '<td>';
|
94 |
+
$html .= __( 'Required', 'woocommerce-jetpack' );
|
95 |
+
$html .= '</td>';
|
96 |
+
$html .= '<td>';
|
97 |
+
$html .= '<input class="checkbox" type="checkbox" ' . $is_disabled . ' name="' . $option_name . '" id="' . $option_name . '" ' . $is_checked . ' />';
|
98 |
+
$html .= '</td>';
|
99 |
+
$html .= '</tr>';
|
100 |
+
|
101 |
+
$option_name = 'wcj_input_fields_text_1_title';
|
102 |
+
$saved_title = get_post_meta( $current_post_id, '_' . $option_name, true );
|
103 |
+
$html .= '<tr>';
|
104 |
+
$html .= '<td>';
|
105 |
+
$html .= __( 'Title', 'woocommerce-jetpack' );
|
106 |
+
$html .= '</td>';
|
107 |
+
$html .= '<td>';
|
108 |
+
$html .= '<textarea style="width:30%;min-width:100px;height:50px;" ' . $is_disabled . ' name="' . $option_name . '">' . $saved_title . '</textarea>';
|
109 |
+
$html .= '</td>';
|
110 |
+
$html .= '</tr>';
|
111 |
+
|
112 |
+
$html .= '</table>';
|
113 |
+
$html .= '<input type="hidden" name="woojetpack_input_fields_save_post" value="woojetpack_input_fields_save_post">';
|
114 |
+
echo $html;
|
115 |
+
}
|
116 |
|
117 |
/**
|
118 |
* product_add_ons_validate_values.
|
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,custom css,hide categories count,hide subcategories count,hide category count,hide subcategory count,display total sales
|
5 |
Requires at least: 3.9.1
|
6 |
Tested up to: 4.0
|
7 |
-
Stable tag: 1.7.
|
8 |
License: GNU General Public License v3.0
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -127,9 +127,13 @@ If you wish that some task would go up the queue to make it faster, please conta
|
|
127 |
- More: Packing Slip Option (without prices because Packing Slip is not Invoice),
|
128 |
- Customizable Packing Slip template.
|
129 |
- Orders: Customer VAT Number field (very useful in Europa).
|
|
|
130 |
|
131 |
== Changelog ==
|
132 |
|
|
|
|
|
|
|
133 |
= 1.7.8 - 15/10/2014 =
|
134 |
* Fix - Product Listings - Hide empty not working, fixed. Suggested by Rene.
|
135 |
This was caused by changes in WooCommerce code.
|
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,custom css,hide categories count,hide subcategories count,hide category count,hide subcategory count,display total sales
|
5 |
Requires at least: 3.9.1
|
6 |
Tested up to: 4.0
|
7 |
+
Stable tag: 1.7.9
|
8 |
License: GNU General Public License v3.0
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
127 |
- More: Packing Slip Option (without prices because Packing Slip is not Invoice),
|
128 |
- Customizable Packing Slip template.
|
129 |
- Orders: Customer VAT Number field (very useful in Europa).
|
130 |
+
* Add pdf packing slips (also be attached to the admin new order email). Idea by Ron.
|
131 |
|
132 |
== Changelog ==
|
133 |
|
134 |
+
= 1.7.9 - 16/10/2014 =
|
135 |
+
* Fix - Custom Price Labels - Hiding price labels on cart page didn't work, fixed. Suggested by Paolo.
|
136 |
+
|
137 |
= 1.7.8 - 15/10/2014 =
|
138 |
* Fix - Product Listings - Hide empty not working, fixed. Suggested by Rene.
|
139 |
This was caused by changes in WooCommerce code.
|
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.7.
|
7 |
Author: Algoritmika Ltd
|
8 |
Author URI: http://www.algoritmika.com
|
9 |
Copyright: © 2014 Algoritmika Ltd.
|
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.7.9
|
7 |
Author: Algoritmika Ltd
|
8 |
Author URI: http://www.algoritmika.com
|
9 |
Copyright: © 2014 Algoritmika Ltd.
|