Plugin Directory

Changeset 3039963


Ignore:
Timestamp:
02/22/2024 11:29:11 PM (2 years ago)
Author:
starnetwork
Message:

add woo blocks support
add support to Woo v8.5+
bugfixing

Location:
wc-smartpay/trunk
Files:
5 added
4 edited

Legend:

Unmodified
Added
Removed
  • wc-smartpay/trunk/README.md

    r3039652 r3039963  
    11=== SmartPay for WooCommerce ===
    2 Stable tag: 1.0.4
     2Stable tag: 1.0.5
    33Tested up to: 6.4
    44License: GPLv2 or later
  • wc-smartpay/trunk/includes/class-smartpay-payment-gateway.php

    r3031558 r3039963  
    1313     * Method code
    1414     */
    15     const METHOD_CODE = 'wc_smartpay';
     15    const METHOD_CODE = 'wc-smartpay';
    1616
    1717    /**
     
    350350            );
    351351        }
    352         return $this->payment_processor()->execute( $order_id );
     352        return $this->payment_processor()->execute( $order );
    353353    }
    354354
  • wc-smartpay/trunk/includes/class-smartpay.php

    r3039652 r3039963  
    1616     * @var string
    1717     */
    18     private $version = '1.0.4';
     18    private $version = '1.0.5';
    1919
    2020    /**
     
    7979     */
    8080    private function __construct() {
     81        add_action( 'woocommerce_blocks_loaded', array( $this, 'enable_blocks_support') );
    8182        add_action( 'woocommerce_init', array( $this, 'init_hooks' ) );
    8283        add_filter( 'auto_update_plugin', array( $this, 'enable_auto_updates' ), 10, 2 );
     
    180181    }
    181182
     183    /**
     184     * @return void
     185     */
     186    public function enable_blocks_support()
     187    {
     188        if ( class_exists( 'Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType' ) ) {
     189            add_action(
     190                'woocommerce_blocks_payment_method_type_registration',
     191                function( $payment_method_registry ) {
     192                    $payment_method_registry->register( new SmartPay_Checkout_Block() );
     193                }
     194            );
     195        }
     196    }
     197
    182198    /**
    183199     * Enable auto updates
  • wc-smartpay/trunk/smartpay.php

    r3039652 r3039963  
    44 * Plugin URI: https://smartpay.co.il/
    55 * Description: SmartPay payment plugin for WooCommerce
    6  * Version:     1.0.4
     6 * Version:     1.0.5
    77 * Author:      SmartPay
    88 * License:     GPLv2 or later
     
    1515defined( 'ABSPATH' ) || exit;
    1616
    17 define( 'SMARTPAY_VERSION', '1.0.4' );
     17define( 'SMARTPAY_VERSION', '1.0.5' );
    1818
    1919if ( ! defined( 'SMARTPAY_PLUGIN_FILE' ) ) {
Note: See TracChangeset for help on using the changeset viewer.