WC_Order_Item::apply_changes
Merge changes with data and clear. Overrides WC_Data::apply_changes. array_replace_recursive does not work well for order items because it merges taxes instead of replacing them.
Method of the class: WC_Order_Item{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Order_Item = new WC_Order_Item(); $WC_Order_Item->apply_changes();
Changelog
| Since 3.2.0 | Introduced. |
WC_Order_Item::apply_changes() WC Order Item::apply changes code WC 10.7.0
public function apply_changes() {
$this->data = array_replace( $this->data, $this->changes );
$this->changes = array();
}