Rollback condition from delete flow as causes issues with no HPOS tables (#39625)

This commit is contained in:
Barry Hughes 2023-08-08 10:35:01 -07:00 committed by GitHub
commit e62af256f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View File

@ -0,0 +1,5 @@
Significance: patch
Type: fix
Comment: Partial rollback of an earlier PR.

View File

@ -667,10 +667,12 @@ ORDER BY orders.id ASC
return;
}
if ( $this->data_sync_is_enabled() ) {
if ( $this->get_table_exists() ) {
$this->data_store->delete_order_data_from_custom_order_tables( $postid );
if ( ! $this->get_table_exists() ) {
return;
}
if ( $this->data_sync_is_enabled() ) {
$this->data_store->delete_order_data_from_custom_order_tables( $postid );
} elseif ( $this->custom_orders_table_is_authoritative() ) {
return;
}