Plugin Directory

Changeset 2957840


Ignore:
Timestamp:
08/24/2023 11:25:40 AM (2 years ago)
Author:
cryptapi
Message:

v4.7.9 - new features and bugfixes

Location:
cryptapi-payment-gateway-for-woocommerce
Files:
5 edited
8 copied

Legend:

Unmodified
Added
Removed
  • cryptapi-payment-gateway-for-woocommerce/tags/4.7.9/CryptAPI.php

    r2945994 r2957840  
    44Plugin URI: https://github.com/cryptapi/woocommerce-cryptapi
    55Description: Accept cryptocurrency payments on your WooCommerce website
    6 Version: 4.7.8
     6Version: 4.7.9
    77Requires at least: 5
    88Tested up to: 6.3
    99WC requires at least: 5.8
    10 WC tested up to: 7.9.0
     10WC tested up to: 8.0.2
    1111Requires PHP: 7.2
    1212Author: cryptapi
     
    132132    wp_schedule_event(time(), 'cryptapi_interval', 'cryptapi_cronjob');
    133133}
     134
     135add_action('before_woocommerce_init', function () {
     136    if (class_exists(\Automattic\WooCommerce\Utilities\FeaturesUtil::class)) {
     137        \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('custom_order_tables', __FILE__, true);
     138    }
     139});
  • cryptapi-payment-gateway-for-woocommerce/tags/4.7.9/README.md

    r2945994 r2957840  
    1414### Description
    1515
    16 Accept payments in Bitcoin, Bitcoin Cash, Litecoin, Ethereum, Monero and IOTA directly to your crypto wallet, without any sign-ups or lengthy processes.
     16Accept payments in Bitcoin, Bitcoin Cash, Litecoin, Ethereum and USDT directly to your crypto wallet, without any sign-ups or lengthy processes.
    1717All you need is to provide your crypto address.
    1818
     
    2727* (BCH) Bitcoin Cash
    2828* (LTC) Litecoin
    29 * (XMR) Monero
    3029* (TRX) Tron
    3130* (BNB) Binance Coin
    3231* (USDT) USDT
     32* (SHIB) Shiba Inu
     33* (DOGE) Dogecoin
     34* (MATIC) Matic
    3335
    3436among many others, for a full list of the supported cryptocurrencies and tokens, check [this page](https://cryptapi.io/pricing/).
     
    350352* Minor fixes
    351353
     354#### 4.7.9
     355* Support for WooCommerce HPOS.
     356* Minor fixes
     357
    352358### Upgrade Notice
    353359#### 4.3
  • cryptapi-payment-gateway-for-woocommerce/tags/4.7.9/controllers/CryptAPI.php

    r2945994 r2957840  
    454454                    jQuery('#payment_cryptapi_coin').selectWoo({
    455455                        minimumResultsForSearch: -1,
    456                         templateResult: formatState,
    457                     });
     456                        templateResult: formatState
     457                    })
    458458
    459459                    function formatState(opt) {
    460460                        if (!opt.id) {
    461                             return opt.text;
     461                            return opt.text
    462462                        }
    463                         let optImage = jQuery(opt.element).attr('data-image');
     463                        let optImage = jQuery(opt.element).attr('data-image')
    464464                        if (!optImage) {
    465                             return opt.text;
     465                            return opt.text
    466466                        } else {
    467                             return jQuery('<span style="display:flex; align-items:center;"><img style="margin-right: 8px" src="' + optImage + '" width="24px" alt="' + opt.text + '" /> ' + opt.text + '</span>');
     467                            return jQuery('<span style="display:flex; align-items:center;"><img style="margin-right: 8px" src="' + optImage + '" width="24px" alt="' + opt.text + '" /> ' + opt.text + '</span>')
    468468                        }
    469469                    }
     
    669669                'order_history' => json_decode($order->get_meta('cryptapi_history'), true),
    670670                'counter' => (string)$counter_calc,
    671                 'crypto_total' => (float) $order->get_meta('cryptapi_total'),
     671                'crypto_total' => (float)$order->get_meta('cryptapi_total'),
    672672                'already_paid' => $already_paid,
    673                 'remaining' => (float) $remaining_pending <= 0 ? 0 : $remaining_pending,
    674                 'fiat_remaining' => (float) $remaining_fiat <= 0 ? 0 : $remaining_fiat,
    675                 'already_paid_fiat' => (float) $already_paid_fiat <= 0 ? 0 : $already_paid_fiat,
     673                'remaining' => (float)$remaining_pending <= 0 ? 0 : $remaining_pending,
     674                'fiat_remaining' => (float)$remaining_fiat <= 0 ? 0 : $remaining_fiat,
     675                'already_paid_fiat' => (float)$already_paid_fiat <= 0 ? 0 : $already_paid_fiat,
    676676                'fiat_symbol' => get_woocommerce_currency_symbol(),
    677677            ];
     
    769769        $remaining_pending = $calc['remaining_pending'];
    770770
    771         $order_notes = $this->get_private_order_notes($order->get_id());
     771        $order_notes = $this->get_private_order_notes($order);
    772772
    773773        $has_pending = false;
     
    14521452    }
    14531453
    1454     function get_private_order_notes($order_id)
    1455     {
    1456         global $wpdb;
    1457 
    1458         $table_perfixed = $wpdb->prefix . 'comments';
    1459         $results = $wpdb->get_results("
    1460         SELECT *
    1461         FROM $table_perfixed
    1462         WHERE  `comment_post_ID` = $order_id
    1463         AND  `comment_type` LIKE  'order_note'
    1464     ");
     1454    function get_private_order_notes($order)
     1455    {
     1456        $results = wc_get_order_notes([
     1457            'order_in' => $order->get_id(),
     1458            'order__in' => $order->get_id()
     1459        ]);
    14651460
    14661461        foreach ($results as $note) {
    1467             $order_note[] = array(
    1468                 'note_id' => $note->comment_ID,
    1469                 'note_date' => $note->comment_date,
    1470                 'note_author' => $note->comment_author,
    1471                 'note_content' => $note->comment_content,
    1472             );
     1462            if (!$note->customer_note) {
     1463                $order_note[] = array(
     1464                    'note_id' => $note->id,
     1465                    'note_date' => $note->date_created,
     1466                    'note_content' => $note->content,
     1467                );
     1468            }
    14731469        }
    14741470
     
    15051501        <script>
    15061502            jQuery(function () {
    1507                 const validate_button = jQuery('#validate_callbacks');
     1503                const validate_button = jQuery('#validate_callbacks')
    15081504
    15091505                validate_button.on('click', function (e) {
    1510                     e.preventDefault();
    1511                     validate_callbacks();
    1512                     validate_button.html('<?php echo esc_attr(__('Checking', 'cryptapi'));?>');
     1506                    e.preventDefault()
     1507                    validate_callbacks()
     1508                    validate_button.html('<?php echo esc_attr(__('Checking', 'cryptapi'));?>')
    15131509                })
    15141510
    15151511                function validate_callbacks() {
    15161512                    jQuery.getJSON('<?php echo $ajax_url?>').always(function () {
    1517                         window.location.reload();
     1513                        window.location.reload()
    15181514                    })
    15191515                }
  • cryptapi-payment-gateway-for-woocommerce/tags/4.7.9/define.php

    r2945994 r2957840  
    11<?php
    22
    3 define('CRYPTAPI_PLUGIN_VERSION', '4.7.8');
     3define('CRYPTAPI_PLUGIN_VERSION', '4.7.9');
    44define('CRYPTAPI_PLUGIN_PATH', plugin_dir_path(__FILE__));
    55define('CRYPTAPI_PLUGIN_URL', plugin_dir_url(__FILE__));
  • cryptapi-payment-gateway-for-woocommerce/tags/4.7.9/readme.txt

    r2945994 r2957840  
    11=== CryptAPI Payment Gateway for WooCommerce ===
    22Contributors: cryptapi
    3 Tags: crypto payments, woocommerce, payment gateway, crypto, payment, pay with crypto, payment request, bitcoin, bnb, usdt, ethereum, monero, litecoin, bitcoin cash, shib, doge
     3Tags: crypto payments, woocommerce, payment gateway, crypto, payment, pay with crypto, payment request, bitcoin, bnb, usdt, ethereum, litecoin, bitcoin cash, shib, doge
    44Requires at least: 5
    55Tested up to: 6.3
    6 Stable tag: 4.7.8
     6Stable tag: 4.7.9
    77Requires PHP: 7.2
    88WC requires at least: 5.8
    9 WC tested up to: 7.9.0
     9WC tested up to: 8.0.2
    1010License: MIT
    1111
     
    1515== Description ==
    1616
    17 Accept payments in Bitcoin, Ethereum, Bitcoin Cash, Litecoin, Monero, BNB, USDT, SHIB, DOGE and many more directly to your crypto wallet, without any sign-ups or lengthy processes.
     17Accept payments in Bitcoin, Ethereum, Bitcoin Cash, Litecoin, BNB, USDT, SHIB, DOGE and many more directly to your crypto wallet, without any sign-ups or lengthy processes.
    1818All you need is to provide your crypto address.
    1919
     
    350350* Minor fixes
    351351
     352= 4.7.9 =
     353* Support for WooCommerce HPOS.
     354* Minor fixes
     355
    352356== Upgrade Notice ==
    353357
  • cryptapi-payment-gateway-for-woocommerce/trunk/CryptAPI.php

    r2945994 r2957840  
    44Plugin URI: https://github.com/cryptapi/woocommerce-cryptapi
    55Description: Accept cryptocurrency payments on your WooCommerce website
    6 Version: 4.7.8
     6Version: 4.7.9
    77Requires at least: 5
    88Tested up to: 6.3
    99WC requires at least: 5.8
    10 WC tested up to: 7.9.0
     10WC tested up to: 8.0.2
    1111Requires PHP: 7.2
    1212Author: cryptapi
     
    132132    wp_schedule_event(time(), 'cryptapi_interval', 'cryptapi_cronjob');
    133133}
     134
     135add_action('before_woocommerce_init', function () {
     136    if (class_exists(\Automattic\WooCommerce\Utilities\FeaturesUtil::class)) {
     137        \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('custom_order_tables', __FILE__, true);
     138    }
     139});
  • cryptapi-payment-gateway-for-woocommerce/trunk/README.md

    r2945994 r2957840  
    1414### Description
    1515
    16 Accept payments in Bitcoin, Bitcoin Cash, Litecoin, Ethereum, Monero and IOTA directly to your crypto wallet, without any sign-ups or lengthy processes.
     16Accept payments in Bitcoin, Bitcoin Cash, Litecoin, Ethereum and USDT directly to your crypto wallet, without any sign-ups or lengthy processes.
    1717All you need is to provide your crypto address.
    1818
     
    2727* (BCH) Bitcoin Cash
    2828* (LTC) Litecoin
    29 * (XMR) Monero
    3029* (TRX) Tron
    3130* (BNB) Binance Coin
    3231* (USDT) USDT
     32* (SHIB) Shiba Inu
     33* (DOGE) Dogecoin
     34* (MATIC) Matic
    3335
    3436among many others, for a full list of the supported cryptocurrencies and tokens, check [this page](https://cryptapi.io/pricing/).
     
    350352* Minor fixes
    351353
     354#### 4.7.9
     355* Support for WooCommerce HPOS.
     356* Minor fixes
     357
    352358### Upgrade Notice
    353359#### 4.3
  • cryptapi-payment-gateway-for-woocommerce/trunk/controllers/CryptAPI.php

    r2945994 r2957840  
    454454                    jQuery('#payment_cryptapi_coin').selectWoo({
    455455                        minimumResultsForSearch: -1,
    456                         templateResult: formatState,
    457                     });
     456                        templateResult: formatState
     457                    })
    458458
    459459                    function formatState(opt) {
    460460                        if (!opt.id) {
    461                             return opt.text;
     461                            return opt.text
    462462                        }
    463                         let optImage = jQuery(opt.element).attr('data-image');
     463                        let optImage = jQuery(opt.element).attr('data-image')
    464464                        if (!optImage) {
    465                             return opt.text;
     465                            return opt.text
    466466                        } else {
    467                             return jQuery('<span style="display:flex; align-items:center;"><img style="margin-right: 8px" src="' + optImage + '" width="24px" alt="' + opt.text + '" /> ' + opt.text + '</span>');
     467                            return jQuery('<span style="display:flex; align-items:center;"><img style="margin-right: 8px" src="' + optImage + '" width="24px" alt="' + opt.text + '" /> ' + opt.text + '</span>')
    468468                        }
    469469                    }
     
    669669                'order_history' => json_decode($order->get_meta('cryptapi_history'), true),
    670670                'counter' => (string)$counter_calc,
    671                 'crypto_total' => (float) $order->get_meta('cryptapi_total'),
     671                'crypto_total' => (float)$order->get_meta('cryptapi_total'),
    672672                'already_paid' => $already_paid,
    673                 'remaining' => (float) $remaining_pending <= 0 ? 0 : $remaining_pending,
    674                 'fiat_remaining' => (float) $remaining_fiat <= 0 ? 0 : $remaining_fiat,
    675                 'already_paid_fiat' => (float) $already_paid_fiat <= 0 ? 0 : $already_paid_fiat,
     673                'remaining' => (float)$remaining_pending <= 0 ? 0 : $remaining_pending,
     674                'fiat_remaining' => (float)$remaining_fiat <= 0 ? 0 : $remaining_fiat,
     675                'already_paid_fiat' => (float)$already_paid_fiat <= 0 ? 0 : $already_paid_fiat,
    676676                'fiat_symbol' => get_woocommerce_currency_symbol(),
    677677            ];
     
    769769        $remaining_pending = $calc['remaining_pending'];
    770770
    771         $order_notes = $this->get_private_order_notes($order->get_id());
     771        $order_notes = $this->get_private_order_notes($order);
    772772
    773773        $has_pending = false;
     
    14521452    }
    14531453
    1454     function get_private_order_notes($order_id)
    1455     {
    1456         global $wpdb;
    1457 
    1458         $table_perfixed = $wpdb->prefix . 'comments';
    1459         $results = $wpdb->get_results("
    1460         SELECT *
    1461         FROM $table_perfixed
    1462         WHERE  `comment_post_ID` = $order_id
    1463         AND  `comment_type` LIKE  'order_note'
    1464     ");
     1454    function get_private_order_notes($order)
     1455    {
     1456        $results = wc_get_order_notes([
     1457            'order_in' => $order->get_id(),
     1458            'order__in' => $order->get_id()
     1459        ]);
    14651460
    14661461        foreach ($results as $note) {
    1467             $order_note[] = array(
    1468                 'note_id' => $note->comment_ID,
    1469                 'note_date' => $note->comment_date,
    1470                 'note_author' => $note->comment_author,
    1471                 'note_content' => $note->comment_content,
    1472             );
     1462            if (!$note->customer_note) {
     1463                $order_note[] = array(
     1464                    'note_id' => $note->id,
     1465                    'note_date' => $note->date_created,
     1466                    'note_content' => $note->content,
     1467                );
     1468            }
    14731469        }
    14741470
     
    15051501        <script>
    15061502            jQuery(function () {
    1507                 const validate_button = jQuery('#validate_callbacks');
     1503                const validate_button = jQuery('#validate_callbacks')
    15081504
    15091505                validate_button.on('click', function (e) {
    1510                     e.preventDefault();
    1511                     validate_callbacks();
    1512                     validate_button.html('<?php echo esc_attr(__('Checking', 'cryptapi'));?>');
     1506                    e.preventDefault()
     1507                    validate_callbacks()
     1508                    validate_button.html('<?php echo esc_attr(__('Checking', 'cryptapi'));?>')
    15131509                })
    15141510
    15151511                function validate_callbacks() {
    15161512                    jQuery.getJSON('<?php echo $ajax_url?>').always(function () {
    1517                         window.location.reload();
     1513                        window.location.reload()
    15181514                    })
    15191515                }
  • cryptapi-payment-gateway-for-woocommerce/trunk/define.php

    r2945994 r2957840  
    11<?php
    22
    3 define('CRYPTAPI_PLUGIN_VERSION', '4.7.8');
     3define('CRYPTAPI_PLUGIN_VERSION', '4.7.9');
    44define('CRYPTAPI_PLUGIN_PATH', plugin_dir_path(__FILE__));
    55define('CRYPTAPI_PLUGIN_URL', plugin_dir_url(__FILE__));
  • cryptapi-payment-gateway-for-woocommerce/trunk/readme.txt

    r2945994 r2957840  
    11=== CryptAPI Payment Gateway for WooCommerce ===
    22Contributors: cryptapi
    3 Tags: crypto payments, woocommerce, payment gateway, crypto, payment, pay with crypto, payment request, bitcoin, bnb, usdt, ethereum, monero, litecoin, bitcoin cash, shib, doge
     3Tags: crypto payments, woocommerce, payment gateway, crypto, payment, pay with crypto, payment request, bitcoin, bnb, usdt, ethereum, litecoin, bitcoin cash, shib, doge
    44Requires at least: 5
    55Tested up to: 6.3
    6 Stable tag: 4.7.8
     6Stable tag: 4.7.9
    77Requires PHP: 7.2
    88WC requires at least: 5.8
    9 WC tested up to: 7.9.0
     9WC tested up to: 8.0.2
    1010License: MIT
    1111
     
    1515== Description ==
    1616
    17 Accept payments in Bitcoin, Ethereum, Bitcoin Cash, Litecoin, Monero, BNB, USDT, SHIB, DOGE and many more directly to your crypto wallet, without any sign-ups or lengthy processes.
     17Accept payments in Bitcoin, Ethereum, Bitcoin Cash, Litecoin, BNB, USDT, SHIB, DOGE and many more directly to your crypto wallet, without any sign-ups or lengthy processes.
    1818All you need is to provide your crypto address.
    1919
     
    350350* Minor fixes
    351351
     352= 4.7.9 =
     353* Support for WooCommerce HPOS.
     354* Minor fixes
     355
    352356== Upgrade Notice ==
    353357
Note: See TracChangeset for help on using the changeset viewer.