fix/31824 - Initial commit
This commit is contained in:
parent
21ed16c24b
commit
8dbc76ef2b
|
@ -175,6 +175,9 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
|||
}
|
||||
|
||||
try {
|
||||
|
||||
throw new ErrorException('message', 0, 1, __FILE__, 179);
|
||||
|
||||
/**
|
||||
* Trigger action before saving to the DB. Allows you to adjust object props before save.
|
||||
*
|
||||
|
@ -200,7 +203,15 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
|||
do_action( 'woocommerce_after_' . $this->object_type . '_object_save', $this, $this->data_store );
|
||||
|
||||
} catch ( Exception $e ) {
|
||||
$this->handle_exception( $e, __( 'Error saving order.', 'woocommerce' ) );
|
||||
$message_id = $this->get_id() ? $this->get_id() : __( '(no ID)', 'woocommerce' );
|
||||
$this->handle_exception( $e,
|
||||
wp_kses_post(
|
||||
sprintf(
|
||||
__( 'Error saving order ID %1$s.', 'woocommerce' ),
|
||||
$message_id
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return $this->get_id();
|
||||
|
|
Loading…
Reference in New Issue