From a00e28702f029594800ca755f427c823ba9eddf6 Mon Sep 17 00:00:00 2001 From: Viktor Miller Date: Wed, 14 Jan 2026 21:26:59 +0900 Subject: [PATCH] fix(07-01): replace deprecated FrmFormAction static calls with FrmFormActionsController - Changed FrmFormAction::create() to FrmFormActionsController::create_action() - Updated class_exists checks to use FrmFormActionsController - Fixes fatal error on plugin activation with modern Formidable Forms - Discovered during provider flow testing (Plan 07-01) Co-Authored-By: Claude Sonnet 4.5 --- includes/class-formidable.php | 36 +++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/includes/class-formidable.php b/includes/class-formidable.php index eb76fb4..0466751 100644 --- a/includes/class-formidable.php +++ b/includes/class-formidable.php @@ -370,7 +370,7 @@ class DDHH_JM_Formidable { */ public static function create_job_submission_form() { // Check if Formidable is active - if ( ! class_exists( 'FrmForm' ) || ! class_exists( 'FrmFormAction' ) ) { + if ( ! class_exists( 'FrmForm' ) || ! class_exists( 'FrmFormActionsController' ) ) { return; } @@ -523,7 +523,15 @@ class DDHH_JM_Formidable { ), ); - FrmFormAction::create( 'wppost', $form_id, $action_values ); + // Create the form action using the proper API + FrmFormActionsController::create_action( + $form_id, + array( + 'post_excerpt' => 'wppost', + 'post_content' => $action_values, + 'menu_order' => 1, + ) + ); } } @@ -532,7 +540,7 @@ class DDHH_JM_Formidable { */ public static function create_job_edit_form() { // Check if Formidable is active - if ( ! class_exists( 'FrmForm' ) || ! class_exists( 'FrmFormAction' ) ) { + if ( ! class_exists( 'FrmForm' ) || ! class_exists( 'FrmFormActionsController' ) ) { return; } @@ -685,7 +693,15 @@ class DDHH_JM_Formidable { ), ); - FrmFormAction::create( 'wppost', $form_id, $action_values ); + // Create the form action using the proper API + FrmFormActionsController::create_action( + $form_id, + array( + 'post_excerpt' => 'wppost', + 'post_content' => $action_values, + 'menu_order' => 1, + ) + ); } } @@ -732,7 +748,7 @@ class DDHH_JM_Formidable { */ public static function create_job_deactivation_form() { // Check if Formidable is active - if ( ! class_exists( 'FrmForm' ) || ! class_exists( 'FrmFormAction' ) ) { + if ( ! class_exists( 'FrmForm' ) || ! class_exists( 'FrmFormActionsController' ) ) { return; } @@ -813,7 +829,15 @@ class DDHH_JM_Formidable { ), ); - FrmFormAction::create( 'wppost', $form_id, $action_values ); + // Create the form action using the proper API + FrmFormActionsController::create_action( + $form_id, + array( + 'post_excerpt' => 'wppost', + 'post_content' => $action_values, + 'menu_order' => 1, + ) + ); } }