Plugin Directory

Changeset 2907044


Ignore:
Timestamp:
05/02/2023 01:51:16 PM (3 years ago)
Author:
quadpay
Message:

version 1.7.2 (merchant ID in widget, tested up to WP 6.2)

Location:
quadpay-gateway-for-woocommerce
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • quadpay-gateway-for-woocommerce/tags/1.7.2/includes/class-quadpay-settings.php

    r2712100 r2907044  
    120120                'default'     => '',
    121121            ),
     122            'merchant_id' => array(
     123                'title'       => __( 'Merchant ID', 'woo_quadpay' ),
     124                'type'        => 'text',
     125                'description' => __( 'Zip Merchant ID credential.', 'woo_quadpay' ),
     126                'default'     => '',
     127            ),
    122128            'mfpp' => array(
    123129                'title'       => __( 'Merchant Fee for Payment Plan', 'woo_quadpay' ),
     
    126132                'description' => __( 'Enable only if option is arranged and configured on Zip side. When enabled, fee may be applied to customers choosing Zip.', 'woo_quadpay' ),
    127133                'default'     => 'no'
    128             ),
    129             'merchant_id' => array(
    130                 'title'       => __( 'Merchant ID', 'woo_quadpay' ),
    131                 'type'        => 'text',
    132                 'description' => __( 'Zip Merchant ID credential. Needed only if MFPP is enabled.', 'woo_quadpay' ),
    133                 'default'     => '',
    134134            ),
    135135            'logging' => array(
  • quadpay-gateway-for-woocommerce/tags/1.7.2/includes/class-quadpay-widget.php

    r2688749 r2907044  
    7676        $widget_wrapper       = $this->settings->get_option( 'product_page_widget_wrapper', '' );
    7777        $widget_customization = $this->settings->get_option( 'product_page_widget_customization', '' );
     78        $merchantId           = $this->settings->get_option( 'merchant_id', '' );
    7879
    7980        $price = $product->get_price();
     
    8384        ?>
    8485        <div style="min-height:20px;<?php echo $widget_wrapper; ?>">
    85             <quadpay-widget<?php echo $tag_version_suffix ?> amount="<?php echo $price; ?>" <?php echo $widget_customization; ?>></quadpay-widget<?php echo $tag_version_suffix ?>>
     86            <quadpay-widget<?php echo $tag_version_suffix ?>
     87                amount="<?php echo $price; ?>"
     88            <?php if (!empty($merchantId)):?>
     89                merchantId="<?php echo $merchantId; ?>"
     90            <?php endif; ?>
     91                <?php echo $widget_customization; ?>>
     92            </quadpay-widget<?php echo $tag_version_suffix ?>>
    8693        </div>
    8794        <?php
     
    113120        $widget_wrapper       = $this->settings->get_option( 'product_page_widget_wrapper', '' );
    114121        $widget_customization = $this->settings->get_option( 'product_page_widget_customization', '' );
     122        $merchantId           = $this->settings->get_option( 'merchant_id', '' );
    115123
    116124        $price = $product->get_price();
     
    120128        ?>
    121129        <div style="min-height:20px;<?php echo $widget_wrapper; ?>">
    122             <quadpay-widget<?php echo $tag_version_suffix ?> amount="<?php echo $price; ?>" <?php echo $widget_customization; ?>></quadpay-widget<?php echo $tag_version_suffix ?>>
     130            <quadpay-widget<?php echo $tag_version_suffix ?>
     131                amount="<?php echo $price; ?>"
     132            <?php if (!empty($merchantId)):?>
     133                merchantId="<?php echo $merchantId; ?>"
     134            <?php endif; ?>
     135                <?php echo $widget_customization; ?>
     136            >
     137            </quadpay-widget<?php echo $tag_version_suffix ?>>
    123138        </div>
    124139        <?php
     
    143158        $widget_wrapper       = $this->settings->get_option( 'cart_widget_wrapper', '' );
    144159        $widget_customization = $this->settings->get_option( 'cart_widget_customization', '' );
     160        $merchantId           = $this->settings->get_option( 'merchant_id', '' );
    145161
    146162        $tag_version_suffix = ( $this->settings->get_option_bool( 'widget_backward_compatibility' ) ) ? '' : '-v3';
     
    149165        ?>
    150166        <div style="min-height:20px;<?php echo $widget_wrapper; ?>">
    151             <quadpay-widget<?php echo $tag_version_suffix ?> amount="<?php echo $amount; ?>" <?php echo $widget_customization; ?>></quadpay-widget<?php echo $tag_version_suffix ?>>
     167            <quadpay-widget<?php echo $tag_version_suffix ?>
     168                amount="<?php echo $amount; ?>"
     169            <?php if (!empty($merchantId)):?>
     170                merchantId="<?php echo $merchantId; ?>"
     171            <?php endif; ?>
     172                <?php echo $widget_customization; ?>>
     173            </quadpay-widget<?php echo $tag_version_suffix ?>>
    152174        </div>
    153175        <?php
     
    169191        $widget_wrapper       = $this->settings->get_option( 'payment_widget_wrapper', '' );
    170192        $widget_customization = $this->settings->get_option( 'payment_widget_customization', '' );
     193        $merchantId           = $this->settings->get_option( 'merchant_id', '' );
    171194
    172195        ob_start();
    173196        ?>
    174197        <div style="<?php echo $widget_wrapper; ?>">
    175             <zip-payment-widget amount="<?php echo $amount; ?>" <?php echo $widget_customization; ?>></zip-payment-widget>
     198            <zip-payment-widget amount="<?php echo $amount; ?>"
     199            <?php if (!empty($merchantId)):?>
     200                merchantId="<?php echo $merchantId; ?>"
     201            <?php endif; ?>
     202                <?php echo $widget_customization; ?>>
     203            </zip-payment-widget>
    176204        </div>
    177205        <?php
  • quadpay-gateway-for-woocommerce/tags/1.7.2/quadpay.php

    r2782373 r2907044  
    55Author: Zip Co Limited
    66Author URI: https://zip.co
    7 Version: 1.7.1
     7Version: 1.7.2
    88WC requires at least: 3.1.0
    9 WC tested up to: 6.8
     9WC tested up to: 7.5
    1010*/
    1111
    12 define( 'QUADPAY_WC_VERSION', '1.7.1' );
     12define( 'QUADPAY_WC_VERSION', '1.7.2' );
    1313define( 'QUADPAY_WC_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    1414
  • quadpay-gateway-for-woocommerce/tags/1.7.2/readme.txt

    r2782391 r2907044  
    33* Tags: QuadPay, WooCommerce, payment, gateway
    44* Requires at least: 4.7
    5 * Tested up to: 6.0
    6 * Stable tag: 1.7.1
     5* Tested up to: 6.2
     6* Stable tag: 1.7.2
    77* Requires PHP: 7.0
    88* License: GPLv3
     
    5858
    5959== Changelog ==
     60= 1.7.2 =
     61* Added merchantId to widget tag if it is set in Payment settings
     62* Compatibility - tested up to WordPress 6.2
     63* Compatibility - tested up to WooCommerce 7.5
    6064
    6165= 1.7.1 =
  • quadpay-gateway-for-woocommerce/trunk/includes/class-quadpay-settings.php

    r2712100 r2907044  
    120120                'default'     => '',
    121121            ),
     122            'merchant_id' => array(
     123                'title'       => __( 'Merchant ID', 'woo_quadpay' ),
     124                'type'        => 'text',
     125                'description' => __( 'Zip Merchant ID credential.', 'woo_quadpay' ),
     126                'default'     => '',
     127            ),
    122128            'mfpp' => array(
    123129                'title'       => __( 'Merchant Fee for Payment Plan', 'woo_quadpay' ),
     
    126132                'description' => __( 'Enable only if option is arranged and configured on Zip side. When enabled, fee may be applied to customers choosing Zip.', 'woo_quadpay' ),
    127133                'default'     => 'no'
    128             ),
    129             'merchant_id' => array(
    130                 'title'       => __( 'Merchant ID', 'woo_quadpay' ),
    131                 'type'        => 'text',
    132                 'description' => __( 'Zip Merchant ID credential. Needed only if MFPP is enabled.', 'woo_quadpay' ),
    133                 'default'     => '',
    134134            ),
    135135            'logging' => array(
  • quadpay-gateway-for-woocommerce/trunk/includes/class-quadpay-widget.php

    r2688749 r2907044  
    7676        $widget_wrapper       = $this->settings->get_option( 'product_page_widget_wrapper', '' );
    7777        $widget_customization = $this->settings->get_option( 'product_page_widget_customization', '' );
     78        $merchantId           = $this->settings->get_option( 'merchant_id', '' );
    7879
    7980        $price = $product->get_price();
     
    8384        ?>
    8485        <div style="min-height:20px;<?php echo $widget_wrapper; ?>">
    85             <quadpay-widget<?php echo $tag_version_suffix ?> amount="<?php echo $price; ?>" <?php echo $widget_customization; ?>></quadpay-widget<?php echo $tag_version_suffix ?>>
     86            <quadpay-widget<?php echo $tag_version_suffix ?>
     87                amount="<?php echo $price; ?>"
     88            <?php if (!empty($merchantId)):?>
     89                merchantId="<?php echo $merchantId; ?>"
     90            <?php endif; ?>
     91                <?php echo $widget_customization; ?>>
     92            </quadpay-widget<?php echo $tag_version_suffix ?>>
    8693        </div>
    8794        <?php
     
    113120        $widget_wrapper       = $this->settings->get_option( 'product_page_widget_wrapper', '' );
    114121        $widget_customization = $this->settings->get_option( 'product_page_widget_customization', '' );
     122        $merchantId           = $this->settings->get_option( 'merchant_id', '' );
    115123
    116124        $price = $product->get_price();
     
    120128        ?>
    121129        <div style="min-height:20px;<?php echo $widget_wrapper; ?>">
    122             <quadpay-widget<?php echo $tag_version_suffix ?> amount="<?php echo $price; ?>" <?php echo $widget_customization; ?>></quadpay-widget<?php echo $tag_version_suffix ?>>
     130            <quadpay-widget<?php echo $tag_version_suffix ?>
     131                amount="<?php echo $price; ?>"
     132            <?php if (!empty($merchantId)):?>
     133                merchantId="<?php echo $merchantId; ?>"
     134            <?php endif; ?>
     135                <?php echo $widget_customization; ?>
     136            >
     137            </quadpay-widget<?php echo $tag_version_suffix ?>>
    123138        </div>
    124139        <?php
     
    143158        $widget_wrapper       = $this->settings->get_option( 'cart_widget_wrapper', '' );
    144159        $widget_customization = $this->settings->get_option( 'cart_widget_customization', '' );
     160        $merchantId           = $this->settings->get_option( 'merchant_id', '' );
    145161
    146162        $tag_version_suffix = ( $this->settings->get_option_bool( 'widget_backward_compatibility' ) ) ? '' : '-v3';
     
    149165        ?>
    150166        <div style="min-height:20px;<?php echo $widget_wrapper; ?>">
    151             <quadpay-widget<?php echo $tag_version_suffix ?> amount="<?php echo $amount; ?>" <?php echo $widget_customization; ?>></quadpay-widget<?php echo $tag_version_suffix ?>>
     167            <quadpay-widget<?php echo $tag_version_suffix ?>
     168                amount="<?php echo $amount; ?>"
     169            <?php if (!empty($merchantId)):?>
     170                merchantId="<?php echo $merchantId; ?>"
     171            <?php endif; ?>
     172                <?php echo $widget_customization; ?>>
     173            </quadpay-widget<?php echo $tag_version_suffix ?>>
    152174        </div>
    153175        <?php
     
    169191        $widget_wrapper       = $this->settings->get_option( 'payment_widget_wrapper', '' );
    170192        $widget_customization = $this->settings->get_option( 'payment_widget_customization', '' );
     193        $merchantId           = $this->settings->get_option( 'merchant_id', '' );
    171194
    172195        ob_start();
    173196        ?>
    174197        <div style="<?php echo $widget_wrapper; ?>">
    175             <zip-payment-widget amount="<?php echo $amount; ?>" <?php echo $widget_customization; ?>></zip-payment-widget>
     198            <zip-payment-widget amount="<?php echo $amount; ?>"
     199            <?php if (!empty($merchantId)):?>
     200                merchantId="<?php echo $merchantId; ?>"
     201            <?php endif; ?>
     202                <?php echo $widget_customization; ?>>
     203            </zip-payment-widget>
    176204        </div>
    177205        <?php
  • quadpay-gateway-for-woocommerce/trunk/quadpay.php

    r2782373 r2907044  
    55Author: Zip Co Limited
    66Author URI: https://zip.co
    7 Version: 1.7.1
     7Version: 1.7.2
    88WC requires at least: 3.1.0
    9 WC tested up to: 6.8
     9WC tested up to: 7.5
    1010*/
    1111
    12 define( 'QUADPAY_WC_VERSION', '1.7.1' );
     12define( 'QUADPAY_WC_VERSION', '1.7.2' );
    1313define( 'QUADPAY_WC_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    1414
  • quadpay-gateway-for-woocommerce/trunk/readme.txt

    r2782391 r2907044  
    33* Tags: QuadPay, WooCommerce, payment, gateway
    44* Requires at least: 4.7
    5 * Tested up to: 6.0
    6 * Stable tag: 1.7.1
     5* Tested up to: 6.2
     6* Stable tag: 1.7.2
    77* Requires PHP: 7.0
    88* License: GPLv3
     
    5858
    5959== Changelog ==
     60= 1.7.2 =
     61* Added merchantId to widget tag if it is set in Payment settings
     62* Compatibility - tested up to WordPress 6.2
     63* Compatibility - tested up to WooCommerce 7.5
    6064
    6165= 1.7.1 =
Note: See TracChangeset for help on using the changeset viewer.