Skip to content

Commit

Permalink
Remove collate clause.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Jul 27, 2023
1 parent 0121405 commit bccdb0e
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions src/Install.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,24 +342,6 @@ private function convert_user_meta() {
);
}

/**
* Collate caluse.
*
* Force a specific collate to fix:
* "Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and
* (utf8mb4_unicode_520_ci,IMPLICIT) for operation '='. ".
*
* @link https://dev.mysql.com/doc/refman/8.0/en/charset-collate.html
*/
$collate_clause = '';

if ( ! empty( $wpdb->collate ) ) {
$collate_clause = \sprintf(
'COLLATE %s',
$wpdb->collate
);
}

$query = "
INSERT IGNORE INTO $wpdb->pronamic_pay_mollie_customer_users (
customer_id,
Expand All @@ -372,7 +354,7 @@ private function convert_user_meta() {
$wpdb->pronamic_pay_mollie_customers AS mollie_customer
INNER JOIN
$wpdb->usermeta AS wp_user_meta
ON wp_user_meta.meta_value = mollie_customer.mollie_id $collate_clause
ON wp_user_meta.meta_value = mollie_customer.mollie_id
INNER JOIN
$wpdb->users AS wp_user
ON wp_user_meta.user_id = wp_user.ID
Expand Down

0 comments on commit bccdb0e

Please sign in to comment.