Plugin Directory

Changeset 3027434


Ignore:
Timestamp:
01/26/2024 05:05:54 PM (2 years ago)
Author:
flutterwave
Message:

Update to version 2.3.5 from GitHub

Location:
rave-woocommerce-payment-gateway
Files:
22 edited
1 copied

Legend:

Unmodified
Added
Removed
  • rave-woocommerce-payment-gateway/tags/2.3.5/build/index.asset.php

    r2916059 r3027434  
    1 <?php return array('dependencies' => array('wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => '210eaa3553bf368b8de6');
     1<?php return array('dependencies' => array('wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => 'ca7ef9ebd15e4df41ad9');
  • rave-woocommerce-payment-gateway/tags/2.3.5/build/index.js

    r2916059 r3027434  
    1 (()=>{"use strict";const e=window.wc.wcBlocksRegistry,t=window.wp.element,a=window.wp.i18n,l=window.wp.htmlEntities,n="rave",r=window.wc.wcSettings,o=()=>{const e=(0,r.getSetting)("rave_data",null);if(!e)throw new Error("Flutterwave initialization data is not available");return e};var i,c;const w=()=>(0,t.createElement)("div",null,(0,l.decodeEntities)(o()?.description||(0,a.__)("You may be redirected to a secure page to complete your payment.","rave-woocommerce-payment-gateway"))),m=null!==(i=o()?.asset_url)&&void 0!==i?i:null,d={name:n,label:(0,t.createElement)("div",{style:{display:"flex",flexDirection:"row",rowGap:".5em"}},(0,t.createElement)("img",{src:`${m}/img/flutterwave-full.svg`,alt:(0,l.decodeEntities)(o()?.title||(0,a.__)("Flutterwave","rave-woocommerce-payment-gateway"))}),(0,t.createElement)("b",null,(0,t.createElement)("h4",null,"Flutterwave"))),placeOrderButtonLabel:(0,a.__)("Proceed to Flutterwave","rave-woocommerce-payment-gateway"),ariaLabel:(0,l.decodeEntities)(o()?.title||(0,a.__)("Payment via Flutterwave","rave-woocommerce-payment-gateway")),canMakePayment:()=>!0,content:(0,t.createElement)(w,null),edit:(0,t.createElement)(w,null),paymentMethodId:n,supports:{features:null!==(c=o()?.supports)&&void 0!==c?c:[]}};(0,e.registerPaymentMethod)(d)})();
     1(()=>{"use strict";const e=window.wc.wcBlocksRegistry,t=window.wp.element,a=window.wp.i18n,n=window.wp.htmlEntities,l="rave",r=window.wc.wcSettings,o=()=>{const e=(0,r.getSetting)("rave_data",null);if(!e)throw new Error("Flutterwave initialization data is not available");return e};var i,c;const w=()=>(0,t.createElement)("div",null,(0,n.decodeEntities)(o()?.description||(0,a.__)("You may be redirected to a secure page to complete your payment.","rave-woocommerce-payment-gateway"))),m=null!==(i=o()?.asset_url)&&void 0!==i?i:null,s={name:l,label:(0,t.createElement)("div",{style:{display:"flex",flexDirection:"row",rowGap:".5em",alignItems:"center"}},(0,t.createElement)("img",{src:`${m}/img/flutterwave-full.svg`,alt:(0,n.decodeEntities)(o()?.title||(0,a.__)("Flutterwave","rave-woocommerce-payment-gateway"))}),(0,t.createElement)("b",null,(0,t.createElement)("h4",null,"Flutterwave"))),placeOrderButtonLabel:(0,a.__)("Proceed to Flutterwave","rave-woocommerce-payment-gateway"),ariaLabel:(0,n.decodeEntities)(o()?.title||(0,a.__)("Payment via Flutterwave","rave-woocommerce-payment-gateway")),canMakePayment:()=>!0,content:(0,t.createElement)(w,null),edit:(0,t.createElement)(w,null),paymentMethodId:l,supports:{features:null!==(c=o()?.supports)&&void 0!==c?c:[]}};(0,e.registerPaymentMethod)(s)})();
  • rave-woocommerce-payment-gateway/tags/2.3.5/changelog.txt

    r2988222 r3027434  
    11== Changelog ==
     2= 2.3.5 =
     3* Added: Support for WooCommerce HPOS.
     4* Fixed: WooCommerce Blocks Compatibility Issues with WooCommerce 7.0 to 6.9.1.
     5* Fixed: Payment Option alignment on WooCommerce Checkout Block.
    26= 2.3.4 =
    37* Fix: Webhook Handler Acknowledgement.
  • rave-woocommerce-payment-gateway/tags/2.3.5/client/blocks/payment-method/index.js

    r2916059 r3027434  
    2626    name: PAYMENT_METHOD_NAME,
    2727    label: (
    28         <div style={{ display: 'flex', flexDirection: 'row', rowGap: '.5em'}}>
     28        <div style={{ display: 'flex', flexDirection: 'row', rowGap: '.5em', alignItems: 'center'}}>
    2929            <img
    3030            src={ `${ FLW_ASSETS }/img/flutterwave-full.svg` }
  • rave-woocommerce-payment-gateway/tags/2.3.5/i18n/languages/rave-woocommerce-payment-gateway.pot

    r2988222 r3027434  
    1 # Copyright (C) 2023 Flutterwave Developers
     1# Copyright (C) 2024 Flutterwave Developers
    22# This file is distributed under the MIT License.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Flutterwave WooCommerce 2.3.4\n"
     5"Project-Id-Version: Flutterwave WooCommerce 2.3.5\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/rave-woocommerce-payment-gateway\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2023-11-02T20:18:51+00:00\n"
     12"POT-Creation-Date: 2024-01-26T17:05:41+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.9.0\n"
     
    3838msgstr ""
    3939
    40 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:137
     40#: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:156
    4141msgid "Visa"
    4242msgstr ""
    4343
    44 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:141
     44#: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:160
    4545msgid "American Express"
    4646msgstr ""
    4747
    48 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:145
     48#: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:164
    4949msgid "Mastercard"
    5050msgstr ""
    5151
    52 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:152
     52#: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:171
    5353msgctxt "Name of credit card"
    5454msgid "Discover"
    5555msgstr ""
    5656
    57 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:156
     57#: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:175
    5858msgid "JCB"
    5959msgstr ""
    6060
    61 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:160
     61#: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:179
    6262msgid "Diners"
    6363msgstr ""
     
    332332
    333333#. translators: %s: url
    334 #: includes/class-flw-wc-payment-gateway.php:452
     334#: includes/class-flw-wc-payment-gateway.php:453
    335335msgid "Flutterwave is enabled, but the API keys are not set. Please <a href=\"%s\">set your Flutterwave API keys</a> to be able to accept payments."
    336336msgstr ""
    337337
    338338#. translators: %s: shop cart url
    339 #: includes/class-flw-wc-payment-gateway.php:489
     339#: includes/class-flw-wc-payment-gateway.php:490
    340340msgid "Sorry, your session has expired. <a href=\"%s\" class=\"wc-backward\">Return to shop</a>"
    341341msgstr ""
    342342
    343 #: includes/class-flw-wc-payment-gateway.php:503
     343#: includes/class-flw-wc-payment-gateway.php:504
    344344msgid "We were unable to process your order, please try again."
    345345msgstr ""
    346346
    347 #: includes/class-flw-wc-payment-gateway.php:550
     347#: includes/class-flw-wc-payment-gateway.php:551
    348348msgid "Order Payment"
    349349msgstr ""
     
    355355#. translators: $1. Minimum WooCommerce version. $2. Current WooCommerce version.
    356356#: includes/notices/class-flw-wc-payment-gateway-notices.php:32
    357 msgid "Flutterwave WooCommerce requires WooCommerce %1$s or greater to be installed and active. WooCommerce %2$s is no longer supported."
     357msgid "Flutterwave WooCommerce requires WooCommerce %1$s or greater to be installed and active. kindly upgrade to a higher version of WooCommerce or downgrade to a lower version of Flutterwave WooCommerce that supports WooCommerce version %2$s."
    358358msgstr ""
    359359
  • rave-woocommerce-payment-gateway/tags/2.3.5/includes/blocks/class-flutterwave-wc-gateway-blocks-support.php

    r2916059 r3027434  
    3636     * @var WC_Payment_Gateway
    3737     */
    38     protected WC_Payment_Gateway $gateway;
     38    protected $gateway;
    3939
    4040    /**
     
    4545    public function initialize() {
    4646        $this->settings = get_option( 'woocommerce_rave_settings', array() );
    47         $this->gateway  = new FLW_WC_Payment_Gateway();
     47
     48        if ( version_compare( WC_VERSION, '6.9.1', '<' ) ) {
     49            // For backwards compatibility.
     50            if ( ! class_exists( 'FLW_WC_Payment_Gateway' ) ) {
     51                require_once dirname( FLW_WC_PLUGIN_FILE ) . '/includes/class-flw-wc-payment-gateway.php';
     52            }
     53
     54            $this->gateway = new FLW_WC_Payment_Gateway();
     55        } else {
     56            $gateways      = WC()->payment_gateways->payment_gateways();
     57            $this->gateway = $gateways[ $this->name ];
     58        }
    4859    }
    4960
     
    5465     */
    5566    public function is_active(): bool {
     67        if ( version_compare( WC_VERSION, '6.9.0', '>' ) ) {
     68            $gateways = WC()->payment_gateways->payment_gateways();
     69
     70            if ( ! isset( $gateways[ $this->name ] ) ) {
     71                return false;
     72            }
     73        }
     74
    5675        return $this->gateway->is_available();
    5776    }
  • rave-woocommerce-payment-gateway/tags/2.3.5/includes/class-flutterwave.php

    r2988222 r3027434  
    1919     * @var string
    2020     */
    21     public string $version = '2.3.4';
     21    public string $version = '2.3.5';
    2222
    2323    /**
     
    7575        $this->define( 'FLW_WC_DIR_PATH', plugin_dir_path( FLW_WC_PLUGIN_FILE ) );
    7676        $this->define( 'FLW_WC_VERSION', $this->version );
    77         $this->define( 'FLW_WC_MIN_WC_VER', '7.1' );
     77        $this->define( 'FLW_WC_MIN_WC_VER', '6.9.1' );
    7878        $this->define( 'FLW_WC_URL', trailingslashit( plugins_url( '/', FLW_WC_PLUGIN_FILE ) ) );
    7979        $this->define( 'FLW_WC_EPSILON', 0.01 );
  • rave-woocommerce-payment-gateway/tags/2.3.5/includes/class-flw-wc-payment-gateway.php

    r2988222 r3027434  
    417417
    418418        $flutterwave_request['payment_options'] = $this->payment_options;
    419 
    420         $sdk = $this->sdk->set_event_handler( new FlwEventHandler( $order ) );
     419        $custom_nonce                           = wp_create_nonce();
     420        $flutterwave_request['redirect_url']    = $flutterwave_request['redirect_url'] . '&_wpnonce=' . $custom_nonce;
     421        $sdk                                    = $this->sdk->set_event_handler( new FlwEventHandler( $order ) );
    421422
    422423        $response = $sdk->get_client()->request( $this->sdk::$standard_inline_endpoint, 'POST', $flutterwave_request );
     
    665666            $event_data = $event->data;
    666667
     668            // check if transaction reference starts with WOOC on hpos enabled.
     669            if ( substr( $event_data->tx_ref, 0, 4 ) !== 'WOOC' ) {
     670                wp_send_json(
     671                    array(
     672                        'status'  => 'failed',
     673                        'message' => 'The transaction reference ' . $event_data->tx_ref . ' is not a Flutterwave WooCommerce Generated transaction',
     674                    ),
     675                    WP_Http::OK
     676                );
     677            }
     678
    667679            $txn_ref  = sanitize_text_field( $event_data->tx_ref );
    668680            $o        = explode( '_', $txn_ref );
  • rave-woocommerce-payment-gateway/tags/2.3.5/includes/notices/class-flw-wc-payment-gateway-notices.php

    r2916059 r3027434  
    3030    public function woocommerce_wc_not_supported() {
    3131        /* translators: $1. Minimum WooCommerce version. $2. Current WooCommerce version. */
    32         echo '<div class="error"><p><strong>' . sprintf( esc_html__( 'Flutterwave WooCommerce requires WooCommerce %1$s or greater to be installed and active. WooCommerce %2$s is no longer supported.', 'rave-woocommerce-payment-gateway' ), esc_attr( FLW_WC_MIN_WC_VER ), esc_attr( WC_VERSION ) ) . '</strong></p></div>';
    33 
     32        echo '<div class="error"><p><strong>' . sprintf( esc_html__( 'Flutterwave WooCommerce requires WooCommerce %1$s or greater to be installed and active. kindly upgrade to a higher version of WooCommerce or downgrade to a lower version of Flutterwave WooCommerce that supports WooCommerce version %2$s.', 'rave-woocommerce-payment-gateway' ), esc_attr( FLW_WC_MIN_WC_VER ), esc_attr( WC_VERSION ) ) . '</strong></p></div>';
    3433    }
    3534}
  • rave-woocommerce-payment-gateway/tags/2.3.5/rave-woocommerce-payment-gateway.php

    r2988222 r3027434  
    44 * Plugin URI: https://developer.flutterwave.com/
    55 * Description: Official WooCommerce payment gateway for Flutterwave.
    6  * Version: 2.3.4
     6 * Version: 2.3.5
    77 * Author: Flutterwave Developers
    88 * Author URI: http://flutterwave.com/us
     
    1010 * Text Domain: rave-woocommerce-payment-gateway
    1111 * Domain Path: i18n/languages
    12  * WC requires at least:   7.1
    13  * WC tested up to:        8.2.1
     12 * WC requires at least:   6.9.1
     13 * WC tested up to:        8.4.0
    1414 * Requires at least:      5.6
    1515 * Requires PHP:           7.4
     
    6060add_action( 'woocommerce_blocks_loaded', 'flutterwave_woocommerce_blocks_support' );
    6161
     62
     63add_action(
     64    'before_woocommerce_init',
     65    function() {
     66        if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
     67            \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
     68        }
     69    }
     70);
     71
    6272/**
    6373 * Add the Settings link to the plugin
  • rave-woocommerce-payment-gateway/tags/2.3.5/readme.txt

    r2988222 r3027434  
    33Tags: fintech,flutterwave, woocommerce, payments, nigeria, mastercard, visa, target,Naira,payments,verve,donation,church,shop,store, ghana, kenya, international, mastercard, visa
    44Requires at least: 3.1
    5 Tested up to: 6.3.2
    6 Stable tag: 2.3.4
     5Tested up to: 6.4.2
     6Stable tag: 2.3.5
    77License: MIT
    88License URI: https://github.com/Flutterwave/Woocommerce/blob/master/LICENSE
     
    9797
    9898== Changelog ==
     99= 2.3.5 =
     100* Added: Support for HPOS.
     101* Fixed: compatibility with WooCommerce 7.1 to 6.9.1
    99102= 2.3.4 =
    100103* Fix: Webhook Handler Acknowledgement.
  • rave-woocommerce-payment-gateway/trunk/build/index.asset.php

    r2916059 r3027434  
    1 <?php return array('dependencies' => array('wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => '210eaa3553bf368b8de6');
     1<?php return array('dependencies' => array('wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => 'ca7ef9ebd15e4df41ad9');
  • rave-woocommerce-payment-gateway/trunk/build/index.js

    r2916059 r3027434  
    1 (()=>{"use strict";const e=window.wc.wcBlocksRegistry,t=window.wp.element,a=window.wp.i18n,l=window.wp.htmlEntities,n="rave",r=window.wc.wcSettings,o=()=>{const e=(0,r.getSetting)("rave_data",null);if(!e)throw new Error("Flutterwave initialization data is not available");return e};var i,c;const w=()=>(0,t.createElement)("div",null,(0,l.decodeEntities)(o()?.description||(0,a.__)("You may be redirected to a secure page to complete your payment.","rave-woocommerce-payment-gateway"))),m=null!==(i=o()?.asset_url)&&void 0!==i?i:null,d={name:n,label:(0,t.createElement)("div",{style:{display:"flex",flexDirection:"row",rowGap:".5em"}},(0,t.createElement)("img",{src:`${m}/img/flutterwave-full.svg`,alt:(0,l.decodeEntities)(o()?.title||(0,a.__)("Flutterwave","rave-woocommerce-payment-gateway"))}),(0,t.createElement)("b",null,(0,t.createElement)("h4",null,"Flutterwave"))),placeOrderButtonLabel:(0,a.__)("Proceed to Flutterwave","rave-woocommerce-payment-gateway"),ariaLabel:(0,l.decodeEntities)(o()?.title||(0,a.__)("Payment via Flutterwave","rave-woocommerce-payment-gateway")),canMakePayment:()=>!0,content:(0,t.createElement)(w,null),edit:(0,t.createElement)(w,null),paymentMethodId:n,supports:{features:null!==(c=o()?.supports)&&void 0!==c?c:[]}};(0,e.registerPaymentMethod)(d)})();
     1(()=>{"use strict";const e=window.wc.wcBlocksRegistry,t=window.wp.element,a=window.wp.i18n,n=window.wp.htmlEntities,l="rave",r=window.wc.wcSettings,o=()=>{const e=(0,r.getSetting)("rave_data",null);if(!e)throw new Error("Flutterwave initialization data is not available");return e};var i,c;const w=()=>(0,t.createElement)("div",null,(0,n.decodeEntities)(o()?.description||(0,a.__)("You may be redirected to a secure page to complete your payment.","rave-woocommerce-payment-gateway"))),m=null!==(i=o()?.asset_url)&&void 0!==i?i:null,s={name:l,label:(0,t.createElement)("div",{style:{display:"flex",flexDirection:"row",rowGap:".5em",alignItems:"center"}},(0,t.createElement)("img",{src:`${m}/img/flutterwave-full.svg`,alt:(0,n.decodeEntities)(o()?.title||(0,a.__)("Flutterwave","rave-woocommerce-payment-gateway"))}),(0,t.createElement)("b",null,(0,t.createElement)("h4",null,"Flutterwave"))),placeOrderButtonLabel:(0,a.__)("Proceed to Flutterwave","rave-woocommerce-payment-gateway"),ariaLabel:(0,n.decodeEntities)(o()?.title||(0,a.__)("Payment via Flutterwave","rave-woocommerce-payment-gateway")),canMakePayment:()=>!0,content:(0,t.createElement)(w,null),edit:(0,t.createElement)(w,null),paymentMethodId:l,supports:{features:null!==(c=o()?.supports)&&void 0!==c?c:[]}};(0,e.registerPaymentMethod)(s)})();
  • rave-woocommerce-payment-gateway/trunk/changelog.txt

    r2988222 r3027434  
    11== Changelog ==
     2= 2.3.5 =
     3* Added: Support for WooCommerce HPOS.
     4* Fixed: WooCommerce Blocks Compatibility Issues with WooCommerce 7.0 to 6.9.1.
     5* Fixed: Payment Option alignment on WooCommerce Checkout Block.
    26= 2.3.4 =
    37* Fix: Webhook Handler Acknowledgement.
  • rave-woocommerce-payment-gateway/trunk/client/blocks/payment-method/index.js

    r2916059 r3027434  
    2626    name: PAYMENT_METHOD_NAME,
    2727    label: (
    28         <div style={{ display: 'flex', flexDirection: 'row', rowGap: '.5em'}}>
     28        <div style={{ display: 'flex', flexDirection: 'row', rowGap: '.5em', alignItems: 'center'}}>
    2929            <img
    3030            src={ `${ FLW_ASSETS }/img/flutterwave-full.svg` }
  • rave-woocommerce-payment-gateway/trunk/i18n/languages/rave-woocommerce-payment-gateway.pot

    r2988222 r3027434  
    1 # Copyright (C) 2023 Flutterwave Developers
     1# Copyright (C) 2024 Flutterwave Developers
    22# This file is distributed under the MIT License.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Flutterwave WooCommerce 2.3.4\n"
     5"Project-Id-Version: Flutterwave WooCommerce 2.3.5\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/rave-woocommerce-payment-gateway\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2023-11-02T20:18:51+00:00\n"
     12"POT-Creation-Date: 2024-01-26T17:05:41+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.9.0\n"
     
    3838msgstr ""
    3939
    40 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:137
     40#: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:156
    4141msgid "Visa"
    4242msgstr ""
    4343
    44 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:141
     44#: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:160
    4545msgid "American Express"
    4646msgstr ""
    4747
    48 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:145
     48#: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:164
    4949msgid "Mastercard"
    5050msgstr ""
    5151
    52 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:152
     52#: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:171
    5353msgctxt "Name of credit card"
    5454msgid "Discover"
    5555msgstr ""
    5656
    57 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:156
     57#: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:175
    5858msgid "JCB"
    5959msgstr ""
    6060
    61 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:160
     61#: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:179
    6262msgid "Diners"
    6363msgstr ""
     
    332332
    333333#. translators: %s: url
    334 #: includes/class-flw-wc-payment-gateway.php:452
     334#: includes/class-flw-wc-payment-gateway.php:453
    335335msgid "Flutterwave is enabled, but the API keys are not set. Please <a href=\"%s\">set your Flutterwave API keys</a> to be able to accept payments."
    336336msgstr ""
    337337
    338338#. translators: %s: shop cart url
    339 #: includes/class-flw-wc-payment-gateway.php:489
     339#: includes/class-flw-wc-payment-gateway.php:490
    340340msgid "Sorry, your session has expired. <a href=\"%s\" class=\"wc-backward\">Return to shop</a>"
    341341msgstr ""
    342342
    343 #: includes/class-flw-wc-payment-gateway.php:503
     343#: includes/class-flw-wc-payment-gateway.php:504
    344344msgid "We were unable to process your order, please try again."
    345345msgstr ""
    346346
    347 #: includes/class-flw-wc-payment-gateway.php:550
     347#: includes/class-flw-wc-payment-gateway.php:551
    348348msgid "Order Payment"
    349349msgstr ""
     
    355355#. translators: $1. Minimum WooCommerce version. $2. Current WooCommerce version.
    356356#: includes/notices/class-flw-wc-payment-gateway-notices.php:32
    357 msgid "Flutterwave WooCommerce requires WooCommerce %1$s or greater to be installed and active. WooCommerce %2$s is no longer supported."
     357msgid "Flutterwave WooCommerce requires WooCommerce %1$s or greater to be installed and active. kindly upgrade to a higher version of WooCommerce or downgrade to a lower version of Flutterwave WooCommerce that supports WooCommerce version %2$s."
    358358msgstr ""
    359359
  • rave-woocommerce-payment-gateway/trunk/includes/blocks/class-flutterwave-wc-gateway-blocks-support.php

    r2916059 r3027434  
    3636     * @var WC_Payment_Gateway
    3737     */
    38     protected WC_Payment_Gateway $gateway;
     38    protected $gateway;
    3939
    4040    /**
     
    4545    public function initialize() {
    4646        $this->settings = get_option( 'woocommerce_rave_settings', array() );
    47         $this->gateway  = new FLW_WC_Payment_Gateway();
     47
     48        if ( version_compare( WC_VERSION, '6.9.1', '<' ) ) {
     49            // For backwards compatibility.
     50            if ( ! class_exists( 'FLW_WC_Payment_Gateway' ) ) {
     51                require_once dirname( FLW_WC_PLUGIN_FILE ) . '/includes/class-flw-wc-payment-gateway.php';
     52            }
     53
     54            $this->gateway = new FLW_WC_Payment_Gateway();
     55        } else {
     56            $gateways      = WC()->payment_gateways->payment_gateways();
     57            $this->gateway = $gateways[ $this->name ];
     58        }
    4859    }
    4960
     
    5465     */
    5566    public function is_active(): bool {
     67        if ( version_compare( WC_VERSION, '6.9.0', '>' ) ) {
     68            $gateways = WC()->payment_gateways->payment_gateways();
     69
     70            if ( ! isset( $gateways[ $this->name ] ) ) {
     71                return false;
     72            }
     73        }
     74
    5675        return $this->gateway->is_available();
    5776    }
  • rave-woocommerce-payment-gateway/trunk/includes/class-flutterwave.php

    r2988222 r3027434  
    1919     * @var string
    2020     */
    21     public string $version = '2.3.4';
     21    public string $version = '2.3.5';
    2222
    2323    /**
     
    7575        $this->define( 'FLW_WC_DIR_PATH', plugin_dir_path( FLW_WC_PLUGIN_FILE ) );
    7676        $this->define( 'FLW_WC_VERSION', $this->version );
    77         $this->define( 'FLW_WC_MIN_WC_VER', '7.1' );
     77        $this->define( 'FLW_WC_MIN_WC_VER', '6.9.1' );
    7878        $this->define( 'FLW_WC_URL', trailingslashit( plugins_url( '/', FLW_WC_PLUGIN_FILE ) ) );
    7979        $this->define( 'FLW_WC_EPSILON', 0.01 );
  • rave-woocommerce-payment-gateway/trunk/includes/class-flw-wc-payment-gateway.php

    r2988222 r3027434  
    417417
    418418        $flutterwave_request['payment_options'] = $this->payment_options;
    419 
    420         $sdk = $this->sdk->set_event_handler( new FlwEventHandler( $order ) );
     419        $custom_nonce                           = wp_create_nonce();
     420        $flutterwave_request['redirect_url']    = $flutterwave_request['redirect_url'] . '&_wpnonce=' . $custom_nonce;
     421        $sdk                                    = $this->sdk->set_event_handler( new FlwEventHandler( $order ) );
    421422
    422423        $response = $sdk->get_client()->request( $this->sdk::$standard_inline_endpoint, 'POST', $flutterwave_request );
     
    665666            $event_data = $event->data;
    666667
     668            // check if transaction reference starts with WOOC on hpos enabled.
     669            if ( substr( $event_data->tx_ref, 0, 4 ) !== 'WOOC' ) {
     670                wp_send_json(
     671                    array(
     672                        'status'  => 'failed',
     673                        'message' => 'The transaction reference ' . $event_data->tx_ref . ' is not a Flutterwave WooCommerce Generated transaction',
     674                    ),
     675                    WP_Http::OK
     676                );
     677            }
     678
    667679            $txn_ref  = sanitize_text_field( $event_data->tx_ref );
    668680            $o        = explode( '_', $txn_ref );
  • rave-woocommerce-payment-gateway/trunk/includes/notices/class-flw-wc-payment-gateway-notices.php

    r2916059 r3027434  
    3030    public function woocommerce_wc_not_supported() {
    3131        /* translators: $1. Minimum WooCommerce version. $2. Current WooCommerce version. */
    32         echo '<div class="error"><p><strong>' . sprintf( esc_html__( 'Flutterwave WooCommerce requires WooCommerce %1$s or greater to be installed and active. WooCommerce %2$s is no longer supported.', 'rave-woocommerce-payment-gateway' ), esc_attr( FLW_WC_MIN_WC_VER ), esc_attr( WC_VERSION ) ) . '</strong></p></div>';
    33 
     32        echo '<div class="error"><p><strong>' . sprintf( esc_html__( 'Flutterwave WooCommerce requires WooCommerce %1$s or greater to be installed and active. kindly upgrade to a higher version of WooCommerce or downgrade to a lower version of Flutterwave WooCommerce that supports WooCommerce version %2$s.', 'rave-woocommerce-payment-gateway' ), esc_attr( FLW_WC_MIN_WC_VER ), esc_attr( WC_VERSION ) ) . '</strong></p></div>';
    3433    }
    3534}
  • rave-woocommerce-payment-gateway/trunk/rave-woocommerce-payment-gateway.php

    r2988222 r3027434  
    44 * Plugin URI: https://developer.flutterwave.com/
    55 * Description: Official WooCommerce payment gateway for Flutterwave.
    6  * Version: 2.3.4
     6 * Version: 2.3.5
    77 * Author: Flutterwave Developers
    88 * Author URI: http://flutterwave.com/us
     
    1010 * Text Domain: rave-woocommerce-payment-gateway
    1111 * Domain Path: i18n/languages
    12  * WC requires at least:   7.1
    13  * WC tested up to:        8.2.1
     12 * WC requires at least:   6.9.1
     13 * WC tested up to:        8.4.0
    1414 * Requires at least:      5.6
    1515 * Requires PHP:           7.4
     
    6060add_action( 'woocommerce_blocks_loaded', 'flutterwave_woocommerce_blocks_support' );
    6161
     62
     63add_action(
     64    'before_woocommerce_init',
     65    function() {
     66        if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
     67            \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
     68        }
     69    }
     70);
     71
    6272/**
    6373 * Add the Settings link to the plugin
  • rave-woocommerce-payment-gateway/trunk/readme.txt

    r2988222 r3027434  
    33Tags: fintech,flutterwave, woocommerce, payments, nigeria, mastercard, visa, target,Naira,payments,verve,donation,church,shop,store, ghana, kenya, international, mastercard, visa
    44Requires at least: 3.1
    5 Tested up to: 6.3.2
    6 Stable tag: 2.3.4
     5Tested up to: 6.4.2
     6Stable tag: 2.3.5
    77License: MIT
    88License URI: https://github.com/Flutterwave/Woocommerce/blob/master/LICENSE
     
    9797
    9898== Changelog ==
     99= 2.3.5 =
     100* Added: Support for HPOS.
     101* Fixed: compatibility with WooCommerce 7.1 to 6.9.1
    99102= 2.3.4 =
    100103* Fix: Webhook Handler Acknowledgement.
Note: See TracChangeset for help on using the changeset viewer.