• Resolved amanvirk1982

    (@amanvirk1982)


    We had installed Clover Payments plugin on our website. But the we were not getting Invoice # on transation report we were getting from Clover. For that we were to edit the plugin file and define a filter so that we can push additional data to the payment charge data.

    File path: /wp-content/plugins/clover-payments-for-woocommerce/includes/class-woo-clv-admin.php

    I defined filter in the following function.

    private function getChargeData($order,$token) {

            // get the ID of the order

            $order_id = $order->get_id();

            // get Customer Data for the order

            $customer_data = $this->get_customer_data($order_id);

            $currency = $order->get_currency();

            $amount = $order->get_total();

            $tax = $order->get_total_tax();

            $charge_data = array(

                'amount' => $this->converttocents($amount, $currency),

                'currency' => strtolower( $currency ),

                'source' => $token,

                'capture' => $this->ischarge,

                'description' => $this->ischarge ? 'Authorize and Capture' : 'Authorize',

                'metadata' => array('shopping_cart' => $this->framework_version()),

                'customer' => $customer_data,

                'tax_amount' => $this->converttocents($tax, $currency),

                'skip_default_convenience_fee' => true

            );


            $charge_data = apply_filters( 'woo_clover_payments_charge_request', $charge_data, $order );

            return $charge_data;

        }

    Can you please include the the filter in future release? After that I was able to push order id in to the clover payment gateway and invoice # was showing correctly in the reports.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Define additional filter’ is closed to new replies.