WC_Order::get_changes
Expands the shipping and billing information in the changes array.
Метод класса: WC_Order{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$WC_Order = new WC_Order(); $WC_Order->get_changes();
Код WC_Order::get_changes() WC Order::get changes WC 10.5.2
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;
}