I created a plugin to include a payment gateway on Wooccommerce. It worked fine until the current Woocommerce update. Now, I get the error: Fatal error: Call to undefined method WC_Order::get_order_total() in /home/skyauthe/public_html/wp-content/plugins/woocommerce-gtpay-module/index.php on line 171
It is my understanding that the method is still valid. I'd appreciate any help that points me in the right direction.
function get_gtpay_args( $order ) {
global $woocommerce;
$order_id = '00000'.$order->id;// wp_rand(1, 9999977);
$redirect_url = $this->get_return_url($order);
$order_total = round(((number_format($order->get_order_total() + $order->get_order_discount(), 2, '.', ''))*100),0);
$hash_string = $order_id . $order_total . $redirect_url . $this->hash_key;
$hash = hash('sha512', $hash_string);
Aucun commentaire:
Enregistrer un commentaire