Plugin Directory

Changeset 2305150


Ignore:
Timestamp:
05/14/2020 07:39:19 PM (6 years ago)
Author:
postpay
Message:

v0.1.10

Location:
postpay
Files:
2 deleted
8 edited
15 copied

Legend:

Unmodified
Added
Removed
  • postpay/tags/0.1.10/includes/class-wc-postpay-gateway.php

    r2303846 r2305150  
    4141        $this->in_context  = 'yes' === $this->get_option( 'in_context', 'no' );
    4242        $this->debug       = 'yes' === $this->get_option( 'debug', 'no' );
     43        $this->widget      = 'yes' === $this->get_option( 'payment_method_widget', 'yes' );
    4344        $this->css         = $this->get_option( 'css', '#payment ul li.payment_method_' . $this->id );
    4445        $this->icon        = WC_POSTPAY_DIR_URL . 'assets/images/logo-' . $this->get_option( 'theme' ) . '.png';
  • postpay/tags/0.1.10/includes/wc-postpay-settings.php

    r2303846 r2305150  
    77
    88return array(
    9     'enabled'            => array(
     9    'enabled'               => array(
    1010        'title'   => __( 'Enable/Disable', 'postpay' ),
    1111        'type'    => 'checkbox',
     
    1313        'default' => 'yes',
    1414    ),
    15     'title'              => array(
     15    'title'                 => array(
    1616        'title'       => __( 'Title', 'postpay' ),
    1717        'type'        => 'text',
     
    2020        'desc_tip'    => true,
    2121    ),
    22     'description'        => array(
     22    'description'           => array(
    2323        'title'       => __( 'Description', 'postpay' ),
    2424        'type'        => 'text',
     
    2727        'default'     => __( 'Buy now and pay later with zero interest and zero fees.', 'postpay' ),
    2828    ),
    29     'theme'              => array(
     29    'theme'                 => array(
    3030        'title'       => __( 'Theme', 'postpay' ),
    3131        'type'        => 'select',
     
    3838        ),
    3939    ),
    40     'merchant_id'        => array(
     40    'merchant_id'           => array(
    4141        'title'       => __( 'Merchant ID', 'postpay' ),
    4242        'type'        => 'text',
     
    4545        'desc_tip'    => true,
    4646    ),
    47     'secret_key'         => array(
     47    'secret_key'            => array(
    4848        'title'       => __( 'Secret Key', 'postpay' ),
    4949        'type'        => 'password',
     
    5252        'desc_tip'    => true,
    5353    ),
    54     'sandbox_secret_key' => array(
     54    'sandbox_secret_key'    => array(
    5555        'title'       => __( 'Sandbox Secret Key', 'postpay' ),
    5656        'type'        => 'password',
     
    5959        'desc_tip'    => true,
    6060    ),
    61     'sandbox'            => array(
     61    'sandbox'               => array(
    6262        'title'       => __( 'Postpay Sandbox', 'postpay' ),
    6363        'type'        => 'checkbox',
     
    6666        'description' => __( 'Postpay sandbox can be used to test payments.', 'postpay' ),
    6767    ),
    68     'in_context'         => array(
     68    'in_context'            => array(
    6969        'title'       => __( 'In-Context Checkout', 'postpay' ),
    7070        'type'        => 'checkbox',
     
    7373        'description' => __( 'Checkout flow that keeps customers local to your website.', 'postpay' ),
    7474    ),
    75     'debug'              => array(
     75    'debug'                 => array(
    7676        'title'       => __( 'Debug log', 'postpay' ),
    7777        'type'        => 'checkbox',
     
    8080        'description' => __( 'Log Postpay events, such as HTTP requests.', 'postpay' ),
    8181    ),
    82     'product_widget'     => array(
     82    'product_widget'        => array(
    8383        'title'       => __( 'Product Widget', 'postpay' ),
    8484        'type'        => 'checkbox',
    8585        'label'       => __( 'Enable Product Widget', 'postpay' ),
    86         'default'     => 'no',
     86        'default'     => 'yes',
    8787        'description' => __( 'Show a promotional message on product pages.', 'postpay' ),
    8888    ),
    89     'cart_widget'        => array(
     89    'cart_widget'           => array(
    9090        'title'       => __( 'Cart Widget', 'postpay' ),
    9191        'type'        => 'checkbox',
    9292        'label'       => __( 'Enable Cart Widget', 'postpay' ),
    93         'default'     => 'no',
     93        'default'     => 'yes',
    9494        'description' => __( 'Show a promotional message on cart page.', 'postpay' ),
    9595    ),
    96     'css'                => array(
     96    'payment_method_widget' => array(
     97        'title'       => __( 'Payment Method Widget', 'postpay' ),
     98        'type'        => 'checkbox',
     99        'label'       => __( 'Enable Payment Method Widget', 'postpay' ),
     100        'default'     => 'yes',
     101        'description' => __( 'Show the instalment plan info on payment method selection.', 'postpay' ),
     102    ),
     103    'css'                   => array(
    97104        'title'       => __( 'CSS selector', 'postpay' ),
    98105        'type'        => 'text',
  • postpay/tags/0.1.10/languages/postpay-es_ES.po

    r2303846 r2305150  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WooCommerce Postpay Payment Gateway 0.1.9\n"
     5"Project-Id-Version: WooCommerce Postpay Payment Gateway 0.1.10\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/postpay\n"
    77"Language-Team: Spanish (Spain)\n"
     
    1010"Content-Transfer-Encoding: 8bit\n"
    1111"X-Generator: Poedit 2.3\n"
    12 "POT-Creation-Date: 2020-05-13T02:15:32+00:00\n"
    13 "PO-Revision-Date: 2020-05-13 02:16+0000\n"
     12"POT-Creation-Date: 2020-05-14T19:19:17+00:00\n"
     13"PO-Revision-Date: 2020-05-14 19:22+0000\n"
    1414"X-Domain: postpay\n"
    1515"Last-Translator: admin <dani@postpay.io>\n"
     
    4949
    5050#. translators: %1$s: transaction id %2$s: error code
    51 #: includes/class-wc-postpay-gateway.php:145
     51#: includes/class-wc-postpay-gateway.php:146
    5252msgid "Postpay capture failed. ID: %1$s. Code: %2$s."
    5353msgstr "La captura con Postpay falló. ID: %1$s. Código: %2$s."
    5454
    55 #: includes/class-wc-postpay-gateway.php:154
     55#: includes/class-wc-postpay-gateway.php:155
    5656msgid "Postpay capture error."
    5757msgstr "Postpay error de captura."
    5858
    5959#. translators: %1$s: transaction id %2$s: order status
    60 #: includes/class-wc-postpay-gateway.php:170
     60#: includes/class-wc-postpay-gateway.php:171
    6161msgid "Postpay order cancelled. ID: %1$s. Status: %2$s."
    6262msgstr "Postpay pedido cancelado. ID: %1$s. Estado: %2$s."
    6363
    64 #: includes/class-wc-postpay-gateway.php:176
     64#: includes/class-wc-postpay-gateway.php:177
    6565msgid "Postpay order cancelled."
    6666msgstr "Postpay pedido cancelado."
    6767
    6868#. translators: %1$s: transaction id %2$s: error code
    69 #: includes/class-wc-postpay-gateway.php:200
     69#: includes/class-wc-postpay-gateway.php:201
    7070msgid "Postpay refund failed. ID: %1$s. Code: %2$s."
    7171msgstr "La devolución con Postpay falló. ID: %1$s. Código: %2$s."
     
    191191#: includes/wc-postpay-settings.php:85
    192192msgid "Enable Product Widget"
    193 msgstr "Habilitar Product Widget"
     193msgstr "Habilitar widget de producto"
    194194
    195195#: includes/wc-postpay-settings.php:87
     
    203203#: includes/wc-postpay-settings.php:92
    204204msgid "Enable Cart Widget"
    205 msgstr "Habilitar Cart Widget"
     205msgstr "Habilitar widget de carrito"
    206206
    207207#: includes/wc-postpay-settings.php:94
     
    210210
    211211#: includes/wc-postpay-settings.php:97
     212msgid "Payment Method Widget"
     213msgstr "Widget del método de pago"
     214
     215#: includes/wc-postpay-settings.php:99
     216msgid "Enable Payment Method Widget"
     217msgstr "Habilitar widget del método de pago"
     218
     219#: includes/wc-postpay-settings.php:101
     220msgid "Show the instalment plan info on payment method selection."
     221msgstr ""
     222"Mostrar la información del plan de cuotas en la selección del método de pago."
     223
     224#: includes/wc-postpay-settings.php:104
    212225msgid "CSS selector"
    213226msgstr "Selector CSS"
    214227
    215 #: includes/wc-postpay-settings.php:99
     228#: includes/wc-postpay-settings.php:106
    216229msgid "Selector to hide the payment method if it is not available."
    217230msgstr "Selector para ocultar el método de pago si no está disponible."
  • postpay/tags/0.1.10/languages/postpay.pot

    r2303846 r2305150  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WooCommerce Postpay Payment Gateway 0.1.9\n"
     5"Project-Id-Version: WooCommerce Postpay Payment Gateway 0.1.10\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/postpay\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2020-05-13T02:15:32+00:00\n"
     12"POT-Creation-Date: 2020-05-14T19:19:17+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.4.0\n"
     
    4747
    4848#. translators: %1$s: transaction id %2$s: error code
    49 #: includes/class-wc-postpay-gateway.php:145
     49#: includes/class-wc-postpay-gateway.php:146
    5050msgid "Postpay capture failed. ID: %1$s. Code: %2$s."
    5151msgstr ""
    5252
    53 #: includes/class-wc-postpay-gateway.php:154
     53#: includes/class-wc-postpay-gateway.php:155
    5454msgid "Postpay capture error."
    5555msgstr ""
    5656
    5757#. translators: %1$s: transaction id %2$s: order status
    58 #: includes/class-wc-postpay-gateway.php:170
     58#: includes/class-wc-postpay-gateway.php:171
    5959msgid "Postpay order cancelled. ID: %1$s. Status: %2$s."
    6060msgstr ""
    6161
    62 #: includes/class-wc-postpay-gateway.php:176
     62#: includes/class-wc-postpay-gateway.php:177
    6363msgid "Postpay order cancelled."
    6464msgstr ""
    6565
    6666#. translators: %1$s: transaction id %2$s: error code
    67 #: includes/class-wc-postpay-gateway.php:200
     67#: includes/class-wc-postpay-gateway.php:201
    6868msgid "Postpay refund failed. ID: %1$s. Code: %2$s."
    6969msgstr ""
     
    202202
    203203#: includes/wc-postpay-settings.php:97
     204msgid "Payment Method Widget"
     205msgstr ""
     206
     207#: includes/wc-postpay-settings.php:99
     208msgid "Enable Payment Method Widget"
     209msgstr ""
     210
     211#: includes/wc-postpay-settings.php:101
     212msgid "Show the instalment plan info on payment method selection."
     213msgstr ""
     214
     215#: includes/wc-postpay-settings.php:104
    204216msgid "CSS selector"
    205217msgstr ""
    206218
    207 #: includes/wc-postpay-settings.php:99
     219#: includes/wc-postpay-settings.php:106
    208220msgid "Selector to hide the payment method if it is not available."
    209221msgstr ""
  • postpay/tags/0.1.10/postpay.php

    r2303846 r2305150  
    22/**
    33 * Plugin Name: WooCommerce Postpay Payment Gateway
    4  * Version: 0.1.9
     4 * Version: 0.1.10
    55 * Plugin URI: https://github.com/postpayio/woocommerce
    66 * Description: Buy now and pay later with zero interest and zero fees.
  • postpay/tags/0.1.10/readme.txt

    r2303846 r2305150  
    44Tested up to: 5.4
    55Requires PHP: 5.6
    6 Stable tag: 0.1.9
    7 Version: 0.1.9
     6Stable tag: 0.1.10
     7Version: 0.1.10
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    7373== Changelog ==
    7474
     75= 0.1.10 - 2020-05-15 =
     76* Added Payment Method Widget to settings
     77
    7578= 0.1.9 - 2020-05-13 =
    7679* Added instalment plan widget
  • postpay/tags/0.1.10/templates/payment-fields.php

    r2303846 r2305150  
    77?>
    88
    9 <div
    10     class="postpay-widget"
    11     data-type="instalment-plan"
    12     data-amount="<?php echo WC_Postpay_Adapter::decimal( WC()->cart->total )->jsonSerialize(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>"
    13     data-currency="<?php echo get_woocommerce_currency(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>"
    14     data-country="<?php echo WC()->customer->get_shipping_country(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>"
    15     data-hide-if-invalid="<?php echo $gateway->css; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>"
    16 ></div>
     9<?php if ( $gateway->widget ) : ?>
     10    <div
     11        class="postpay-widget"
     12        data-type="instalment-plan"
     13        data-amount="<?php echo WC_Postpay_Adapter::decimal( WC()->cart->total )->jsonSerialize(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>"
     14        data-currency="<?php echo get_woocommerce_currency(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>"
     15        data-country="<?php echo WC()->customer->get_shipping_country(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>"
     16        data-hide-if-invalid="<?php echo $gateway->css; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>"
     17    ></div>
    1718
    18 <script>
    19 jQuery( document ).ready(
    20     function( $ ) {
    21         postpay.ui.refresh();
    22     }
    23 );
    24 </script>
     19    <script>
     20    jQuery( document ).ready(
     21        function( $ ) {
     22            postpay.ui.refresh();
     23        }
     24    );
     25    </script>
     26<?php else : ?>
     27    <p><?php echo wpautop( wptexturize( $gateway->get_description() ) ); // @codingStandardsIgnoreLine. ?></p>
     28<?php endif; ?>
  • postpay/trunk/includes/class-wc-postpay-gateway.php

    r2303846 r2305150  
    4141        $this->in_context  = 'yes' === $this->get_option( 'in_context', 'no' );
    4242        $this->debug       = 'yes' === $this->get_option( 'debug', 'no' );
     43        $this->widget      = 'yes' === $this->get_option( 'payment_method_widget', 'yes' );
    4344        $this->css         = $this->get_option( 'css', '#payment ul li.payment_method_' . $this->id );
    4445        $this->icon        = WC_POSTPAY_DIR_URL . 'assets/images/logo-' . $this->get_option( 'theme' ) . '.png';
  • postpay/trunk/includes/wc-postpay-settings.php

    r2303846 r2305150  
    77
    88return array(
    9     'enabled'            => array(
     9    'enabled'               => array(
    1010        'title'   => __( 'Enable/Disable', 'postpay' ),
    1111        'type'    => 'checkbox',
     
    1313        'default' => 'yes',
    1414    ),
    15     'title'              => array(
     15    'title'                 => array(
    1616        'title'       => __( 'Title', 'postpay' ),
    1717        'type'        => 'text',
     
    2020        'desc_tip'    => true,
    2121    ),
    22     'description'        => array(
     22    'description'           => array(
    2323        'title'       => __( 'Description', 'postpay' ),
    2424        'type'        => 'text',
     
    2727        'default'     => __( 'Buy now and pay later with zero interest and zero fees.', 'postpay' ),
    2828    ),
    29     'theme'              => array(
     29    'theme'                 => array(
    3030        'title'       => __( 'Theme', 'postpay' ),
    3131        'type'        => 'select',
     
    3838        ),
    3939    ),
    40     'merchant_id'        => array(
     40    'merchant_id'           => array(
    4141        'title'       => __( 'Merchant ID', 'postpay' ),
    4242        'type'        => 'text',
     
    4545        'desc_tip'    => true,
    4646    ),
    47     'secret_key'         => array(
     47    'secret_key'            => array(
    4848        'title'       => __( 'Secret Key', 'postpay' ),
    4949        'type'        => 'password',
     
    5252        'desc_tip'    => true,
    5353    ),
    54     'sandbox_secret_key' => array(
     54    'sandbox_secret_key'    => array(
    5555        'title'       => __( 'Sandbox Secret Key', 'postpay' ),
    5656        'type'        => 'password',
     
    5959        'desc_tip'    => true,
    6060    ),
    61     'sandbox'            => array(
     61    'sandbox'               => array(
    6262        'title'       => __( 'Postpay Sandbox', 'postpay' ),
    6363        'type'        => 'checkbox',
     
    6666        'description' => __( 'Postpay sandbox can be used to test payments.', 'postpay' ),
    6767    ),
    68     'in_context'         => array(
     68    'in_context'            => array(
    6969        'title'       => __( 'In-Context Checkout', 'postpay' ),
    7070        'type'        => 'checkbox',
     
    7373        'description' => __( 'Checkout flow that keeps customers local to your website.', 'postpay' ),
    7474    ),
    75     'debug'              => array(
     75    'debug'                 => array(
    7676        'title'       => __( 'Debug log', 'postpay' ),
    7777        'type'        => 'checkbox',
     
    8080        'description' => __( 'Log Postpay events, such as HTTP requests.', 'postpay' ),
    8181    ),
    82     'product_widget'     => array(
     82    'product_widget'        => array(
    8383        'title'       => __( 'Product Widget', 'postpay' ),
    8484        'type'        => 'checkbox',
    8585        'label'       => __( 'Enable Product Widget', 'postpay' ),
    86         'default'     => 'no',
     86        'default'     => 'yes',
    8787        'description' => __( 'Show a promotional message on product pages.', 'postpay' ),
    8888    ),
    89     'cart_widget'        => array(
     89    'cart_widget'           => array(
    9090        'title'       => __( 'Cart Widget', 'postpay' ),
    9191        'type'        => 'checkbox',
    9292        'label'       => __( 'Enable Cart Widget', 'postpay' ),
    93         'default'     => 'no',
     93        'default'     => 'yes',
    9494        'description' => __( 'Show a promotional message on cart page.', 'postpay' ),
    9595    ),
    96     'css'                => array(
     96    'payment_method_widget' => array(
     97        'title'       => __( 'Payment Method Widget', 'postpay' ),
     98        'type'        => 'checkbox',
     99        'label'       => __( 'Enable Payment Method Widget', 'postpay' ),
     100        'default'     => 'yes',
     101        'description' => __( 'Show the instalment plan info on payment method selection.', 'postpay' ),
     102    ),
     103    'css'                   => array(
    97104        'title'       => __( 'CSS selector', 'postpay' ),
    98105        'type'        => 'text',
  • postpay/trunk/languages/postpay-es_ES.po

    r2303846 r2305150  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WooCommerce Postpay Payment Gateway 0.1.9\n"
     5"Project-Id-Version: WooCommerce Postpay Payment Gateway 0.1.10\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/postpay\n"
    77"Language-Team: Spanish (Spain)\n"
     
    1010"Content-Transfer-Encoding: 8bit\n"
    1111"X-Generator: Poedit 2.3\n"
    12 "POT-Creation-Date: 2020-05-13T02:15:32+00:00\n"
    13 "PO-Revision-Date: 2020-05-13 02:16+0000\n"
     12"POT-Creation-Date: 2020-05-14T19:19:17+00:00\n"
     13"PO-Revision-Date: 2020-05-14 19:22+0000\n"
    1414"X-Domain: postpay\n"
    1515"Last-Translator: admin <dani@postpay.io>\n"
     
    4949
    5050#. translators: %1$s: transaction id %2$s: error code
    51 #: includes/class-wc-postpay-gateway.php:145
     51#: includes/class-wc-postpay-gateway.php:146
    5252msgid "Postpay capture failed. ID: %1$s. Code: %2$s."
    5353msgstr "La captura con Postpay falló. ID: %1$s. Código: %2$s."
    5454
    55 #: includes/class-wc-postpay-gateway.php:154
     55#: includes/class-wc-postpay-gateway.php:155
    5656msgid "Postpay capture error."
    5757msgstr "Postpay error de captura."
    5858
    5959#. translators: %1$s: transaction id %2$s: order status
    60 #: includes/class-wc-postpay-gateway.php:170
     60#: includes/class-wc-postpay-gateway.php:171
    6161msgid "Postpay order cancelled. ID: %1$s. Status: %2$s."
    6262msgstr "Postpay pedido cancelado. ID: %1$s. Estado: %2$s."
    6363
    64 #: includes/class-wc-postpay-gateway.php:176
     64#: includes/class-wc-postpay-gateway.php:177
    6565msgid "Postpay order cancelled."
    6666msgstr "Postpay pedido cancelado."
    6767
    6868#. translators: %1$s: transaction id %2$s: error code
    69 #: includes/class-wc-postpay-gateway.php:200
     69#: includes/class-wc-postpay-gateway.php:201
    7070msgid "Postpay refund failed. ID: %1$s. Code: %2$s."
    7171msgstr "La devolución con Postpay falló. ID: %1$s. Código: %2$s."
     
    191191#: includes/wc-postpay-settings.php:85
    192192msgid "Enable Product Widget"
    193 msgstr "Habilitar Product Widget"
     193msgstr "Habilitar widget de producto"
    194194
    195195#: includes/wc-postpay-settings.php:87
     
    203203#: includes/wc-postpay-settings.php:92
    204204msgid "Enable Cart Widget"
    205 msgstr "Habilitar Cart Widget"
     205msgstr "Habilitar widget de carrito"
    206206
    207207#: includes/wc-postpay-settings.php:94
     
    210210
    211211#: includes/wc-postpay-settings.php:97
     212msgid "Payment Method Widget"
     213msgstr "Widget del método de pago"
     214
     215#: includes/wc-postpay-settings.php:99
     216msgid "Enable Payment Method Widget"
     217msgstr "Habilitar widget del método de pago"
     218
     219#: includes/wc-postpay-settings.php:101
     220msgid "Show the instalment plan info on payment method selection."
     221msgstr ""
     222"Mostrar la información del plan de cuotas en la selección del método de pago."
     223
     224#: includes/wc-postpay-settings.php:104
    212225msgid "CSS selector"
    213226msgstr "Selector CSS"
    214227
    215 #: includes/wc-postpay-settings.php:99
     228#: includes/wc-postpay-settings.php:106
    216229msgid "Selector to hide the payment method if it is not available."
    217230msgstr "Selector para ocultar el método de pago si no está disponible."
  • postpay/trunk/languages/postpay.pot

    r2303846 r2305150  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WooCommerce Postpay Payment Gateway 0.1.9\n"
     5"Project-Id-Version: WooCommerce Postpay Payment Gateway 0.1.10\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/postpay\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2020-05-13T02:15:32+00:00\n"
     12"POT-Creation-Date: 2020-05-14T19:19:17+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.4.0\n"
     
    4747
    4848#. translators: %1$s: transaction id %2$s: error code
    49 #: includes/class-wc-postpay-gateway.php:145
     49#: includes/class-wc-postpay-gateway.php:146
    5050msgid "Postpay capture failed. ID: %1$s. Code: %2$s."
    5151msgstr ""
    5252
    53 #: includes/class-wc-postpay-gateway.php:154
     53#: includes/class-wc-postpay-gateway.php:155
    5454msgid "Postpay capture error."
    5555msgstr ""
    5656
    5757#. translators: %1$s: transaction id %2$s: order status
    58 #: includes/class-wc-postpay-gateway.php:170
     58#: includes/class-wc-postpay-gateway.php:171
    5959msgid "Postpay order cancelled. ID: %1$s. Status: %2$s."
    6060msgstr ""
    6161
    62 #: includes/class-wc-postpay-gateway.php:176
     62#: includes/class-wc-postpay-gateway.php:177
    6363msgid "Postpay order cancelled."
    6464msgstr ""
    6565
    6666#. translators: %1$s: transaction id %2$s: error code
    67 #: includes/class-wc-postpay-gateway.php:200
     67#: includes/class-wc-postpay-gateway.php:201
    6868msgid "Postpay refund failed. ID: %1$s. Code: %2$s."
    6969msgstr ""
     
    202202
    203203#: includes/wc-postpay-settings.php:97
     204msgid "Payment Method Widget"
     205msgstr ""
     206
     207#: includes/wc-postpay-settings.php:99
     208msgid "Enable Payment Method Widget"
     209msgstr ""
     210
     211#: includes/wc-postpay-settings.php:101
     212msgid "Show the instalment plan info on payment method selection."
     213msgstr ""
     214
     215#: includes/wc-postpay-settings.php:104
    204216msgid "CSS selector"
    205217msgstr ""
    206218
    207 #: includes/wc-postpay-settings.php:99
     219#: includes/wc-postpay-settings.php:106
    208220msgid "Selector to hide the payment method if it is not available."
    209221msgstr ""
  • postpay/trunk/postpay.php

    r2303846 r2305150  
    22/**
    33 * Plugin Name: WooCommerce Postpay Payment Gateway
    4  * Version: 0.1.9
     4 * Version: 0.1.10
    55 * Plugin URI: https://github.com/postpayio/woocommerce
    66 * Description: Buy now and pay later with zero interest and zero fees.
  • postpay/trunk/readme.txt

    r2303846 r2305150  
    44Tested up to: 5.4
    55Requires PHP: 5.6
    6 Stable tag: 0.1.9
    7 Version: 0.1.9
     6Stable tag: 0.1.10
     7Version: 0.1.10
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    7373== Changelog ==
    7474
     75= 0.1.10 - 2020-05-15 =
     76* Added Payment Method Widget to settings
     77
    7578= 0.1.9 - 2020-05-13 =
    7679* Added instalment plan widget
  • postpay/trunk/templates/payment-fields.php

    r2303846 r2305150  
    77?>
    88
    9 <div
    10     class="postpay-widget"
    11     data-type="instalment-plan"
    12     data-amount="<?php echo WC_Postpay_Adapter::decimal( WC()->cart->total )->jsonSerialize(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>"
    13     data-currency="<?php echo get_woocommerce_currency(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>"
    14     data-country="<?php echo WC()->customer->get_shipping_country(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>"
    15     data-hide-if-invalid="<?php echo $gateway->css; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>"
    16 ></div>
     9<?php if ( $gateway->widget ) : ?>
     10    <div
     11        class="postpay-widget"
     12        data-type="instalment-plan"
     13        data-amount="<?php echo WC_Postpay_Adapter::decimal( WC()->cart->total )->jsonSerialize(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>"
     14        data-currency="<?php echo get_woocommerce_currency(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>"
     15        data-country="<?php echo WC()->customer->get_shipping_country(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>"
     16        data-hide-if-invalid="<?php echo $gateway->css; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>"
     17    ></div>
    1718
    18 <script>
    19 jQuery( document ).ready(
    20     function( $ ) {
    21         postpay.ui.refresh();
    22     }
    23 );
    24 </script>
     19    <script>
     20    jQuery( document ).ready(
     21        function( $ ) {
     22            postpay.ui.refresh();
     23        }
     24    );
     25    </script>
     26<?php else : ?>
     27    <p><?php echo wpautop( wptexturize( $gateway->get_description() ) ); // @codingStandardsIgnoreLine. ?></p>
     28<?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.