namespace = 'tribe/event-aggregator/v1'; register_rest_route( $this->namespace, '/import/(?P\w+)/batch', [ 'methods' => WP_REST_Server::CREATABLE, 'args' => $batch_endpoint->CREATE_args(), 'permission_callback' => [ $batch_endpoint, 'can_create' ], 'callback' => [ $batch_endpoint, 'create' ], ] ); register_rest_route( $this->namespace, '/import/(?P\w+)/state', [ 'methods' => WP_REST_Server::CREATABLE, 'args' => $state_endpoint->CREATE_args(), 'permission_callback' => [ $state_endpoint, 'can_create' ], 'callback' => [ $state_endpoint, 'create' ], ] ); } }