includes/cli/class-wc-cli-coupon.php 1 location
                
                
                    
                                                
                                                    
                                |  | @@ 66-68 (lines=3) @@ | 
                                                            
                                    | 63 |  | 			$assoc_args = apply_filters( 'woocommerce_cli_create_coupon_data', $assoc_args ); | 
                                                            
                                    | 64 |  |  | 
                                                            
                                    | 65 |  | 			// Check if coupon code is specified. | 
                                                            
                                    | 66 |  | 			if ( ! isset( $assoc_args['code'] ) ) { | 
                                                            
                                    | 67 |  | 				throw new WC_CLI_Exception( 'woocommerce_cli_missing_coupon_code', sprintf( __( 'Missing parameter %s', 'woocommerce' ), 'code' ) ); | 
                                                            
                                    | 68 |  | 			} | 
                                                            
                                    | 69 |  |  | 
                                                            
                                    | 70 |  | 			$coupon_code = apply_filters( 'woocommerce_coupon_code', $assoc_args['code'] ); | 
                                                            
                                    | 71 |  |  | 
                                                                        
                 
                                                            
                    
includes/cli/class-wc-cli-tax.php 1 location
                
                
                    
                                                
                                                    
                                |  | @@ 133-135 (lines=3) @@ | 
                                                            
                                    | 130 |  | 			$assoc_args = apply_filters( 'woocommerce_cli_create_tax_class_data', $assoc_args ); | 
                                                            
                                    | 131 |  |  | 
                                                            
                                    | 132 |  | 			// Check if name is specified. | 
                                                            
                                    | 133 |  | 			if ( ! isset( $assoc_args['name'] ) ) { | 
                                                            
                                    | 134 |  | 				throw new WC_CLI_Exception( 'woocommerce_cli_missing_name', sprintf( __( 'Missing parameter %s', 'woocommerce' ), 'name' ) ); | 
                                                            
                                    | 135 |  | 			} | 
                                                            
                                    | 136 |  |  | 
                                                            
                                    | 137 |  | 			$name    = sanitize_text_field( $assoc_args['name'] ); | 
                                                            
                                    | 138 |  | 			$slug    = sanitize_title( $name ); |