Skip to content

Commit

Permalink
feat(wc): handle HPOS
Browse files Browse the repository at this point in the history
  • Loading branch information
adekbadek committed Oct 14, 2024
1 parent c9d8924 commit 28889a6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion includes/products/class-products-purchase.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,12 @@ public function listing_checkout_update_order_meta( $order_id ) {
if ( is_array( $params ) ) {
foreach ( $params as $param => $value ) {
if ( in_array( $param, array_keys( self::ORDER_META_KEYS ) ) ) {
update_post_meta( $order_id, sanitize_text_field( self::ORDER_META_KEYS[ $param ] ), sanitize_text_field( $value ) );
$order = wc_get_order( $order_id );
if ( ! $order ) {
continue;
}
$order->update_meta_data( $order_id, sanitize_text_field( self::ORDER_META_KEYS[ $param ] ), sanitize_text_field( $value ) );
$order->save();
}
}
}
Expand Down

0 comments on commit 28889a6

Please sign in to comment.