diff --git a/.gitignore b/.gitignore index 10b50889..52e55fb3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,10 @@ /.wp /node_modules /yarn.lock +# wp-scopify dependencies +/dependencies /vendor + SyncToy_f76a6219-f902-4b34-8524-b4fd7b7279a4.dat lib/selenium-server-standalone.jar lib/drivers/chromedriver.exe @@ -17,4 +20,5 @@ nightwatch.conf.js # OS X metadata .DS_Store .vscode/settings.json -.idea/ \ No newline at end of file +.idea/ + diff --git a/includes/kco-functions.php b/includes/kco-functions.php index ce502565..f64ba044 100644 --- a/includes/kco-functions.php +++ b/includes/kco-functions.php @@ -748,7 +748,7 @@ function kco_validate_order_content( $klarna_order, $order ) { $match = true; $name = $klarna_item['name']; - if ( $quantity !== $klarna_item['quantity'] ) { + if ( strval( $quantity ) !== strval( $klarna_item['quantity'] ) ) { // translators: %1$s: Product name, %2$d: Expected quantity, %3$d: Found quantity. $notes[] = sprintf( __( 'The product "%1$s" has a quantity mismatch. Expected %2$d found %3$d.', 'klarna-checkout-for-woocommerce' ), $name, $klarna_item['quantity'], $quantity ); KCO_Logger::log( "$prefix WC order item reference: $reference ($name) has {$quantity} expected {$klarna_item['quantity']}." );