Changeset 2395597
- Timestamp:
- 10/07/2020 08:50:32 PM (5 years ago)
- Location:
- splitit-installment-payments-enabler
- Files:
-
- 134 added
- 15 edited
-
assets/PurpleLogo.png (added)
-
assets/Website_phone_screen_1.png (added)
-
assets/Website_phone_screen_2.png (added)
-
assets/Website_phone_screen_3.png (added)
-
assets/checkout_new_logo.jpg (added)
-
assets/screenshot-1.png (modified) (previous)
-
assets/screenshot-2.png (modified) (previous)
-
assets/screenshot-3.png (modified) (previous)
-
assets/screenshot-4.png (modified) (previous)
-
assets/screenshot-5.png (modified) (previous)
-
assets/screenshot-6.png (modified) (previous)
-
assets/screenshot-7.png (modified) (previous)
-
tags/2.4.7 (added)
-
tags/2.4.7/assets (added)
-
tags/2.4.7/assets/css (added)
-
tags/2.4.7/assets/css/jquery-ui.css (added)
-
tags/2.4.7/assets/css/prodlist.css (added)
-
tags/2.4.7/assets/css/splitit-admin-order.css (added)
-
tags/2.4.7/assets/css/splitit-admin.css (added)
-
tags/2.4.7/assets/css/splitit-front.css (added)
-
tags/2.4.7/assets/images (added)
-
tags/2.4.7/assets/images/Offical_Splitit_Logo.png (added)
-
tags/2.4.7/assets/images/cards (added)
-
tags/2.4.7/assets/images/cards/mastercard.png (added)
-
tags/2.4.7/assets/images/cards/mastercard_old.png (added)
-
tags/2.4.7/assets/images/cards/unionpay.png (added)
-
tags/2.4.7/assets/images/cards/visa.png (added)
-
tags/2.4.7/assets/images/description.png (added)
-
tags/2.4.7/assets/images/index.jpeg (added)
-
tags/2.4.7/assets/images/learn_more.png (added)
-
tags/2.4.7/assets/images/learn_more.svg (added)
-
tags/2.4.7/assets/images/learn_morew.svg (added)
-
tags/2.4.7/assets/images/loader.gif (added)
-
tags/2.4.7/assets/images/logo-06.jpg (added)
-
tags/2.4.7/assets/images/logo-06.png (added)
-
tags/2.4.7/assets/images/old-logo.png (added)
-
tags/2.4.7/assets/images/spl_tell_more.jpg (added)
-
tags/2.4.7/assets/images/tellme.png (added)
-
tags/2.4.7/assets/images/tellmemore.png (added)
-
tags/2.4.7/assets/javascript (added)
-
tags/2.4.7/assets/javascript/splitit-admin-order.js (added)
-
tags/2.4.7/assets/javascript/splitit-admin.js (added)
-
tags/2.4.7/assets/javascript/splitit-checkout.js (added)
-
tags/2.4.7/classes (added)
-
tags/2.4.7/classes/splitit-api.php (added)
-
tags/2.4.7/classes/splitit-checkout.php (added)
-
tags/2.4.7/classes/splitit-helper.php (added)
-
tags/2.4.7/classes/splitit-log.php (added)
-
tags/2.4.7/classes/splitit-settings.php (added)
-
tags/2.4.7/readme.txt (added)
-
tags/2.4.7/splitit.php (added)
-
tags/2.4.7/template (added)
-
tags/2.4.7/template/woocommerce (added)
-
tags/2.4.7/template/woocommerce/cart (added)
-
tags/2.4.7/template/woocommerce/cart/cart.php (added)
-
tags/2.4.8 (added)
-
tags/2.4.8/assets (added)
-
tags/2.4.8/assets/css (added)
-
tags/2.4.8/assets/css/jquery-ui.css (added)
-
tags/2.4.8/assets/css/prodlist.css (added)
-
tags/2.4.8/assets/css/splitit-admin-order.css (added)
-
tags/2.4.8/assets/css/splitit-admin.css (added)
-
tags/2.4.8/assets/css/splitit-front.css (added)
-
tags/2.4.8/assets/images (added)
-
tags/2.4.8/assets/images/Offical_Splitit_Logo.png (added)
-
tags/2.4.8/assets/images/cards (added)
-
tags/2.4.8/assets/images/cards/mastercard.png (added)
-
tags/2.4.8/assets/images/cards/mastercard_old.png (added)
-
tags/2.4.8/assets/images/cards/unionpay.png (added)
-
tags/2.4.8/assets/images/cards/visa.png (added)
-
tags/2.4.8/assets/images/description.png (added)
-
tags/2.4.8/assets/images/index.jpeg (added)
-
tags/2.4.8/assets/images/learn_more.png (added)
-
tags/2.4.8/assets/images/learn_more.svg (added)
-
tags/2.4.8/assets/images/learn_morew.svg (added)
-
tags/2.4.8/assets/images/loader.gif (added)
-
tags/2.4.8/assets/images/logo-06.jpg (added)
-
tags/2.4.8/assets/images/logo-06.png (added)
-
tags/2.4.8/assets/images/old-logo.png (added)
-
tags/2.4.8/assets/images/spl_tell_more.jpg (added)
-
tags/2.4.8/assets/images/tellme.png (added)
-
tags/2.4.8/assets/images/tellmemore.png (added)
-
tags/2.4.8/assets/javascript (added)
-
tags/2.4.8/assets/javascript/splitit-admin-order.js (added)
-
tags/2.4.8/assets/javascript/splitit-admin.js (added)
-
tags/2.4.8/assets/javascript/splitit-checkout.js (added)
-
tags/2.4.8/classes (added)
-
tags/2.4.8/classes/splitit-api.php (added)
-
tags/2.4.8/classes/splitit-checkout.php (added)
-
tags/2.4.8/classes/splitit-helper.php (added)
-
tags/2.4.8/classes/splitit-log.php (added)
-
tags/2.4.8/classes/splitit-settings.php (added)
-
tags/2.4.8/readme.txt (added)
-
tags/2.4.8/splitit.php (added)
-
tags/2.4.8/template (added)
-
tags/2.4.8/template/woocommerce (added)
-
tags/2.4.8/template/woocommerce/cart (added)
-
tags/2.4.8/template/woocommerce/cart/cart.php (added)
-
tags/2.4.9 (added)
-
tags/2.4.9/assets (added)
-
tags/2.4.9/assets/css (added)
-
tags/2.4.9/assets/css/jquery-ui.css (added)
-
tags/2.4.9/assets/css/prodlist.css (added)
-
tags/2.4.9/assets/css/splitit-admin-order.css (added)
-
tags/2.4.9/assets/css/splitit-admin.css (added)
-
tags/2.4.9/assets/css/splitit-front.css (added)
-
tags/2.4.9/assets/images (added)
-
tags/2.4.9/assets/images/Offical_Splitit_Logo.png (added)
-
tags/2.4.9/assets/images/cards (added)
-
tags/2.4.9/assets/images/cards/mastercard.png (added)
-
tags/2.4.9/assets/images/cards/mastercard_old.png (added)
-
tags/2.4.9/assets/images/cards/unionpay.png (added)
-
tags/2.4.9/assets/images/cards/visa.png (added)
-
tags/2.4.9/assets/images/description.png (added)
-
tags/2.4.9/assets/images/index.jpeg (added)
-
tags/2.4.9/assets/images/learn_more.png (added)
-
tags/2.4.9/assets/images/learn_more.svg (added)
-
tags/2.4.9/assets/images/learn_morew.svg (added)
-
tags/2.4.9/assets/images/loader.gif (added)
-
tags/2.4.9/assets/images/logo-06.jpg (added)
-
tags/2.4.9/assets/images/logo-06.png (added)
-
tags/2.4.9/assets/images/old-logo.png (added)
-
tags/2.4.9/assets/images/spl_tell_more.jpg (added)
-
tags/2.4.9/assets/images/tellme.png (added)
-
tags/2.4.9/assets/images/tellmemore.png (added)
-
tags/2.4.9/assets/javascript (added)
-
tags/2.4.9/assets/javascript/splitit-admin-order.js (added)
-
tags/2.4.9/assets/javascript/splitit-admin.js (added)
-
tags/2.4.9/assets/javascript/splitit-checkout.js (added)
-
tags/2.4.9/classes (added)
-
tags/2.4.9/classes/splitit-api.php (added)
-
tags/2.4.9/classes/splitit-checkout.php (added)
-
tags/2.4.9/classes/splitit-helper.php (added)
-
tags/2.4.9/classes/splitit-log.php (added)
-
tags/2.4.9/classes/splitit-settings.php (added)
-
tags/2.4.9/readme.txt (added)
-
tags/2.4.9/splitit.php (added)
-
tags/2.4.9/template (added)
-
tags/2.4.9/template/woocommerce (added)
-
tags/2.4.9/template/woocommerce/cart (added)
-
tags/2.4.9/template/woocommerce/cart/cart.php (added)
-
trunk/assets/css/splitit-admin-order.css (modified) (1 diff)
-
trunk/assets/css/splitit-front.css (modified) (2 diffs)
-
trunk/assets/javascript/splitit-checkout.js (modified) (3 diffs)
-
trunk/classes/splitit-api.php (modified) (3 diffs)
-
trunk/classes/splitit-helper.php (modified) (1 diff)
-
trunk/classes/splitit-settings.php (modified) (1 diff)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/splitit.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
splitit-installment-payments-enabler/trunk/assets/css/splitit-admin-order.css
r2316842 r2395597 13 13 span.payment-title-checkout { font-size: 13px; } 14 14 span.payment-title-checkout #tell-me-more{ float:none !important; color:#6d6d6d; box-shadow:none !important;display: inline-block;vertical-align: middle;} 15 span.tell-me-more-image-wrapper { display:inline-block; width:12px; } -
splitit-installment-payments-enabler/trunk/assets/css/splitit-front.css
r2316842 r2395597 34 34 span.splitit-installment-price-product #tell-me-more{ float: none; text-decoration: none !important; box-shadow:none !important;} 35 35 .tell-me-more-image { float: none !important; vertical-align: middle; } 36 .splitit-installment-price-checkout .tell-me-more-image{ width: 12px ; }36 .splitit-installment-price-checkout .tell-me-more-image{ width: 12px !important; } 37 37 .splitit-installment-price-product .tell-me-more-image {width: 12px;margin-bottom:5px;} 38 38 span.splitit-installment-price-checkout { font-size: 15px !important;} … … 44 44 .related .splitit-installment-price-product, .related #tell-me-more {display: none !important;} 45 45 46 div.payment_box.payment_method_splitit img.tell-me-more-image {max-height: 100% !important;}46 span.tell-me-more-image-wrapper { display:inline-block; width:12px; } -
splitit-installment-payments-enabler/trunk/assets/javascript/splitit-checkout.js
r2353339 r2395597 52 52 var top = (screen.height/2)-(window.innerHeight/2); 53 53 var win= window.open(this.href,"Tell me more","width=433,height=607,left="+left+",top="+top+",location=no,status=no,scrollbars=no,resizable=no"); 54 win.document.writeln("<body style='margin:0px'><img width=100% src='"+this.href+"' />"); 55 win.document.writeln("</body>"); 56 win.document.write('<title>Splitit Learn More</title>'); 57 54 58 55 return; 59 56 $.ajax({ … … 186 183 */ 187 184 function getFormFields() { 188 var field_blocks = $('form.woocommerce-checkout .validate-required,#ship-to-different-address,#terms ');185 var field_blocks = $('form.woocommerce-checkout .validate-required,#ship-to-different-address,#terms,#billing_city_field'); 189 186 var fields = {}; 190 187 field_blocks.each(function() { … … 243 240 } else { 244 241 var elem = $(this).find('input.input-text').val(); 242 } 243 244 if ($(this).prop('id') == 'billing_city_field' && !elem) { 245 elem = $('#billing_country option:selected').text(); 245 246 } 246 247 -
splitit-installment-payments-enabler/trunk/classes/splitit-api.php
r2353339 r2395597 53 53 $params = array('UserName' => $this->_username, 54 54 'Password' => $this->_password, 55 'TouchPoint' => array("Code" => "WooCommercePlugin", "Version" => "2.4. 6"),55 'TouchPoint' => array("Code" => "WooCommercePlugin", "Version" => "2.4.9"), 56 56 ); 57 57 … … 197 197 $percentageOfOrder = 50; 198 198 } 199 $firstInstallmentAmount = (($order_data['AmountBeforeFees'] * $percentageOfOrder) / 100);199 $firstInstallmentAmount = round((($order_data['AmountBeforeFees'] * $percentageOfOrder) / 100), 2); 200 200 // var_dump($firstInstallmentAmount); 201 201 } … … 362 362 $user_data = ""; 363 363 if (isset($_COOKIE['splitit_checkout'])) { 364 $user_data = wc_clean($_COOKIE['splitit_checkout']);364 $user_data = urldecode(wc_clean($_COOKIE['splitit_checkout'])); 365 365 } 366 366 -
splitit-installment-payments-enabler/trunk/classes/splitit-helper.php
r2316842 r2395597 29 29 if (isset($_GET['page']) && $_GET['page'] == 'wc-settings' && isset($_GET['tab']) && $_GET['tab'] == 'checkout') { 30 30 wp_enqueue_style('splitit_prodlist_admin_css', plugins_url('/assets/css/splitit-admin.css', dirname(__FILE__))); 31 } 32 /* support multi currency plugin */ 33 if (isset($_GET['page']) && $_GET['page'] == 'woocommerce-multi-currency') { 34 wp_enqueue_style('splitit_order_admin_css', plugins_url('/assets/css/splitit-admin-order.css', dirname(__FILE__))); 31 35 } 32 36 } -
splitit-installment-payments-enabler/trunk/classes/splitit-settings.php
r2353339 r2395597 467 467 'custom_attributes' => array('readonly' => 'readonly'), 468 468 */ 469 'splitit_help_title_link_local' => array(470 'type' => 'text',471 'class' => 'hidden',472 'default' => Splitit_learnmore_imgsource_local473 ),474 469 '_3dSecure ' => array( 475 470 'type' => 'title', -
splitit-installment-payments-enabler/trunk/readme.txt
r2359161 r2395597 4 4 Requires at least: 3.0.1 5 5 Tested up to: 5.5.0 6 Stable tag: 2.4. 66 Stable tag: 2.4.9 7 7 License: GPLv3 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 12 12 == Description == 13 13 14 Splitit – Interest-Free Monthly Payments plugin for WooCommerce<br> 14 Splitit – Interest-Free Monthly Payments plugin for WooCommerce<br/> 15 <br/> 16 <a href="https://www.splitit.com/">Splitit</a> is a payment method solution enabling customers to pay for purchases with an existing debit or credit card by splitting the cost into interest and fee free monthly payments, without additional registrations or applications.<br/> 17 Splitit enables merchants to offer their customers an easy way to pay for purchases in monthly instalments with instant approval, decreasing cart abandonment rates and increasing revenue.<br/> 18 Serving many of Internet Retailer’s top 500 merchants, Splitit’s global footprint extends to hundreds of merchants in countries around the world. Headquartered in New York, Splitit has an R&D center in Israel and offices in London and Australia.<br/> 19 <br/> 15 20 Start offering your customers **interest-free installment payments** on their existing credit cards today!<br> 16 21 The Splitit WooCommerce plugin lets your customers pay for your goods and services via interest-free monthly installments on the Visa and Master Card credit cards they already have in their wallets. … … 21 26 Interest-free installment payments make great business sense!<br><br> 22 27 Ecommerce merchants that offer Splitit to their customers enjoy:<br> 23 -Increased sales 24 <br> 28 -Increased sales<br> 25 29 -Higher average tickets<br> 26 27 -Increased conversion rates 28 <br> 30 -Increased conversion rates<br> 29 31 -A better alternative to discounts and promotions<br> 30 32 -Stronger brand value<br> … … 69 71 == Changelog == 70 72 73 = 2.4.9 = 74 *Fix Splitit payment method title for checkout, admin and invoice - remove html from admin and invoice 75 76 = 2.4.8 = 77 *Fix optional city field issue 78 79 = 2.4.7 = 80 *Fix big question mark 81 *Fix plus sign 82 *Include installment price text 83 *Paypal compatibility 84 *Round firstpayment amount for percentage type 85 *Change to the new learn more 86 *Wordperss 5.5 compatibility 87 71 88 = 2.4.6 = 72 89 *Remove zipcode validation on special countries -
splitit-installment-payments-enabler/trunk/splitit.php
r2353339 r2395597 5 5 Plugin URI: http://wordpress.org/plugins/splitit/ 6 6 Description: Integrates Splitit payment method into your WooCommerce installation. 7 Version: 2.4. 67 Version: 2.4.9 8 8 Author: Splitit 9 9 Text Domain: splitit … … 177 177 if (!class_exists('WC_Payment_Gateway')) {return;} 178 178 179 define('Splitit_VERSION', '2.4. 6');179 define('Splitit_VERSION', '2.4.9'); 180 180 define('Splitit_logo_source_local', plugin_dir_url(__FILE__) . 'assets/images/Offical_Splitit_Logo.png'); 181 define('Splitit_learnmore_imgsource_local', plugin_dir_url(__FILE__) . 'assets/images/V1-USD.png');182 181 183 182 // Import helper classes … … 244 243 245 244 //echo $this->settings['splitit_help_title_link_local'];die; 246 $learnmoreImage = '<img class="tell-me-more-image" src="' . plugin_dir_url(__FILE__) . 'assets/images/learn_more.png" >'; 247 $textToDisplay = "<span class='payment-title-checkout'><img class='paymentlogoWidthSrc' src='" . $this->s('splitit_logo_src_local') . "' alt='SPLITIT'/> ".__("0% INTEREST MONTHLY PAYMENTS")." <a href='" . $this->s('splitit_help_title_link_local') . "' id='tell-me-more'>" . $learnmoreImage . "</a></span>"; 245 $learnmoreImage = '<span class="tell-me-more-image-wrapper"><img class="tell-me-more-image" src="' . plugin_dir_url(__FILE__) . 'assets/images/learn_more.png" ></span>'; 246 // $textToDisplay = "<span class=\"payment-title-checkout\"><img class=\"paymentlogoWidthSrc\" src=\"" . $this->s('splitit_logo_src_local') . "\" alt=\"SPLITIT\"/> ".__("0% INTEREST MONTHLY PAYMENTS")." <a href=\"" . $this->getHelpMeLink() . "\" id=\"tell-me-more\">" . $learnmoreImage . "</a></span>"; 247 $textToDisplay = "Splitit <span class=\"payment-title-checkout\">".__("0% INTEREST MONTHLY PAYMENTS")." <a href=\"" . $this->getHelpMeLink() . "\" id=\"tell-me-more\">" . $learnmoreImage . "</a></span>"; 248 248 $descriptionImage = '<span class="description_image"><img class="tell-me-more-image" src="' . plugin_dir_url(__FILE__) . 'assets/images/description.png" ></span>'; 249 249 //echo $textToDisplay;die; 250 $this->title = $textToDisplay; 251 $this->description = $descriptionImage; 250 $this->title = "Splitit"; 251 // $this->title = $textToDisplay; 252 $this->description = "<script> 253 (function(i,s,o,g,r,a,m){i['SplititObject']=r;i[r]=i[r]||function(){ 254 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 255 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 256 })(window, document, 'script', '//upstream.production.splitit.com/v1/dist/upstream-messaging.js?v='+(Math.ceil(new Date().getTime()/100000)), 'splitit'); 257 258 splitit('init', { apiKey: '{$this->s('splitit_api_terminal_key')}', lang: 'en', currency: 'USD', currencySymbol: '$', debug: false }); 259 </script> 260 <div data-splitit='true' data-splitit-amount='100' data-splitit-num-installments='3' data-splitit-type='product-description'></div>"; 261 $this->description = "<script> 262 jQuery('.wc_payment_method.payment_method_splitit label').html(jQuery('.wc_payment_method.payment_method_splitit label').html().replace('Splitit','$textToDisplay')); 263 </script>". 264 $descriptionImage; 252 265 $this->instructions = $this->s('instructions'); 253 266 // if($this->s('splitit_max_installments') && $this->s('splitit_max_installments') != '' && $this->s('splitit_max_installments') <= $this->s('splitit_max_installments_limit')) { … … 1537 1550 if (is_product() && in_array('product', $sections)) { 1538 1551 if($this->isSplititTextVisibleOnProduct($product->get_id())){ 1539 return $price . $this->get_formatted_installment_price($product);1552 return $price . '</p><p class="splitprice" style="margin-top: -30px;">' .$this->get_formatted_installment_price($product); 1540 1553 } else { 1541 1554 return $price; … … 1549 1562 } 1550 1563 if (is_checkout() && in_array('checkout', $sections)) { 1551 return $price . $this->get_formatted_installment_price($product); 1552 } 1564 if (method_exists($product, 'get_price')) { 1565 return $price . $this->get_formatted_installment_price($product); 1566 } 1567 return $price; 1568 } 1553 1569 } 1554 1570 } … … 1593 1609 if (isset($this->settings['splitit_logo_src_local']) && $this->settings['splitit_logo_src_local']) { 1594 1610 //echo $this->settings['splitit_help_title_link_local'];die; 1595 $replace = "<a id='tell-me-more' href='" . $this-> settings['splitit_help_title_link_local']. "' class='no-lightbox' target='_blank'><img class='logoWidthSrc' src='" . $this->settings['splitit_logo_src_local'] . "' alt='SPLITIT'/></a>";1611 $replace = "<a id='tell-me-more' href='" . $this->getHelpMeLink($price) . "' class='no-lightbox' target='_blank'><img class='logoWidthSrc' src='" . $this->settings['splitit_logo_src_local'] . "' alt='SPLITIT'/></a>"; 1596 1612 /*$textToDisplay = str_replace('SPLITIT', $replace, $this->settings['splitit_without_interest']);*/ 1597 1613 } 1598 $learnmoreImage = '< img class="tell-me-more-image" src="' . plugin_dir_url(__FILE__) . 'assets/images/learn_more.png">';1599 $learnmore = " <a id='tell-me-more' href='" . $this-> settings['splitit_help_title_link_local']. "' class='no-lightbox' target='_blank'>" . $learnmoreImage . "</a>";1614 $learnmoreImage = '<span class="tell-me-more-image-wrapper"><img class="tell-me-more-image" src="' . plugin_dir_url(__FILE__) . 'assets/images/learn_more.png"></span>'; 1615 $learnmore = " <a id='tell-me-more' href='" . $this->getHelpMeLink($price) . "' class='no-lightbox' target='_blank'>" . $learnmoreImage . "</a>"; 1600 1616 //$prodData = $product->get_data(); 1601 1617 //$split_price = round($prodData['price'] / self::$_maxInstallments, 3); … … 1626 1642 if (isset($this->settings['splitit_logo_src_local']) && $this->settings['splitit_logo_src_local']) { 1627 1643 //echo $this->settings['splitit_help_title_link_local'];die; 1628 $replace = "<a href='" . $this-> settings['splitit_help_title_link_local']. "' id='tell-me-more'><img class='logoWidthSrc' src='" . $this->settings['splitit_logo_src_local'] . "' alt='SPLITIT'/></a>";1644 $replace = "<a href='" . $this->getHelpMeLink($product->get_price()) . "' id='tell-me-more'><img class='logoWidthSrc' src='" . $this->settings['splitit_logo_src_local'] . "' alt='SPLITIT'/></a>"; 1629 1645 $textToDisplay = str_replace('SPLITIT', $replace, isset($this->settings['splitit_without_interest'])?$this->settings['splitit_without_interest']:''); 1630 1646 } 1631 $learnmoreImage = '< img class="tell-me-more-image" src="' . plugin_dir_url(__FILE__) . 'assets/images/learn_more.png">';1632 $learnmore = " <a href='" . $this-> settings['splitit_help_title_link_local']. "' id='tell-me-more'>" . $learnmoreImage . "</a>";1647 $learnmoreImage = '<span class="tell-me-more-image-wrapper"><img class="tell-me-more-image" src="' . plugin_dir_url(__FILE__) . 'assets/images/learn_more.png"></span>'; 1648 $learnmore = " <a href='" . $this->getHelpMeLink($product->get_price()) . "' id='tell-me-more'>" . $learnmoreImage . "</a>"; 1633 1649 $split_price = round($product->get_price() / self::$_maxInstallments, 3); 1634 1650 return '<span style="display:block;" class="splitit-installment-price splitit-installment-price-product">or ' . self::$_maxInstallments . ' interest-free payments of ' . wc_price($split_price, array('decimals' => 2)) . ' with ' . $replace . $learnmore . '</span>'; … … 1980 1996 wp_die(); 1981 1997 } 1982 } 1998 1999 public function getHelpMeLink($amount = null) 2000 { 2001 $apiKey = $this->get_option('splitit_api_terminal_key'); 2002 $culture = get_locale(); 2003 $currencyCode = "USD"; 2004 if (get_woocommerce_currency() != "") { 2005 $currencyCode = get_woocommerce_currency(); 2006 } 2007 $numInstallments = self::$_maxInstallments; 2008 2009 if ($this->get_option('splitit_mode_sandbox')) { 2010 $url = 'https://documents.sandbox.splitit.com/LearnMore?apiKey=' . $apiKey; 2011 } else { 2012 $url = 'https://documents.production.splitit.com/LearnMore?apiKey=' . $apiKey; 2013 } 2014 if ($amount) { 2015 $url = $url . '&amount=' . $amount; 2016 } 2017 $url = $url . '&culture=' . $culture 2018 . '¤cyCode=' . $currencyCode 2019 . '&numInstallments=' . $numInstallments; 2020 2021 2022 return $url; 2023 } 2024 } 1983 2025 1984 2026 // Make the object available for later use
Note: See TracChangeset
for help on using the changeset viewer.