Skip to content
This repository was archived by the owner on Jun 15, 2022. It is now read-only.

Commit 6f639ab

Browse files
committed
Drop the collation capability check from install_tables().
Based on https://developer.wordpress.org/reference/classes/wpdb/has_cap/#source, MySQL has supported collation since version 4.1, which is *far* below the minimum MySQL requirements for WordPress (5.0+, per https://wordpress.org/about/requirements/).
1 parent 86cd950 commit 6f639ab

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

includes/class-wc-custom-order-table-install.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,9 @@ protected static function install_tables() {
4343
// Load wp-admin/includes/upgrade.php, which defines dbDelta().
4444
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
4545

46-
$collate = '';
47-
48-
if ( $wpdb->has_cap( 'collation' ) ) {
49-
$collate = $wpdb->get_charset_collate();
50-
}
51-
52-
$table = wc_custom_order_table()->get_table_name();
53-
$tables = "
46+
$table = wc_custom_order_table()->get_table_name();
47+
$collate = $wpdb->get_charset_collate();
48+
$tables = "
5449
CREATE TABLE {$table} (
5550
order_id BIGINT UNSIGNED NOT NULL,
5651
order_key varchar(100) NOT NULL,

0 commit comments

Comments
 (0)