From 19a91e3afc429df8756d15f687ddca5a18460eca Mon Sep 17 00:00:00 2001 From: Brent Shepherd Date: Thu, 6 Aug 2015 17:31:21 -0700 Subject: [PATCH] Fix truncated_key value inserted on visual auth When inserting a new set of API keys via the visual API endpoint, only 5 format values were specified in the 3rd param passed to the $wpdb->insert(); however, 6 values were specified in the 2nd param. This meant that the truncted_key value was being formatted as an integer only the first numerical characters of the last 7 character of the consumer key were being stored. For example, given a consumer key value of ck_e91f2aeae6c3dea3045293a3dbdf55c317ad762c the truncated_key value should be 7ad762c but instead, it was being stored at 7. --- includes/class-wc-auth.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/class-wc-auth.php b/includes/class-wc-auth.php index 4825f40c0dd..1838f6f93e4 100644 --- a/includes/class-wc-auth.php +++ b/includes/class-wc-auth.php @@ -212,6 +212,7 @@ class WC_Auth { '%s', '%s', '%s', + '%s', '%s' ) );