Fix - Settings API - allow multiselect fields to be emptied.
Closes #7542
This commit is contained in:
parent
d435eedbef
commit
26487a5734
|
@ -922,10 +922,10 @@ abstract class WC_Settings_API {
|
||||||
*/
|
*/
|
||||||
public function validate_multiselect_field( $key ) {
|
public function validate_multiselect_field( $key ) {
|
||||||
|
|
||||||
$value = $this->get_option( $key );
|
|
||||||
|
|
||||||
if ( isset( $_POST[ $this->plugin_id . $this->id . '_' . $key ] ) ) {
|
if ( isset( $_POST[ $this->plugin_id . $this->id . '_' . $key ] ) ) {
|
||||||
$value = array_map( 'wc_clean', array_map( 'stripslashes', (array) $_POST[ $this->plugin_id . $this->id . '_' . $key ] ) );
|
$value = array_map( 'wc_clean', array_map( 'stripslashes', (array) $_POST[ $this->plugin_id . $this->id . '_' . $key ] ) );
|
||||||
|
} else {
|
||||||
|
$value = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
|
|
|
@ -138,6 +138,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
* Fix - Settings API - allow multiselect fields to be emptied.
|
||||||
* Fix - Saving an order needs to save the discount amount ex. tax like the cart.
|
* Fix - Saving an order needs to save the discount amount ex. tax like the cart.
|
||||||
* Tweak - Show discounts inc. tax when showing order totals inc. tax.
|
* Tweak - Show discounts inc. tax when showing order totals inc. tax.
|
||||||
* Tweak - Use 30 days instead of year for transients to avoid bugs in memcache plugins.
|
* Tweak - Use 30 days instead of year for transients to avoid bugs in memcache plugins.
|
||||||
|
|
Loading…
Reference in New Issue