Plugin Directory

Changeset 2872540


Ignore:
Timestamp:
02/28/2023 04:57:15 PM (3 years ago)
Author:
solpressplugins
Message:

v2.0.6: fixing bugs

Location:
solpress-payment-gateway
Files:
2 deleted
6 edited
41 copied

Legend:

Unmodified
Added
Removed
  • solpress-payment-gateway/tags/2.0.6/changes.txt

    r2868534 r2872540  
     1### 2023.02.28
     2- Fixing file conflicts caused by version updates.
     3### 2023.02.24
     4- Fixed issue with saving custom currency failing.
     5
    16### 2023.02.21
    27- Added fields for custom classes for payment buttons on the WC settings page.
  • solpress-payment-gateway/tags/2.0.6/includes/class-wc-solpress-solana.php

    r2868534 r2872540  
    114114        if (strlen($this->get_option('custom_spl_symbol')) > 0 && strlen($this->get_option('custom_spl_name')) > 0) {
    115115            $this->addCustomTokenCurrency();
    116         }
    117 
     116
     117            add_action( 'woocommerce_settings_pricing_options', 'my_custom_pricing_options_description' );
     118            function my_custom_pricing_options_description( ) {
     119                ?>
     120                <p><?php echo esc_html( 'The currency is set by Solpress Payment Gateway.' ); ?></p>
     121                <?php
     122               
     123            }
     124
     125        }     
     126       
    118127    }
    119128
     
    125134         * Custom currency and currency symbol
    126135         */
    127         add_filter('woocommerce_currencies', function($currencies) use ($token_name){
    128             $currencies['CSPLT'] = __( $token_name , 'woocommerce');
     136        add_filter('woocommerce_currencies', function($currencies) use ($token_name, $token_symbol){
     137            $currencies[$token_symbol] = __( $token_name , 'woocommerce');
    129138            return $currencies;
    130139        });
     
    132141        add_filter('woocommerce_currency_symbol', function ($currency_symbol, $currency) use($token_symbol) {
    133142            switch ($currency) {
    134                 case 'CSPLT':
     143                case $token_symbol:
    135144                    $currency_symbol = $token_symbol;
    136145                    break;
     
    139148        }, 10, 2);
    140149
     150        update_option('woocommerce_currency', $token_symbol);
    141151
    142152    }
     
    338348            $transaction_token = 'Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr';
    339349        } else {
    340             $end_point =  strlen($this->network_url) > 0 ? $this->network_url : $default_mainnet_rpc;
     350            $end_point =  $this->network_url;
    341351            $transaction_token = strlen($this->custom_spl_token) > 0 && $this->custom_spl_enabled !== 'no' ? $this->custom_spl_token : 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
    342352        }
     
    372382                if (!is_wp_error($confirmed)) {
    373383                    $confirmed_body = isset($confirmed['body']) ? json_decode($confirmed['body'], true) : array();
    374                     // $this->memo = $this->generate_memo();
    375384                    $program_index = $confirmed_body['result']['transaction']['message']['instructions'][0]['programIdIndex'];
    376385                    $program_account = $confirmed_body['result']['transaction']['message']['accountKeys'][$program_index];
  • solpress-payment-gateway/tags/2.0.6/readme.txt

    r2868534 r2872540  
    22Contributors: solpressplugins
    33Donate link: https://solpress.dev
    4 Tags: solana pay, woocommerce, payment, payment gateway, solana, crypto, phantom, phantom wallet
     4Tags: solana pay, woocommerce, payment, payment gateway, solana, crypto, phantom, phantom wallet, crypto payment, crypto woocommerce, payment crypto
    55Requires at least: 4.7
    66Tested up to: 6.1
    7 Stable tag: 2.0.0
     7Stable tag: 2.0.6
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    4646
    4747= 1.0 =
    48 * Initial launch of plugin supporting Phantom wallet and USDC on Solana.
     48* Initial launch of plugin supporting Phantom wallet and USDC on Solana.
     49
     50Read `./changes.txt` for bug fixes.
  • solpress-payment-gateway/tags/2.0.6/solpress.php

    r2868543 r2872540  
    1717 * Plugin URI:        https://solpress.dev
    1818 * Description:       A payment gateway using Solana Pay for your WooCommerce store.
    19  * Version:           2.0.0
     19 * Version:           2.0.6
    2020 * Author:            Solpress
    2121 * Author URI:        https://profiles.wordpress.org/solpressplugins/
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define( 'SOLPRESS_VERSION', '2.0.0' );
     38define( 'SOLPRESS_VERSION', '2.0.6' );
    3939define( 'SOLPRESS_ROOT', plugin_dir_path( __FILE__ ) );
    4040define( 'SOLPRESS_ASSETS', SOLPRESS_ROOT . '/assets/' );
  • solpress-payment-gateway/tags/2.0.6/utils/run_phpcs.sh

    r2868534 r2872540  
    1 rm -f wp-vip-go.txt && phpcs --standard=WordPress-VIP-Go -sp --basepath=. --ignore='vendor' --extensions=php . > wp-vip-go.txt & rm -f wp-var-analysis.txt &&  phpcs --standard=VariableAnalysis -sp --basepath=. --ignore='vendor' --extensions=php . > wp-var-analysis.txt & rm -f wp-vip-min.txt &&  phpcs --standard=WordPressVIPMinimum -sp --basepath=. --ignore='vendor' --extensions=php . > wp-vip-min.txt  &
     1rm -f wp-vip-go.txt && phpcs --standard=WordPress-VIP-Go -sp --basepath=. --ignore='vendor,release' --extensions=php . > wp-vip-go.txt & rm -f wp-var-analysis.txt &&  phpcs --standard=VariableAnalysis -sp --basepath=. --ignore='vendor,release' --extensions=php . > wp-var-analysis.txt & rm -f wp-vip-min.txt &&  phpcs --standard=WordPressVIPMinimum -sp --basepath=. --ignore='vendor,release' --extensions=php . > wp-vip-min.txt  &
  • solpress-payment-gateway/trunk/changes.txt

    r2868534 r2872540  
     1### 2023.02.28
     2- Fixing file conflicts caused by version updates.
     3### 2023.02.24
     4- Fixed issue with saving custom currency failing.
     5
    16### 2023.02.21
    27- Added fields for custom classes for payment buttons on the WC settings page.
  • solpress-payment-gateway/trunk/includes/class-wc-solpress-solana.php

    r2868534 r2872540  
    114114        if (strlen($this->get_option('custom_spl_symbol')) > 0 && strlen($this->get_option('custom_spl_name')) > 0) {
    115115            $this->addCustomTokenCurrency();
    116         }
    117 
     116
     117            add_action( 'woocommerce_settings_pricing_options', 'my_custom_pricing_options_description' );
     118            function my_custom_pricing_options_description( ) {
     119                ?>
     120                <p><?php echo esc_html( 'The currency is set by Solpress Payment Gateway.' ); ?></p>
     121                <?php
     122               
     123            }
     124
     125        }     
     126       
    118127    }
    119128
     
    125134         * Custom currency and currency symbol
    126135         */
    127         add_filter('woocommerce_currencies', function($currencies) use ($token_name){
    128             $currencies['CSPLT'] = __( $token_name , 'woocommerce');
     136        add_filter('woocommerce_currencies', function($currencies) use ($token_name, $token_symbol){
     137            $currencies[$token_symbol] = __( $token_name , 'woocommerce');
    129138            return $currencies;
    130139        });
     
    132141        add_filter('woocommerce_currency_symbol', function ($currency_symbol, $currency) use($token_symbol) {
    133142            switch ($currency) {
    134                 case 'CSPLT':
     143                case $token_symbol:
    135144                    $currency_symbol = $token_symbol;
    136145                    break;
     
    139148        }, 10, 2);
    140149
     150        update_option('woocommerce_currency', $token_symbol);
    141151
    142152    }
     
    338348            $transaction_token = 'Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr';
    339349        } else {
    340             $end_point =  strlen($this->network_url) > 0 ? $this->network_url : $default_mainnet_rpc;
     350            $end_point =  $this->network_url;
    341351            $transaction_token = strlen($this->custom_spl_token) > 0 && $this->custom_spl_enabled !== 'no' ? $this->custom_spl_token : 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
    342352        }
     
    372382                if (!is_wp_error($confirmed)) {
    373383                    $confirmed_body = isset($confirmed['body']) ? json_decode($confirmed['body'], true) : array();
    374                     // $this->memo = $this->generate_memo();
    375384                    $program_index = $confirmed_body['result']['transaction']['message']['instructions'][0]['programIdIndex'];
    376385                    $program_account = $confirmed_body['result']['transaction']['message']['accountKeys'][$program_index];
  • solpress-payment-gateway/trunk/readme.txt

    r2868534 r2872540  
    22Contributors: solpressplugins
    33Donate link: https://solpress.dev
    4 Tags: solana pay, woocommerce, payment, payment gateway, solana, crypto, phantom, phantom wallet
     4Tags: solana pay, woocommerce, payment, payment gateway, solana, crypto, phantom, phantom wallet, crypto payment, crypto woocommerce, payment crypto
    55Requires at least: 4.7
    66Tested up to: 6.1
    7 Stable tag: 2.0.0
     7Stable tag: 2.0.6
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    4646
    4747= 1.0 =
    48 * Initial launch of plugin supporting Phantom wallet and USDC on Solana.
     48* Initial launch of plugin supporting Phantom wallet and USDC on Solana.
     49
     50Read `./changes.txt` for bug fixes.
  • solpress-payment-gateway/trunk/solpress.php

    r2868543 r2872540  
    1717 * Plugin URI:        https://solpress.dev
    1818 * Description:       A payment gateway using Solana Pay for your WooCommerce store.
    19  * Version:           2.0.0
     19 * Version:           2.0.6
    2020 * Author:            Solpress
    2121 * Author URI:        https://profiles.wordpress.org/solpressplugins/
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define( 'SOLPRESS_VERSION', '2.0.0' );
     38define( 'SOLPRESS_VERSION', '2.0.6' );
    3939define( 'SOLPRESS_ROOT', plugin_dir_path( __FILE__ ) );
    4040define( 'SOLPRESS_ASSETS', SOLPRESS_ROOT . '/assets/' );
  • solpress-payment-gateway/trunk/utils/run_phpcs.sh

    r2868534 r2872540  
    1 rm -f wp-vip-go.txt && phpcs --standard=WordPress-VIP-Go -sp --basepath=. --ignore='vendor' --extensions=php . > wp-vip-go.txt & rm -f wp-var-analysis.txt &&  phpcs --standard=VariableAnalysis -sp --basepath=. --ignore='vendor' --extensions=php . > wp-var-analysis.txt & rm -f wp-vip-min.txt &&  phpcs --standard=WordPressVIPMinimum -sp --basepath=. --ignore='vendor' --extensions=php . > wp-vip-min.txt  &
     1rm -f wp-vip-go.txt && phpcs --standard=WordPress-VIP-Go -sp --basepath=. --ignore='vendor,release' --extensions=php . > wp-vip-go.txt & rm -f wp-var-analysis.txt &&  phpcs --standard=VariableAnalysis -sp --basepath=. --ignore='vendor,release' --extensions=php . > wp-var-analysis.txt & rm -f wp-vip-min.txt &&  phpcs --standard=WordPressVIPMinimum -sp --basepath=. --ignore='vendor,release' --extensions=php . > wp-vip-min.txt  &
Note: See TracChangeset for help on using the changeset viewer.