Version Description
- The deprecated page styles field has been replaced with an image URL field in the settings.
- The Image URL field can be used to specify an image/logo URL that will be displayed in the paypal checkout page.
Download this release
Release Info
Developer | mra13 |
Plugin | WordPress Simple PayPal Shopping Cart |
Version | 4.3.5 |
Comparing to | |
See all releases |
Code changes from version 4.3.3 to 4.3.5
- includes/admin/wp_shopping_cart_menu_general_settings.php +51 -12
- includes/wspsc-cart-functions.php +2 -2
- readme.txt +10 -2
- wp_shopping_cart.php +4 -3
includes/admin/wp_shopping_cart_menu_general_settings.php
CHANGED
@@ -25,7 +25,9 @@ function show_wp_cart_options_page ()
|
|
25 |
wp_die('Error! Nonce Security Check Failed! Go back to settings menu and save the settings again.');
|
26 |
}
|
27 |
|
28 |
-
|
|
|
|
|
29 |
update_option('cart_currency_symbol', sanitize_text_field($_POST["cart_currency_symbol"]));
|
30 |
update_option('cart_base_shipping_cost', sanitize_text_field($_POST["cart_base_shipping_cost"]));
|
31 |
update_option('cart_free_shipping_threshold', sanitize_text_field($_POST["cart_free_shipping_threshold"]));
|
@@ -144,7 +146,7 @@ function show_wp_cart_options_page ()
|
|
144 |
$wp_shopping_cart_enable_debug = 'checked="checked"';
|
145 |
}
|
146 |
?>
|
147 |
-
<h2><?php _e("Simple PayPal Shopping Cart Settings", "wordpress-simple-paypal-shopping-cart"); ?> v
|
148 |
|
149 |
<div style="background: none repeat scroll 0 0 #FFF6D5;border: 1px solid #D1B655;color: #3F2502;margin: 10px 0;padding: 5px 5px 5px 10px;text-shadow: 1px 1px #FFFFFF;">
|
150 |
<p><?php _e("For more information, updates, detailed documentation and video tutorial, please visit:", "wordpress-simple-paypal-shopping-cart"); ?><br />
|
@@ -182,13 +184,50 @@ echo '
|
|
182 |
</tr>
|
183 |
<tr valign="top">
|
184 |
<th scope="row">'.(__("Text/Image to Show When Cart Empty", "wordpress-simple-paypal-shopping-cart")).'</th>
|
185 |
-
<td><input type="text" name="wp_cart_empty_text" value="'.esc_attr($emptyCartText).'" size="
|
186 |
-
</tr>
|
|
|
|
|
187 |
<tr valign="top">
|
188 |
-
<th scope="row"
|
189 |
-
<td
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
</tr>
|
191 |
-
|
|
|
|
|
192 |
<th scope="row">'.(__("Currency Symbol", "wordpress-simple-paypal-shopping-cart")).'</th>
|
193 |
<td><input type="text" name="cart_currency_symbol" value="'.esc_attr($defaultSymbol).'" size="3" style="width: 2em;" /> ('.(__("e.g.", "wordpress-simple-paypal-shopping-cart")).' $, £, €)
|
194 |
</td>
|
@@ -218,7 +257,7 @@ echo '
|
|
218 |
<th scope="row">'.(__("Add to Cart button text or Image", "wordpress-simple-paypal-shopping-cart")).'</th>
|
219 |
<td><input type="text" name="addToCartButtonName" value="'.esc_attr($addcart).'" size="100" />
|
220 |
<br />'.(__("To use a customized image as the button simply enter the URL of the image file.", "wordpress-simple-paypal-shopping-cart")).' '.(__("e.g.", "wordpress-simple-paypal-shopping-cart")).' http://www.your-domain.com/wp-content/plugins/wordpress-paypal-shopping-cart/images/buy_now_button.png
|
221 |
-
<br />You can download nice add to cart button images from <a href="
|
222 |
</td>
|
223 |
</tr>
|
224 |
|
@@ -275,9 +314,9 @@ echo '
|
|
275 |
|
276 |
<table class="form-table">
|
277 |
<tr valign="top">
|
278 |
-
<th scope="row">'.(__("Custom Checkout Page
|
279 |
-
<td><input type="text" name="wp_cart_paypal_co_page_style" value="'.esc_attr($wp_cart_paypal_co_page_style).'" size="
|
280 |
-
<br />'.(__("Specify
|
281 |
</tr>
|
282 |
</table>
|
283 |
|
@@ -300,7 +339,7 @@ echo '
|
|
300 |
<tr valign="top">
|
301 |
<th scope="row">'.(__("Use WP Affiliate Platform", "wordpress-simple-paypal-shopping-cart")).'</th>
|
302 |
<td><input type="checkbox" name="wp_use_aff_platform" value="1" '.$wp_use_aff_platform.' />
|
303 |
-
<br />'.(__("Check this if using with the", "wordpress-simple-paypal-shopping-cart")).' <a href="https://www.tipsandtricks-hq.com
|
304 |
</tr>
|
305 |
</table>
|
306 |
</div></div>
|
25 |
wp_die('Error! Nonce Security Check Failed! Go back to settings menu and save the settings again.');
|
26 |
}
|
27 |
|
28 |
+
$currency_code = sanitize_text_field($_POST["cart_payment_currency"]);
|
29 |
+
$currency_code = trim(strtoupper($currency_code));//Currency code must be uppercase.
|
30 |
+
update_option('cart_payment_currency', $currency_code);
|
31 |
update_option('cart_currency_symbol', sanitize_text_field($_POST["cart_currency_symbol"]));
|
32 |
update_option('cart_base_shipping_cost', sanitize_text_field($_POST["cart_base_shipping_cost"]));
|
33 |
update_option('cart_free_shipping_threshold', sanitize_text_field($_POST["cart_free_shipping_threshold"]));
|
146 |
$wp_shopping_cart_enable_debug = 'checked="checked"';
|
147 |
}
|
148 |
?>
|
149 |
+
<h2><?php _e("Simple PayPal Shopping Cart Settings", "wordpress-simple-paypal-shopping-cart"); ?> v<?php echo WP_CART_VERSION; ?></h2>
|
150 |
|
151 |
<div style="background: none repeat scroll 0 0 #FFF6D5;border: 1px solid #D1B655;color: #3F2502;margin: 10px 0;padding: 5px 5px 5px 10px;text-shadow: 1px 1px #FFFFFF;">
|
152 |
<p><?php _e("For more information, updates, detailed documentation and video tutorial, please visit:", "wordpress-simple-paypal-shopping-cart"); ?><br />
|
184 |
</tr>
|
185 |
<tr valign="top">
|
186 |
<th scope="row">'.(__("Text/Image to Show When Cart Empty", "wordpress-simple-paypal-shopping-cart")).'</th>
|
187 |
+
<td><input type="text" name="wp_cart_empty_text" value="'.esc_attr($emptyCartText).'" size="100" /><br />'.(__("You can either enter plain text or the URL of an image that you want to show when the shopping cart is empty", "wordpress-simple-paypal-shopping-cart")).'</td>
|
188 |
+
</tr>';
|
189 |
+
|
190 |
+
?>
|
191 |
<tr valign="top">
|
192 |
+
<th scope="row"><?php _e("Currency", "wordpress-simple-paypal-shopping-cart"); ?></th>
|
193 |
+
<td>
|
194 |
+
<select id="cart_payment_currency" name="cart_payment_currency">
|
195 |
+
<option value="USD" <?php echo ($defaultCurrency == 'USD') ? 'selected="selected"' : ''; ?>>US Dollars (USD)</option>
|
196 |
+
<option value="EUR" <?php echo ($defaultCurrency == 'EUR') ? 'selected="selected"' : ''; ?>>Euros (EUR)</option>
|
197 |
+
<option value="GBP" <?php echo ($defaultCurrency == 'GBP') ? 'selected="selected"' : ''; ?>>Pounds Sterling (GBP)</option>
|
198 |
+
<option value="AUD" <?php echo ($defaultCurrency == 'AUD') ? 'selected="selected"' : ''; ?>>Australian Dollars (AUD)</option>
|
199 |
+
<option value="BRL" <?php echo ($defaultCurrency == 'BRL') ? 'selected="selected"' : ''; ?>>Brazilian Real (BRL)</option>
|
200 |
+
<option value="CAD" <?php echo ($defaultCurrency == 'CAD') ? 'selected="selected"' : ''; ?>>Canadian Dollars (CAD)</option>
|
201 |
+
<option value="CNY" <?php echo ($defaultCurrency == 'CNY') ? 'selected="selected"' : ''; ?>>Chinese Yuan (CNY)</option>
|
202 |
+
<option value="CZK" <?php echo ($defaultCurrency == 'CZK') ? 'selected="selected"' : ''; ?>>Czech Koruna (CZK)</option>
|
203 |
+
<option value="DKK" <?php echo ($defaultCurrency == 'DKK') ? 'selected="selected"' : ''; ?>>Danish Krone (DKK)</option>
|
204 |
+
<option value="HKD" <?php echo ($defaultCurrency == 'HKD') ? 'selected="selected"' : ''; ?>>Hong Kong Dollar (HKD)</option>
|
205 |
+
<option value="HUF" <?php echo ($defaultCurrency == 'HUF') ? 'selected="selected"' : ''; ?>>Hungarian Forint (HUF)</option>
|
206 |
+
<option value="INR" <?php echo ($defaultCurrency == 'INR') ? 'selected="selected"' : ''; ?>>Indian Rupee (INR)</option>
|
207 |
+
<option value="IDR" <?php echo ($defaultCurrency == 'IDR') ? 'selected="selected"' : ''; ?>>Indonesia Rupiah (IDR)</option>
|
208 |
+
<option value="ILS" <?php echo ($defaultCurrency == 'ILS') ? 'selected="selected"' : ''; ?>>Israeli Shekel (ILS)</option>
|
209 |
+
<option value="JPY" <?php echo ($defaultCurrency == 'JPY') ? 'selected="selected"' : ''; ?>>Japanese Yen (JPY)</option>
|
210 |
+
<option value="MYR" <?php echo ($defaultCurrency == 'MYR') ? 'selected="selected"' : ''; ?>>Malaysian Ringgits (MYR)</option>
|
211 |
+
<option value="MXN" <?php echo ($defaultCurrency == 'MXN') ? 'selected="selected"' : ''; ?>>Mexican Peso (MXN)</option>
|
212 |
+
<option value="NZD" <?php echo ($defaultCurrency == 'NZD') ? 'selected="selected"' : ''; ?>>New Zealand Dollar (NZD)</option>
|
213 |
+
<option value="NOK" <?php echo ($defaultCurrency == 'NOK') ? 'selected="selected"' : ''; ?>>Norwegian Krone (NOK)</option>
|
214 |
+
<option value="PHP" <?php echo ($defaultCurrency == 'PHP') ? 'selected="selected"' : ''; ?>>Philippine Pesos (PHP)</option>
|
215 |
+
<option value="PLN" <?php echo ($defaultCurrency == 'PLN') ? 'selected="selected"' : ''; ?>>Polish Zloty (PLN)</option>
|
216 |
+
<option value="SGD" <?php echo ($defaultCurrency == 'SGD') ? 'selected="selected"' : ''; ?>>Singapore Dollar (SGD)</option>
|
217 |
+
<option value="ZAR" <?php echo ($defaultCurrency == 'ZAR') ? 'selected="selected"' : ''; ?>>South African Rand (ZAR)</option>
|
218 |
+
<option value="KRW" <?php echo ($defaultCurrency == 'KRW') ? 'selected="selected"' : ''; ?>>South Korean Won (KRW)</option>
|
219 |
+
<option value="SEK" <?php echo ($defaultCurrency == 'SEK') ? 'selected="selected"' : ''; ?>>Swedish Krona (SEK)</option>
|
220 |
+
<option value="CHF" <?php echo ($defaultCurrency == 'CHF') ? 'selected="selected"' : ''; ?>>Swiss Franc (CHF)</option>
|
221 |
+
<option value="TWD" <?php echo ($defaultCurrency == 'TWD') ? 'selected="selected"' : ''; ?>>Taiwan New Dollars (TWD)</option>
|
222 |
+
<option value="THB" <?php echo ($defaultCurrency == 'THB') ? 'selected="selected"' : ''; ?>>Thai Baht (THB)</option>
|
223 |
+
<option value="TRY" <?php echo ($defaultCurrency == 'TRY') ? 'selected="selected"' : ''; ?>>Turkish Lira (TRY)</option>
|
224 |
+
<option value="VND" <?php echo ($defaultCurrency == 'VND') ? 'selected="selected"' : ''; ?>>Vietnamese Dong (VND)</option>
|
225 |
+
</select>
|
226 |
+
</td>
|
227 |
</tr>
|
228 |
+
<?php
|
229 |
+
|
230 |
+
echo '<tr valign="top">
|
231 |
<th scope="row">'.(__("Currency Symbol", "wordpress-simple-paypal-shopping-cart")).'</th>
|
232 |
<td><input type="text" name="cart_currency_symbol" value="'.esc_attr($defaultSymbol).'" size="3" style="width: 2em;" /> ('.(__("e.g.", "wordpress-simple-paypal-shopping-cart")).' $, £, €)
|
233 |
</td>
|
257 |
<th scope="row">'.(__("Add to Cart button text or Image", "wordpress-simple-paypal-shopping-cart")).'</th>
|
258 |
<td><input type="text" name="addToCartButtonName" value="'.esc_attr($addcart).'" size="100" />
|
259 |
<br />'.(__("To use a customized image as the button simply enter the URL of the image file.", "wordpress-simple-paypal-shopping-cart")).' '.(__("e.g.", "wordpress-simple-paypal-shopping-cart")).' http://www.your-domain.com/wp-content/plugins/wordpress-paypal-shopping-cart/images/buy_now_button.png
|
260 |
+
<br />You can download nice add to cart button images from <a href="https://www.tipsandtricks-hq.com/ecommerce/add-to-cart-button-images-for-shopping-cart-631" target="_blank">this page</a>.
|
261 |
</td>
|
262 |
</tr>
|
263 |
|
314 |
|
315 |
<table class="form-table">
|
316 |
<tr valign="top">
|
317 |
+
<th scope="row">'.(__("Custom Checkout Page Logo Image", "wordpress-simple-paypal-shopping-cart")).'</th>
|
318 |
+
<td><input type="text" name="wp_cart_paypal_co_page_style" value="'.esc_attr($wp_cart_paypal_co_page_style).'" size="100" />
|
319 |
+
<br />'.(__("Specify an image URL if you want to customize the paypal checkout page with a custom logo/image. The image URL must be a 'https' URL otherwise PayPal will ignore it.", "wordpress-simple-paypal-shopping-cart")).'</td>
|
320 |
</tr>
|
321 |
</table>
|
322 |
|
339 |
<tr valign="top">
|
340 |
<th scope="row">'.(__("Use WP Affiliate Platform", "wordpress-simple-paypal-shopping-cart")).'</th>
|
341 |
<td><input type="checkbox" name="wp_use_aff_platform" value="1" '.$wp_use_aff_platform.' />
|
342 |
+
<br />'.(__("Check this if using with the", "wordpress-simple-paypal-shopping-cart")).' <a href="https://www.tipsandtricks-hq.com/wordpress-affiliate-platform-plugin-simple-affiliate-program-for-wordpress-blogsite-1474" target="_blank">WP Affiliate Platform plugin</a>. '.(__("This plugin lets you run your own affiliate campaign/program and allows you to reward (pay commission) your affiliates for referred sales", "wordpress-simple-paypal-shopping-cart")).'</td>
|
343 |
</tr>
|
344 |
</table>
|
345 |
</div></div>
|
includes/wspsc-cart-functions.php
CHANGED
@@ -9,7 +9,7 @@ function print_wp_shopping_cart($args = array()) {
|
|
9 |
if (preg_match("/http/", $empty_cart_text)) {
|
10 |
$output .= '<img src="' . $empty_cart_text . '" alt="' . $empty_cart_text . '" class="wp_cart_empty_cart_image" />';
|
11 |
} else {
|
12 |
-
$output .= $empty_cart_text;
|
13 |
}
|
14 |
$output .= '</div>';
|
15 |
}
|
@@ -209,7 +209,7 @@ function print_wp_shopping_cart($args = array()) {
|
|
209 |
}
|
210 |
$page_style_name = get_option('wp_cart_paypal_co_page_style');
|
211 |
if (!empty($page_style_name)) {
|
212 |
-
$output .= '<input type="hidden" name="
|
213 |
}
|
214 |
$output .= wp_cart_add_custom_field();
|
215 |
|
9 |
if (preg_match("/http/", $empty_cart_text)) {
|
10 |
$output .= '<img src="' . $empty_cart_text . '" alt="' . $empty_cart_text . '" class="wp_cart_empty_cart_image" />';
|
11 |
} else {
|
12 |
+
$output .= __($empty_cart_text, "wordpress-simple-paypal-shopping-cart");
|
13 |
}
|
14 |
$output .= '</div>';
|
15 |
}
|
209 |
}
|
210 |
$page_style_name = get_option('wp_cart_paypal_co_page_style');
|
211 |
if (!empty($page_style_name)) {
|
212 |
+
$output .= '<input type="hidden" name="image_url" value="' . $page_style_name . '" />';
|
213 |
}
|
214 |
$output .= wp_cart_add_custom_field();
|
215 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Tips and Tricks HQ, Ruhul Amin, wptipsntricks, mbrsolution, mra13
|
|
3 |
Donate link: https://www.tipsandtricks-hq.com
|
4 |
Tags: cart, shopping cart, WordPress shopping cart, Paypal shopping cart, sell, selling, sell products, online shop, shop, e-commerce, wordpress ecommerce, wordpress store, store, PayPal cart widget, sell digital products, sell service, digital downloads, paypal, paypal cart, e-shop, compact cart, coupon, discount
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 4.3.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Very easy to use Simple WordPress Paypal Shopping Cart Plugin. Great for selling products online in one click from your WordPress site.
|
@@ -187,6 +187,14 @@ None
|
|
187 |
|
188 |
== Changelog ==
|
189 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
= 4.3.3 =
|
191 |
- Fix for paypal adding "+" character between words in the item name parameter.
|
192 |
|
3 |
Donate link: https://www.tipsandtricks-hq.com
|
4 |
Tags: cart, shopping cart, WordPress shopping cart, Paypal shopping cart, sell, selling, sell products, online shop, shop, e-commerce, wordpress ecommerce, wordpress store, store, PayPal cart widget, sell digital products, sell service, digital downloads, paypal, paypal cart, e-shop, compact cart, coupon, discount
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 4.8
|
7 |
+
Stable tag: 4.3.5
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Very easy to use Simple WordPress Paypal Shopping Cart Plugin. Great for selling products online in one click from your WordPress site.
|
187 |
|
188 |
== Changelog ==
|
189 |
|
190 |
+
= 4.3.5 =
|
191 |
+
- The deprecated page styles field has been replaced with an image URL field in the settings.
|
192 |
+
- The Image URL field can be used to specify an image/logo URL that will be displayed in the paypal checkout page.
|
193 |
+
|
194 |
+
= 4.3.4 =
|
195 |
+
- All the paypal supported currency codes are shown as a dropdown option in the plugin settings.
|
196 |
+
- Currency code value in the settings is automatically converted to uppercase string if the user mistakenly enters a lowercase string.
|
197 |
+
|
198 |
= 4.3.3 =
|
199 |
- Fix for paypal adding "+" character between words in the item name parameter.
|
200 |
|
wp_shopping_cart.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: WP Simple Paypal Shopping cart
|
4 |
-
Version: 4.3.
|
5 |
Plugin URI: https://www.tipsandtricks-hq.com/wordpress-simple-paypal-shopping-cart-plugin-768
|
6 |
Author: Tips and Tricks HQ, Ruhul Amin, mra13
|
7 |
Author URI: https://www.tipsandtricks-hq.com/
|
@@ -26,7 +26,7 @@ if (version_compare(PHP_VERSION, '5.4.0') >= 0) {
|
|
26 |
}
|
27 |
}
|
28 |
|
29 |
-
define('WP_CART_VERSION', '4.3.
|
30 |
define('WP_CART_FOLDER', dirname(plugin_basename(__FILE__)));
|
31 |
define('WP_CART_PATH', plugin_dir_path(__FILE__));
|
32 |
define('WP_CART_URL', plugins_url('', __FILE__));
|
@@ -495,8 +495,9 @@ function wp_cart_add_read_form_javascript() {
|
|
495 |
|
496 |
function print_wp_cart_button_for_product($name, $price, $shipping = 0, $var1 = '', $var2 = '', $var3 = '', $atts = array()) {
|
497 |
$addcart = get_option('addToCartButtonName');
|
498 |
-
if (!$addcart || ($addcart == ''))
|
499 |
$addcart = __("Add to Cart", "wordpress-simple-paypal-shopping-cart");
|
|
|
500 |
|
501 |
$var_output = "";
|
502 |
if (!empty($var1)) {
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: WP Simple Paypal Shopping cart
|
4 |
+
Version: 4.3.5
|
5 |
Plugin URI: https://www.tipsandtricks-hq.com/wordpress-simple-paypal-shopping-cart-plugin-768
|
6 |
Author: Tips and Tricks HQ, Ruhul Amin, mra13
|
7 |
Author URI: https://www.tipsandtricks-hq.com/
|
26 |
}
|
27 |
}
|
28 |
|
29 |
+
define('WP_CART_VERSION', '4.3.5');
|
30 |
define('WP_CART_FOLDER', dirname(plugin_basename(__FILE__)));
|
31 |
define('WP_CART_PATH', plugin_dir_path(__FILE__));
|
32 |
define('WP_CART_URL', plugins_url('', __FILE__));
|
495 |
|
496 |
function print_wp_cart_button_for_product($name, $price, $shipping = 0, $var1 = '', $var2 = '', $var3 = '', $atts = array()) {
|
497 |
$addcart = get_option('addToCartButtonName');
|
498 |
+
if (!$addcart || ($addcart == '')){
|
499 |
$addcart = __("Add to Cart", "wordpress-simple-paypal-shopping-cart");
|
500 |
+
}
|
501 |
|
502 |
$var_output = "";
|
503 |
if (!empty($var1)) {
|