• The plugin has a lot of errors on the payment page.
    “WC_Shortcode_Checkout->output was called with an argument that is deprecated since version 2.1! “order” is no longer used to pass an order ID. Use the order-pay or order-received endpoint instead. ”

    Also the Checkout configuration needs updating to use get_ functions :

     Checkout.configure({
                            merchant: "<?php echo $this->merchant_id; ?>",
                            order: {
                                id: "<?php echo $order_id; ?>",
                                amount: '<?php echo $order->get_total(); ?>',
                                currency: "<?php echo get_woocommerce_currency(); ?>",
                                description: "<?php printf( __( 'Pay for order #%d via %s', 'woo-mpgs' ), $order_id, $this->title ); ?>",
                                customerOrderDate:"<?php echo date('Y-m-d'); ?>",
                                customerReference:"<?php echo $order->get_user_id(); ?>",
                                reference:"<?php echo $order_id; ?>"
                            },
                            session: {
                                id: "<?php echo esc_js( $_REQUEST['sessionId'] ); ?>"
                            },
                            billing:{
                                address: {
                                    city:"<?php echo $order->get_billing_city(); ?>",
                                    country:"<?php echo $this->kia_convert_country_code( $order->get_billing_country() ); ?>",
                                    postcodeZip:"<?php echo $order->get_billing_postcode(); ?>",
                                    stateProvince:"<?php echo $order->get_billing_state(); ?>",
                                    street:"<?php echo $order->get_billing_address_1(); ?>",
                                    street2:"<?php echo $order->get_billing_address_2(); ?>"
                                }
                            },
                            customer:{
                                email:"<?php echo $order->get_billing_email(); ?>",
                                firstName:"<?php echo $order->get_billing_first_name(); ?>",
                                lastName:"<?php echo $order->get_billing_last_name(); ?>",
                                phone:"<?php echo $order->get_billing_phone(); ?>"
                            },
                            interaction: {
                                merchant: {
                                    name: "<?php echo $this->merchant_name; ?>",
                                    address: {
                                        line1: "<?php echo $this->merchant_address1; ?>",
                                        line2: "<?php echo $this->merchant_address2; ?>"
                                    }
                                },
                                displayControl: {
                                    billingAddress  : "HIDE",
                                    customerEmail   : "HIDE",
                                    orderSummary    : "HIDE",
                                    shipping        : "HIDE"
                                }
                            }
                        });

The topic ‘Plugin Needs Updating’ is closed to new replies.