delete( $wpdb->postmeta, array( 'meta_key' => $meta_key ) ); } if ( $price_type !== '_price_method') { foreach ( array('_min', '_max' ) as $min_or_max ) { $meta_key = '_' . $region_key . $min_or_max . $price_type . '_variation_id'; $wpdb->delete( $wpdb->postmeta, array( 'meta_key' => $meta_key ) ); } } } } // Delete options $wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE 'wc\_price\_based_country\_%';"); // Delete admin notices delete_metadata( 'user', 0, 'wc_price_based_country_admin_notices', '', true ); ?>