Version Description
31/05/2022 =
- FIXED - Added Security vulnerability fixes.
- WooCommerce 6.5.1 tested
- WordPress 6.0 tested
Download this release
Release Info
Developer | ronyp |
Plugin | Booster for WooCommerce |
Version | 5.5.9 |
Comparing to | |
See all releases |
Code changes from version 5.5.8 to 5.5.9
- includes/admin/class-wcj-tools.php +3 -3
- includes/class-wcj-admin-orders-list.php +3 -3
- includes/class-wcj-checkout-files-upload.php +11 -11
- includes/class-wcj-cross-sells.php +3 -3
- includes/class-wcj-debug-tools.php +3 -3
- includes/class-wcj-emails-verification.php +8 -8
- includes/class-wcj-eu-vat-number.php +3 -3
- includes/class-wcj-export-import.php +6 -5
- includes/class-wcj-general.php +5 -5
- includes/class-wcj-max-products-per-user.php +2 -2
- includes/class-wcj-my-account.php +3 -3
- includes/class-wcj-orders.php +6 -6
- includes/class-wcj-payment-gateways.php +3 -3
- includes/class-wcj-pdf-invoicing.php +10 -10
- includes/class-wcj-price-by-user-role.php +3 -3
- includes/class-wcj-product-bookings.php +3 -3
- includes/class-wcj-product-by-user.php +4 -4
- includes/class-wcj-product-open-pricing.php +3 -3
- includes/class-wcj-product-price-by-formula.php +3 -3
- includes/class-wcj-products-xml.php +2 -2
- includes/class-wcj-related-products.php +3 -3
- includes/class-wcj-reports.php +7 -7
- includes/class-wcj-track-users.php +4 -4
- includes/classes/class-wcj-module.php +7 -7
- includes/functions/wcj-functions-booster-core.php +2 -2
- includes/functions/wcj-functions-eu-vat.php +4 -4
- includes/functions/wcj-functions-exchange-rates.php +7 -7
- includes/functions/wcj-functions-products.php +2 -2
- includes/input-fields/class-wcj-product-input-fields-core.php +4 -4
- includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-display.php +14 -14
- includes/price-by-country/class-wcj-price-by-country-group-generator.php +2 -2
- includes/reports/class-wcj-currency-reports.php +3 -3
- includes/reports/wcj-class-reports-customers.php +4 -4
- includes/reports/wcj-class-reports-monthly-sales.php +5 -5
- includes/reports/wcj-class-reports-sales-daily.php +3 -3
- includes/reports/wcj-class-reports-sales-gateways.php +3 -3
- includes/reports/wcj-class-reports-sales.php +5 -5
- includes/settings/wcj-settings-currency-exchange-rates.php +2 -2
- includes/settings/wcj-settings-debug-tools.php +2 -2
- includes/settings/wcj-settings-max-products-per-user.php +2 -2
- includes/settings/wcj-settings-pdf-invoicing-advanced.php +2 -2
- includes/settings/wcj-settings-price-by-country.php +2 -2
- includes/settings/wcj-settings-products-xml.php +2 -2
- includes/settings/wcj-settings-wpml.php +2 -2
- includes/shortcodes/class-wcj-shortcodes-general.php +3 -3
- includes/shortcodes/class-wcj-shortcodes-products-add-form.php +3 -3
- includes/shortcodes/class-wcj-shortcodes-products.php +3 -3
- includes/tools/class-wcj-order-statuses-tool.php +6 -6
- readme.txt +7 -1
- tracking/class-plugin-usage-tracker.php +8 -8
- version-details.txt +3 -4
- woocommerce-jetpack.php +2 -2
includes/admin/class-wcj-tools.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce Tools
|
4 |
*
|
5 |
-
* @version 5.5.
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
@@ -59,7 +59,7 @@ class WCJ_Tools {
|
|
59 |
/**
|
60 |
* create_tools_page.
|
61 |
*
|
62 |
-
* @version 5.5.
|
63 |
*/
|
64 |
function create_tools_page() {
|
65 |
|
@@ -74,7 +74,7 @@ class WCJ_Tools {
|
|
74 |
$active_tab = ( isset( $_GET['tab'] ) ) ? $_GET['tab'] : 'dashboard';
|
75 |
foreach ( $tabs as $tab ) {
|
76 |
$is_active = ( $active_tab === $tab['id'] ) ? 'nav-tab-active' : '';
|
77 |
-
$html .= '<a href="' .
|
78 |
}
|
79 |
$html .= '</h2>';
|
80 |
echo $html;
|
2 |
/**
|
3 |
* Booster for WooCommerce Tools
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
59 |
/**
|
60 |
* create_tools_page.
|
61 |
*
|
62 |
+
* @version 5.5.9
|
63 |
*/
|
64 |
function create_tools_page() {
|
65 |
|
74 |
$active_tab = ( isset( $_GET['tab'] ) ) ? $_GET['tab'] : 'dashboard';
|
75 |
foreach ( $tabs as $tab ) {
|
76 |
$is_active = ( $active_tab === $tab['id'] ) ? 'nav-tab-active' : '';
|
77 |
+
$html .= '<a href="' . esc_url(add_query_arg( array( 'page' => 'wcj-tools', 'tab' => $tab['id'] ), get_admin_url() . 'admin.php' )) . '" class="nav-tab ' . $is_active . '">' . $tab['title'] . '</a>';
|
78 |
}
|
79 |
$html .= '</h2>';
|
80 |
echo $html;
|
includes/class-wcj-admin-orders-list.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Admin Orders List
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @since 3.2.4
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -191,7 +191,7 @@ class WCJ_Admin_Orders_List extends WCJ_Module {
|
|
191 |
/**
|
192 |
* add_shop_order_multiple_statuses_not_completed_link.
|
193 |
*
|
194 |
-
* @version
|
195 |
* @since 2.5.7
|
196 |
*/
|
197 |
function add_shop_order_multiple_statuses_not_completed_link( $views ) {
|
@@ -205,7 +205,7 @@ class WCJ_Admin_Orders_List extends WCJ_Module {
|
|
205 |
$all_not_completed_statuses_param = urlencode( implode( ',', $all_not_completed_statuses ) );
|
206 |
$class = ( isset( $wp_query->query['post_status'] ) && is_array( $wp_query->query['post_status'] ) && $all_not_completed_statuses === $wp_query->query['post_status'] ) ? 'current' : '';
|
207 |
$query_string = remove_query_arg( array( 'post_status', 'wcj_admin_filter_statuses' ) );
|
208 |
-
$query_string =
|
209 |
$views['wcj_statuses_not_completed'] = '<a href="' . esc_url( $query_string ) . '" class="' . esc_attr( $class ) . '">' . __( 'Not Completed', 'woocommerce-jetpack' ) . '</a>';
|
210 |
return $views;
|
211 |
}
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Admin Orders List
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 3.2.4
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
191 |
/**
|
192 |
* add_shop_order_multiple_statuses_not_completed_link.
|
193 |
*
|
194 |
+
* @version 5.5.9
|
195 |
* @since 2.5.7
|
196 |
*/
|
197 |
function add_shop_order_multiple_statuses_not_completed_link( $views ) {
|
205 |
$all_not_completed_statuses_param = urlencode( implode( ',', $all_not_completed_statuses ) );
|
206 |
$class = ( isset( $wp_query->query['post_status'] ) && is_array( $wp_query->query['post_status'] ) && $all_not_completed_statuses === $wp_query->query['post_status'] ) ? 'current' : '';
|
207 |
$query_string = remove_query_arg( array( 'post_status', 'wcj_admin_filter_statuses' ) );
|
208 |
+
$query_string = esc_url(add_query_arg( 'post_status', $all_not_completed_statuses_param, $query_string ));
|
209 |
$views['wcj_statuses_not_completed'] = '<a href="' . esc_url( $query_string ) . '" class="' . esc_attr( $class ) . '">' . __( 'Not Completed', 'woocommerce-jetpack' ) . '</a>';
|
210 |
return $views;
|
211 |
}
|
includes/class-wcj-checkout-files-upload.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Checkout Files Upload
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @since 2.4.5
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -104,7 +104,7 @@ class WCJ_Checkout_Files_Upload extends WCJ_Module {
|
|
104 |
/**
|
105 |
* add_files_to_order_display.
|
106 |
*
|
107 |
-
* @version
|
108 |
* @since 2.4.7
|
109 |
* @todo (maybe) somehow add `%image%` to emails also
|
110 |
*/
|
@@ -133,8 +133,8 @@ class WCJ_Checkout_Files_Upload extends WCJ_Module {
|
|
133 |
if ( $do_add_img ) {
|
134 |
$order_file_name = wcj_get_wcj_uploads_dir( 'checkout_files_upload' ) . '/' . get_post_meta( $order_id, '_' . 'wcj_checkout_files_upload_' . $i, true );
|
135 |
if ( @is_array( getimagesize( $order_file_name ) ) ) {
|
136 |
-
$link =
|
137 |
-
$img = '<img style="' . $img_style . '" src="' .
|
138 |
}
|
139 |
}
|
140 |
$html .= wcj_handle_replacements( array(
|
@@ -227,7 +227,7 @@ class WCJ_Checkout_Files_Upload extends WCJ_Module {
|
|
227 |
/**
|
228 |
* create_file_admin_order_meta_box.
|
229 |
*
|
230 |
-
* @version
|
231 |
* @since 2.4.5
|
232 |
*/
|
233 |
function create_file_admin_order_meta_box() {
|
@@ -240,17 +240,17 @@ class WCJ_Checkout_Files_Upload extends WCJ_Module {
|
|
240 |
$real_file_name = get_post_meta( $order_id, '_' . 'wcj_checkout_files_upload_real_name_' . $i, true );
|
241 |
if ( '' != $order_file_name ) {
|
242 |
$files_exists = true;
|
243 |
-
$html .= '<p><a href="' .
|
244 |
array(
|
245 |
'wcj_download_checkout_file_admin' => $order_file_name,
|
246 |
'wcj_checkout_file_number' => $i,
|
247 |
-
) ) . '">' . $real_file_name . '</a></p>';
|
248 |
}
|
249 |
}
|
250 |
if ( ! $files_exists ) {
|
251 |
$html .= '<p><em>' . __( 'No files uploaded.', 'woocommerce-jetpack' ) . '</em></p>';
|
252 |
} else {
|
253 |
-
$html .= '<p><a style="color:#a00;" href="' .
|
254 |
__( 'Delete all files', 'woocommerce-jetpack' ) . '</a></p>';
|
255 |
}
|
256 |
echo $html;
|
@@ -708,7 +708,7 @@ class WCJ_Checkout_Files_Upload extends WCJ_Module {
|
|
708 |
/**
|
709 |
* get_the_form.
|
710 |
*
|
711 |
-
* @version
|
712 |
* @since 2.5.0
|
713 |
*/
|
714 |
function get_the_form( $i, $file_name, $order_id = 0 ) {
|
@@ -737,8 +737,8 @@ class WCJ_Checkout_Files_Upload extends WCJ_Module {
|
|
737 |
' value="' . wcj_get_option( 'wcj_checkout_files_upload_label_upload_button_' . $i, __( 'Upload', 'woocommerce-jetpack' ) ) . '"' .
|
738 |
' data-value="' . wcj_get_option( 'wcj_checkout_files_upload_label_upload_button_' . $i, __( 'Upload', 'woocommerce-jetpack' ) ) . '">';
|
739 |
} else {
|
740 |
-
$link =
|
741 |
-
$field_html = '<a href="' .
|
742 |
$button_html = '<input type="submit"' .
|
743 |
' class="button"' .
|
744 |
' style="width:100%;"' .
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Checkout Files Upload
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.4.5
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
104 |
/**
|
105 |
* add_files_to_order_display.
|
106 |
*
|
107 |
+
* @version 5.5.9
|
108 |
* @since 2.4.7
|
109 |
* @todo (maybe) somehow add `%image%` to emails also
|
110 |
*/
|
133 |
if ( $do_add_img ) {
|
134 |
$order_file_name = wcj_get_wcj_uploads_dir( 'checkout_files_upload' ) . '/' . get_post_meta( $order_id, '_' . 'wcj_checkout_files_upload_' . $i, true );
|
135 |
if ( @is_array( getimagesize( $order_file_name ) ) ) {
|
136 |
+
$link = esc_url(add_query_arg( array( 'wcj_download_checkout_file' => $i, '_wpnonce' => wp_create_nonce( 'wcj_download_checkout_file' ), 'wcj_download_checkout_file_order_id' => $order_id ) ));
|
137 |
+
$img = '<img style="' . $img_style . '" src="' . esc_url($link). '"> ';
|
138 |
}
|
139 |
}
|
140 |
$html .= wcj_handle_replacements( array(
|
227 |
/**
|
228 |
* create_file_admin_order_meta_box.
|
229 |
*
|
230 |
+
* @version 5.5.9
|
231 |
* @since 2.4.5
|
232 |
*/
|
233 |
function create_file_admin_order_meta_box() {
|
240 |
$real_file_name = get_post_meta( $order_id, '_' . 'wcj_checkout_files_upload_real_name_' . $i, true );
|
241 |
if ( '' != $order_file_name ) {
|
242 |
$files_exists = true;
|
243 |
+
$html .= '<p><a href="' . esc_url(add_query_arg(
|
244 |
array(
|
245 |
'wcj_download_checkout_file_admin' => $order_file_name,
|
246 |
'wcj_checkout_file_number' => $i,
|
247 |
+
) ) ) . '">' . $real_file_name . '</a></p>';
|
248 |
}
|
249 |
}
|
250 |
if ( ! $files_exists ) {
|
251 |
$html .= '<p><em>' . __( 'No files uploaded.', 'woocommerce-jetpack' ) . '</em></p>';
|
252 |
} else {
|
253 |
+
$html .= '<p><a style="color:#a00;" href="' . esc_url(add_query_arg( 'wcj_download_checkout_file_admin_delete_all', $order_id )) . '"' . wcj_get_js_confirmation() . '>' .
|
254 |
__( 'Delete all files', 'woocommerce-jetpack' ) . '</a></p>';
|
255 |
}
|
256 |
echo $html;
|
708 |
/**
|
709 |
* get_the_form.
|
710 |
*
|
711 |
+
* @version 5.5.9
|
712 |
* @since 2.5.0
|
713 |
*/
|
714 |
function get_the_form( $i, $file_name, $order_id = 0 ) {
|
737 |
' value="' . wcj_get_option( 'wcj_checkout_files_upload_label_upload_button_' . $i, __( 'Upload', 'woocommerce-jetpack' ) ) . '"' .
|
738 |
' data-value="' . wcj_get_option( 'wcj_checkout_files_upload_label_upload_button_' . $i, __( 'Upload', 'woocommerce-jetpack' ) ) . '">';
|
739 |
} else {
|
740 |
+
$link = esc_url(add_query_arg( array( 'wcj_download_checkout_file' => $i, '_wpnonce' => wp_create_nonce( 'wcj_download_checkout_file' ), 'wcj_download_checkout_file_order_id' => $order_id ) ));
|
741 |
+
$field_html = '<a href="' . esc_url($link) . '">' . $this->maybe_get_image( $link, $i, $order_id ) . $file_name . '</a>';
|
742 |
$button_html = '<input type="submit"' .
|
743 |
' class="button"' .
|
744 |
' style="width:100%;"' .
|
includes/class-wcj-cross-sells.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Cross-sells
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @since 3.5.3
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -66,7 +66,7 @@ class WCJ_Cross_Sells extends WCJ_Module {
|
|
66 |
/**
|
67 |
* replace_with_cross_sells_to_url.
|
68 |
*
|
69 |
-
* @version
|
70 |
* @since 3.9.0
|
71 |
* @todo [dev] re-check variable products
|
72 |
*/
|
@@ -82,7 +82,7 @@ class WCJ_Cross_Sells extends WCJ_Module {
|
|
82 |
}
|
83 |
}
|
84 |
if ( ! empty( $product_ids_to_remove ) ) {
|
85 |
-
$url =
|
86 |
}
|
87 |
}
|
88 |
return $url;
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Cross-sells
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 3.5.3
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
66 |
/**
|
67 |
* replace_with_cross_sells_to_url.
|
68 |
*
|
69 |
+
* @version 5.5.9
|
70 |
* @since 3.9.0
|
71 |
* @todo [dev] re-check variable products
|
72 |
*/
|
82 |
}
|
83 |
}
|
84 |
if ( ! empty( $product_ids_to_remove ) ) {
|
85 |
+
$url = esc_url(add_query_arg( array( 'wcj-remove-from-cart' => implode( ',', array_unique( $product_ids_to_remove ) ) ), $url ));
|
86 |
}
|
87 |
}
|
88 |
return $url;
|
includes/class-wcj-debug-tools.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Debug Tools
|
4 |
*
|
5 |
-
* @version 5.5.
|
6 |
* @version 4.1.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -39,7 +39,7 @@ class WCJ_Debug_Tools extends WCJ_Module {
|
|
39 |
/**
|
40 |
* create_debug_tools_tool.
|
41 |
*
|
42 |
-
* @version 5.5.
|
43 |
*/
|
44 |
function create_debug_tools_tool() {
|
45 |
// Delete log
|
@@ -53,7 +53,7 @@ class WCJ_Debug_Tools extends WCJ_Module {
|
|
53 |
$the_tools = '';
|
54 |
$the_tools .= '<div class="wcj-setting-jetpack-body wcj_tools_cnt_main">';
|
55 |
$the_tools .= $this->get_tool_header_html( 'debug_tools' );
|
56 |
-
$the_tools .= '<p><a href="' . add_query_arg( 'wcj_delete_log', '1' ) . '">' . __( 'Delete Log', 'woocommerce-jetpack' )
|
57 |
// Log
|
58 |
$the_log = '';
|
59 |
$the_log .= '<p style="font-style:italic;color:gray;">' . sprintf( __( 'Now: %s', 'woocommerce-jetpack' ), date( 'Y-m-d H:i:s' ) ) . '</p>';
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Debug Tools
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @version 4.1.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
39 |
/**
|
40 |
* create_debug_tools_tool.
|
41 |
*
|
42 |
+
* @version 5.5.9
|
43 |
*/
|
44 |
function create_debug_tools_tool() {
|
45 |
// Delete log
|
53 |
$the_tools = '';
|
54 |
$the_tools .= '<div class="wcj-setting-jetpack-body wcj_tools_cnt_main">';
|
55 |
$the_tools .= $this->get_tool_header_html( 'debug_tools' );
|
56 |
+
$the_tools .= '<p><a href="' . esc_url(add_query_arg( 'wcj_delete_log', '1' )) . '">' . __( 'Delete Log', 'woocommerce-jetpack' ). '</a></p>';
|
57 |
// Log
|
58 |
$the_log = '';
|
59 |
$the_log .= '<p style="font-style:italic;color:gray;">' . sprintf( __( 'Now: %s', 'woocommerce-jetpack' ), date( 'Y-m-d H:i:s' ) ) . '</p>';
|
includes/class-wcj-emails-verification.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Email Verification
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @since 2.8.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -138,18 +138,18 @@ class WCJ_Email_Verification extends WCJ_Module {
|
|
138 |
/**
|
139 |
* prevent_user_login_automatically_after_register.
|
140 |
*
|
141 |
-
* @version
|
142 |
* @since 2.8.0
|
143 |
*/
|
144 |
function prevent_user_login_automatically_after_register( $redirect_to ) {
|
145 |
wp_logout();
|
146 |
-
return
|
147 |
}
|
148 |
|
149 |
/**
|
150 |
* check_if_user_email_is_verified.
|
151 |
*
|
152 |
-
* @version
|
153 |
* @since 2.8.0
|
154 |
*/
|
155 |
function check_if_user_email_is_verified( $userdata ) {
|
@@ -168,7 +168,7 @@ class WCJ_Email_Verification extends WCJ_Module {
|
|
168 |
$error_message = do_shortcode( wcj_get_option( 'wcj_emails_verification_error_message',
|
169 |
__( 'Your account has to be activated before you can login. You can resend email with verification link by clicking <a href="%resend_verification_url%">here</a>.', 'woocommerce-jetpack' )
|
170 |
) );
|
171 |
-
$error_message = str_replace( '%resend_verification_url%',
|
172 |
$userdata = new WP_Error( 'booster_email_verified_error', $error_message );
|
173 |
}
|
174 |
return $userdata;
|
@@ -177,7 +177,7 @@ class WCJ_Email_Verification extends WCJ_Module {
|
|
177 |
/**
|
178 |
* reset_and_mail_activation_link.
|
179 |
*
|
180 |
-
* @version 5.
|
181 |
* @since 2.8.0
|
182 |
* @todo %site_name% etc. in `wcj_emails_verification_email_subject`
|
183 |
*/
|
@@ -206,7 +206,7 @@ class WCJ_Email_Verification extends WCJ_Module {
|
|
206 |
/**
|
207 |
* process_email_verification.
|
208 |
*
|
209 |
-
* @version
|
210 |
* @since 2.8.0
|
211 |
*/
|
212 |
function process_email_verification() {
|
@@ -235,7 +235,7 @@ class WCJ_Email_Verification extends WCJ_Module {
|
|
235 |
__( '<strong>Error:</strong> Activation failed, please contact our administrator. You can resend email with verification link by clicking <a href="%resend_verification_url%">here</a>.', 'woocommerce-jetpack' )
|
236 |
)
|
237 |
);
|
238 |
-
$_notice = str_replace( '%resend_verification_url%',
|
239 |
wc_add_notice( $_notice, 'error' );
|
240 |
} else {
|
241 |
$_notice = wcj_get_option( 'wcj_emails_verification_failed_message_no_user_id',
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Email Verification
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.8.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
138 |
/**
|
139 |
* prevent_user_login_automatically_after_register.
|
140 |
*
|
141 |
+
* @version 5.5.9
|
142 |
* @since 2.8.0
|
143 |
*/
|
144 |
function prevent_user_login_automatically_after_register( $redirect_to ) {
|
145 |
wp_logout();
|
146 |
+
return esc_url(add_query_arg( 'wcj_activate_account_message', '', $redirect_to ));
|
147 |
}
|
148 |
|
149 |
/**
|
150 |
* check_if_user_email_is_verified.
|
151 |
*
|
152 |
+
* @version 5.5.9
|
153 |
* @since 2.8.0
|
154 |
*/
|
155 |
function check_if_user_email_is_verified( $userdata ) {
|
168 |
$error_message = do_shortcode( wcj_get_option( 'wcj_emails_verification_error_message',
|
169 |
__( 'Your account has to be activated before you can login. You can resend email with verification link by clicking <a href="%resend_verification_url%">here</a>.', 'woocommerce-jetpack' )
|
170 |
) );
|
171 |
+
$error_message = str_replace( '%resend_verification_url%', esc_url(add_query_arg( 'wcj_user_id', $userdata->ID, wc_get_page_permalink( 'myaccount' ) )), $error_message );
|
172 |
$userdata = new WP_Error( 'booster_email_verified_error', $error_message );
|
173 |
}
|
174 |
return $userdata;
|
177 |
/**
|
178 |
* reset_and_mail_activation_link.
|
179 |
*
|
180 |
+
* @version 5.5.9
|
181 |
* @since 2.8.0
|
182 |
* @todo %site_name% etc. in `wcj_emails_verification_email_subject`
|
183 |
*/
|
206 |
/**
|
207 |
* process_email_verification.
|
208 |
*
|
209 |
+
* @version 5.5.9
|
210 |
* @since 2.8.0
|
211 |
*/
|
212 |
function process_email_verification() {
|
235 |
__( '<strong>Error:</strong> Activation failed, please contact our administrator. You can resend email with verification link by clicking <a href="%resend_verification_url%">here</a>.', 'woocommerce-jetpack' )
|
236 |
)
|
237 |
);
|
238 |
+
$_notice = str_replace( '%resend_verification_url%', esc_url(add_query_arg( 'wcj_user_id', $data['id'], wc_get_page_permalink( 'myaccount' ) )), $_notice );
|
239 |
wc_add_notice( $_notice, 'error' );
|
240 |
} else {
|
241 |
$_notice = wcj_get_option( 'wcj_emails_verification_failed_message_no_user_id',
|
includes/class-wcj-eu-vat-number.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - EU VAT Number
|
4 |
*
|
5 |
-
* @version 5.5.
|
6 |
* @since 2.3.9
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -174,7 +174,7 @@ class WCJ_EU_VAT_Number extends WCJ_Module {
|
|
174 |
/**
|
175 |
* create_meta_box.
|
176 |
*
|
177 |
-
* @version
|
178 |
* @since 2.6.0
|
179 |
*/
|
180 |
function create_meta_box() {
|
@@ -232,7 +232,7 @@ class WCJ_EU_VAT_Number extends WCJ_Module {
|
|
232 |
),
|
233 |
);
|
234 |
echo wcj_get_table_html( $table_data, array( 'table_class' => 'widefat striped', 'table_heading_type' => 'vertical' ) );
|
235 |
-
echo '<p>' . '<a href="' .
|
236 |
__( 'Validate VAT and remove taxes', 'woocommerce-jetpack' ) . '</a>' . '</p>';
|
237 |
}
|
238 |
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - EU VAT Number
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.3.9
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
174 |
/**
|
175 |
* create_meta_box.
|
176 |
*
|
177 |
+
* @version 5.5.9
|
178 |
* @since 2.6.0
|
179 |
*/
|
180 |
function create_meta_box() {
|
232 |
),
|
233 |
);
|
234 |
echo wcj_get_table_html( $table_data, array( 'table_class' => 'widefat striped', 'table_heading_type' => 'vertical' ) );
|
235 |
+
echo '<p>' . '<a href="' . esc_url(add_query_arg( 'validate_vat_and_maybe_remove_taxes', $order_id )) . '">' .
|
236 |
__( 'Validate VAT and remove taxes', 'woocommerce-jetpack' ) . '</a>' . '</p>';
|
237 |
}
|
238 |
|
includes/class-wcj-export-import.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Export
|
4 |
*
|
5 |
-
* @version 5.5.
|
6 |
* @since 2.5.4
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -250,7 +250,7 @@ class WCJ_Export_Import extends WCJ_Module {
|
|
250 |
/**
|
251 |
* export_date_fields.
|
252 |
*
|
253 |
-
* @version
|
254 |
* @since 3.0.0
|
255 |
* @todo [dev] maybe make `$dateformat` optional
|
256 |
* @todo [dev] mark current (i.e. active) link (if exists)
|
@@ -259,15 +259,16 @@ class WCJ_Export_Import extends WCJ_Module {
|
|
259 |
$current_start_date = ( isset( $_GET['start_date'] ) ? $_GET['start_date'] : '' );
|
260 |
$current_end_date = ( isset( $_GET['end_date'] ) ? $_GET['end_date'] : '' );
|
261 |
$predefined_ranges = array();
|
262 |
-
$predefined_ranges[] = '<a href="' .
|
263 |
__( 'All time', 'woocommerce-jetpack' ) . '</a>';
|
264 |
foreach ( array_merge( wcj_get_reports_standard_ranges(), wcj_get_reports_custom_ranges() ) as $range_id => $range_data ) {
|
265 |
-
$link =
|
266 |
'start_date' => $range_data['start_date'],
|
267 |
'end_date' => $range_data['end_date'],
|
268 |
'range' => $range_id,
|
269 |
-
) );
|
270 |
$predefined_ranges[] = '<a href="' . $link . '">' . $range_data['title'] . '</a>';
|
|
|
271 |
}
|
272 |
$predefined_ranges = implode( ' | ', $predefined_ranges );
|
273 |
$dateformat = ' dateformat="yy-mm-dd"';
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Export
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.5.4
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
250 |
/**
|
251 |
* export_date_fields.
|
252 |
*
|
253 |
+
* @version 5.5.9
|
254 |
* @since 3.0.0
|
255 |
* @todo [dev] maybe make `$dateformat` optional
|
256 |
* @todo [dev] mark current (i.e. active) link (if exists)
|
259 |
$current_start_date = ( isset( $_GET['start_date'] ) ? $_GET['start_date'] : '' );
|
260 |
$current_end_date = ( isset( $_GET['end_date'] ) ? $_GET['end_date'] : '' );
|
261 |
$predefined_ranges = array();
|
262 |
+
$predefined_ranges[] = '<a href="' . esc_url(add_query_arg( 'range', 'all_time', remove_query_arg( array( 'start_date', 'end_date' ) ) )) . '">' .
|
263 |
__( 'All time', 'woocommerce-jetpack' ) . '</a>';
|
264 |
foreach ( array_merge( wcj_get_reports_standard_ranges(), wcj_get_reports_custom_ranges() ) as $range_id => $range_data ) {
|
265 |
+
$link = esc_url(add_query_arg( array(
|
266 |
'start_date' => $range_data['start_date'],
|
267 |
'end_date' => $range_data['end_date'],
|
268 |
'range' => $range_id,
|
269 |
+
) ));
|
270 |
$predefined_ranges[] = '<a href="' . $link . '">' . $range_data['title'] . '</a>';
|
271 |
+
|
272 |
}
|
273 |
$predefined_ranges = implode( ' | ', $predefined_ranges );
|
274 |
$dateformat = ' dateformat="yy-mm-dd"';
|
includes/class-wcj-general.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - General
|
4 |
*
|
5 |
-
* @version 5.5.
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
@@ -107,7 +107,7 @@ class WCJ_General extends WCJ_Module {
|
|
107 |
/**
|
108 |
* add_user_role_changer.
|
109 |
*
|
110 |
-
* @version
|
111 |
* @since 2.9.0
|
112 |
*/
|
113 |
function add_user_role_changer( $wp_admin_bar ) {
|
@@ -129,7 +129,7 @@ class WCJ_General extends WCJ_Module {
|
|
129 |
'parent' => 'booster-user-role-changer',
|
130 |
'id' => 'booster-user-role-changer-role-' . $user_role_key,
|
131 |
'title' => $user_role_name,
|
132 |
-
'href' =>
|
133 |
);
|
134 |
$wp_admin_bar->add_node( $args );
|
135 |
}
|
@@ -175,7 +175,7 @@ class WCJ_General extends WCJ_Module {
|
|
175 |
/**
|
176 |
* create_custom_roles_tool.
|
177 |
*
|
178 |
-
* @version 5.
|
179 |
* @since 2.5.3
|
180 |
*/
|
181 |
function create_custom_roles_tool() {
|
@@ -222,7 +222,7 @@ class WCJ_General extends WCJ_Module {
|
|
222 |
foreach ( $existing_roles as $role_key => $role_data ) {
|
223 |
$delete_html = ( in_array( $role_key, $default_wp_wc_roles ) )
|
224 |
? ''
|
225 |
-
: '<a href="' .
|
226 |
$caps = ( ! empty( $custom_roles[ $role_key ]['caps_role'] ) ? $custom_roles[ $role_key ]['caps_role'] : $role_key );
|
227 |
$table_data[] = array( $role_key, $role_data['name'], $caps, $delete_html );
|
228 |
}
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - General
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
107 |
/**
|
108 |
* add_user_role_changer.
|
109 |
*
|
110 |
+
* @version 5.5.9
|
111 |
* @since 2.9.0
|
112 |
*/
|
113 |
function add_user_role_changer( $wp_admin_bar ) {
|
129 |
'parent' => 'booster-user-role-changer',
|
130 |
'id' => 'booster-user-role-changer-role-' . $user_role_key,
|
131 |
'title' => $user_role_name,
|
132 |
+
'href' => esc_url(add_query_arg( 'wcj_booster_user_role', $user_role_key )),
|
133 |
);
|
134 |
$wp_admin_bar->add_node( $args );
|
135 |
}
|
175 |
/**
|
176 |
* create_custom_roles_tool.
|
177 |
*
|
178 |
+
* @version 5.5.9
|
179 |
* @since 2.5.3
|
180 |
*/
|
181 |
function create_custom_roles_tool() {
|
222 |
foreach ( $existing_roles as $role_key => $role_data ) {
|
223 |
$delete_html = ( in_array( $role_key, $default_wp_wc_roles ) )
|
224 |
? ''
|
225 |
+
: '<a href="' . esc_url(add_query_arg( 'wcj_delete_role', $role_key )). '"' . wcj_get_js_confirmation() . '>' . __( 'Delete', 'woocommerce-jetpack') . '</a>';
|
226 |
$caps = ( ! empty( $custom_roles[ $role_key ]['caps_role'] ) ? $custom_roles[ $role_key ]['caps_role'] : $role_key );
|
227 |
$table_data[] = array( $role_key, $role_data['name'], $caps, $delete_html );
|
228 |
}
|
includes/class-wcj-max-products-per-user.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Max Products per User
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @since 3.5.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -138,7 +138,7 @@ class WCJ_Max_products_Per_User extends WCJ_Module {
|
|
138 |
/**
|
139 |
* calculate_data.
|
140 |
*
|
141 |
-
* @version
|
142 |
* @since 3.5.0
|
143 |
* @todo reset `wcj_max_products_per_user_report` and `wcj_max_products_per_user_saved` meta
|
144 |
*/
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Max Products per User
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 3.5.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
138 |
/**
|
139 |
* calculate_data.
|
140 |
*
|
141 |
+
* @version 5.5.9
|
142 |
* @since 3.5.0
|
143 |
* @todo reset `wcj_max_products_per_user_report` and `wcj_max_products_per_user_saved` meta
|
144 |
*/
|
includes/class-wcj-my-account.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - My Account
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @since 2.9.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -214,7 +214,7 @@ if ( ! class_exists( 'WCJ_My_Account' ) ) :
|
|
214 |
/**
|
215 |
* set_custom_page_url.
|
216 |
*
|
217 |
-
* @version
|
218 |
* @since 4.3.0
|
219 |
* @todo [dev] (maybe) customizable `section` (e.g. `wcj-section`)
|
220 |
*/
|
@@ -222,7 +222,7 @@ if ( ! class_exists( 'WCJ_My_Account' ) ) :
|
|
222 |
if ( ! isset( $this->custom_pages ) ) {
|
223 |
$this->get_custom_pages();
|
224 |
}
|
225 |
-
return ( isset( $this->custom_pages[ $endpoint ] ) && empty( $this->custom_pages[ $endpoint ]['endpoint'] ) && ( $myaccount_page_id = wcj_get_option( 'woocommerce_myaccount_page_id' ) ) ?
|
226 |
}
|
227 |
|
228 |
/**
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - My Account
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.9.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
214 |
/**
|
215 |
* set_custom_page_url.
|
216 |
*
|
217 |
+
* @version 5.5.9
|
218 |
* @since 4.3.0
|
219 |
* @todo [dev] (maybe) customizable `section` (e.g. `wcj-section`)
|
220 |
*/
|
222 |
if ( ! isset( $this->custom_pages ) ) {
|
223 |
$this->get_custom_pages();
|
224 |
}
|
225 |
+
return ( isset( $this->custom_pages[ $endpoint ] ) && empty( $this->custom_pages[ $endpoint ]['endpoint'] ) && ( $myaccount_page_id = wcj_get_option( 'woocommerce_myaccount_page_id' ) ) ? esc_url(add_query_arg( 'section', $endpoint, get_permalink( $myaccount_page_id ) )) : esc_url($url ));
|
226 |
}
|
227 |
|
228 |
/**
|
includes/class-wcj-orders.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Orders
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
@@ -133,13 +133,13 @@ class WCJ_Orders extends WCJ_Module {
|
|
133 |
/**
|
134 |
* create_orders_navigation_meta_box.
|
135 |
*
|
136 |
-
* @version
|
137 |
* @since 3.4.0
|
138 |
* @todo this will output the link, even if there no prev/next orders available
|
139 |
*/
|
140 |
function create_orders_navigation_meta_box() {
|
141 |
-
echo '<a href="' .
|
142 |
-
'<a href="' .
|
143 |
}
|
144 |
|
145 |
/**
|
@@ -198,7 +198,7 @@ class WCJ_Orders extends WCJ_Module {
|
|
198 |
/**
|
199 |
* handle_bulk_actions_regenerate_download_permissions.
|
200 |
*
|
201 |
-
* @version
|
202 |
* @since 3.2.0
|
203 |
* @see https://make.wordpress.org/core/2016/10/04/custom-bulk-actions/
|
204 |
* @todo (maybe) "bulk actions" for for WP < 4.7
|
@@ -212,7 +212,7 @@ class WCJ_Orders extends WCJ_Module {
|
|
212 |
$data_store->delete_by_order_id( $post_id );
|
213 |
wc_downloadable_product_permissions( $post_id, true );
|
214 |
}
|
215 |
-
$redirect_to =
|
216 |
return $redirect_to;
|
217 |
}
|
218 |
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Orders
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
133 |
/**
|
134 |
* create_orders_navigation_meta_box.
|
135 |
*
|
136 |
+
* @version 5.5.9
|
137 |
* @since 3.4.0
|
138 |
* @todo this will output the link, even if there no prev/next orders available
|
139 |
*/
|
140 |
function create_orders_navigation_meta_box() {
|
141 |
+
echo '<a href="' . esc_url(add_query_arg( 'wcj_orders_navigation', 'prev' )) . '">' . '<< ' . __( 'Previous order', 'woocommerce-jetpack' ) . '</a>' .
|
142 |
+
'<a href="' . esc_url(add_query_arg( 'wcj_orders_navigation', 'next' )) . '" style="float:right;">' . __( 'Next order', 'woocommerce-jetpack' ) . ' >>' . '</a>';
|
143 |
}
|
144 |
|
145 |
/**
|
198 |
/**
|
199 |
* handle_bulk_actions_regenerate_download_permissions.
|
200 |
*
|
201 |
+
* @version 5.5.9
|
202 |
* @since 3.2.0
|
203 |
* @see https://make.wordpress.org/core/2016/10/04/custom-bulk-actions/
|
204 |
* @todo (maybe) "bulk actions" for for WP < 4.7
|
212 |
$data_store->delete_by_order_id( $post_id );
|
213 |
wc_downloadable_product_permissions( $post_id, true );
|
214 |
}
|
215 |
+
$redirect_to = esc_url(add_query_arg( 'wcj_bulk_regenerated_download_permissions', count( $post_ids ), $redirect_to ));
|
216 |
return $redirect_to;
|
217 |
}
|
218 |
|
includes/class-wcj-payment-gateways.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Custom Gateways
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
@@ -101,7 +101,7 @@ class WCJ_Payment_Gateways extends WCJ_Module {
|
|
101 |
/**
|
102 |
* create_custom_payment_gateways_fields_admin_order_meta_box.
|
103 |
*
|
104 |
-
* @version
|
105 |
* @since 2.5.2
|
106 |
*/
|
107 |
function create_custom_payment_gateways_fields_admin_order_meta_box() {
|
@@ -114,7 +114,7 @@ class WCJ_Payment_Gateways extends WCJ_Module {
|
|
114 |
}
|
115 |
$html .= wcj_get_table_html( $table_data, array( 'table_class' => 'widefat striped', 'table_heading_type' => 'vertical', ) );
|
116 |
if ( 'yes' === wcj_get_option( 'wcj_custom_payment_gateways_input_fields_delete_button', 'no' ) ) {
|
117 |
-
$html .= '<p><a style="color:#a00;" href="' .
|
118 |
__( 'Delete', 'woocommerce-jetpack' ) . '</a></p>';
|
119 |
}
|
120 |
echo $html;
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Custom Gateways
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
101 |
/**
|
102 |
* create_custom_payment_gateways_fields_admin_order_meta_box.
|
103 |
*
|
104 |
+
* @version 5.5.9
|
105 |
* @since 2.5.2
|
106 |
*/
|
107 |
function create_custom_payment_gateways_fields_admin_order_meta_box() {
|
114 |
}
|
115 |
$html .= wcj_get_table_html( $table_data, array( 'table_class' => 'widefat striped', 'table_heading_type' => 'vertical', ) );
|
116 |
if ( 'yes' === wcj_get_option( 'wcj_custom_payment_gateways_input_fields_delete_button', 'no' ) ) {
|
117 |
+
$html .= '<p><a style="color:#a00;" href="' . esc_url(add_query_arg( 'wcj_delete_payment_gateway_input_fields', $order_id )) . '"' . wcj_get_js_confirmation() . '>' .
|
118 |
__( 'Delete', 'woocommerce-jetpack' ) . '</a></p>';
|
119 |
}
|
120 |
echo $html;
|
includes/class-wcj-pdf-invoicing.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - PDF Invoicing
|
4 |
*
|
5 |
-
* @version 5.5.
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
@@ -154,7 +154,7 @@ class WCJ_PDF_Invoicing extends WCJ_Module {
|
|
154 |
/**
|
155 |
* Processes the PDF bulk actions.
|
156 |
*
|
157 |
-
* @version 5.5.
|
158 |
* @since 2.5.7
|
159 |
* @todo on `generate` (and maybe other actions) validate user permissions/capabilities - `if ( ! current_user_can( $post_type_object->cap->export_post, $post_id ) ) { wp_die( __( 'You are not allowed to export this post.' ) ); }`
|
160 |
*
|
@@ -193,7 +193,7 @@ class WCJ_PDF_Invoicing extends WCJ_Module {
|
|
193 |
}
|
194 |
}
|
195 |
// Build the redirect url
|
196 |
-
$redirect_to =
|
197 |
array(
|
198 |
'generated' => $generated,
|
199 |
'generated_type' => $the_type,
|
@@ -202,7 +202,7 @@ class WCJ_PDF_Invoicing extends WCJ_Module {
|
|
202 |
'post_status' => $_GET['post_status'],
|
203 |
),
|
204 |
$redirect_to
|
205 |
-
);
|
206 |
}
|
207 |
|
208 |
foreach( $post_ids as $post_id ) {
|
@@ -211,7 +211,7 @@ class WCJ_PDF_Invoicing extends WCJ_Module {
|
|
211 |
}
|
212 |
}
|
213 |
// Build the redirect url
|
214 |
-
$redirect_to =
|
215 |
array(
|
216 |
'generated' => $generated,
|
217 |
'generated_type' => $the_type,
|
@@ -220,18 +220,18 @@ class WCJ_PDF_Invoicing extends WCJ_Module {
|
|
220 |
'post_status' => $_GET['post_status'],
|
221 |
),
|
222 |
$redirect_to
|
223 |
-
);
|
224 |
break;
|
225 |
case 'download':
|
226 |
if ( '' != ( $result = $this->get_invoices_zip( $the_type, $post_ids ) ) ) {
|
227 |
// Build the redirect url
|
228 |
-
$redirect_to =
|
229 |
array(
|
230 |
'post_status' => $_GET['post_status'],
|
231 |
'wcj_notice' => $result,
|
232 |
),
|
233 |
$redirect_to
|
234 |
-
);
|
235 |
}
|
236 |
break;
|
237 |
case 'merge':
|
@@ -244,13 +244,13 @@ class WCJ_PDF_Invoicing extends WCJ_Module {
|
|
244 |
if ( ! empty( $merge_ids ) ) {
|
245 |
if ( '' != ( $result = $this->merge_pdfs( $the_type, $merge_ids ) ) ) {
|
246 |
// Build the redirect url
|
247 |
-
$redirect_to =
|
248 |
array(
|
249 |
'post_status' => $_GET['post_status'],
|
250 |
'wcj_notice' => $result,
|
251 |
),
|
252 |
$redirect_to
|
253 |
-
);
|
254 |
}
|
255 |
}
|
256 |
break;
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - PDF Invoicing
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
154 |
/**
|
155 |
* Processes the PDF bulk actions.
|
156 |
*
|
157 |
+
* @version 5.5.9
|
158 |
* @since 2.5.7
|
159 |
* @todo on `generate` (and maybe other actions) validate user permissions/capabilities - `if ( ! current_user_can( $post_type_object->cap->export_post, $post_id ) ) { wp_die( __( 'You are not allowed to export this post.' ) ); }`
|
160 |
*
|
193 |
}
|
194 |
}
|
195 |
// Build the redirect url
|
196 |
+
$redirect_to = esc_url(add_query_arg(
|
197 |
array(
|
198 |
'generated' => $generated,
|
199 |
'generated_type' => $the_type,
|
202 |
'post_status' => $_GET['post_status'],
|
203 |
),
|
204 |
$redirect_to
|
205 |
+
));
|
206 |
}
|
207 |
|
208 |
foreach( $post_ids as $post_id ) {
|
211 |
}
|
212 |
}
|
213 |
// Build the redirect url
|
214 |
+
$redirect_to = esc_url(add_query_arg(
|
215 |
array(
|
216 |
'generated' => $generated,
|
217 |
'generated_type' => $the_type,
|
220 |
'post_status' => $_GET['post_status'],
|
221 |
),
|
222 |
$redirect_to
|
223 |
+
));
|
224 |
break;
|
225 |
case 'download':
|
226 |
if ( '' != ( $result = $this->get_invoices_zip( $the_type, $post_ids ) ) ) {
|
227 |
// Build the redirect url
|
228 |
+
$redirect_to = esc_url(add_query_arg(
|
229 |
array(
|
230 |
'post_status' => $_GET['post_status'],
|
231 |
'wcj_notice' => $result,
|
232 |
),
|
233 |
$redirect_to
|
234 |
+
));
|
235 |
}
|
236 |
break;
|
237 |
case 'merge':
|
244 |
if ( ! empty( $merge_ids ) ) {
|
245 |
if ( '' != ( $result = $this->merge_pdfs( $the_type, $merge_ids ) ) ) {
|
246 |
// Build the redirect url
|
247 |
+
$redirect_to = esc_url(add_query_arg(
|
248 |
array(
|
249 |
'post_status' => $_GET['post_status'],
|
250 |
'wcj_notice' => $result,
|
251 |
),
|
252 |
$redirect_to
|
253 |
+
));
|
254 |
}
|
255 |
}
|
256 |
break;
|
includes/class-wcj-price-by-user-role.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Price based on User Role
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @since 2.5.0
|
7 |
* @author Pluggabl LLC.
|
8 |
* @todo Fix "Make Empty Price" option for variable products
|
@@ -211,12 +211,12 @@ class WCJ_Price_By_User_Role extends WCJ_Module {
|
|
211 |
/**
|
212 |
* add_notice_query_var.
|
213 |
*
|
214 |
-
* @version
|
215 |
* @since 2.5.0
|
216 |
*/
|
217 |
function add_notice_query_var( $location ) {
|
218 |
remove_filter( 'redirect_post_location', array( $this, 'add_notice_query_var' ), 99 );
|
219 |
-
return
|
220 |
}
|
221 |
|
222 |
/**
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Price based on User Role
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.5.0
|
7 |
* @author Pluggabl LLC.
|
8 |
* @todo Fix "Make Empty Price" option for variable products
|
211 |
/**
|
212 |
* add_notice_query_var.
|
213 |
*
|
214 |
+
* @version 5.5.9
|
215 |
* @since 2.5.0
|
216 |
*/
|
217 |
function add_notice_query_var( $location ) {
|
218 |
remove_filter( 'redirect_post_location', array( $this, 'add_notice_query_var' ), 99 );
|
219 |
+
return esc_url(add_query_arg( array( 'wcj_product_price_by_user_role_admin_notice' => true ), $location ));
|
220 |
}
|
221 |
|
222 |
/**
|
includes/class-wcj-product-bookings.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Bookings
|
4 |
*
|
5 |
-
* @version
|
6 |
* @since 2.5.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -448,12 +448,12 @@ class WCJ_Product_Bookings extends WCJ_Module {
|
|
448 |
/**
|
449 |
* add_notice_query_var.
|
450 |
*
|
451 |
-
* @version
|
452 |
* @since 2.5.0
|
453 |
*/
|
454 |
function add_notice_query_var( $location ) {
|
455 |
remove_filter( 'redirect_post_location', array( $this, 'add_notice_query_var' ), 99 );
|
456 |
-
return
|
457 |
}
|
458 |
|
459 |
/**
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Bookings
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.5.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
448 |
/**
|
449 |
* add_notice_query_var.
|
450 |
*
|
451 |
+
* @version 5.5.9
|
452 |
* @since 2.5.0
|
453 |
*/
|
454 |
function add_notice_query_var( $location ) {
|
455 |
remove_filter( 'redirect_post_location', array( $this, 'add_notice_query_var' ), 99 );
|
456 |
+
return esc_url(add_query_arg( array( 'wcj_product_bookings_admin_notice' => true ), $location ));
|
457 |
}
|
458 |
|
459 |
/**
|
includes/class-wcj-product-by-user.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Product by User
|
4 |
*
|
5 |
-
* @version 5.5.
|
6 |
* @since 2.5.2
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -208,7 +208,7 @@ class WCJ_Product_By_User extends WCJ_Module {
|
|
208 |
/**
|
209 |
* add_my_products_content_my_account_page.
|
210 |
*
|
211 |
-
* @version
|
212 |
* @since 2.5.2
|
213 |
*/
|
214 |
function add_my_products_content_my_account_page() {
|
@@ -274,8 +274,8 @@ class WCJ_Product_By_User extends WCJ_Module {
|
|
274 |
/* $i . ' [' . $_product_id . ']' . */ get_the_post_thumbnail( $_product_id, array( 25, 25 ) ),
|
275 |
'<code>'. $_product_data['status'] . '</code>',
|
276 |
$_product_data['title'],
|
277 |
-
'<a class="button" href="' .
|
278 |
-
'<a class="button" href="' .
|
279 |
);
|
280 |
}
|
281 |
echo wcj_get_table_html( $table_data, array( 'table_class' => 'shop_table shop_table_responsive my_account_orders' ) );
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Product by User
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.5.2
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
208 |
/**
|
209 |
* add_my_products_content_my_account_page.
|
210 |
*
|
211 |
+
* @version 5.5.9
|
212 |
* @since 2.5.2
|
213 |
*/
|
214 |
function add_my_products_content_my_account_page() {
|
274 |
/* $i . ' [' . $_product_id . ']' . */ get_the_post_thumbnail( $_product_id, array( 25, 25 ) ),
|
275 |
'<code>'. $_product_data['status'] . '</code>',
|
276 |
$_product_data['title'],
|
277 |
+
'<a class="button" href="' . esc_url(add_query_arg( 'wcj_edit_product', $_product_id, remove_query_arg( array( 'wcj_edit_product_image_delete', 'wcj_delete_product' ) ) )) . '">' . __( 'Edit', 'woocommerce-jetpack' ) . '</a>' . ' ' .
|
278 |
+
'<a class="button" href="' . esc_url(add_query_arg( 'wcj_delete_product', $_product_id, remove_query_arg( array( 'wcj_edit_product_image_delete', 'wcj_edit_product' ) ) )) . '" onclick="return confirm(\'' . __( 'Are you sure?', 'woocommerce-jetpack' ) . '\')">' . __( 'Delete', 'woocommerce-jetpack' ) . '</a>',
|
279 |
);
|
280 |
}
|
281 |
echo wcj_get_table_html( $table_data, array( 'table_class' => 'shop_table shop_table_responsive my_account_orders' ) );
|
includes/class-wcj-product-open-pricing.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Product Open Pricing
|
4 |
*
|
5 |
-
* @version
|
6 |
* @since 2.4.8
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -199,12 +199,12 @@ class WCJ_Product_Open_Pricing extends WCJ_Module {
|
|
199 |
/**
|
200 |
* add_notice_query_var.
|
201 |
*
|
202 |
-
* @version
|
203 |
* @since 2.4.8
|
204 |
*/
|
205 |
function add_notice_query_var( $location ) {
|
206 |
remove_filter( 'redirect_post_location', array( $this, 'add_notice_query_var' ), 99 );
|
207 |
-
return
|
208 |
}
|
209 |
|
210 |
/**
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Product Open Pricing
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.4.8
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
199 |
/**
|
200 |
* add_notice_query_var.
|
201 |
*
|
202 |
+
* @version 5.5.9
|
203 |
* @since 2.4.8
|
204 |
*/
|
205 |
function add_notice_query_var( $location ) {
|
206 |
remove_filter( 'redirect_post_location', array( $this, 'add_notice_query_var' ), 99 );
|
207 |
+
return esc_url(add_query_arg( array( 'wcj_product_open_price_admin_notice' => true ), $location ));
|
208 |
}
|
209 |
|
210 |
/**
|
includes/class-wcj-product-price-by-formula.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Product Price by Formula
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @since 2.5.1
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -397,12 +397,12 @@ class WCJ_Product_Price_by_Formula extends WCJ_Module {
|
|
397 |
/**
|
398 |
* add_notice_query_var.
|
399 |
*
|
400 |
-
* @version
|
401 |
* @since 2.5.0
|
402 |
*/
|
403 |
function add_notice_query_var( $location ) {
|
404 |
remove_filter( 'redirect_post_location', array( $this, 'add_notice_query_var' ), 99 );
|
405 |
-
return
|
406 |
}
|
407 |
|
408 |
/**
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Product Price by Formula
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.5.1
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
397 |
/**
|
398 |
* add_notice_query_var.
|
399 |
*
|
400 |
+
* @version 5.5.9
|
401 |
* @since 2.5.0
|
402 |
*/
|
403 |
function add_notice_query_var( $location ) {
|
404 |
remove_filter( 'redirect_post_location', array( $this, 'add_notice_query_var' ), 99 );
|
405 |
+
return esc_url(add_query_arg( array( 'wcj_product_price_by_formula_admin_notice' => true ), $location ));
|
406 |
}
|
407 |
|
408 |
/**
|
includes/class-wcj-products-xml.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Products XML
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @since 2.5.7
|
7 |
* @author Pluggabl LLC.
|
8 |
* @todo create all files at once (manually and synchronize update)
|
@@ -124,7 +124,7 @@ class WCJ_Products_XML extends WCJ_Module {
|
|
124 |
/**
|
125 |
* wcj_create_products_xml.
|
126 |
*
|
127 |
-
* @version
|
128 |
* @since 2.5.7
|
129 |
*/
|
130 |
function wcj_create_products_xml() {
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Products XML
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.5.7
|
7 |
* @author Pluggabl LLC.
|
8 |
* @todo create all files at once (manually and synchronize update)
|
124 |
/**
|
125 |
* wcj_create_products_xml.
|
126 |
*
|
127 |
+
* @version 5.5.9
|
128 |
* @since 2.5.7
|
129 |
*/
|
130 |
function wcj_create_products_xml() {
|
includes/class-wcj-related-products.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/**
|
4 |
* Booster for WooCommerce - Module - Related Products
|
5 |
*
|
6 |
-
* @version 5.5.
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
9 |
|
@@ -34,7 +34,7 @@ if (!class_exists('WCJ_Related_Products')) :
|
|
34 |
/**
|
35 |
* Constructor.
|
36 |
*
|
37 |
-
* @version 5.
|
38 |
*/
|
39 |
function __construct()
|
40 |
{
|
@@ -46,7 +46,7 @@ if (!class_exists('WCJ_Related_Products')) :
|
|
46 |
$this->link_slug = 'woocommerce-related-products';
|
47 |
$this->extra_desc = sprintf(
|
48 |
__('You may need to <a href="%s">clear all products transients</a> to immediately see results on frontend after changing module\'s settings. Alternatively you can just update each product individually to clear its transients.', 'woocommerce-jetpack'),
|
49 |
-
add_query_arg('wcj_clear_all_products_transients', 'yes')
|
50 |
);
|
51 |
parent::__construct();
|
52 |
|
3 |
/**
|
4 |
* Booster for WooCommerce - Module - Related Products
|
5 |
*
|
6 |
+
* @version 5.5.9
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
9 |
|
34 |
/**
|
35 |
* Constructor.
|
36 |
*
|
37 |
+
* @version 5.5.9
|
38 |
*/
|
39 |
function __construct()
|
40 |
{
|
46 |
$this->link_slug = 'woocommerce-related-products';
|
47 |
$this->extra_desc = sprintf(
|
48 |
__('You may need to <a href="%s">clear all products transients</a> to immediately see results on frontend after changing module\'s settings. Alternatively you can just update each product individually to clear its transients.', 'woocommerce-jetpack'),
|
49 |
+
esc_url(add_query_arg('wcj_clear_all_products_transients', 'yes'))
|
50 |
);
|
51 |
parent::__construct();
|
52 |
|
includes/class-wcj-reports.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Reports
|
4 |
*
|
5 |
-
* @version
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
@@ -59,7 +59,7 @@ class WCJ_Reports extends WCJ_Module {
|
|
59 |
/**
|
60 |
* add_custom_order_reports_ranges_by_month_to_admin_bar.
|
61 |
*
|
62 |
-
* @version
|
63 |
* @since 2.2.4
|
64 |
*/
|
65 |
function add_custom_order_reports_ranges_by_month_to_admin_bar( $wp_admin_bar ) {
|
@@ -89,12 +89,12 @@ class WCJ_Reports extends WCJ_Module {
|
|
89 |
'parent' => $parent,
|
90 |
'id' => $parent . '_' . $month_num,
|
91 |
'title' => $month_name,
|
92 |
-
'href' =>
|
93 |
'range' => 'custom',
|
94 |
'start_date' => $start_date,
|
95 |
'end_date' => $end_date,
|
96 |
'wc_reports_nonce' => $custom_range_nonce,
|
97 |
-
) ),
|
98 |
'meta' => array( 'title' => $month_name ),
|
99 |
);
|
100 |
$wp_admin_bar->add_node( $node );
|
@@ -105,7 +105,7 @@ class WCJ_Reports extends WCJ_Module {
|
|
105 |
/**
|
106 |
* add_custom_order_reports_ranges_to_admin_bar.
|
107 |
*
|
108 |
-
* @version
|
109 |
*/
|
110 |
function add_custom_order_reports_ranges_to_admin_bar( $wp_admin_bar ) {
|
111 |
$is_reports = ( isset( $_GET['page'] ) && 'wc-reports' === $_GET['page'] );
|
@@ -128,12 +128,12 @@ class WCJ_Reports extends WCJ_Module {
|
|
128 |
'parent' => $parent,
|
129 |
'id' => $parent . '_' . $custom_range_id,
|
130 |
'title' => $custom_range['title'],
|
131 |
-
'href' =>
|
132 |
'range' => 'custom',
|
133 |
'start_date' => $custom_range['start_date'],
|
134 |
'end_date' => $custom_range['end_date'],
|
135 |
'wc_reports_nonce' => $custom_range_nonce,
|
136 |
-
) ),
|
137 |
'meta' => array( 'title' => $custom_range['title'] ),
|
138 |
);
|
139 |
$wp_admin_bar->add_node( $node );
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Reports
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
59 |
/**
|
60 |
* add_custom_order_reports_ranges_by_month_to_admin_bar.
|
61 |
*
|
62 |
+
* @version 5.5.9
|
63 |
* @since 2.2.4
|
64 |
*/
|
65 |
function add_custom_order_reports_ranges_by_month_to_admin_bar( $wp_admin_bar ) {
|
89 |
'parent' => $parent,
|
90 |
'id' => $parent . '_' . $month_num,
|
91 |
'title' => $month_name,
|
92 |
+
'href' => esc_url(add_query_arg( array(
|
93 |
'range' => 'custom',
|
94 |
'start_date' => $start_date,
|
95 |
'end_date' => $end_date,
|
96 |
'wc_reports_nonce' => $custom_range_nonce,
|
97 |
+
) )),
|
98 |
'meta' => array( 'title' => $month_name ),
|
99 |
);
|
100 |
$wp_admin_bar->add_node( $node );
|
105 |
/**
|
106 |
* add_custom_order_reports_ranges_to_admin_bar.
|
107 |
*
|
108 |
+
* @version 5.5.9
|
109 |
*/
|
110 |
function add_custom_order_reports_ranges_to_admin_bar( $wp_admin_bar ) {
|
111 |
$is_reports = ( isset( $_GET['page'] ) && 'wc-reports' === $_GET['page'] );
|
128 |
'parent' => $parent,
|
129 |
'id' => $parent . '_' . $custom_range_id,
|
130 |
'title' => $custom_range['title'],
|
131 |
+
'href' => esc_url(add_query_arg( array(
|
132 |
'range' => 'custom',
|
133 |
'start_date' => $custom_range['start_date'],
|
134 |
'end_date' => $custom_range['end_date'],
|
135 |
'wc_reports_nonce' => $custom_range_nonce,
|
136 |
+
) )),
|
137 |
'meta' => array( 'title' => $custom_range['title'] ),
|
138 |
);
|
139 |
$wp_admin_bar->add_node( $node );
|
includes/class-wcj-track-users.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - User Tracking
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @since 3.1.3
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -301,7 +301,7 @@ class WCJ_User_Tracking extends WCJ_Module {
|
|
301 |
/**
|
302 |
* track_users_by_country_dashboard_widget.
|
303 |
*
|
304 |
-
* @version
|
305 |
* @since 2.9.1
|
306 |
* @todo (maybe) display all info (IP, referer etc.) on country click
|
307 |
* @todo (maybe) display stats by day and/or month
|
@@ -331,7 +331,7 @@ class WCJ_User_Tracking extends WCJ_Module {
|
|
331 |
}
|
332 |
}
|
333 |
echo '<p>' .
|
334 |
-
'<a class="button-primary" href="' .
|
335 |
'onclick="return confirm(\'' . __( 'Are you sure?', 'woocommerce-jetpack' ) . '\')"' .
|
336 |
'>' . __( 'Delete all tracking data', 'woocommerce-jetpack' ) . '</a>' .
|
337 |
'</p>';
|
@@ -339,7 +339,7 @@ class WCJ_User_Tracking extends WCJ_Module {
|
|
339 |
$cron_next_schedule = ( '' != ( $_time = wcj_get_option( 'wcj_track_users_cron_time_schedule', '' ) ) ? date( 'Y-m-d H:i:s', $_time ) : '-' );
|
340 |
echo '<p>' .
|
341 |
sprintf( __( 'Stats generated at %s. Next update is scheduled at %s.', 'woocommerce-jetpack' ), $cron_last_run, $cron_next_schedule ) . ' ' .
|
342 |
-
'<a href="' .
|
343 |
'</p>';
|
344 |
}
|
345 |
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - User Tracking
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 3.1.3
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
301 |
/**
|
302 |
* track_users_by_country_dashboard_widget.
|
303 |
*
|
304 |
+
* @version 5.5.9
|
305 |
* @since 2.9.1
|
306 |
* @todo (maybe) display all info (IP, referer etc.) on country click
|
307 |
* @todo (maybe) display stats by day and/or month
|
331 |
}
|
332 |
}
|
333 |
echo '<p>' .
|
334 |
+
'<a class="button-primary" href="' . esc_url(add_query_arg( 'wcj_delete_track_users_stats', '1' )) . '" ' .
|
335 |
'onclick="return confirm(\'' . __( 'Are you sure?', 'woocommerce-jetpack' ) . '\')"' .
|
336 |
'>' . __( 'Delete all tracking data', 'woocommerce-jetpack' ) . '</a>' .
|
337 |
'</p>';
|
339 |
$cron_next_schedule = ( '' != ( $_time = wcj_get_option( 'wcj_track_users_cron_time_schedule', '' ) ) ? date( 'Y-m-d H:i:s', $_time ) : '-' );
|
340 |
echo '<p>' .
|
341 |
sprintf( __( 'Stats generated at %s. Next update is scheduled at %s.', 'woocommerce-jetpack' ), $cron_last_run, $cron_next_schedule ) . ' ' .
|
342 |
+
'<a href="' . esc_url(add_query_arg( 'wcj_track_users_update_county_stats', '1' )) . '">' . __( 'Update now', 'woocommerce-jetpack' ) . '</a>.' .
|
343 |
'</p>';
|
344 |
}
|
345 |
|
includes/classes/class-wcj-module.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce Module
|
4 |
*
|
5 |
-
* @version 5.5.
|
6 |
* @since 2.2.0
|
7 |
* @author Pluggabl LLC.
|
8 |
* @todo [dev] maybe should be `abstract` ?
|
@@ -289,12 +289,12 @@ class WCJ_Module {
|
|
289 |
/**
|
290 |
* validate_value_add_notice_query_var.
|
291 |
*
|
292 |
-
* @version
|
293 |
* @since 2.9.1
|
294 |
*/
|
295 |
function validate_value_add_notice_query_var( $location ) {
|
296 |
remove_filter( 'redirect_post_location', array( $this, 'validate_value_add_notice_query_var' ), 99 );
|
297 |
-
return
|
298 |
}
|
299 |
|
300 |
/**
|
@@ -416,12 +416,12 @@ class WCJ_Module {
|
|
416 |
/**
|
417 |
* add_notice_query_var.
|
418 |
*
|
419 |
-
* @version
|
420 |
* @since 2.5.3
|
421 |
*/
|
422 |
function add_notice_query_var( $location ) {
|
423 |
remove_filter( 'redirect_post_location', array( $this, 'add_notice_query_var' ), 99 );
|
424 |
-
return
|
425 |
}
|
426 |
|
427 |
/**
|
@@ -871,7 +871,7 @@ class WCJ_Module {
|
|
871 |
/**
|
872 |
* add_reset_settings_button.
|
873 |
*
|
874 |
-
* @version
|
875 |
* @since 2.4.0
|
876 |
*/
|
877 |
function add_reset_settings_button( $settings ) {
|
@@ -889,7 +889,7 @@ class WCJ_Module {
|
|
889 |
'id' => 'wcj_' . $this->id . '_reset_settings',
|
890 |
'type' => 'custom_link',
|
891 |
'link' => '<a onclick="return confirm(\'' . __( 'Are you sure?', 'woocommerce-jetpack' ) . '\')" class="button-primary" style="' .
|
892 |
-
$reset_button_style . '" href="' .
|
893 |
),
|
894 |
array(
|
895 |
'type' => 'sectionend',
|
2 |
/**
|
3 |
* Booster for WooCommerce Module
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.2.0
|
7 |
* @author Pluggabl LLC.
|
8 |
* @todo [dev] maybe should be `abstract` ?
|
289 |
/**
|
290 |
* validate_value_add_notice_query_var.
|
291 |
*
|
292 |
+
* @version 5.5.9
|
293 |
* @since 2.9.1
|
294 |
*/
|
295 |
function validate_value_add_notice_query_var( $location ) {
|
296 |
remove_filter( 'redirect_post_location', array( $this, 'validate_value_add_notice_query_var' ), 99 );
|
297 |
+
return esc_url(add_query_arg( array( 'wcj_' . $this->id . '_meta_box_admin_notice' => true ), $location ));
|
298 |
}
|
299 |
|
300 |
/**
|
416 |
/**
|
417 |
* add_notice_query_var.
|
418 |
*
|
419 |
+
* @version 5.5.9
|
420 |
* @since 2.5.3
|
421 |
*/
|
422 |
function add_notice_query_var( $location ) {
|
423 |
remove_filter( 'redirect_post_location', array( $this, 'add_notice_query_var' ), 99 );
|
424 |
+
return esc_url(add_query_arg( array( 'wcj_' . $this->id . '_admin_notice' => true ), $location ));
|
425 |
}
|
426 |
|
427 |
/**
|
871 |
/**
|
872 |
* add_reset_settings_button.
|
873 |
*
|
874 |
+
* @version 5.5.9
|
875 |
* @since 2.4.0
|
876 |
*/
|
877 |
function add_reset_settings_button( $settings ) {
|
889 |
'id' => 'wcj_' . $this->id . '_reset_settings',
|
890 |
'type' => 'custom_link',
|
891 |
'link' => '<a onclick="return confirm(\'' . __( 'Are you sure?', 'woocommerce-jetpack' ) . '\')" class="button-primary" style="' .
|
892 |
+
$reset_button_style . '" href="' . esc_url(add_query_arg( 'wcj_reset_settings', $this->id )) . '">' . __( 'Reset settings', 'woocommerce-jetpack' ) . '</a>',
|
893 |
),
|
894 |
array(
|
895 |
'type' => 'sectionend',
|
includes/functions/wcj-functions-booster-core.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Functions - Booster Core
|
4 |
*
|
5 |
-
* @version
|
6 |
* @since 2.9.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -51,7 +51,7 @@ if ( ! function_exists( 'wcj_is_rest' ) ) {
|
|
51 |
/**
|
52 |
* Checks if the current request is a WP REST API request.
|
53 |
*
|
54 |
-
* @version
|
55 |
* @since 4.3.0
|
56 |
*
|
57 |
* @author matzeeable
|
2 |
/**
|
3 |
* Booster for WooCommerce - Functions - Booster Core
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.9.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
51 |
/**
|
52 |
* Checks if the current request is a WP REST API request.
|
53 |
*
|
54 |
+
* @version 5.5.9
|
55 |
* @since 4.3.0
|
56 |
*
|
57 |
* @author matzeeable
|
includes/functions/wcj-functions-eu-vat.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Functions - EU VAT
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @since 2.9.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -13,17 +13,17 @@ if ( ! function_exists( 'wcj_validate_vat_no_soap' ) ) {
|
|
13 |
/**
|
14 |
* wcj_validate_vat_no_soap.
|
15 |
*
|
16 |
-
* @version 5.
|
17 |
* @since 2.5.7
|
18 |
* @return mixed: bool on successful checking (can be true or false), null otherwise
|
19 |
*/
|
20 |
function wcj_validate_vat_no_soap( $country_code, $vat_number, $method ) {
|
21 |
$country_code = strtoupper( $country_code );
|
22 |
-
$api_url =
|
23 |
'ms' => $country_code,
|
24 |
'vat' => $vat_number,
|
25 |
'locale' => 'en',
|
26 |
-
), 'http://ec.europa.eu/taxation_customs/vies/viesquer.do' );
|
27 |
switch ( $method ) {
|
28 |
case 'file_get_contents':
|
29 |
if ( ini_get( 'allow_url_fopen' ) ) {
|
2 |
/**
|
3 |
* Booster for WooCommerce - Functions - EU VAT
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.9.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
13 |
/**
|
14 |
* wcj_validate_vat_no_soap.
|
15 |
*
|
16 |
+
* @version 5.5.9
|
17 |
* @since 2.5.7
|
18 |
* @return mixed: bool on successful checking (can be true or false), null otherwise
|
19 |
*/
|
20 |
function wcj_validate_vat_no_soap( $country_code, $vat_number, $method ) {
|
21 |
$country_code = strtoupper( $country_code );
|
22 |
+
$api_url = esc_url(add_query_arg( array(
|
23 |
'ms' => $country_code,
|
24 |
'vat' => $vat_number,
|
25 |
'locale' => 'en',
|
26 |
+
), 'http://ec.europa.eu/taxation_customs/vies/viesquer.do' ));
|
27 |
switch ( $method ) {
|
28 |
case 'file_get_contents':
|
29 |
if ( ini_get( 'allow_url_fopen' ) ) {
|
includes/functions/wcj-functions-exchange-rates.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Functions - Exchange Rates
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @since 2.7.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -192,7 +192,7 @@ if ( ! function_exists( 'wcj_currencyconverterapi_get_exchange_rate' ) ) {
|
|
192 |
/*
|
193 |
* wcj_currencyconverterapi_get_exchange_rate.
|
194 |
*
|
195 |
-
* @version
|
196 |
* @since 3.9.0
|
197 |
*/
|
198 |
function wcj_currencyconverterapi_get_exchange_rate( $currency_from, $currency_to ) {
|
@@ -200,9 +200,9 @@ if ( ! function_exists( 'wcj_currencyconverterapi_get_exchange_rate' ) ) {
|
|
200 |
$url = 'https://free.currencyconverterapi.com/api/v6/convert?q=' . $pair . '&compact=y';
|
201 |
$api_key = wcj_get_option( 'wcj_currency_exchange_api_key_fccapi' );
|
202 |
if ( ! empty( $api_key ) ) {
|
203 |
-
$url =
|
204 |
'apiKey' => $api_key
|
205 |
-
), $url );
|
206 |
}
|
207 |
$response = wcj_get_currency_exchange_rates_url_response( $url );
|
208 |
if ( $response ) {
|
@@ -502,7 +502,7 @@ if ( ! function_exists( 'wcj_currencyconverterapi_io_get_exchange_rate_average'
|
|
502 |
/*
|
503 |
* wcj_currencyconverterapi_io_get_exchange_rate_average.
|
504 |
*
|
505 |
-
* @version
|
506 |
* @since 3.9.0
|
507 |
* @return false or rate
|
508 |
*/
|
@@ -515,9 +515,9 @@ if ( ! function_exists( 'wcj_currencyconverterapi_io_get_exchange_rate_average'
|
|
515 |
$url = 'https://free.currencyconverterapi.com/api/v6/convert?q=' . $pair . '&compact=ultra&date=' . $range['start_date'] . '&endDate=' . $range['end_date'];
|
516 |
$api_key = wcj_get_option( 'wcj_currency_exchange_api_key_fccapi' );
|
517 |
if ( ! empty( $api_key ) ) {
|
518 |
-
$url =
|
519 |
'apiKey' => $api_key
|
520 |
-
), $url );
|
521 |
}
|
522 |
$response = wcj_get_currency_exchange_rates_url_response( $url );
|
523 |
if ( $response && ! empty( $response->{$pair} ) ) {
|
2 |
/**
|
3 |
* Booster for WooCommerce - Functions - Exchange Rates
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.7.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
192 |
/*
|
193 |
* wcj_currencyconverterapi_get_exchange_rate.
|
194 |
*
|
195 |
+
* @version 5.5.9
|
196 |
* @since 3.9.0
|
197 |
*/
|
198 |
function wcj_currencyconverterapi_get_exchange_rate( $currency_from, $currency_to ) {
|
200 |
$url = 'https://free.currencyconverterapi.com/api/v6/convert?q=' . $pair . '&compact=y';
|
201 |
$api_key = wcj_get_option( 'wcj_currency_exchange_api_key_fccapi' );
|
202 |
if ( ! empty( $api_key ) ) {
|
203 |
+
$url = esc_url(add_query_arg( array(
|
204 |
'apiKey' => $api_key
|
205 |
+
), $url ));
|
206 |
}
|
207 |
$response = wcj_get_currency_exchange_rates_url_response( $url );
|
208 |
if ( $response ) {
|
502 |
/*
|
503 |
* wcj_currencyconverterapi_io_get_exchange_rate_average.
|
504 |
*
|
505 |
+
* @version 5.5.9
|
506 |
* @since 3.9.0
|
507 |
* @return false or rate
|
508 |
*/
|
515 |
$url = 'https://free.currencyconverterapi.com/api/v6/convert?q=' . $pair . '&compact=ultra&date=' . $range['start_date'] . '&endDate=' . $range['end_date'];
|
516 |
$api_key = wcj_get_option( 'wcj_currency_exchange_api_key_fccapi' );
|
517 |
if ( ! empty( $api_key ) ) {
|
518 |
+
$url = esc_url(add_query_arg( array(
|
519 |
'apiKey' => $api_key
|
520 |
+
), $url ));
|
521 |
}
|
522 |
$response = wcj_get_currency_exchange_rates_url_response( $url );
|
523 |
if ( $response && ! empty( $response->{$pair} ) ) {
|
includes/functions/wcj-functions-products.php
CHANGED
@@ -467,7 +467,7 @@ if ( ! function_exists( 'wcj_is_product_wholesale_enabled' ) ) {
|
|
467 |
if ( ! empty( $product_cats_to_exclude ) && in_array( $product_id, $product_cats_to_exclude ) ) {
|
468 |
$is_product_eligible_new = false;
|
469 |
}
|
470 |
-
return $is_product_eligible_new
|
471 |
}
|
472 |
}
|
473 |
|
@@ -487,7 +487,7 @@ if ( ! function_exists( 'wcj_is_product_wholesale_enabled' ) ) {
|
|
487 |
}
|
488 |
}
|
489 |
|
490 |
-
return $is_product_eligible
|
491 |
}
|
492 |
}
|
493 |
return false;
|
467 |
if ( ! empty( $product_cats_to_exclude ) && in_array( $product_id, $product_cats_to_exclude ) ) {
|
468 |
$is_product_eligible_new = false;
|
469 |
}
|
470 |
+
return $is_product_eligible_new ;
|
471 |
}
|
472 |
}
|
473 |
|
487 |
}
|
488 |
}
|
489 |
|
490 |
+
return $is_product_eligible;
|
491 |
}
|
492 |
}
|
493 |
return false;
|
includes/input-fields/class-wcj-product-input-fields-core.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Product Input Fields - Core
|
4 |
*
|
5 |
-
* @version
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
@@ -366,7 +366,7 @@ class WCJ_Product_Input_Fields_Core {
|
|
366 |
/**
|
367 |
* output_custom_input_fields_in_admin_order.
|
368 |
*
|
369 |
-
* @version
|
370 |
*/
|
371 |
function output_custom_input_fields_in_admin_order( $item_id, $item, $_product ) {
|
372 |
if ( null === $_product ) {
|
@@ -383,9 +383,9 @@ class WCJ_Product_Input_Fields_Core {
|
|
383 |
$value = maybe_unserialize( $value );
|
384 |
if ( isset( $value['name'] ) ) {
|
385 |
if ( isset( $value['wcj_uniqid'] ) ) {
|
386 |
-
$value = '<a href="' . add_query_arg( 'wcj_download_file', $_product_id . '_' . $i . '_' . $value['wcj_uniqid'] . '.' . pathinfo( $value['name'], PATHINFO_EXTENSION ) ) . '">' . $value['name'] . '</a>';
|
387 |
} else {
|
388 |
-
$value = '<a href="' .
|
389 |
}
|
390 |
}
|
391 |
} else {
|
2 |
/**
|
3 |
* Booster for WooCommerce - Product Input Fields - Core
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
366 |
/**
|
367 |
* output_custom_input_fields_in_admin_order.
|
368 |
*
|
369 |
+
* @version 5.5.9
|
370 |
*/
|
371 |
function output_custom_input_fields_in_admin_order( $item_id, $item, $_product ) {
|
372 |
if ( null === $_product ) {
|
383 |
$value = maybe_unserialize( $value );
|
384 |
if ( isset( $value['name'] ) ) {
|
385 |
if ( isset( $value['wcj_uniqid'] ) ) {
|
386 |
+
$value = '<a href="' . esc_url(add_query_arg( 'wcj_download_file', $_product_id . '_' . $i . '_' . $value['wcj_uniqid'] . '.' . pathinfo( $value['name'], PATHINFO_EXTENSION ) ) ) . '">' . $value['name'] . '</a>';
|
387 |
} else {
|
388 |
+
$value = '<a href="' . esc_url(add_query_arg( 'wcj_download_file', $item_id . '_' . $i . '.' . pathinfo( $value['name'], PATHINFO_EXTENSION ) )) . '">' .$value['name'] . '</a>';
|
389 |
}
|
390 |
}
|
391 |
} else {
|
includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-display.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - PDF Invoicing - Display
|
4 |
*
|
5 |
-
* @version
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
@@ -114,7 +114,7 @@ class WCJ_PDF_Invoicing_Display extends WCJ_Module {
|
|
114 |
/**
|
115 |
* add_pdf_invoices_admin_actions.
|
116 |
*
|
117 |
-
* @version
|
118 |
* @since 2.4.7
|
119 |
*/
|
120 |
function add_pdf_invoices_admin_actions( $actions, $the_order ) {
|
@@ -127,7 +127,7 @@ class WCJ_PDF_Invoicing_Display extends WCJ_Module {
|
|
127 |
if ( 'yes' === wcj_get_option( 'wcj_invoicing_' . $invoice_type['id'] . '_save_as_enabled', 'no' ) ) {
|
128 |
$query_args['save_pdf_invoice'] = '1';
|
129 |
}
|
130 |
-
$the_url =
|
131 |
$the_name = __( 'View', 'woocommerce-jetpack' ) . ' ' . $invoice_type['title'];
|
132 |
$the_action = 'view ' . $invoice_type['id'];
|
133 |
$the_action_id = $invoice_type['id'];
|
@@ -136,7 +136,7 @@ class WCJ_PDF_Invoicing_Display extends WCJ_Module {
|
|
136 |
if ( 'yes' === wcj_get_option( 'wcj_invoicing_' . $invoice_type['id'] . '_admin_orders_delete_btn', 'yes' ) ) {
|
137 |
// Delete button
|
138 |
$query_args = array( 'delete_invoice_for_order_id' => wcj_get_order_id( $the_order ), 'invoice_type_id' => $invoice_type['id'] );
|
139 |
-
$the_url =
|
140 |
$the_name = __( 'Delete', 'woocommerce-jetpack' ) . ' ' . $invoice_type['title'];
|
141 |
$the_action = 'view ' . $invoice_type['id'] . '_' . 'delete' . ( ( 'yes' === wcj_get_option( 'wcj_invoicing_' . $invoice_type['id'] . '_admin_orders_delete_btn_confirm', 'yes' ) ) ? ' wcj_need_confirmation' : '' );
|
142 |
$the_action_id = $invoice_type['id'] . '_' . 'delete';
|
@@ -146,7 +146,7 @@ class WCJ_PDF_Invoicing_Display extends WCJ_Module {
|
|
146 |
if ( 'yes' === wcj_get_option( 'wcj_invoicing_' . $invoice_type['id'] . '_admin_orders_create_btn', 'yes' ) ) {
|
147 |
// Create button
|
148 |
$query_args = array( 'create_invoice_for_order_id' => wcj_get_order_id( $the_order ), 'invoice_type_id' => $invoice_type['id'] );
|
149 |
-
$the_url =
|
150 |
$the_name = __( 'Create', 'woocommerce-jetpack' ) . ' ' . $invoice_type['title'];
|
151 |
$the_action = 'view ' . $invoice_type['id'] . '_' . 'create' . ( ( 'yes' === wcj_get_option( 'wcj_invoicing_' . $invoice_type['id'] . '_admin_orders_create_btn_confirm', 'yes' ) ) ? ' wcj_need_confirmation' : '' );
|
152 |
$the_action_id = $invoice_type['id'] . '_' . 'create';
|
@@ -175,7 +175,7 @@ class WCJ_PDF_Invoicing_Display extends WCJ_Module {
|
|
175 |
/**
|
176 |
* Output custom columns for products
|
177 |
*
|
178 |
-
* @version
|
179 |
* @param string $column
|
180 |
*/
|
181 |
function render_order_columns( $column ) {
|
@@ -195,7 +195,7 @@ class WCJ_PDF_Invoicing_Display extends WCJ_Module {
|
|
195 |
if ( 'yes' === wcj_get_option( 'wcj_invoicing_' . $invoice_type_id . '_save_as_enabled', 'no' ) ) {
|
196 |
$query_args['save_pdf_invoice'] = '1';
|
197 |
}
|
198 |
-
$html .= '<a href="' .
|
199 |
$the_number . '</a>';
|
200 |
}
|
201 |
echo $html;
|
@@ -204,7 +204,7 @@ class WCJ_PDF_Invoicing_Display extends WCJ_Module {
|
|
204 |
/**
|
205 |
* add_pdf_invoices_links_to_thankyou_page.
|
206 |
*
|
207 |
-
* @version
|
208 |
* @since 3.6.0
|
209 |
* @todo option to change priority for the hook (probably for all docs at once)
|
210 |
*/
|
@@ -222,7 +222,7 @@ class WCJ_PDF_Invoicing_Display extends WCJ_Module {
|
|
222 |
if ( '' == ( $title = wcj_get_option( 'wcj_invoicing_' . $invoice_type['id'] . '_thankyou_page_link_text', $invoice_type['title'] ) ) ) {
|
223 |
$title = $invoice_type['title'];
|
224 |
}
|
225 |
-
echo str_replace( '%link%', '<a target="_blank" href="' .
|
226 |
get_option( 'wcj_invoicing_' . $invoice_type['id'] . '_thankyou_page_template',
|
227 |
'<p><strong>' . sprintf( __( 'Your %s:', 'woocommerce-jetpack' ), $invoice_type['title'] ) . ' </strong> %link%</p>' ) );
|
228 |
}
|
@@ -232,7 +232,7 @@ class WCJ_PDF_Invoicing_Display extends WCJ_Module {
|
|
232 |
/**
|
233 |
* add_pdf_invoices_action_links.
|
234 |
*
|
235 |
-
* @version
|
236 |
*/
|
237 |
function add_pdf_invoices_action_links( $actions, $the_order ) {
|
238 |
$invoice_types = wcj_get_enabled_invoice_types();
|
@@ -247,7 +247,7 @@ class WCJ_PDF_Invoicing_Display extends WCJ_Module {
|
|
247 |
if ( 'yes' === wcj_get_option( 'wcj_invoicing_' . $invoice_type['id'] . '_save_as_enabled', 'no' ) ) {
|
248 |
$query_args['save_pdf_invoice'] = '1';
|
249 |
}
|
250 |
-
$the_url =
|
251 |
$the_name = wcj_get_option( 'wcj_invoicing_' . $invoice_type['id'] . '_link_text' );
|
252 |
if ( '' == $the_name ) {
|
253 |
$the_name = $invoice_type['title'];
|
@@ -303,7 +303,7 @@ class WCJ_PDF_Invoicing_Display extends WCJ_Module {
|
|
303 |
$query_args['save_pdf_invoice'] = '1';
|
304 |
$target = '';
|
305 |
}
|
306 |
-
$the_url =
|
307 |
$the_name = __( 'View', 'woocommerce-jetpack' );
|
308 |
$the_invoice = wcj_get_invoice( $order_id, $invoice_type['id'] );
|
309 |
$the_number = ' [#' . $the_invoice->get_invoice_number() . ']';
|
@@ -311,7 +311,7 @@ class WCJ_PDF_Invoicing_Display extends WCJ_Module {
|
|
311 |
$view_link = '<a' . $target . ' href="' . $the_url . '">' . $the_name . '</a>';
|
312 |
// "Delete" link
|
313 |
$query_args = array( 'delete_invoice_for_order_id' => $order_id, 'invoice_type_id' => $invoice_type['id'] );
|
314 |
-
$the_url =
|
315 |
$the_name = __( 'Delete', 'woocommerce-jetpack' );
|
316 |
$delete_link = '<a class="wcj_need_confirmation" href="' . $the_url . '">' . $the_name . '</a>';
|
317 |
// Numbering & date
|
@@ -331,7 +331,7 @@ class WCJ_PDF_Invoicing_Display extends WCJ_Module {
|
|
331 |
} else {
|
332 |
// "Create" link
|
333 |
$query_args = array( 'create_invoice_for_order_id' => $order_id, 'invoice_type_id' => $invoice_type['id'] );
|
334 |
-
$the_url =
|
335 |
$the_name = __( 'Create', 'woocommerce-jetpack' );
|
336 |
$actions = array( '<a class="wcj_need_confirmation" href="' . $the_url . '">' . $the_name . '</a>' );
|
337 |
}
|
2 |
/**
|
3 |
* Booster for WooCommerce - PDF Invoicing - Display
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
114 |
/**
|
115 |
* add_pdf_invoices_admin_actions.
|
116 |
*
|
117 |
+
* @version 5.5.9
|
118 |
* @since 2.4.7
|
119 |
*/
|
120 |
function add_pdf_invoices_admin_actions( $actions, $the_order ) {
|
127 |
if ( 'yes' === wcj_get_option( 'wcj_invoicing_' . $invoice_type['id'] . '_save_as_enabled', 'no' ) ) {
|
128 |
$query_args['save_pdf_invoice'] = '1';
|
129 |
}
|
130 |
+
$the_url = esc_url(add_query_arg( $query_args, remove_query_arg( array ( 'create_invoice_for_order_id', 'delete_invoice_for_order_id' ) ) ));
|
131 |
$the_name = __( 'View', 'woocommerce-jetpack' ) . ' ' . $invoice_type['title'];
|
132 |
$the_action = 'view ' . $invoice_type['id'];
|
133 |
$the_action_id = $invoice_type['id'];
|
136 |
if ( 'yes' === wcj_get_option( 'wcj_invoicing_' . $invoice_type['id'] . '_admin_orders_delete_btn', 'yes' ) ) {
|
137 |
// Delete button
|
138 |
$query_args = array( 'delete_invoice_for_order_id' => wcj_get_order_id( $the_order ), 'invoice_type_id' => $invoice_type['id'] );
|
139 |
+
$the_url = esc_url(add_query_arg( $query_args, remove_query_arg( 'create_invoice_for_order_id' ) ));
|
140 |
$the_name = __( 'Delete', 'woocommerce-jetpack' ) . ' ' . $invoice_type['title'];
|
141 |
$the_action = 'view ' . $invoice_type['id'] . '_' . 'delete' . ( ( 'yes' === wcj_get_option( 'wcj_invoicing_' . $invoice_type['id'] . '_admin_orders_delete_btn_confirm', 'yes' ) ) ? ' wcj_need_confirmation' : '' );
|
142 |
$the_action_id = $invoice_type['id'] . '_' . 'delete';
|
146 |
if ( 'yes' === wcj_get_option( 'wcj_invoicing_' . $invoice_type['id'] . '_admin_orders_create_btn', 'yes' ) ) {
|
147 |
// Create button
|
148 |
$query_args = array( 'create_invoice_for_order_id' => wcj_get_order_id( $the_order ), 'invoice_type_id' => $invoice_type['id'] );
|
149 |
+
$the_url = esc_url(add_query_arg( $query_args, remove_query_arg( 'delete_invoice_for_order_id' ) ));
|
150 |
$the_name = __( 'Create', 'woocommerce-jetpack' ) . ' ' . $invoice_type['title'];
|
151 |
$the_action = 'view ' . $invoice_type['id'] . '_' . 'create' . ( ( 'yes' === wcj_get_option( 'wcj_invoicing_' . $invoice_type['id'] . '_admin_orders_create_btn_confirm', 'yes' ) ) ? ' wcj_need_confirmation' : '' );
|
152 |
$the_action_id = $invoice_type['id'] . '_' . 'create';
|
175 |
/**
|
176 |
* Output custom columns for products
|
177 |
*
|
178 |
+
* @version 5.5.9
|
179 |
* @param string $column
|
180 |
*/
|
181 |
function render_order_columns( $column ) {
|
195 |
if ( 'yes' === wcj_get_option( 'wcj_invoicing_' . $invoice_type_id . '_save_as_enabled', 'no' ) ) {
|
196 |
$query_args['save_pdf_invoice'] = '1';
|
197 |
}
|
198 |
+
$html .= '<a href="' . esc_url(add_query_arg( $query_args, remove_query_arg( array( 'create_invoice_for_order_id', 'delete_invoice_for_order_id' ) ) )) . '">' .
|
199 |
$the_number . '</a>';
|
200 |
}
|
201 |
echo $html;
|
204 |
/**
|
205 |
* add_pdf_invoices_links_to_thankyou_page.
|
206 |
*
|
207 |
+
* @version 5.5.9
|
208 |
* @since 3.6.0
|
209 |
* @todo option to change priority for the hook (probably for all docs at once)
|
210 |
*/
|
222 |
if ( '' == ( $title = wcj_get_option( 'wcj_invoicing_' . $invoice_type['id'] . '_thankyou_page_link_text', $invoice_type['title'] ) ) ) {
|
223 |
$title = $invoice_type['title'];
|
224 |
}
|
225 |
+
echo str_replace( '%link%', '<a target="_blank" href="' . esc_url(add_query_arg( $query_args )) . '">' . $title . '</a>',
|
226 |
get_option( 'wcj_invoicing_' . $invoice_type['id'] . '_thankyou_page_template',
|
227 |
'<p><strong>' . sprintf( __( 'Your %s:', 'woocommerce-jetpack' ), $invoice_type['title'] ) . ' </strong> %link%</p>' ) );
|
228 |
}
|
232 |
/**
|
233 |
* add_pdf_invoices_action_links.
|
234 |
*
|
235 |
+
* @version 5.5.9
|
236 |
*/
|
237 |
function add_pdf_invoices_action_links( $actions, $the_order ) {
|
238 |
$invoice_types = wcj_get_enabled_invoice_types();
|
247 |
if ( 'yes' === wcj_get_option( 'wcj_invoicing_' . $invoice_type['id'] . '_save_as_enabled', 'no' ) ) {
|
248 |
$query_args['save_pdf_invoice'] = '1';
|
249 |
}
|
250 |
+
$the_url = esc_url(add_query_arg( $query_args ));
|
251 |
$the_name = wcj_get_option( 'wcj_invoicing_' . $invoice_type['id'] . '_link_text' );
|
252 |
if ( '' == $the_name ) {
|
253 |
$the_name = $invoice_type['title'];
|
303 |
$query_args['save_pdf_invoice'] = '1';
|
304 |
$target = '';
|
305 |
}
|
306 |
+
$the_url = esc_url(add_query_arg( $query_args, remove_query_arg( array ( 'create_invoice_for_order_id', 'delete_invoice_for_order_id' ) ) ));
|
307 |
$the_name = __( 'View', 'woocommerce-jetpack' );
|
308 |
$the_invoice = wcj_get_invoice( $order_id, $invoice_type['id'] );
|
309 |
$the_number = ' [#' . $the_invoice->get_invoice_number() . ']';
|
311 |
$view_link = '<a' . $target . ' href="' . $the_url . '">' . $the_name . '</a>';
|
312 |
// "Delete" link
|
313 |
$query_args = array( 'delete_invoice_for_order_id' => $order_id, 'invoice_type_id' => $invoice_type['id'] );
|
314 |
+
$the_url = esc_url(add_query_arg( $query_args, remove_query_arg( 'create_invoice_for_order_id' )) );
|
315 |
$the_name = __( 'Delete', 'woocommerce-jetpack' );
|
316 |
$delete_link = '<a class="wcj_need_confirmation" href="' . $the_url . '">' . $the_name . '</a>';
|
317 |
// Numbering & date
|
331 |
} else {
|
332 |
// "Create" link
|
333 |
$query_args = array( 'create_invoice_for_order_id' => $order_id, 'invoice_type_id' => $invoice_type['id'] );
|
334 |
+
$the_url = esc_url(add_query_arg( $query_args, remove_query_arg( 'delete_invoice_for_order_id' ) ));
|
335 |
$the_name = __( 'Create', 'woocommerce-jetpack' );
|
336 |
$actions = array( '<a class="wcj_need_confirmation" href="' . $the_url . '">' . $the_name . '</a>' );
|
337 |
}
|
includes/price-by-country/class-wcj-price-by-country-group-generator.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Price By Country - Group Generator
|
4 |
*
|
5 |
-
* @version
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
@@ -64,7 +64,7 @@ class WCJ_Price_By_Country_Group_Generator {
|
|
64 |
/**
|
65 |
* create_all_countries_groups.
|
66 |
*
|
67 |
-
* @version
|
68 |
* @todo add nonce verification
|
69 |
*/
|
70 |
function create_all_countries_groups() {
|
2 |
/**
|
3 |
* Booster for WooCommerce - Price By Country - Group Generator
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
64 |
/**
|
65 |
* create_all_countries_groups.
|
66 |
*
|
67 |
+
* @version 5.5.9
|
68 |
* @todo add nonce verification
|
69 |
*/
|
70 |
function create_all_countries_groups() {
|
includes/reports/class-wcj-currency-reports.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Reports - Currency
|
4 |
*
|
5 |
-
* @version
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
@@ -24,7 +24,7 @@ class WCJ_Currency_Reports {
|
|
24 |
/**
|
25 |
* add_reports_currency_to_admin_bar.
|
26 |
*
|
27 |
-
* @version
|
28 |
*/
|
29 |
function add_reports_currency_to_admin_bar( $wp_admin_bar ) {
|
30 |
|
@@ -74,7 +74,7 @@ class WCJ_Currency_Reports {
|
|
74 |
'parent' => $parent,
|
75 |
'id' => $parent . '_' . $code,
|
76 |
'title' => $code,
|
77 |
-
'href' =>
|
78 |
'meta' => array( 'title' => __( 'Show reports only in', 'woocommerce-jetpack' ) . ' ' . $code, ),
|
79 |
);
|
80 |
$wp_admin_bar->add_node( $args );
|
2 |
/**
|
3 |
* Booster for WooCommerce - Reports - Currency
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
24 |
/**
|
25 |
* add_reports_currency_to_admin_bar.
|
26 |
*
|
27 |
+
* @version 5.5.9
|
28 |
*/
|
29 |
function add_reports_currency_to_admin_bar( $wp_admin_bar ) {
|
30 |
|
74 |
'parent' => $parent,
|
75 |
'id' => $parent . '_' . $code,
|
76 |
'title' => $code,
|
77 |
+
'href' => esc_url(add_query_arg( 'currency', $code )),
|
78 |
'meta' => array( 'title' => __( 'Show reports only in', 'woocommerce-jetpack' ) . ' ' . $code, ),
|
79 |
);
|
80 |
$wp_admin_bar->add_node( $args );
|
includes/reports/wcj-class-reports-customers.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Reports - Customers
|
4 |
*
|
5 |
-
* @version
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
@@ -126,7 +126,7 @@ class WCJ_Reports_Customers {
|
|
126 |
/**
|
127 |
* get_data function.
|
128 |
*
|
129 |
-
* @version
|
130 |
*/
|
131 |
function get_html( $data, $total_customers, $report_type = 'all_countries' ) {
|
132 |
$html = '';
|
@@ -146,12 +146,12 @@ class WCJ_Reports_Customers {
|
|
146 |
$result = $result['customer_counter'];
|
147 |
$html .= '<tr>';
|
148 |
$html .= '<td>' . ++$i . '</td>';
|
149 |
-
$country_code_link = '<a href="' .
|
150 |
$html .= ( 2 == strlen( $country_code ) ) ? '<td>' . $country_code_link . '</td>' : '<td>' . $country_code . '</td>' ;
|
151 |
$html .= '<td>' . $result . '</td>';
|
152 |
$html .= ( 0 != $total_customers ) ? '<td>' . number_format( ( $result / $total_customers ) * 100, 2 ) . '%' . '</td>' : '<td></td>';
|
153 |
$country_flag_img = wcj_get_country_flag_by_code( $country_code );
|
154 |
-
$country_flag_img_link = '<a href="' .
|
155 |
$country_flag_img . ' ' . wcj_get_country_name_by_code( $country_code ) . '</a>';
|
156 |
$html .= ( 2 == strlen( $country_code ) ) ? '<td>' . $country_flag_img_link . '</td>' : '<td></td>';
|
157 |
$html .= '</tr>';
|
2 |
/**
|
3 |
* Booster for WooCommerce - Reports - Customers
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
126 |
/**
|
127 |
* get_data function.
|
128 |
*
|
129 |
+
* @version 5.5.9
|
130 |
*/
|
131 |
function get_html( $data, $total_customers, $report_type = 'all_countries' ) {
|
132 |
$html = '';
|
146 |
$result = $result['customer_counter'];
|
147 |
$html .= '<tr>';
|
148 |
$html .= '<td>' . ++$i . '</td>';
|
149 |
+
$country_code_link = '<a href="' . esc_url(add_query_arg( array ( 'country' => $country_code ) )) . '">' . $country_code . '</a>';
|
150 |
$html .= ( 2 == strlen( $country_code ) ) ? '<td>' . $country_code_link . '</td>' : '<td>' . $country_code . '</td>' ;
|
151 |
$html .= '<td>' . $result . '</td>';
|
152 |
$html .= ( 0 != $total_customers ) ? '<td>' . number_format( ( $result / $total_customers ) * 100, 2 ) . '%' . '</td>' : '<td></td>';
|
153 |
$country_flag_img = wcj_get_country_flag_by_code( $country_code );
|
154 |
+
$country_flag_img_link = '<a href="' . esc_url(add_query_arg( array ( 'country' => $country_code ) )) . '">' .
|
155 |
$country_flag_img . ' ' . wcj_get_country_name_by_code( $country_code ) . '</a>';
|
156 |
$html .= ( 2 == strlen( $country_code ) ) ? '<td>' . $country_flag_img_link . '</td>' : '<td></td>';
|
157 |
$html .= '</tr>';
|
includes/reports/wcj-class-reports-monthly-sales.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Reports - Monthly Sales (with Currency Conversion)
|
4 |
*
|
5 |
-
* @version
|
6 |
* @since 2.4.7
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -71,7 +71,7 @@ class WCJ_Reports_Monthly_Sales {
|
|
71 |
/*
|
72 |
* get_monthly_sales_report.
|
73 |
*
|
74 |
-
* @version
|
75 |
* @since 2.4.7
|
76 |
* @todo (maybe) visible rows selection by admin (as option)
|
77 |
* @todo (maybe) take not monthly average, but "Close" of closest day (probably create new "Daily Sales (with Currency Conversion)" report)
|
@@ -316,11 +316,11 @@ class WCJ_Reports_Monthly_Sales {
|
|
316 |
$menu = '';
|
317 |
$menu .= '<p>';
|
318 |
$menu .= '<ul class="subsubsub">';
|
319 |
-
$menu .= '<li><a href="' .
|
320 |
( ( $this->year == date( 'Y' ) ) ? 'current' : '' ) . '">' . date( 'Y' ) . '</a> | </li>';
|
321 |
-
$menu .= '<li><a href="' .
|
322 |
( ( $this->year == ( date( 'Y' ) - 1 ) ) ? 'current' : '' ) . '">' . ( date( 'Y' ) - 1 ) . '</a> | </li>';
|
323 |
-
$menu .= '<li><a href="' . add_query_arg( 'year', ( date( 'Y' ) - 2 ) ) . '" class="' .
|
324 |
( ( $this->year == ( date( 'Y' ) - 2 ) ) ? 'current' : '' ) . '">' . ( date( 'Y' ) - 2 ) . '</a> | </li>';
|
325 |
$menu .= '</ul>';
|
326 |
$menu .= '</p>';
|
2 |
/**
|
3 |
* Booster for WooCommerce - Reports - Monthly Sales (with Currency Conversion)
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.4.7
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
71 |
/*
|
72 |
* get_monthly_sales_report.
|
73 |
*
|
74 |
+
* @version 5.5.9
|
75 |
* @since 2.4.7
|
76 |
* @todo (maybe) visible rows selection by admin (as option)
|
77 |
* @todo (maybe) take not monthly average, but "Close" of closest day (probably create new "Daily Sales (with Currency Conversion)" report)
|
316 |
$menu = '';
|
317 |
$menu .= '<p>';
|
318 |
$menu .= '<ul class="subsubsub">';
|
319 |
+
$menu .= '<li><a href="' . esc_url(add_query_arg( 'year', date( 'Y' ) ) ) . '" class="' .
|
320 |
( ( $this->year == date( 'Y' ) ) ? 'current' : '' ) . '">' . date( 'Y' ) . '</a> | </li>';
|
321 |
+
$menu .= '<li><a href="' . esc_url(add_query_arg( 'year', ( date( 'Y' ) - 1 ) )) . '" class="' .
|
322 |
( ( $this->year == ( date( 'Y' ) - 1 ) ) ? 'current' : '' ) . '">' . ( date( 'Y' ) - 1 ) . '</a> | </li>';
|
323 |
+
$menu .= '<li><a href="' . esc_url(add_query_arg( 'year', ( date( 'Y' ) - 2 ) ) ). '" class="' .
|
324 |
( ( $this->year == ( date( 'Y' ) - 2 ) ) ? 'current' : '' ) . '">' . ( date( 'Y' ) - 2 ) . '</a> | </li>';
|
325 |
$menu .= '</ul>';
|
326 |
$menu .= '</p>';
|
includes/reports/wcj-class-reports-sales-daily.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Reports - Product Sales (Daily)
|
4 |
*
|
5 |
-
* @version
|
6 |
* @since 2.9.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -155,7 +155,7 @@ class WCJ_Reports_Product_Sales_Daily {
|
|
155 |
/*
|
156 |
* output_report_header.
|
157 |
*
|
158 |
-
* @version
|
159 |
* @since 2.9.0
|
160 |
*/
|
161 |
function output_report_header() {
|
@@ -166,7 +166,7 @@ class WCJ_Reports_Product_Sales_Daily {
|
|
166 |
$menu .= '<ul class="subsubsub">';
|
167 |
foreach ( array_merge( wcj_get_reports_standard_ranges(), wcj_get_reports_custom_ranges() ) as $custom_range ) {
|
168 |
$menu .= '<li><a ' .
|
169 |
-
'href="' .
|
170 |
'class="' . ( ( $this->start_date == $custom_range['start_date'] && $this->end_date == $custom_range['end_date'] ) ? 'current' : '' ) . '"' .
|
171 |
'>' . $custom_range['title'] . '</a> | </li>';
|
172 |
}
|
2 |
/**
|
3 |
* Booster for WooCommerce - Reports - Product Sales (Daily)
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.9.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
155 |
/*
|
156 |
* output_report_header.
|
157 |
*
|
158 |
+
* @version 5.5.9
|
159 |
* @since 2.9.0
|
160 |
*/
|
161 |
function output_report_header() {
|
166 |
$menu .= '<ul class="subsubsub">';
|
167 |
foreach ( array_merge( wcj_get_reports_standard_ranges(), wcj_get_reports_custom_ranges() ) as $custom_range ) {
|
168 |
$menu .= '<li><a ' .
|
169 |
+
'href="' . esc_url(add_query_arg( array( 'start_date' => $custom_range['start_date'], 'end_date' => $custom_range['end_date'] ) )) . '" ' .
|
170 |
'class="' . ( ( $this->start_date == $custom_range['start_date'] && $this->end_date == $custom_range['end_date'] ) ? 'current' : '' ) . '"' .
|
171 |
'>' . $custom_range['title'] . '</a> | </li>';
|
172 |
}
|
includes/reports/wcj-class-reports-sales-gateways.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Reports - Product Sales - Gateways
|
4 |
*
|
5 |
-
* @version
|
6 |
* @since 3.6.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -105,7 +105,7 @@ class WCJ_Reports_Product_Sales_Gateways {
|
|
105 |
/*
|
106 |
* output_report_header.
|
107 |
*
|
108 |
-
* @version
|
109 |
* @since 3.6.0
|
110 |
*/
|
111 |
function output_report_header() {
|
@@ -116,7 +116,7 @@ class WCJ_Reports_Product_Sales_Gateways {
|
|
116 |
$menu .= '<ul class="subsubsub">';
|
117 |
foreach ( array_merge( wcj_get_reports_standard_ranges(), wcj_get_reports_custom_ranges() ) as $custom_range ) {
|
118 |
$menu .= '<li><a ' .
|
119 |
-
'href="' .
|
120 |
'class="' . ( ( $this->start_date == $custom_range['start_date'] && $this->end_date == $custom_range['end_date'] ) ? 'current' : '' ) . '"' .
|
121 |
'>' . $custom_range['title'] . '</a> | </li>';
|
122 |
}
|
2 |
/**
|
3 |
* Booster for WooCommerce - Reports - Product Sales - Gateways
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 3.6.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
105 |
/*
|
106 |
* output_report_header.
|
107 |
*
|
108 |
+
* @version 5.5.9
|
109 |
* @since 3.6.0
|
110 |
*/
|
111 |
function output_report_header() {
|
116 |
$menu .= '<ul class="subsubsub">';
|
117 |
foreach ( array_merge( wcj_get_reports_standard_ranges(), wcj_get_reports_custom_ranges() ) as $custom_range ) {
|
118 |
$menu .= '<li><a ' .
|
119 |
+
'href="' . esc_url(add_query_arg( array( 'start_date' => $custom_range['start_date'], 'end_date' => $custom_range['end_date'] ) )) . '" ' .
|
120 |
'class="' . ( ( $this->start_date == $custom_range['start_date'] && $this->end_date == $custom_range['end_date'] ) ? 'current' : '' ) . '"' .
|
121 |
'>' . $custom_range['title'] . '</a> | </li>';
|
122 |
}
|
includes/reports/wcj-class-reports-sales.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Reports - Sales
|
4 |
*
|
5 |
-
* @version
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
@@ -67,7 +67,7 @@ class WCJ_Reports_Sales {
|
|
67 |
/*
|
68 |
* get_products_sales.
|
69 |
*
|
70 |
-
* @version
|
71 |
* @since 2.3.0
|
72 |
* @todo fix when variable and variations are all (wrongfully) counted in total sums
|
73 |
* @todo display more info for "Parent product deleted" and "Product deleted"
|
@@ -325,11 +325,11 @@ class WCJ_Reports_Sales {
|
|
325 |
|
326 |
$menu = '';
|
327 |
$menu .= '<ul class="subsubsub">';
|
328 |
-
$menu .= '<li><a href="' .
|
329 |
( ( $this->year == date( 'Y' ) ) ? 'current' : '' ) . '">' . date( 'Y' ) . '</a> | </li>';
|
330 |
-
$menu .= '<li><a href="' .
|
331 |
( ( $this->year == ( date( 'Y' ) - 1 ) ) ? 'current' : '' ) . '">' . ( date( 'Y' ) - 1 ) . '</a> | </li>';
|
332 |
-
$menu .= '<li><a href="' .
|
333 |
( ( $this->year == ( date( 'Y' ) - 2 ) ) ? 'current' : '' ) . '">' . ( date( 'Y' ) - 2 ) . '</a></li>';
|
334 |
$menu .= '</ul>';
|
335 |
$menu .= '<br class="clear">';
|
2 |
/**
|
3 |
* Booster for WooCommerce - Reports - Sales
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
67 |
/*
|
68 |
* get_products_sales.
|
69 |
*
|
70 |
+
* @version 5.5.9
|
71 |
* @since 2.3.0
|
72 |
* @todo fix when variable and variations are all (wrongfully) counted in total sums
|
73 |
* @todo display more info for "Parent product deleted" and "Product deleted"
|
325 |
|
326 |
$menu = '';
|
327 |
$menu .= '<ul class="subsubsub">';
|
328 |
+
$menu .= '<li><a href="' . esc_url(add_query_arg( 'year', date( 'Y' ) ) ) . '" class="' .
|
329 |
( ( $this->year == date( 'Y' ) ) ? 'current' : '' ) . '">' . date( 'Y' ) . '</a> | </li>';
|
330 |
+
$menu .= '<li><a href="' . esc_url(add_query_arg( 'year', ( date( 'Y' ) - 1 ) )) . '" class="' .
|
331 |
( ( $this->year == ( date( 'Y' ) - 1 ) ) ? 'current' : '' ) . '">' . ( date( 'Y' ) - 1 ) . '</a> | </li>';
|
332 |
+
$menu .= '<li><a href="' . esc_url(add_query_arg( 'year', ( date( 'Y' ) - 2 ) )) . '" class="' .
|
333 |
( ( $this->year == ( date( 'Y' ) - 2 ) ) ? 'current' : '' ) . '">' . ( date( 'Y' ) - 2 ) . '</a></li>';
|
334 |
$menu .= '</ul>';
|
335 |
$menu .= '<br class="clear">';
|
includes/settings/wcj-settings-currency-exchange-rates.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Settings - Currency Exchange Rates
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @since 2.8.0
|
7 |
* @author Pluggabl LLC.
|
8 |
* @todo add "rounding" and "fixed offset" options for each pair separately (and option to enable/disable these per pair extra settings)
|
@@ -41,7 +41,7 @@ $settings = array(
|
|
41 |
'weekly' => __( 'Update Weekly', 'woocommerce-jetpack' ),
|
42 |
),
|
43 |
'desc' => ( $this->is_enabled() ?
|
44 |
-
$desc . ' ' . '<a href="' .
|
45 |
),
|
46 |
array(
|
47 |
'title' => __( 'Exchange Rates Server', 'woocommerce-jetpack' ),
|
2 |
/**
|
3 |
* Booster for WooCommerce - Settings - Currency Exchange Rates
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.8.0
|
7 |
* @author Pluggabl LLC.
|
8 |
* @todo add "rounding" and "fixed offset" options for each pair separately (and option to enable/disable these per pair extra settings)
|
41 |
'weekly' => __( 'Update Weekly', 'woocommerce-jetpack' ),
|
42 |
),
|
43 |
'desc' => ( $this->is_enabled() ?
|
44 |
+
$desc . ' ' . '<a href="' . esc_url(add_query_arg( 'wcj_currency_exchange_rates_update_now', '1' )) . '">' . __( 'Update all rates now', 'woocommerce-jetpack' ) . '</a>' : '' ),
|
45 |
),
|
46 |
array(
|
47 |
'title' => __( 'Exchange Rates Server', 'woocommerce-jetpack' ),
|
includes/settings/wcj-settings-debug-tools.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Settings - Debug Tools
|
4 |
*
|
5 |
-
* @version
|
6 |
* @since 4.1.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -44,7 +44,7 @@ return array(
|
|
44 |
'id' => 'wcj_debug_tools_system_info',
|
45 |
'default' => '',
|
46 |
'type' => 'custom_link',
|
47 |
-
'link' => '<a href="' . add_query_arg( 'wcj_debug', true ) . '">' . __( 'Show extended info', 'woocommerce-jetpack' ) . '</a>' .
|
48 |
'<pre style="background-color: white; padding: 5px;">' . wcj_get_table_html( $this->get_system_info_table_array(),
|
49 |
array( 'columns_styles' => array( 'padding:0;', 'padding:0;' ), 'table_heading_type' => 'vertical' ) ) . '</pre>',
|
50 |
),
|
2 |
/**
|
3 |
* Booster for WooCommerce - Settings - Debug Tools
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 4.1.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
44 |
'id' => 'wcj_debug_tools_system_info',
|
45 |
'default' => '',
|
46 |
'type' => 'custom_link',
|
47 |
+
'link' => '<a href="' . esc_url( add_query_arg( 'wcj_debug', true ) ). '">' . __( 'Show extended info', 'woocommerce-jetpack' ) . '</a>' .
|
48 |
'<pre style="background-color: white; padding: 5px;">' . wcj_get_table_html( $this->get_system_info_table_array(),
|
49 |
array( 'columns_styles' => array( 'padding:0;', 'padding:0;' ), 'table_heading_type' => 'vertical' ) ) . '</pre>',
|
50 |
),
|
includes/settings/wcj-settings-max-products-per-user.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Settings - Max Products per User
|
4 |
*
|
5 |
-
* @version
|
6 |
* @since 3.5.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -97,7 +97,7 @@ return array(
|
|
97 |
'default' => '',
|
98 |
'type' => 'custom_link',
|
99 |
'link' => '<a class="button" href="' .
|
100 |
-
|
101 |
__( 'Calculate Data', 'woocommerce-jetpack' ) .
|
102 |
'</a>',
|
103 |
),
|
2 |
/**
|
3 |
* Booster for WooCommerce - Settings - Max Products per User
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 3.5.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
97 |
'default' => '',
|
98 |
'type' => 'custom_link',
|
99 |
'link' => '<a class="button" href="' .
|
100 |
+
esc_url(add_query_arg( 'wcj_max_products_per_user_calculate_data', '1', remove_query_arg( 'wcj_max_products_per_user_calculate_data_finished' ) ) ). '">' .
|
101 |
__( 'Calculate Data', 'woocommerce-jetpack' ) .
|
102 |
'</a>',
|
103 |
),
|
includes/settings/wcj-settings-pdf-invoicing-advanced.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Settings - PDF Invoicing - Advanced
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @since 3.3.0
|
7 |
* @author Pluggabl LLC.
|
8 |
* @todo (maybe) create "Tools (Options)" submodule
|
@@ -156,7 +156,7 @@ return array(
|
|
156 |
array(
|
157 |
'title' => __( 'Actions', 'woocommerce-jetpack' ),
|
158 |
'type' => 'custom_link',
|
159 |
-
'link' => '<a class="button" href="' .
|
160 |
( $is_full_fonts ? __( 'Re-download', 'woocommerce-jetpack' ) : __( 'Download', 'woocommerce-jetpack' ) )
|
161 |
. '</a>',
|
162 |
'id' => 'wcj_invoicing_fonts_manager_styling_option',
|
2 |
/**
|
3 |
* Booster for WooCommerce - Settings - PDF Invoicing - Advanced
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 3.3.0
|
7 |
* @author Pluggabl LLC.
|
8 |
* @todo (maybe) create "Tools (Options)" submodule
|
156 |
array(
|
157 |
'title' => __( 'Actions', 'woocommerce-jetpack' ),
|
158 |
'type' => 'custom_link',
|
159 |
+
'link' => '<a class="button" href="' . esc_url(add_query_arg( 'wcj_download_fonts', '1' ) ). '">' .
|
160 |
( $is_full_fonts ? __( 'Re-download', 'woocommerce-jetpack' ) : __( 'Download', 'woocommerce-jetpack' ) )
|
161 |
. '</a>',
|
162 |
'id' => 'wcj_invoicing_fonts_manager_styling_option',
|
includes/settings/wcj-settings-price-by-country.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Settings - Prices and Currencies by Country
|
4 |
*
|
5 |
-
* @version 5.5.
|
6 |
* @since 2.8.1
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -195,7 +195,7 @@ $settings = array(
|
|
195 |
'title' => __( 'Price Filter Widget and Sorting by Price Support', 'woocommerce-jetpack' ),
|
196 |
'desc' => empty( $message = apply_filters( 'booster_message', '', 'desc' ) ) ? __( 'Enable', 'woocommerce-jetpack' ) : $message,
|
197 |
'custom_attributes' => apply_filters( 'booster_message', '', 'disabled' ),
|
198 |
-
'desc_tip' => '<a href="' .
|
199 |
__( 'Recalculate price filter widget and sorting by price product prices.', 'woocommerce-jetpack' ) . '</a>',
|
200 |
'id' => 'wcj_price_by_country_price_filter_widget_support_enabled',
|
201 |
'default' => 'no',
|
2 |
/**
|
3 |
* Booster for WooCommerce - Settings - Prices and Currencies by Country
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.8.1
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
195 |
'title' => __( 'Price Filter Widget and Sorting by Price Support', 'woocommerce-jetpack' ),
|
196 |
'desc' => empty( $message = apply_filters( 'booster_message', '', 'desc' ) ) ? __( 'Enable', 'woocommerce-jetpack' ) : $message,
|
197 |
'custom_attributes' => apply_filters( 'booster_message', '', 'disabled' ),
|
198 |
+
'desc_tip' => '<a href="' . esc_url(add_query_arg( 'recalculate_price_filter_products_prices', '1', remove_query_arg( array( 'wcj_generate_country_groups' ) ) ) ). '">' .
|
199 |
__( 'Recalculate price filter widget and sorting by price product prices.', 'woocommerce-jetpack' ) . '</a>',
|
200 |
'id' => 'wcj_price_by_country_price_filter_widget_support_enabled',
|
201 |
'default' => 'no',
|
includes/settings/wcj-settings-products-xml.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Settings - Products XML
|
4 |
*
|
5 |
-
* @version
|
6 |
* @since 2.8.0
|
7 |
* @author Pluggabl LLC.
|
8 |
* @todo recheck "URL" in `'wcj_products_xml_file_path_' . $i`
|
@@ -53,7 +53,7 @@ for ( $i = 1; $i <= apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_pro
|
|
53 |
if ( $this->is_enabled() ) {
|
54 |
$products_xml_cron_desc = '<a class="button" title="' .
|
55 |
__( 'If you\'ve made any changes in module\'s settings - don\'t forget to save changes before clicking this button.', 'woocommerce-jetpack' ) . '"' .
|
56 |
-
' href="' .
|
57 |
__( 'Create Now', 'woocommerce-jetpack' ) . '</a>' .
|
58 |
wcj_crons_get_next_event_time_message( 'wcj_create_products_xml_cron_time_' . $i );
|
59 |
}
|
2 |
/**
|
3 |
* Booster for WooCommerce - Settings - Products XML
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.8.0
|
7 |
* @author Pluggabl LLC.
|
8 |
* @todo recheck "URL" in `'wcj_products_xml_file_path_' . $i`
|
53 |
if ( $this->is_enabled() ) {
|
54 |
$products_xml_cron_desc = '<a class="button" title="' .
|
55 |
__( 'If you\'ve made any changes in module\'s settings - don\'t forget to save changes before clicking this button.', 'woocommerce-jetpack' ) . '"' .
|
56 |
+
' href="' . esc_url(add_query_arg( 'wcj_create_products_xml', $i, remove_query_arg( 'wcj_create_products_xml_result' ) )) . '">' .
|
57 |
__( 'Create Now', 'woocommerce-jetpack' ) . '</a>' .
|
58 |
wcj_crons_get_next_event_time_message( 'wcj_create_products_xml_cron_time_' . $i );
|
59 |
}
|
includes/settings/wcj-settings-wpml.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Settings - WPML
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @since 2.8.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -98,7 +98,7 @@ $settings = array(
|
|
98 |
'id' => 'wcj_' . $this->id . '_module_tools',
|
99 |
'type' => 'custom_link',
|
100 |
'link' => ( $this->is_enabled() ) ?
|
101 |
-
'<code>' . '<a href="' .
|
102 |
__( 'Regenerate wpml-config.xml file', 'woocommerce-jetpack' ) . '</a>' . '</code>' .
|
103 |
'<pre>' . $this->notice . '</pre>' :
|
104 |
'<code>' . __( 'Regenerate wpml-config.xml file', 'woocommerce-jetpack' ) . '</code>',
|
2 |
/**
|
3 |
* Booster for WooCommerce - Settings - WPML
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.8.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
98 |
'id' => 'wcj_' . $this->id . '_module_tools',
|
99 |
'type' => 'custom_link',
|
100 |
'link' => ( $this->is_enabled() ) ?
|
101 |
+
'<code>' . '<a href="' . esc_url(add_query_arg( 'create_wpml_xml_file', '1' )) . '">' .
|
102 |
__( 'Regenerate wpml-config.xml file', 'woocommerce-jetpack' ) . '</a>' . '</code>' .
|
103 |
'<pre>' . $this->notice . '</pre>' :
|
104 |
'<code>' . __( 'Regenerate wpml-config.xml file', 'woocommerce-jetpack' ) . '</code>',
|
includes/shortcodes/class-wcj-shortcodes-general.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Shortcodes - General
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
@@ -762,7 +762,7 @@ class WCJ_General_Shortcodes extends WCJ_Shortcodes {
|
|
762 |
/**
|
763 |
* wcj_currency_select_link_list.
|
764 |
*
|
765 |
-
* @version
|
766 |
* @since 2.4.5
|
767 |
*/
|
768 |
function wcj_currency_select_link_list( $atts, $content ) {
|
@@ -796,7 +796,7 @@ class WCJ_General_Shortcodes extends WCJ_Shortcodes {
|
|
796 |
'%currency_symbol%' => get_woocommerce_currency_symbol( $currency_code ),
|
797 |
);
|
798 |
$currency_switcher_output = str_replace( array_keys( $template_replaced_values ), array_values( $template_replaced_values ), $switcher_template );
|
799 |
-
$the_link = '<a href="' .
|
800 |
if ( $currency_code != $selected_currency ) {
|
801 |
$links[] = $the_link;
|
802 |
} else {
|
2 |
/**
|
3 |
* Booster for WooCommerce - Shortcodes - General
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @author Pluggabl LLC.
|
7 |
*/
|
8 |
|
762 |
/**
|
763 |
* wcj_currency_select_link_list.
|
764 |
*
|
765 |
+
* @version 5.5.9
|
766 |
* @since 2.4.5
|
767 |
*/
|
768 |
function wcj_currency_select_link_list( $atts, $content ) {
|
796 |
'%currency_symbol%' => get_woocommerce_currency_symbol( $currency_code ),
|
797 |
);
|
798 |
$currency_switcher_output = str_replace( array_keys( $template_replaced_values ), array_values( $template_replaced_values ), $switcher_template );
|
799 |
+
$the_link = '<a href="' . esc_url(add_query_arg( 'wcj-currency', $currency_code )) . '">' . $currency_switcher_output . '</a>';
|
800 |
if ( $currency_code != $selected_currency ) {
|
801 |
$links[] = $the_link;
|
802 |
} else {
|
includes/shortcodes/class-wcj-shortcodes-products-add-form.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Shortcodes - Products Add Form
|
4 |
*
|
5 |
-
* @version
|
6 |
* @since 2.5.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -246,7 +246,7 @@ class WCJ_Products_Add_Form_Shortcodes extends WCJ_Shortcodes {
|
|
246 |
/**
|
247 |
* wcj_product_add_new.
|
248 |
*
|
249 |
-
* @version
|
250 |
* @since 2.5.0
|
251 |
* @todo `multipart` only if image
|
252 |
*/
|
@@ -360,7 +360,7 @@ class WCJ_Products_Add_Form_Shortcodes extends WCJ_Shortcodes {
|
|
360 |
if ( 0 != $atts['product_id'] ) {
|
361 |
$the_field = ( '' == get_post_thumbnail_id( $atts['product_id'] ) ) ?
|
362 |
$new_image_field :
|
363 |
-
'<a href="' .
|
364 |
__( 'Are you sure?', 'woocommerce-jetpack' ) . '\')">' . __( 'Delete', 'woocommerce-jetpack' ) . '</a><br>' .
|
365 |
get_the_post_thumbnail( $atts['product_id'], array( 50, 50 ) , array( 'class' => 'alignleft' ) );
|
366 |
} else {
|
2 |
/**
|
3 |
* Booster for WooCommerce - Shortcodes - Products Add Form
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 2.5.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
246 |
/**
|
247 |
* wcj_product_add_new.
|
248 |
*
|
249 |
+
* @version 5.5.9
|
250 |
* @since 2.5.0
|
251 |
* @todo `multipart` only if image
|
252 |
*/
|
360 |
if ( 0 != $atts['product_id'] ) {
|
361 |
$the_field = ( '' == get_post_thumbnail_id( $atts['product_id'] ) ) ?
|
362 |
$new_image_field :
|
363 |
+
'<a href="' . esc_url(add_query_arg( 'wcj_edit_product_image_delete', $atts['product_id'] ) ). '" onclick="return confirm(\'' .
|
364 |
__( 'Are you sure?', 'woocommerce-jetpack' ) . '\')">' . __( 'Delete', 'woocommerce-jetpack' ) . '</a><br>' .
|
365 |
get_the_post_thumbnail( $atts['product_id'], array( 50, 50 ) , array( 'class' => 'alignleft' ) );
|
366 |
} else {
|
includes/shortcodes/class-wcj-shortcodes-products.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/**
|
4 |
* Booster for WooCommerce - Shortcodes - Products
|
5 |
*
|
6 |
-
* @version 5.5.
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
9 |
|
@@ -245,13 +245,13 @@ if (!class_exists('WCJ_Products_Shortcodes')) :
|
|
245 |
/**
|
246 |
* wcj_product_author_link.
|
247 |
*
|
248 |
-
* @version
|
249 |
* @since 2.6.0
|
250 |
*/
|
251 |
function wcj_product_author_link($atts)
|
252 |
{
|
253 |
global $post;
|
254 |
-
return
|
255 |
}
|
256 |
|
257 |
/**
|
3 |
/**
|
4 |
* Booster for WooCommerce - Shortcodes - Products
|
5 |
*
|
6 |
+
* @version 5.5.9
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
9 |
|
245 |
/**
|
246 |
* wcj_product_author_link.
|
247 |
*
|
248 |
+
* @version 5.5.9
|
249 |
* @since 2.6.0
|
250 |
*/
|
251 |
function wcj_product_author_link($atts)
|
252 |
{
|
253 |
global $post;
|
254 |
+
return esc_url(add_query_arg('post_type', 'product', get_author_posts_url($post->post_author)));
|
255 |
}
|
256 |
|
257 |
/**
|
includes/tools/class-wcj-order-statuses-tool.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Tool - Order Statuses
|
4 |
*
|
5 |
-
* @version 5.5.
|
6 |
* @since 3.2.2
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -131,7 +131,7 @@ class WCJ_Order_Statuses_Tool {
|
|
131 |
/**
|
132 |
* get_custom_statuses_table.
|
133 |
*
|
134 |
-
* @version
|
135 |
* @since 3.2.2
|
136 |
*/
|
137 |
function get_custom_statuses_table() {
|
@@ -157,11 +157,11 @@ class WCJ_Order_Statuses_Tool {
|
|
157 |
$icon_data = $this->module->get_status_icon_data( substr( $status, 3 ) );
|
158 |
$color_html = '<input disabled type="color" value="' . $icon_data['color'] . '">';
|
159 |
$text_color_html = '<input disabled type="color" value="' . $icon_data['text_color'] . '">';
|
160 |
-
$delete_button = '<a class="button-primary" href="' .
|
161 |
'" onclick="return confirm(\'' . __( 'Are you sure?', 'woocommerce-jetpack' ) . '\')">' . __( 'Delete', 'woocommerce-jetpack' ) . '</a>';
|
162 |
$edit_button = '<a class="button-primary"' . ( '' != apply_filters( 'booster_message', '', 'desc' ) ?
|
163 |
' disabled title="' . __( 'Get Booster Plus to enable.', 'woocommerce-jetpack' ) . '"' :
|
164 |
-
' href="' .
|
165 |
$row = array_merge( $row, array(
|
166 |
$icon_data['content'],
|
167 |
$color_html,
|
@@ -261,11 +261,11 @@ class WCJ_Order_Statuses_Tool {
|
|
261 |
/**
|
262 |
* get_delete_all_custom_statuses_button.
|
263 |
*
|
264 |
-
* @version
|
265 |
* @since 3.2.2
|
266 |
*/
|
267 |
function get_delete_all_custom_statuses_button() {
|
268 |
-
return '<p>' . '<a class="button-primary" href="' .
|
269 |
'" onclick="return confirm(\'' . __( 'Are you sure?', 'woocommerce-jetpack' ) . '\')">' . __( 'Delete All Custom Statuses', 'woocommerce-jetpack' ) . '</a>' .
|
270 |
'</p>';
|
271 |
}
|
2 |
/**
|
3 |
* Booster for WooCommerce - Tool - Order Statuses
|
4 |
*
|
5 |
+
* @version 5.5.9
|
6 |
* @since 3.2.2
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
131 |
/**
|
132 |
* get_custom_statuses_table.
|
133 |
*
|
134 |
+
* @version 5.5.9
|
135 |
* @since 3.2.2
|
136 |
*/
|
137 |
function get_custom_statuses_table() {
|
157 |
$icon_data = $this->module->get_status_icon_data( substr( $status, 3 ) );
|
158 |
$color_html = '<input disabled type="color" value="' . $icon_data['color'] . '">';
|
159 |
$text_color_html = '<input disabled type="color" value="' . $icon_data['text_color'] . '">';
|
160 |
+
$delete_button = '<a class="button-primary" href="' . esc_url(add_query_arg( 'delete', $status, remove_query_arg( 'edit' ) )) .
|
161 |
'" onclick="return confirm(\'' . __( 'Are you sure?', 'woocommerce-jetpack' ) . '\')">' . __( 'Delete', 'woocommerce-jetpack' ) . '</a>';
|
162 |
$edit_button = '<a class="button-primary"' . ( '' != apply_filters( 'booster_message', '', 'desc' ) ?
|
163 |
' disabled title="' . __( 'Get Booster Plus to enable.', 'woocommerce-jetpack' ) . '"' :
|
164 |
+
' href="' . esc_url(add_query_arg( 'edit', $status, remove_query_arg( 'delete' ) )) . '"' ) . '>' . __( 'Edit', 'woocommerce-jetpack' ) . '</a>';
|
165 |
$row = array_merge( $row, array(
|
166 |
$icon_data['content'],
|
167 |
$color_html,
|
261 |
/**
|
262 |
* get_delete_all_custom_statuses_button.
|
263 |
*
|
264 |
+
* @version 5.5.9
|
265 |
* @since 3.2.2
|
266 |
*/
|
267 |
function get_delete_all_custom_statuses_button() {
|
268 |
+
return '<p>' . '<a class="button-primary" href="' . esc_url(add_query_arg( 'delete_all', '1', remove_query_arg( array( 'edit', 'delete' ) ) )) .
|
269 |
'" onclick="return confirm(\'' . __( 'Are you sure?', 'woocommerce-jetpack' ) . '\')">' . __( 'Delete All Custom Statuses', 'woocommerce-jetpack' ) . '</a>' .
|
270 |
'</p>';
|
271 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: woocommerce customization, woocommerce bundle, woocommerce product addon,
|
|
4 |
Requires at least: 4.4
|
5 |
Tested up to: 6.0
|
6 |
Requires PHP: 5.6
|
7 |
-
Stable tag: 5.5.
|
8 |
License: GNU General Public License v3.0
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -272,6 +272,12 @@ To unlock all Booster for WooCommerce features, please install additional paid B
|
|
272 |
|
273 |
== Changelog ==
|
274 |
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
= 5.5.8 25/05/2022 =
|
276 |
|
277 |
* NEW FEATURE - PRODUCTS - User Products - Send an email to the product owner when a product has been sold.
|
4 |
Requires at least: 4.4
|
5 |
Tested up to: 6.0
|
6 |
Requires PHP: 5.6
|
7 |
+
Stable tag: 5.5.9
|
8 |
License: GNU General Public License v3.0
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
272 |
|
273 |
== Changelog ==
|
274 |
|
275 |
+
= 5.5.9 31/05/2022 =
|
276 |
+
|
277 |
+
* FIXED - Added Security vulnerability fixes.
|
278 |
+
* WooCommerce 6.5.1 tested
|
279 |
+
* WordPress 6.0 tested
|
280 |
+
|
281 |
= 5.5.8 25/05/2022 =
|
282 |
|
283 |
* NEW FEATURE - PRODUCTS - User Products - Send an email to the product owner when a product has been sold.
|
tracking/class-plugin-usage-tracker.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* This is the class that sends all the data back to the home site
|
4 |
* It also handles opting in and deactivation
|
5 |
-
* @version
|
6 |
*/
|
7 |
|
8 |
// Exit if accessed directly
|
@@ -858,11 +858,11 @@ if( ! class_exists( 'Plugin_Usage_Tracker') ) {
|
|
858 |
// Option 2 enables a second notice that fires after the user opts in to tracking
|
859 |
$yes_args['marketing'] = 'yes';
|
860 |
}
|
861 |
-
$url_yes =
|
862 |
-
$url_no =
|
863 |
'plugin' => $this->plugin_name,
|
864 |
'plugin_action' => 'no'
|
865 |
-
) );
|
866 |
|
867 |
// Decide on notice text
|
868 |
if( $this->marketing != 1 ) {
|
@@ -913,14 +913,14 @@ if( ! class_exists( 'Plugin_Usage_Tracker') ) {
|
|
913 |
$plugin = $this->plugin_data();
|
914 |
$plugin_name = $plugin['Name'];
|
915 |
|
916 |
-
$url_yes =
|
917 |
'plugin' => $this->plugin_name,
|
918 |
'marketing_optin' => 'yes'
|
919 |
-
) );
|
920 |
-
$url_no =
|
921 |
'plugin' => $this->plugin_name,
|
922 |
'marketing_optin' => 'no'
|
923 |
-
) );
|
924 |
|
925 |
$marketing_text = sprintf(
|
926 |
__( 'Thank you for opting in to tracking. Would you like to receive occasional news about this %s, including details of new features and special offers?', 'singularity' ),
|
2 |
/**
|
3 |
* This is the class that sends all the data back to the home site
|
4 |
* It also handles opting in and deactivation
|
5 |
+
* @version 5.5.9
|
6 |
*/
|
7 |
|
8 |
// Exit if accessed directly
|
858 |
// Option 2 enables a second notice that fires after the user opts in to tracking
|
859 |
$yes_args['marketing'] = 'yes';
|
860 |
}
|
861 |
+
$url_yes = esc_url(add_query_arg( $yes_args ));
|
862 |
+
$url_no = esc_url(add_query_arg( array(
|
863 |
'plugin' => $this->plugin_name,
|
864 |
'plugin_action' => 'no'
|
865 |
+
) ));
|
866 |
|
867 |
// Decide on notice text
|
868 |
if( $this->marketing != 1 ) {
|
913 |
$plugin = $this->plugin_data();
|
914 |
$plugin_name = $plugin['Name'];
|
915 |
|
916 |
+
$url_yes = esc_url(add_query_arg( array(
|
917 |
'plugin' => $this->plugin_name,
|
918 |
'marketing_optin' => 'yes'
|
919 |
+
) ));
|
920 |
+
$url_no = esc_url(add_query_arg( array(
|
921 |
'plugin' => $this->plugin_name,
|
922 |
'marketing_optin' => 'no'
|
923 |
+
) ));
|
924 |
|
925 |
$marketing_text = sprintf(
|
926 |
__( 'Thank you for opting in to tracking. Would you like to receive occasional news about this %s, including details of new features and special offers?', 'singularity' ),
|
version-details.txt
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
-
= 5.5.
|
2 |
|
3 |
-
*
|
4 |
-
* NEW FEATURE - PAYMENT GATEWAYS - Gateways Fees and Discounts - Added a new feature to apply Payment Gateways Fees by User role.
|
5 |
* WooCommerce 6.5.1 tested
|
6 |
-
* WordPress 6.0 tested
|
1 |
+
= 5.5.9 31/05/2022 =
|
2 |
|
3 |
+
* FIXED - Added Security vulnerability fixes.
|
|
|
4 |
* WooCommerce 6.5.1 tested
|
5 |
+
* WordPress 6.0 tested
|
woocommerce-jetpack.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Booster for WooCommerce
|
4 |
Plugin URI: https://booster.io
|
5 |
Description: Supercharge your WooCommerce site with these awesome powerful features. More than 100 modules. All in one WooCommerce plugin.
|
6 |
-
Version: 5.5.
|
7 |
Author: Pluggabl LLC
|
8 |
Author URI: https://booster.io
|
9 |
Text Domain: woocommerce-jetpack
|
@@ -58,7 +58,7 @@ if (!class_exists('WC_Jetpack')) :
|
|
58 |
* @var string
|
59 |
* @since 2.4.7
|
60 |
*/
|
61 |
-
public $version = '5.5.
|
62 |
|
63 |
/**
|
64 |
* @var WC_Jetpack The single instance of the class
|
3 |
Plugin Name: Booster for WooCommerce
|
4 |
Plugin URI: https://booster.io
|
5 |
Description: Supercharge your WooCommerce site with these awesome powerful features. More than 100 modules. All in one WooCommerce plugin.
|
6 |
+
Version: 5.5.9
|
7 |
Author: Pluggabl LLC
|
8 |
Author URI: https://booster.io
|
9 |
Text Domain: woocommerce-jetpack
|
58 |
* @var string
|
59 |
* @since 2.4.7
|
60 |
*/
|
61 |
+
public $version = '5.5.9';
|
62 |
|
63 |
/**
|
64 |
* @var WC_Jetpack The single instance of the class
|