kennym / cf7-to-api

LOOKING FOR MAINTAINER. Wordpress plugin to transmit contact form 7 entries to remote API using POST or GET
https://wordpress.org/plugins/cf7-to-api-basic-auth/
52 stars 30 forks source link

Save error with latest CF7 and feature request #52

Open ats-org opened 2 years ago

ats-org commented 2 years ago

Greetings,

There seems to be an issue with the latest CF& and being able to update, others have rolled back to resolve the issue but unfortunately, that is something we cannot do.

https://wordpress.org/support/topic/settings-not-saving-and-showing-up-as-blank/

Also, a possible feature request would be to instead of adding the form fields in the body of the post would it be possible to append the JSON object as a query parameter?

sealview commented 2 years ago

Salutare, Here you may find a quick solution. https://wordpress.org/support/topic/problems-after-update-49/#post-15341751 Hope it helps.

tconley commented 2 years ago

With CF7 5.5.4 @sealview solution works for saving, but the API is never called when a form is submitted. The only error i saw when turning on WP debug was

Array to string conversion in wp-content/plugins/cf7-to-api-basic-auth/includes/class-cf7-api-admin.php

on these two lines:

<textarea name="template" rows="12" dir="ltr" placeholder="<?php echo esc_attr( $xml_placeholder );?>"><?php echo isset( $wpcf7_api_data_template ) ? $wpcf7_api_data_template : ""; ?></textarea>

<textarea name="json_template" rows="12" dir="ltr" placeholder="<?php echo esc_attr( $json_placeholder );?>"><?php echo isset( $wpcf7_api_json_data_template ) ? $wpcf7_api_json_data_template : ""; ?></textarea>