Use wc_get_order() instead of "new WC_Order"

This commit is contained in:
Claudio Sanches 2019-12-03 16:43:00 -03:00
parent 988b72e461
commit 3d394dd72c
1 changed files with 1 additions and 1 deletions

View File

@ -890,7 +890,7 @@ function wc_update_coupon_usage_counts( $order_id ) {
* @param int $order_id Order ID.
*/
function wc_release_held_stock( $order_id ) {
$order = new WC_Order( $order_id );
$order = wc_get_order( $order_id );
if ( ! $order ) {
return;
}