WC_Order::get_changes()
Expands the shipping and billing information in the changes array.
Contents
Description Description
Source Source
File: includes/class-wc-order.php
public function get_changes() {
$changed_props = parent::get_changes();
$subs = array( 'shipping', 'billing' );
foreach ( $subs as $sub ) {
if ( ! empty( $changed_props[ $sub ] ) ) {
foreach ( $changed_props[ $sub ] as $sub_prop => $value ) {
$changed_props[ $sub . '_' . $sub_prop ] = $value;
}
}
}
if ( isset( $changed_props['customer_note'] ) ) {
$changed_props['post_excerpt'] = $changed_props['customer_note'];
}
return $changed_props;
}