Flip arguments to prevent errors when key doesn't exist

This commit is contained in:
claudiulodro 2017-12-13 09:54:35 -08:00
parent b0189363c2
commit 2a17ad9a2b
1 changed files with 1 additions and 1 deletions

View File

@ -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
}
/**