2017-08-08 59 views
1

我選擇一種付款方式與woochemerce twocheckout插件,付款過程沒關係,我可以通過沙箱與插件paymanet的問題是在過程的返回付款:woocommerce twocheckout返回付款錯誤,但郵件發送

Order properties should not be accessed directly. 
Backtrace: require('wp-blog-header.php'), require_once('wp-load.php'), 
require_once('wp-config.php'), require_once('wp-settings.php'), 
do_action('wp_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, 
call_user_func_array, WC_Form_Handler::checkout_action, 
WC_Checkout->process_checkout, WC_Checkout->process_order_payment, 
WC_Gateway_Twocheckout->process_payment, WC_Abstract_Legacy_Order->__get, 
wc_doing_it_wrong 

和WordPress下降錯誤

"Warning: Cannot modify header information - headers already sent" 

但付款是確定的,而爲了得到安置,甚至acctually訂單郵件發送去,

感謝支持和閱讀twocheckout功能插件woocommerce get方法後,HEL

回答

0

,我知道有呼叫nonupdated方法訂購屬性,所以,檢查錯誤,應該去 WC order methods of Woocommerce和檢查的變化,:

爲twocheckout了「process_payment」功能已經過時方法調用帳單地址信息,所以這裏的更新:

  if ('yes' == $this->debug && $this->notify_url !=='') 
      $this->log('Generating payment form for order ' . $order->get_order_number() . '. Notify URL: '. $this->notify_url); 

     // 2Checkout Args 
     $twocheckout_args = array(
           'token'   => $_POST['token'], 
           'sellerId'  => $this->seller_id, 
           'currency' => get_woocommerce_currency(), 
           'total'   => $order->get_total(), 

           // Order key 
           'merchantOrderId' => $order->get_order_number(), 

           // Billing Address info 
           "billingAddr" => array(
            'name'   => $order->get_billing_first_name() . ' ' . $order->get_billing_last_name(), 
            'addrLine1'  => $order->get_billing_address_1(), 
            'addrLine2'  => $order->get_billing_address_2(), 
            'city'   => $order->get_billing_city(), 
            'state'   => $order->get_billing_state(), 
            'zipCode'  => $order->get_billing_postcode(), 
            'country'  => $order->get_billing_country(), 
            'email'   => $order->get_billing_email(), 
            'phoneNumber' => $order->get_billing_phone() 
           ) 
          ); 

你也可以找到forkedre更新methond here

希望這會很快得到更新。

相關問題