Merge pull request #27017 from woocommerce/fix/25480
Fixed the `shipping_zone_method` CLI command's instance_id parameter
This commit is contained in:
commit
840554d788
|
@ -113,7 +113,8 @@ class WC_CLI_Runner {
|
|||
'refund_id' => __( 'Refund ID.', 'woocommerce' ),
|
||||
'attribute_id' => __( 'Attribute ID.', 'woocommerce' ),
|
||||
'zone_id' => __( 'Zone ID.', 'woocommerce' ),
|
||||
'id' => __( 'ID.', 'woocommerce' ),
|
||||
'instance_id' => __( 'Instance ID.', 'woocommerce' ),
|
||||
'id' => __( 'The ID for the resource.', 'woocommerce' ),
|
||||
);
|
||||
$rest_command->set_supported_ids( $supported_ids );
|
||||
$positional_args = array_keys( $supported_ids );
|
||||
|
@ -166,14 +167,6 @@ class WC_CLI_Runner {
|
|||
$ids[] = $id_name;
|
||||
}
|
||||
}
|
||||
if ( in_array( $command, array( 'delete', 'get', 'update' ), true ) && ! in_array( 'id', $ids, true ) ) {
|
||||
$synopsis[] = array(
|
||||
'name' => 'id',
|
||||
'type' => 'positional',
|
||||
'description' => __( 'The id for the resource.', 'woocommerce' ),
|
||||
'optional' => false,
|
||||
);
|
||||
}
|
||||
|
||||
foreach ( $endpoint_args as $name => $args ) {
|
||||
if ( ! in_array( $name, $positional_args, true ) || strpos( $route, '<' . $id_name . '>' ) === false ) {
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
set -ex
|
||||
|
||||
PACKAGE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../ && pwd )"
|
||||
WP_CLI_BIN_DIR="${PACKAGE_DIR}/bin"
|
||||
|
||||
download() {
|
||||
if [ `which curl` ]; then
|
||||
|
|
Loading…
Reference in New Issue