Merge pull request #11172 from jluisfreitas/patch-1

[REST API] incorrect key on saving post_meta
This commit is contained in:
Claudio Sanches 2016-06-17 16:24:14 -03:00 committed by GitHub
commit 4a9807b56a
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'] );