芝麻web文件管理V1.00
编辑当前文件:/home/paymbalq/www/wp-content/plugins/woocommerce/src/StoreApi/Routes/V1/ProductAttributes.php
\WP_REST_Server::READABLE, 'callback' => [ $this, 'get_response' ], 'permission_callback' => '__return_true', 'args' => $this->get_collection_params(), 'allow_batch' => [ 'v1' => true ], ], 'schema' => [ $this->schema, 'get_public_item_schema' ], ]; } /** * Get a collection of attributes. * * @param \WP_REST_Request $request Request object. * @return \WP_REST_Response */ protected function get_route_response( \WP_REST_Request $request ) { $ids = wc_get_attribute_taxonomy_ids(); $return = []; foreach ( $ids as $id ) { $object = wc_get_attribute( $id ); $data = $this->prepare_item_for_response( $object, $request ); $return[] = $this->prepare_response_for_collection( $data ); } return rest_ensure_response( $return ); } }