Hi,
I had the same problem.
I found a quick solution. I am not a WP guru, but the solution works for me.
It seams that with the CF7 5.5.3 the Post’s meta is called different, so this is what you have to do to work.
Open the plug-in’s folder (wp-content/plugins/cf7-to-api/) go to “include” folder and open in editing mode the “class-cf7-api-admin.php”.
Search for the «wpcf7_integrations» function, it should be at line 146 and add in the beginning of the function the follow code (right before $wpcf7_[…] declarations):
$wpcf7 = WPCF7_ContactForm::get_current();
$form_id = $wpcf7->id();
Now you have to change the first 4 declaration from:
$wpcf7_api_data = $post->prop( 'wpcf7_api_data' );
$wpcf7_api_data_map = $post->prop( 'wpcf7_api_data_map' );
$wpcf7_api_data_template = $post->prop( 'template' );
$wpcf7_api_json_data_template = $post->prop( 'json_template' );
With this:
$wpcf7_api_data = get_post_meta($form_id,'_wpcf7_api_data')[0];
$wpcf7_api_data_map = get_post_meta($form_id,'_wpcf7_api_data_map')[0];
$wpcf7_api_data_template = get_post_meta($form_id,'template');
$wpcf7_api_json_data_template = get_post_meta($form_id,'json_template');
Now it should work fine!
Hope it helps!
-
This reply was modified 4 years, 3 months ago by
sealview. Reason: more comprehensive
So it seems the plugin is not supported anymore? The dev of the plugin would sell it…
Plugin is working
Download plugin 1.4.11
https://ww.wp.xz.cn/plugins/cf7-to-api-basic-auth/advanced/ at the bottom of that page.
Best regards
Malinka