From 61f14afd3bbb697b378c7ab9d1bd5e35092d59d0 Mon Sep 17 00:00:00 2001 From: Chris Huber Date: Mon, 27 Apr 2026 01:40:42 +0000 Subject: [PATCH] fix: correct ability slug for job status endpoint The get_job_status handler was calling wp_get_ability('datamachine/jobs-get') but the registered ability slug is 'datamachine/get-jobs'. This caused every call to GET /datamachine/v1/socials/jobs/{id} to return 500 with 'Job lookup ability not available'. --- inc/RestApi.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/RestApi.php b/inc/RestApi.php index 72a02c4ed..df61a2762 100644 --- a/inc/RestApi.php +++ b/inc/RestApi.php @@ -1271,7 +1271,7 @@ public static function cross_post( \WP_REST_Request $request ) { * Get job status by job ID. * * Returns the DM job record including engine_data (per-platform results). - * Thin wrapper around datamachine/jobs-get ability. + * Thin wrapper around datamachine/get-jobs ability. * * @param \WP_REST_Request $request Request object. * @return \WP_REST_Response @@ -1279,7 +1279,7 @@ public static function cross_post( \WP_REST_Request $request ) { public static function get_job_status( \WP_REST_Request $request ) { $job_id = intval( $request->get_param( 'job_id' ) ); - $ability = wp_get_ability( 'datamachine/jobs-get' ); + $ability = wp_get_ability( 'datamachine/get-jobs' ); if ( ! $ability ) { return new \WP_REST_Response(