[REST API] Fixed batch create coupons

This commit is contained in:
Claudio Sanches 2016-05-22 18:19:45 -03:00
parent 9385058886
commit abac5e2160
1 changed files with 1 additions and 1 deletions

View File

@ -298,7 +298,7 @@ class WC_REST_Coupons_Controller extends WC_REST_Posts_Controller {
* @return bool|WP_Error
*/
protected function add_post_meta_fields( $post, $request ) {
$data = $request->get_json_params();
$data = array_filter( $request->get_params() );
$defaults = array(
'discount_type' => 'fixed_cart',