Payment gateway not loaded since recent update2020-02-26T16:07:42+05:30

Home Forums Core Payment gateway not loaded since recent update

Viewing 1 post (of 1 total)
  • Author
  • masi.raphael
    Post count: 2


    before a recent update, payment gateway appear correctly, but since payment gateway no more loaded or more exactly registered too late. I correct that by changing plugin loading like below.

    In woo-wallet.php, I replace :

    $GLOBALS[‘woo_wallet’] = woo_wallet();

    by :

    add_action( ‘plugins_loaded’, ‘woocommerce_gateway_woowallet_init’ );
    function woocommerce_gateway_woowallet_init() {
    global $GLOBALS;
    $GLOBALS[‘woo_wallet’] = woo_wallet();

    and in class-woo-wallet.php, I move this part of code from init() to init_hooks(), just after “add_action( ‘init’, array( $this, ‘init’ ), 5);”, line 151.

    // move from init() to init_hooks()
    include_once( WOO_WALLET_ABSPATH . ‘includes/class-woo-wallet-payment-method.php’ );
    add_filter( ‘woocommerce_payment_gateways’, array( $this, ‘load_gateway’ ) );

    And with that, all is back to normal. So could you say if this update is possible, as I can continue to update this plugin from wordpress.

    Best regards.

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.