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 <noreply@anthropic.com>
This commit is contained in:
2026-01-14 21:26:59 +09:00
parent 433b83bd8f
commit a00e28702f

View File

@@ -370,7 +370,7 @@ class DDHH_JM_Formidable {
*/ */
public static function create_job_submission_form() { public static function create_job_submission_form() {
// Check if Formidable is active // Check if Formidable is active
if ( ! class_exists( 'FrmForm' ) || ! class_exists( 'FrmFormAction' ) ) { if ( ! class_exists( 'FrmForm' ) || ! class_exists( 'FrmFormActionsController' ) ) {
return; 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() { public static function create_job_edit_form() {
// Check if Formidable is active // Check if Formidable is active
if ( ! class_exists( 'FrmForm' ) || ! class_exists( 'FrmFormAction' ) ) { if ( ! class_exists( 'FrmForm' ) || ! class_exists( 'FrmFormActionsController' ) ) {
return; 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() { public static function create_job_deactivation_form() {
// Check if Formidable is active // Check if Formidable is active
if ( ! class_exists( 'FrmForm' ) || ! class_exists( 'FrmFormAction' ) ) { if ( ! class_exists( 'FrmForm' ) || ! class_exists( 'FrmFormActionsController' ) ) {
return; 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,
)
);
} }
} }