Fix - Settings API - allow multiselect fields to be emptied.

Closes #7542
This commit is contained in:
Mike Jolley 2015-02-24 12:12:42 +00:00
parent d435eedbef
commit 26487a5734
2 changed files with 3 additions and 2 deletions

View File

@ -922,10 +922,10 @@ abstract class WC_Settings_API {
*/
public function validate_multiselect_field( $key ) {
$value = $this->get_option( $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 ] ) );
} else {
$value = '';
}
return $value;

View File

@ -138,6 +138,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
== 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.
* 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.