[2.4] Default value should not apply if value of option is 0
Fixes #9270 @claudiosmweb
This commit is contained in:
parent
84f83e0bf4
commit
1ec3cb0ef6
|
@ -185,7 +185,7 @@ abstract class WC_Settings_API {
|
|||
$this->settings[ $key ] = isset( $form_fields[ $key ]['default'] ) ? $form_fields[ $key ]['default'] : '';
|
||||
}
|
||||
|
||||
if ( ! is_null( $empty_value ) && empty( $this->settings[ $key ] ) ) {
|
||||
if ( ! is_null( $empty_value ) && empty( $this->settings[ $key ] ) && '' === $this->settings[ $key ] ) {
|
||||
$this->settings[ $key ] = $empty_value;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue