Trash instead of force delete Closes #4785
This commit is contained in:
parent
9d47a60914
commit
1996b7b7b5
|
@ -13,12 +13,12 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|||
global $wpdb, $woocommerce;
|
||||
|
||||
// Pages no longer used
|
||||
wp_delete_post( get_option('woocommerce_pay_page_id'), true );
|
||||
wp_delete_post( get_option('woocommerce_thanks_page_id'), true );
|
||||
wp_delete_post( get_option('woocommerce_view_order_page_id'), true );
|
||||
wp_delete_post( get_option('woocommerce_change_password_page_id'), true );
|
||||
wp_delete_post( get_option('woocommerce_edit_address_page_id'), true );
|
||||
wp_delete_post( get_option('woocommerce_lost_password_page_id'), true );
|
||||
wp_trash_post( get_option('woocommerce_pay_page_id') );
|
||||
wp_trash_post( get_option('woocommerce_thanks_page_id') );
|
||||
wp_trash_post( get_option('woocommerce_view_order_page_id') );
|
||||
wp_trash_post( get_option('woocommerce_change_password_page_id') );
|
||||
wp_trash_post( get_option('woocommerce_edit_address_page_id') );
|
||||
wp_trash_post( get_option('woocommerce_lost_password_page_id') );
|
||||
|
||||
// Upgrade file paths to support multiple file paths + names etc
|
||||
$existing_file_paths = $wpdb->get_results( "SELECT * FROM {$wpdb->postmeta} WHERE meta_key = '_file_paths' AND meta_value != '';" );
|
||||
|
|
Loading…
Reference in New Issue