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