[REST API] incorrect key on saving post_meta

This commit is contained in:
JLuis Freitas 2016-06-17 19:07:06 +01:00 committed by GitHub
parent 52ff42d3ad
commit 3948fcf4c7
1 changed files with 1 additions and 1 deletions

View File

@ -541,7 +541,7 @@ class WC_REST_Orders_Controller extends WC_REST_Posts_Controller {
update_post_meta( $order->id, '_payment_method', $request['payment_method'] );
}
if ( ! empty( $request['payment_method_title'] ) ) {
update_post_meta( $order->id, '_payment_method_title', $request['payment_method'] );
update_post_meta( $order->id, '_payment_method_title', $request['payment_method_title'] );
}
if ( true === $request['set_paid'] ) {
$order->payment_complete( $request['transaction_id'] );