rebase code on oct-10-2023
This commit is contained in:
@@ -935,17 +935,7 @@ AND `group_id` = %d
|
||||
$sql = $wpdb->prepare( "{$update} {$where} {$order} LIMIT %d", $params ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders
|
||||
$rows_affected = $wpdb->query( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
|
||||
if ( false === $rows_affected ) {
|
||||
$error = empty( $wpdb->last_error )
|
||||
? _x( 'unknown', 'database error', 'woocommerce' )
|
||||
: $wpdb->last_error;
|
||||
|
||||
throw new \RuntimeException(
|
||||
sprintf(
|
||||
/* translators: %s database error. */
|
||||
__( 'Unable to claim actions. Database error: %s.', 'woocommerce' ),
|
||||
$error
|
||||
)
|
||||
);
|
||||
throw new \RuntimeException( __( 'Unable to claim actions. Database error.', 'woocommerce' ) );
|
||||
}
|
||||
|
||||
return (int) $rows_affected;
|
||||
|
||||
Reference in New Issue
Block a user