Changeset 2299357
- Timestamp:
- 05/06/2020 01:53:11 PM (6 years ago)
- Location:
- postpay
- Files:
-
- 4 added
- 4 deleted
- 14 edited
- 7 copied
-
tags/0.1.8 (copied) (copied from postpay/trunk)
-
tags/0.1.8/assets/images (copied) (copied from postpay/trunk/assets/images)
-
tags/0.1.8/assets/images/logo-blue.png (deleted)
-
tags/0.1.8/assets/images/logo-dark.png (added)
-
tags/0.1.8/assets/images/logo-light.png (added)
-
tags/0.1.8/assets/images/logo-white.png (deleted)
-
tags/0.1.8/includes/class-wc-postpay-gateway.php (modified) (2 diffs)
-
tags/0.1.8/includes/http/class-wc-postpay-client.php (copied) (copied from postpay/trunk/includes/http/class-wc-postpay-client.php)
-
tags/0.1.8/includes/wc-postpay-settings.php (modified) (1 diff)
-
tags/0.1.8/languages/postpay-es_ES.mo (modified) (previous)
-
tags/0.1.8/languages/postpay-es_ES.po (copied) (copied from postpay/trunk/languages/postpay-es_ES.po) (4 diffs)
-
tags/0.1.8/languages/postpay.pot (copied) (copied from postpay/trunk/languages/postpay.pot) (4 diffs)
-
tags/0.1.8/postpay.php (copied) (copied from postpay/trunk/postpay.php) (4 diffs)
-
tags/0.1.8/readme.txt (copied) (copied from postpay/trunk/readme.txt) (2 diffs)
-
tags/0.1.8/templates/widgets/cart.php (modified) (1 diff)
-
tags/0.1.8/templates/widgets/product.php (modified) (1 diff)
-
trunk/assets/images/logo-blue.png (deleted)
-
trunk/assets/images/logo-dark.png (added)
-
trunk/assets/images/logo-light.png (added)
-
trunk/assets/images/logo-white.png (deleted)
-
trunk/includes/class-wc-postpay-gateway.php (modified) (2 diffs)
-
trunk/includes/wc-postpay-settings.php (modified) (1 diff)
-
trunk/languages/postpay-es_ES.mo (modified) (previous)
-
trunk/languages/postpay-es_ES.po (modified) (4 diffs)
-
trunk/languages/postpay.pot (modified) (4 diffs)
-
trunk/postpay.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/templates/widgets/cart.php (modified) (1 diff)
-
trunk/templates/widgets/product.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
postpay/tags/0.1.8/includes/class-wc-postpay-gateway.php
r2290456 r2299357 36 36 $this->title = $this->get_option( 'title' ); 37 37 $this->description = $this->get_option( 'description' ); 38 $this->theme = $this->get_option( 'theme' ); 38 39 $this->token_param = $this->id . '-token'; 39 40 $this->sandbox = 'yes' === $this->get_option( 'sandbox', 'yes' ); … … 42 43 $this->max_amount = $this->get_option( 'max_amount', 0 ); 43 44 $this->min_amount = $this->get_option( 'min_amount', 0 ); 44 $this->icon = WC_POSTPAY_DIR_URL . 'assets/images/logo-' . $this->get_option( ' icon' ) . '.png';45 $this->icon = WC_POSTPAY_DIR_URL . 'assets/images/logo-' . $this->get_option( 'theme' ) . '.png'; 45 46 46 47 require_once WC_POSTPAY_DIR_PATH . 'includes/class-wc-postpay-api.php'; -
postpay/tags/0.1.8/includes/wc-postpay-settings.php
r2290456 r2299357 27 27 'default' => __( 'Buy now and pay later with zero interest and zero fees.', 'postpay' ), 28 28 ), 29 ' icon'=> array(30 'title' => __( ' Icon Color', 'postpay' ),29 'theme' => array( 30 'title' => __( 'Theme', 'postpay' ), 31 31 'type' => 'select', 32 32 'desc_tip' => true, 33 'description' => __( 'This controls the color of the icon which the user sees during checkout.', 'postpay' ),34 'default' => ' blue',33 'description' => __( 'This controls the color to coordinate and contrast with different backgrounds.', 'postpay' ), 34 'default' => 'light', 35 35 'options' => array( 36 ' blue' => __( 'Blue', 'postpay' ),37 ' white' => __( 'White', 'postpay' ),36 'light' => __( 'Light', 'postpay' ), 37 'dark' => __( 'Dark', 'postpay' ), 38 38 ), 39 39 ), -
postpay/tags/0.1.8/languages/postpay-es_ES.po
r2298511 r2299357 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Postpay 0.1.7\n"5 "Project-Id-Version: WooCommerce Postpay Payment Gateway 0.1.8\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/postpay\n" 7 7 "Language-Team: Spanish (Spain)\n" … … 10 10 "Content-Transfer-Encoding: 8bit\n" 11 11 "X-Generator: Poedit 2.3\n" 12 "POT-Creation-Date: 2020-0 4-23T19:30:34+00:00\n"13 "PO-Revision-Date: 2020-0 4-23 19:40+0000\n"12 "POT-Creation-Date: 2020-05-06T13:21:35+00:00\n" 13 "PO-Revision-Date: 2020-05-06 13:24+0000\n" 14 14 "X-Domain: postpay\n" 15 15 "Last-Translator: mongkok <dani@postpay.io>\n" … … 49 49 50 50 #. translators: %1$s: transaction id %2$s: error code 51 #: includes/class-wc-postpay-gateway.php:15 451 #: includes/class-wc-postpay-gateway.php:155 52 52 msgid "Postpay capture failed. ID: %1$s. Code: %2$s." 53 53 msgstr "La captura con Postpay falló. ID: %1$s. Código: %2$s." 54 54 55 #: includes/class-wc-postpay-gateway.php:16 355 #: includes/class-wc-postpay-gateway.php:164 56 56 msgid "Postpay capture error." 57 57 msgstr "Postpay error de captura." 58 58 59 59 #. translators: %1$s: transaction id %2$s: order status 60 #: includes/class-wc-postpay-gateway.php:1 7960 #: includes/class-wc-postpay-gateway.php:180 61 61 msgid "Postpay order cancelled. ID: %1$s. Status: %2$s." 62 62 msgstr "Postpay pedido cancelado. ID: %1$s. Estado: %2$s." 63 63 64 #: includes/class-wc-postpay-gateway.php:18 564 #: includes/class-wc-postpay-gateway.php:186 65 65 msgid "Postpay order cancelled." 66 66 msgstr "Postpay pedido cancelado." 67 67 68 68 #. translators: %1$s: transaction id %2$s: error code 69 #: includes/class-wc-postpay-gateway.php:2 0969 #: includes/class-wc-postpay-gateway.php:210 70 70 msgid "Postpay refund failed. ID: %1$s. Code: %2$s." 71 71 msgstr "La devolución con Postpay falló. ID: %1$s. Código: %2$s." … … 106 106 107 107 #: includes/wc-postpay-settings.php:30 108 msgid " Icon Color"109 msgstr " Color del Icono"108 msgid "Theme" 109 msgstr "Tema" 110 110 111 111 #: includes/wc-postpay-settings.php:33 112 112 msgid "" 113 "This controls the color of the icon which the user sees during checkout."114 msgstr ""115 "Esto controla el color del icono que el usuario ve durante el proceso de"116 " compra."113 "This controls the color to coordinate and contrast with different " 114 "backgrounds." 115 msgstr "" 116 "Esto controla el color para coordinar y contrastar con diferentes fondos." 117 117 118 118 #: includes/wc-postpay-settings.php:36 119 msgid " Blue"120 msgstr " Azul"119 msgid "Light" 120 msgstr "Claro" 121 121 122 122 #: includes/wc-postpay-settings.php:37 123 msgid " White"124 msgstr " Blanco"123 msgid "Dark" 124 msgstr "Oscuro" 125 125 126 126 #: includes/wc-postpay-settings.php:41 -
postpay/tags/0.1.8/languages/postpay.pot
r2298511 r2299357 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: WooCommerce Postpay Payment Gateway 0.1. 7\n"5 "Project-Id-Version: WooCommerce Postpay Payment Gateway 0.1.8\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/postpay\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2020-0 4-23T19:30:34+00:00\n"12 "POT-Creation-Date: 2020-05-06T13:21:35+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.4.0\n" … … 47 47 48 48 #. translators: %1$s: transaction id %2$s: error code 49 #: includes/class-wc-postpay-gateway.php:15 449 #: includes/class-wc-postpay-gateway.php:155 50 50 msgid "Postpay capture failed. ID: %1$s. Code: %2$s." 51 51 msgstr "" 52 52 53 #: includes/class-wc-postpay-gateway.php:16 353 #: includes/class-wc-postpay-gateway.php:164 54 54 msgid "Postpay capture error." 55 55 msgstr "" 56 56 57 57 #. translators: %1$s: transaction id %2$s: order status 58 #: includes/class-wc-postpay-gateway.php:1 7958 #: includes/class-wc-postpay-gateway.php:180 59 59 msgid "Postpay order cancelled. ID: %1$s. Status: %2$s." 60 60 msgstr "" 61 61 62 #: includes/class-wc-postpay-gateway.php:18 562 #: includes/class-wc-postpay-gateway.php:186 63 63 msgid "Postpay order cancelled." 64 64 msgstr "" 65 65 66 66 #. translators: %1$s: transaction id %2$s: error code 67 #: includes/class-wc-postpay-gateway.php:2 0967 #: includes/class-wc-postpay-gateway.php:210 68 68 msgid "Postpay refund failed. ID: %1$s. Code: %2$s." 69 69 msgstr "" … … 102 102 103 103 #: includes/wc-postpay-settings.php:30 104 msgid " Icon Color"104 msgid "Theme" 105 105 msgstr "" 106 106 107 107 #: includes/wc-postpay-settings.php:33 108 msgid "This controls the color of the icon which the user sees during checkout."108 msgid "This controls the color to coordinate and contrast with different backgrounds." 109 109 msgstr "" 110 110 111 111 #: includes/wc-postpay-settings.php:36 112 msgid " Blue"112 msgid "Light" 113 113 msgstr "" 114 114 115 115 #: includes/wc-postpay-settings.php:37 116 msgid " White"116 msgid "Dark" 117 117 msgstr "" 118 118 -
postpay/tags/0.1.8/postpay.php
r2298511 r2299357 2 2 /** 3 3 * Plugin Name: WooCommerce Postpay Payment Gateway 4 * Version: 0.1. 74 * Version: 0.1.8 5 5 * Plugin URI: https://github.com/postpayio/woocommerce 6 6 * Description: Buy now and pay later with zero interest and zero fees. … … 127 127 'sandbox' => 'yes' === $this->settings['sandbox'], 128 128 'merchantId' => $this->settings['merchant_id'], 129 'theme' => $this->settings['theme'] ?? 'light', 129 130 ) 130 131 ); 131 132 } 132 }133 134 /**135 * Return if the amount is between maximum and minimum.136 *137 * @param float $amount Amount.138 *139 * @return boolean140 */141 protected function is_valid_amount( $amount ) {142 $max_amount = $this->settings['max_amount'];143 $min_amount = $this->settings['min_amount'];144 145 return ( ( 0 < $amount ) &&146 ( empty( $max_amount ) || $max_amount > $amount ) &&147 ( empty( $min_amount ) || $min_amount < $amount )148 );149 133 } 150 134 … … 154 138 public function product_widget() { 155 139 if ( $this->enabled && 'yes' === $this->settings['product_widget'] ) { 156 global $product; 157 $price = wc_get_price_including_tax( $product ); 158 159 if ( $this->is_valid_amount( $price ) ) { 160 wc_get_postpay_template( 'widgets/product.php', array( 'price' => $price ) ); 161 } 140 wc_get_postpay_template( 'widgets/product.php' ); 162 141 } 163 142 } … … 168 147 public function cart_widget() { 169 148 if ( $this->enabled && 'yes' === $this->settings['cart_widget'] ) { 170 $total = WC()->cart->total; 171 172 if ( $this->is_valid_amount( $total ) ) { 173 wc_get_postpay_template( 'widgets/cart.php', array( 'total' => $total ) ); 174 } 149 wc_get_postpay_template( 'widgets/cart.php' ); 175 150 } 176 151 } -
postpay/tags/0.1.8/readme.txt
r2298511 r2299357 4 4 Tested up to: 5.4 5 5 Requires PHP: 5.6 6 Stable tag: 0.1. 77 Version: 0.1. 76 Stable tag: 0.1.8 7 Version: 0.1.8 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 73 73 == Changelog == 74 74 75 = 0.1.8 - 2020-05-06 = 76 * Added theme to settings 77 * Removed widget amount validation 78 75 79 = 0.1.7 - 2020-05-05 = 76 80 * Fixed interface declaration compatible -
postpay/tags/0.1.8/templates/widgets/cart.php
r2287781 r2299357 10 10 class="postpay-widget" 11 11 data-type="cart" 12 data-amount="<?php echo WC_Postpay_Adapter::decimal( $total )->jsonSerialize(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>"12 data-amount="<?php echo WC_Postpay_Adapter::decimal( WC()->cart->total )->jsonSerialize(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 13 13 data-currency="<?php echo get_woocommerce_currency(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 14 14 ></div> -
postpay/tags/0.1.8/templates/widgets/product.php
r2287781 r2299357 5 5 6 6 defined( 'ABSPATH' ) || exit; 7 8 global $product; 9 10 $price = wc_get_price_including_tax( $product ); 7 11 ?> 8 12 -
postpay/trunk/includes/class-wc-postpay-gateway.php
r2290456 r2299357 36 36 $this->title = $this->get_option( 'title' ); 37 37 $this->description = $this->get_option( 'description' ); 38 $this->theme = $this->get_option( 'theme' ); 38 39 $this->token_param = $this->id . '-token'; 39 40 $this->sandbox = 'yes' === $this->get_option( 'sandbox', 'yes' ); … … 42 43 $this->max_amount = $this->get_option( 'max_amount', 0 ); 43 44 $this->min_amount = $this->get_option( 'min_amount', 0 ); 44 $this->icon = WC_POSTPAY_DIR_URL . 'assets/images/logo-' . $this->get_option( ' icon' ) . '.png';45 $this->icon = WC_POSTPAY_DIR_URL . 'assets/images/logo-' . $this->get_option( 'theme' ) . '.png'; 45 46 46 47 require_once WC_POSTPAY_DIR_PATH . 'includes/class-wc-postpay-api.php'; -
postpay/trunk/includes/wc-postpay-settings.php
r2290456 r2299357 27 27 'default' => __( 'Buy now and pay later with zero interest and zero fees.', 'postpay' ), 28 28 ), 29 ' icon'=> array(30 'title' => __( ' Icon Color', 'postpay' ),29 'theme' => array( 30 'title' => __( 'Theme', 'postpay' ), 31 31 'type' => 'select', 32 32 'desc_tip' => true, 33 'description' => __( 'This controls the color of the icon which the user sees during checkout.', 'postpay' ),34 'default' => ' blue',33 'description' => __( 'This controls the color to coordinate and contrast with different backgrounds.', 'postpay' ), 34 'default' => 'light', 35 35 'options' => array( 36 ' blue' => __( 'Blue', 'postpay' ),37 ' white' => __( 'White', 'postpay' ),36 'light' => __( 'Light', 'postpay' ), 37 'dark' => __( 'Dark', 'postpay' ), 38 38 ), 39 39 ), -
postpay/trunk/languages/postpay-es_ES.po
r2298511 r2299357 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Postpay 0.1.7\n"5 "Project-Id-Version: WooCommerce Postpay Payment Gateway 0.1.8\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/postpay\n" 7 7 "Language-Team: Spanish (Spain)\n" … … 10 10 "Content-Transfer-Encoding: 8bit\n" 11 11 "X-Generator: Poedit 2.3\n" 12 "POT-Creation-Date: 2020-0 4-23T19:30:34+00:00\n"13 "PO-Revision-Date: 2020-0 4-23 19:40+0000\n"12 "POT-Creation-Date: 2020-05-06T13:21:35+00:00\n" 13 "PO-Revision-Date: 2020-05-06 13:24+0000\n" 14 14 "X-Domain: postpay\n" 15 15 "Last-Translator: mongkok <dani@postpay.io>\n" … … 49 49 50 50 #. translators: %1$s: transaction id %2$s: error code 51 #: includes/class-wc-postpay-gateway.php:15 451 #: includes/class-wc-postpay-gateway.php:155 52 52 msgid "Postpay capture failed. ID: %1$s. Code: %2$s." 53 53 msgstr "La captura con Postpay falló. ID: %1$s. Código: %2$s." 54 54 55 #: includes/class-wc-postpay-gateway.php:16 355 #: includes/class-wc-postpay-gateway.php:164 56 56 msgid "Postpay capture error." 57 57 msgstr "Postpay error de captura." 58 58 59 59 #. translators: %1$s: transaction id %2$s: order status 60 #: includes/class-wc-postpay-gateway.php:1 7960 #: includes/class-wc-postpay-gateway.php:180 61 61 msgid "Postpay order cancelled. ID: %1$s. Status: %2$s." 62 62 msgstr "Postpay pedido cancelado. ID: %1$s. Estado: %2$s." 63 63 64 #: includes/class-wc-postpay-gateway.php:18 564 #: includes/class-wc-postpay-gateway.php:186 65 65 msgid "Postpay order cancelled." 66 66 msgstr "Postpay pedido cancelado." 67 67 68 68 #. translators: %1$s: transaction id %2$s: error code 69 #: includes/class-wc-postpay-gateway.php:2 0969 #: includes/class-wc-postpay-gateway.php:210 70 70 msgid "Postpay refund failed. ID: %1$s. Code: %2$s." 71 71 msgstr "La devolución con Postpay falló. ID: %1$s. Código: %2$s." … … 106 106 107 107 #: includes/wc-postpay-settings.php:30 108 msgid " Icon Color"109 msgstr " Color del Icono"108 msgid "Theme" 109 msgstr "Tema" 110 110 111 111 #: includes/wc-postpay-settings.php:33 112 112 msgid "" 113 "This controls the color of the icon which the user sees during checkout."114 msgstr ""115 "Esto controla el color del icono que el usuario ve durante el proceso de"116 " compra."113 "This controls the color to coordinate and contrast with different " 114 "backgrounds." 115 msgstr "" 116 "Esto controla el color para coordinar y contrastar con diferentes fondos." 117 117 118 118 #: includes/wc-postpay-settings.php:36 119 msgid " Blue"120 msgstr " Azul"119 msgid "Light" 120 msgstr "Claro" 121 121 122 122 #: includes/wc-postpay-settings.php:37 123 msgid " White"124 msgstr " Blanco"123 msgid "Dark" 124 msgstr "Oscuro" 125 125 126 126 #: includes/wc-postpay-settings.php:41 -
postpay/trunk/languages/postpay.pot
r2298511 r2299357 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: WooCommerce Postpay Payment Gateway 0.1. 7\n"5 "Project-Id-Version: WooCommerce Postpay Payment Gateway 0.1.8\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/postpay\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2020-0 4-23T19:30:34+00:00\n"12 "POT-Creation-Date: 2020-05-06T13:21:35+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.4.0\n" … … 47 47 48 48 #. translators: %1$s: transaction id %2$s: error code 49 #: includes/class-wc-postpay-gateway.php:15 449 #: includes/class-wc-postpay-gateway.php:155 50 50 msgid "Postpay capture failed. ID: %1$s. Code: %2$s." 51 51 msgstr "" 52 52 53 #: includes/class-wc-postpay-gateway.php:16 353 #: includes/class-wc-postpay-gateway.php:164 54 54 msgid "Postpay capture error." 55 55 msgstr "" 56 56 57 57 #. translators: %1$s: transaction id %2$s: order status 58 #: includes/class-wc-postpay-gateway.php:1 7958 #: includes/class-wc-postpay-gateway.php:180 59 59 msgid "Postpay order cancelled. ID: %1$s. Status: %2$s." 60 60 msgstr "" 61 61 62 #: includes/class-wc-postpay-gateway.php:18 562 #: includes/class-wc-postpay-gateway.php:186 63 63 msgid "Postpay order cancelled." 64 64 msgstr "" 65 65 66 66 #. translators: %1$s: transaction id %2$s: error code 67 #: includes/class-wc-postpay-gateway.php:2 0967 #: includes/class-wc-postpay-gateway.php:210 68 68 msgid "Postpay refund failed. ID: %1$s. Code: %2$s." 69 69 msgstr "" … … 102 102 103 103 #: includes/wc-postpay-settings.php:30 104 msgid " Icon Color"104 msgid "Theme" 105 105 msgstr "" 106 106 107 107 #: includes/wc-postpay-settings.php:33 108 msgid "This controls the color of the icon which the user sees during checkout."108 msgid "This controls the color to coordinate and contrast with different backgrounds." 109 109 msgstr "" 110 110 111 111 #: includes/wc-postpay-settings.php:36 112 msgid " Blue"112 msgid "Light" 113 113 msgstr "" 114 114 115 115 #: includes/wc-postpay-settings.php:37 116 msgid " White"116 msgid "Dark" 117 117 msgstr "" 118 118 -
postpay/trunk/postpay.php
r2298511 r2299357 2 2 /** 3 3 * Plugin Name: WooCommerce Postpay Payment Gateway 4 * Version: 0.1. 74 * Version: 0.1.8 5 5 * Plugin URI: https://github.com/postpayio/woocommerce 6 6 * Description: Buy now and pay later with zero interest and zero fees. … … 127 127 'sandbox' => 'yes' === $this->settings['sandbox'], 128 128 'merchantId' => $this->settings['merchant_id'], 129 'theme' => $this->settings['theme'] ?? 'light', 129 130 ) 130 131 ); 131 132 } 132 }133 134 /**135 * Return if the amount is between maximum and minimum.136 *137 * @param float $amount Amount.138 *139 * @return boolean140 */141 protected function is_valid_amount( $amount ) {142 $max_amount = $this->settings['max_amount'];143 $min_amount = $this->settings['min_amount'];144 145 return ( ( 0 < $amount ) &&146 ( empty( $max_amount ) || $max_amount > $amount ) &&147 ( empty( $min_amount ) || $min_amount < $amount )148 );149 133 } 150 134 … … 154 138 public function product_widget() { 155 139 if ( $this->enabled && 'yes' === $this->settings['product_widget'] ) { 156 global $product; 157 $price = wc_get_price_including_tax( $product ); 158 159 if ( $this->is_valid_amount( $price ) ) { 160 wc_get_postpay_template( 'widgets/product.php', array( 'price' => $price ) ); 161 } 140 wc_get_postpay_template( 'widgets/product.php' ); 162 141 } 163 142 } … … 168 147 public function cart_widget() { 169 148 if ( $this->enabled && 'yes' === $this->settings['cart_widget'] ) { 170 $total = WC()->cart->total; 171 172 if ( $this->is_valid_amount( $total ) ) { 173 wc_get_postpay_template( 'widgets/cart.php', array( 'total' => $total ) ); 174 } 149 wc_get_postpay_template( 'widgets/cart.php' ); 175 150 } 176 151 } -
postpay/trunk/readme.txt
r2298511 r2299357 4 4 Tested up to: 5.4 5 5 Requires PHP: 5.6 6 Stable tag: 0.1. 77 Version: 0.1. 76 Stable tag: 0.1.8 7 Version: 0.1.8 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 73 73 == Changelog == 74 74 75 = 0.1.8 - 2020-05-06 = 76 * Added theme to settings 77 * Removed widget amount validation 78 75 79 = 0.1.7 - 2020-05-05 = 76 80 * Fixed interface declaration compatible -
postpay/trunk/templates/widgets/cart.php
r2287781 r2299357 10 10 class="postpay-widget" 11 11 data-type="cart" 12 data-amount="<?php echo WC_Postpay_Adapter::decimal( $total )->jsonSerialize(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>"12 data-amount="<?php echo WC_Postpay_Adapter::decimal( WC()->cart->total )->jsonSerialize(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 13 13 data-currency="<?php echo get_woocommerce_currency(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>" 14 14 ></div> -
postpay/trunk/templates/widgets/product.php
r2287781 r2299357 5 5 6 6 defined( 'ABSPATH' ) || exit; 7 8 global $product; 9 10 $price = wc_get_price_including_tax( $product ); 7 11 ?> 8 12
Note: See TracChangeset
for help on using the changeset viewer.