Changeset 3407088
- Timestamp:
- 12/01/2025 05:19:15 PM (4 months ago)
- Location:
- formdev/trunk
- Files:
-
- 3 edited
-
api/Formdev.php (modified) (4 diffs)
-
formdev.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
formdev/trunk/api/Formdev.php
r3369443 r3407088 332 332 if($sessions->maxCount > 24){ 333 333 $pages = $sessions->maxCount/24; 334 $pages = ceil($pages); 334 335 $i = 1; 335 336 while ($i <= $pages) { … … 352 353 ]; 353 354 $where = ['meta_key' => 'sessions']; 354 $updated = $wpdb->update($table_name, $meta, $where); 355 $existing_meta = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb->prefix}formdev_metas WHERE meta_key = %s LIMIT 1", 'sessions')); 356 if(isset($existing_meta->meta_key)){ 357 $updated = $wpdb->update($table_name, $meta, $where); 358 }else{ 359 $meta['meta_key'] = 'sessions'; 360 $meta['created_at'] = gmdate('Y-m-d H:i:s'); 361 $wpdb->insert($table_name, $meta); 362 } 355 363 356 364 $societes = $this->call('societe/liste'); … … 629 637 )); 630 638 639 $post_content = !empty($data->txtWeb) ? $data->txtWeb : ''; 640 if(empty($post_content)){ 641 $post_content = !empty($data->programme) ? $data->programme : 'Aucune description disponible'; 642 } 643 631 644 if (!$product_id) { 632 645 // Créer le produit 633 646 $product_id = wp_insert_post([ 634 647 'post_title' => $data->nomFormation, 635 'post_content' => !empty($data->objectifs) ? $data->objectifs : 'Aucune description disponible',648 'post_content' => $post_content, 636 649 'post_status' => 'publish', 637 650 'post_type' => 'product', … … 663 676 'ID' => $product_id, 664 677 'post_title' => $data->nomFormation, 665 'post_content' => !empty($data->objectifs) ? $data->objectifs : 'Aucune description disponible',678 'post_content' => $post_content, 666 679 'post_status' => $post_status, 667 680 ]; -
formdev/trunk/formdev.php
r3388965 r3407088 5 5 * Plugin URI: https://www.form-dev.fr 6 6 * Description: Synchroniser automatiquement les formations présentes dans votre CRM Formdev 7 * Version: 1.2. 47 * Version: 1.2.5 8 8 * Author: Formdev 9 9 * Author URI: https://app.form-dev.fr … … 16 16 // Définition de la version du plugin 17 17 if (!defined('FORMEDEV_VERSION')) { 18 define('FORMEDEV_VERSION', '1.2. 3');18 define('FORMEDEV_VERSION', '1.2.5'); 19 19 } 20 20 -
formdev/trunk/readme.txt
r3388965 r3407088 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1.2. 47 Stable tag: 1.2.5 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 68 68 69 69 == Changelog == 70 = 1.2.5 = 71 * fix objectifs & txtWeb 72 70 73 = 1.2.4 = 71 74 * add qualifIntervenant & remove HT
Note: See TracChangeset
for help on using the changeset viewer.