Skip to content

Commit f9146e9

Browse files
authored
Revert "Fix listing author and order author mismatch by db migration" (#2278)
Revert "Add migration function for order table (#2276)" This reverts commit fb0fea3.
1 parent c0e4034 commit f9146e9

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

includes/classes/class-installation.php

-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ class ATBDP_Installation {
5050
],
5151
'8.3.0' => [
5252
'directorist_830_migrate_directory_sorting_order',
53-
'directorist_830_sync_listing_author_and_order_author',
5453
'directorist_830_update_db_version',
5554
],
5655
);

includes/update-functions.php

+1-17
Original file line numberDiff line numberDiff line change
@@ -246,20 +246,4 @@ function directorist_830_update_db_version() {
246246

247247
function directorist_830_migrate_directory_sorting_order() {
248248
Directorist\Multi_Directory\Multi_Directory_Manager::add_directory_type_sorting_order_to_missing_ones( false );
249-
}
250-
251-
function directorist_830_sync_listing_author_and_order_author() {
252-
global $wpdb;
253-
254-
$wpdb->query( $wpdb->prepare(
255-
"UPDATE wp_posts AS p
256-
INNER JOIN wp_postmeta AS pm
257-
ON p.ID = pm.post_id
258-
AND pm.meta_key = '_listing_id'
259-
INNER JOIN wp_posts AS p2
260-
ON p2.ID = CAST(pm.meta_value AS UNSIGNED)
261-
SET p.post_author = p2.post_author
262-
WHERE p.post_type = 'atbdp_orders'
263-
AND p.post_author <> p2.post_author;",
264-
) );
265-
}
249+
}

0 commit comments

Comments
 (0)