Merged in feature/MAW-855-import-code-into-aws (pull request #2)

code import from pantheon

* code import from pantheon
This commit is contained in:
Tony Volpe
2023-12-04 23:08:14 +00:00
parent 8c9b1312bc
commit 8f4b5efda6
4766 changed files with 185592 additions and 239967 deletions

View File

@@ -9,6 +9,7 @@
use Automattic\Jetpack\Constants;
use Automattic\WooCommerce\Internal\Admin\Orders\Edit as OrderEdit;
use Automattic\WooCommerce\Utilities\OrderUtil;
defined( 'ABSPATH' ) || exit;
@@ -215,7 +216,7 @@ class WC_Admin_Meta_Boxes {
$post_id = absint( $post_id );
// $post_id and $post are required
if ( empty( $post_id ) || empty( $post ) || self::$saved_meta_boxes ) {
if ( empty( $post_id ) || empty( $post ) || ! is_a( $post, 'WP_Post' ) || self::$saved_meta_boxes ) {
return;
}
@@ -247,6 +248,10 @@ class WC_Admin_Meta_Boxes {
// Check the post type.
if ( in_array( $post->post_type, wc_get_order_types( 'order-meta-boxes' ), true ) ) {
if ( OrderUtil::custom_orders_table_usage_is_enabled() ) {
return;
}
/**
* Save meta for shop order.
*