récupération des données
-
Hi
My current WP configuration
PHP/MySQL version: 8.1
Theme used: Custom theme
Installed plugins: ACF to REST API, ACF: Better Search, Akismet Anti-spam: Spam Protection, Content Views, Content Views Pro, Import and export users and customers, Import WP, Newsletter, Newsletter – Addons Manager and Support, Newsletter – Import/Export, PublishPress Capabilities, PublishPress Permissions, Secure Custom Fields, Smush, SVG Support, Ultimate Member, WP Mail SMTP, WP Ultimate CSV Importer – Custom Fields Import, Yoast SEO, Make
Hosting provider: OVH PRO version
Website address: https://www.test.cinema-jacques-demy.fr/I am trying to enrich a Gsheet file by retrieving the data contained in SCF.
I have tried using MAKE and ZAPIER without successful results. Do you have a strategy that works to automate this?
In addition to configuring Make or Zapier via webhook, I have modified my
functions.php
file in my environment; here is a rough outline of the script in question, using only one field.// FrThib --> essais make
function send_data_to_zapier() {
// Remplacer données SCF
$field_value = scf_get_field('resume_du_film'); //resume_du_film est un nom de champ connu
// Envoi de la donnée d'essai
$data = array(
'field_value' => $field_value,
);
// URL du webhook Make
$webhook_url = 'https://hook.eu2.make.com//xxxxxx/xxxxx/'; // URL récupéré dans make
// Envoyer les données au webhook make
$response = wp_remote_post($webhook_url, array(
'method' => 'POST',
'body' => json_encode($data),
'headers' => array(
'Content-Type' => 'application/json'
)
));
// Vérifiez si l'envoi a réussi
if (is_wp_error($response)) {
error_log('Erreur lors de l\'envoi des données à make');
} else {
error_log('Données envoyées avec succès à make');
}
}
add_action('init', 'send_data_to_make');In the log, I have roughly the following information:
[11-Nov-2024 18:20:13 UTC] La fonction scf_get_field est indisponible.
[11-Nov-2024 18:20:13 UTC] PHP Deprecated: wp_smush_should_skip_parse est?obsolète?depuis la version 3.16.1 ! Utilisez wp_smush_should_skip_lazy_load à la place. in /home/www/test/wp-includes/functions.php on line 6085Thank you for your help
Regards
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.