Plugin Directory

Changeset 3182959


Ignore:
Timestamp:
11/06/2024 08:47:54 AM (17 months ago)
Author:
allpay
Message:

Updated to v.1.1.0

New: Support of HPOS
New: Adapted to new WooCommerce checkout page
Fix: SSL error
Improvement: Plugin sends to Allpay full list of products so they can be included in receipt

Location:
allpay-payment-gateway/trunk
Files:
5 added
2 edited

Legend:

Unmodified
Added
Removed
  • allpay-payment-gateway/trunk/allpay-gateway.php

    r3014084 r3182959  
    33 * Plugin Name: Allpay payment gateway
    44 * Plugin URI: https://www.allpay.co.il/integrations/woocommerce
    5  * Description: Allpay Payment Gateway for WooCommerce.
     5 * Description: Allpay Payment Gateway for WooCommerce to accepts Visa, Mastercard, Diners, AmEx and other brands.
    66 * Author: Allpay
    77 * Author URI: https://allpay.co.il
    8  * Version: 1.0.4
     8 * Version: 1.1.0
    99 * Text Domain: allpay-payment-gateway
    1010 * Domain Path: /languages
    11  * Tested up to: 6.4
    12  * WC tested up to: 8.4.0
     11 * Tested up to: 6.6.2
     12 * WC tested up to: 9.3.3
    1313 * WC requires at least: 3.0
    1414 *
     
    2121if ( ! defined( 'ABSPATH' ) ) exit;
    2222
    23 add_action( 'plugins_loaded', 'allpay_init', 0 );
     23add_action( 'plugins_loaded', 'allpay_init', 0 );
     24
     25use Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry;
    2426
    2527function allpay_init() {
    26     // If the parent WC_Payment_Gateway class doesn't exist
    27     // it means WooCommerce is not installed on the site
    28     // so do nothing
     28
    2929    if ( ! class_exists( 'WC_Payment_Gateway' ) ) return;
     30
     31    include_once( 'classes/class-allpay.php' );
     32    include_once( 'classes/class-allpay-blocks-integration.php' );
    3033   
    3134    // plugin translation
    3235    load_plugin_textdomain( 'allpay-payment-gateway', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); 
    3336
    34     include_once( 'allpay.php' );
    35 
    36     add_filter( 'woocommerce_payment_gateways', 'allpay_gateway' );
    37     function allpay_gateway( $methods ) {
     37    function add_allpay_gateway( $methods ) {
    3838        $methods[] = 'WC_Allpay';
    3939        return $methods;
    4040    }
    41    
     41    add_filter( 'woocommerce_payment_gateways', 'add_allpay_gateway' );
     42
     43    // blocks
     44    if ( class_exists( 'Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry' ) && class_exists( 'Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType' ) ) {
     45        add_action( 'woocommerce_blocks_payment_method_type_registration', function ( Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry $payment_method_registry ) {
     46            $payment_method_registry->register( new AllpayBlocksIntegration() );
     47        } );
     48    }       
    4249}
    4350
     
    5259    return array_merge( $plugin_links, $links );   
    5360}
     61
     62// поддержка HPOS
     63add_action( 'before_woocommerce_init', function() {
     64    if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
     65        \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); //__FILE__ должен вести в основному файлу вашего плагина
     66    }
     67} );
     68
     69
     70
     71
  • allpay-payment-gateway/trunk/readme.txt

    r3014084 r3182959  
    44Requires PHP: 5.6
    55Requires at least: 4.7
    6 Tested up to: 6.4
    7 Stable tag: 1.0.4
     6Tested up to: 6.6.2
     7Stable tag: 1.1.0
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    5757
    5858= How frequent are funds credited to the bank account? =
    59 Every 15th day of month.
     59Every 6th day of month.
    6060
    6161== Changelog ==
     62= 1.1.0 - 6TH NOVEMBER 2024 =
     63* New: Support of HPOS
     64* New: Adapted to new WooCommerce checkout page
     65* Fix: SSL error
     66* Improvement: Plugin sends to Allpay full list of products so they can be included in receipt
     67
    6268= 1.0.4 - MONDAY, 25TH DECEMBER 2023 =
    6369* New: Added payment page language support for ENG, HEB and RUS
Note: See TracChangeset for help on using the changeset viewer.