Merge pull request #6382 from mgiulio/wc_get_order
Use wc_get_order in simplify-commerce
This commit is contained in:
commit
7427acd9f3
|
@ -40,7 +40,7 @@ class WC_Addons_Gateway_Simplify_Commerce extends WC_Gateway_Simplify_Commerce {
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function process_subscription( $order_id ) {
|
public function process_subscription( $order_id ) {
|
||||||
$order = new WC_Order( $order_id );
|
$order = wc_get_order( $order_id );
|
||||||
$token = isset( $_POST['simplify_token'] ) ? wc_clean( $_POST['simplify_token'] ) : '';
|
$token = isset( $_POST['simplify_token'] ) ? wc_clean( $_POST['simplify_token'] ) : '';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -118,7 +118,7 @@ class WC_Addons_Gateway_Simplify_Commerce extends WC_Gateway_Simplify_Commerce {
|
||||||
*/
|
*/
|
||||||
public function process_pre_order( $order_id ) {
|
public function process_pre_order( $order_id ) {
|
||||||
if ( WC_Pre_Orders_Order::order_requires_payment_tokenization( $order_id ) ) {
|
if ( WC_Pre_Orders_Order::order_requires_payment_tokenization( $order_id ) ) {
|
||||||
$order = new WC_Order( $order_id );
|
$order = wc_get_order( $order_id );
|
||||||
$token = isset( $_POST['simplify_token'] ) ? wc_clean( $_POST['simplify_token'] ) : '';
|
$token = isset( $_POST['simplify_token'] ) ? wc_clean( $_POST['simplify_token'] ) : '';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -269,7 +269,7 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway {
|
||||||
* @param integer $order_id
|
* @param integer $order_id
|
||||||
*/
|
*/
|
||||||
public function process_payment( $order_id ) {
|
public function process_payment( $order_id ) {
|
||||||
$order = new WC_Order( $order_id );
|
$order = wc_get_order( $order_id );
|
||||||
$token = isset( $_POST['simplify_token'] ) ? wc_clean( $_POST['simplify_token'] ) : '';
|
$token = isset( $_POST['simplify_token'] ) ? wc_clean( $_POST['simplify_token'] ) : '';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue