From 2a17ad9a2b080fd9c29b61a1a11274353e64cf6c Mon Sep 17 00:00:00 2001 From: claudiulodro Date: Wed, 13 Dec 2017 09:54:35 -0800 Subject: [PATCH] Flip arguments to prevent errors when key doesn't exist --- includes/wc-core-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/wc-core-functions.php b/includes/wc-core-functions.php index 93d92d420e2..02e279902bf 100644 --- a/includes/wc-core-functions.php +++ b/includes/wc-core-functions.php @@ -1830,7 +1830,7 @@ function wc_make_phone_clickable( $phone ) { * @return mixed Value sanitized by wc_clean. */ function wc_get_post_data_by_key( $key, $default = '' ) { - return wc_clean( wc_get_var( wp_unslash( $_POST[ $key ] ), $default ) ); // @codingStandardsIgnoreLine + return wc_clean( wp_unslash( wc_get_var( $_POST[ $key ] ), $default ) ); // @codingStandardsIgnoreLine } /**