Plugin Directory

Changeset 3399339


Ignore:
Timestamp:
11/20/2025 03:15:45 AM (5 months ago)
Author:
maalypay
Message:

updates related on block checkout

Location:
maaly-pay
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • maaly-pay/assets/js/maaly-pay.js

    r3399333 r3399339  
    1515    edit: null,
    1616    canMakePayment: () => true,
    17     supports: {
    18         features: [],
    19         style: [],
    20     },
    2117};
    2218
  • maaly-pay/trunk/assets/js/maaly-pay.js

    r3399333 r3399339  
    1515    edit: null,
    1616    canMakePayment: () => true,
    17     supports: {
    18         features: [],
    19         style: [],
    20     },
    2117};
    2218
  • maaly-pay/trunk/includes/class-maaly-pay-gateway.php

    r3399281 r3399339  
    1818        $this->method_description = __('Accept cryptocurrency payments via Maaly Pay.', 'maaly-pay');
    1919
     20        $this->supports = array(
     21            'products',
     22        );
     23
    2024        $this->init_form_fields();
    2125        $this->init_settings();
     
    2529        $this->enabled = $this->get_option('enabled', 'yes');
    2630        add_action('woocommerce_update_options_payment_gateways_' . $this->id, [$this, 'process_admin_options']);
    27     }
    28 
    29     public function is_available()
    30     {
    31         if ($this->enabled !== 'yes') {
    32             return false;
    33         }
    34 
    35         // Check if WooCommerce is available
    36         if (!WC() || !WC()->cart) {
    37             return false;
    38         }
    39 
    40         // Check if cart needs payment
    41         if (!WC()->cart->needs_payment()) {
    42             return false;
    43         }
    44 
    45         return true;
    4631    }
    4732
  • maaly-pay/trunk/maaly-pay.php

    r3399323 r3399339  
    3737require_once MAALY_PAY_PLUGIN_DIR . 'includes/class-maaly-pay-admin.php';
    3838require_once MAALY_PAY_PLUGIN_DIR . 'includes/class-maaly-pay-frontend.php';
     39require_once MAALY_PAY_PLUGIN_DIR . 'includes/class-maaly-pay-gateway.php';
    3940
    4041// Initialize frontend
    41 Maaly_Pay_Frontend::init();
    42 
    43 add_action('woocommerce_blocks_loaded', 'maalypayplugin_register_gateway_block_support');
     42// Maaly_Pay_Frontend::init();
    4443
    4544// Fix checkout page template issues
     
    152151// REGISTER PAYMENT GATEWAY (FIXED)
    153152// -----------------------------------------------------------------------------
    154 // add_action('plugins_loaded', 'maaly_pay_init_gateway', 0);
    155 add_action('woocommerce_loaded', 'maaly_pay_init_gateway', 0);
     153add_action('plugins_loaded', 'maaly_pay_init_gateway', 0);
     154// add_action('woocommerce_loaded', 'maaly_pay_init_gateway', 0);
     155
     156add_filter('woocommerce_payment_gateways', 'maaly_pay_add_gateway_class');
     157
     158add_action('woocommerce_blocks_loaded', 'maalypayplugin_register_gateway_block_support');
    156159
    157160function maaly_pay_init_gateway()
     
    166169        return;
    167170    }
    168 
    169     require_once MAALY_PAY_PLUGIN_DIR . 'includes/class-maaly-pay-gateway.php';
    170     add_filter('woocommerce_payment_gateways', 'maaly_pay_add_gateway_class');
    171171
    172172    $initialized = true;
Note: See TracChangeset for help on using the changeset viewer.