Flip arguments to prevent errors when key doesn't exist
This commit is contained in:
parent
b0189363c2
commit
2a17ad9a2b
|
@ -1830,7 +1830,7 @@ function wc_make_phone_clickable( $phone ) {
|
||||||
* @return mixed Value sanitized by wc_clean.
|
* @return mixed Value sanitized by wc_clean.
|
||||||
*/
|
*/
|
||||||
function wc_get_post_data_by_key( $key, $default = '' ) {
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue