Plugin Directory

Changeset 3181509


Ignore:
Timestamp:
11/04/2024 02:24:26 PM (17 months ago)
Author:
aliakro
Message:

Update to version 10.18.1 from GitHub

Location:
weight-loss-tracker
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • weight-loss-tracker/tags/10.18.1/pro-features/hook-gravity-forms.php

    r2965347 r3181509  
    179179
    180180    // Add weight entry!
    181     $result = ws_ls_db_entry_set( $weight , $user_id );
    182 
    183     if ( false === empty( $result ) ) {
     181    $entry_id = ws_ls_db_entry_set( $weight , $user_id );
     182
     183    if ( false === empty( $entry_id ) ) {
    184184
    185185        GFCommon::log_debug( 'Weight entry saved!' );
     
    187187        foreach ( $meta as $key => $value ) {
    188188
    189             $meta_field = [ 'entry_id' => $result, 'key' => $key, 'value' => $value ];
     189            $meta_field = [ 'entry_id' => $entry_id, 'key' => $key, 'value' => $value ];
    190190
    191191            GFCommon::log_debug( 'Adding meta data: ' . print_r( $meta_field, true ) );
     
    193193            ws_ls_meta_add_to_entry( $meta_field );
    194194        }
     195
     196        ws_ls_webhooks_manually_fire_weight( $user_id, $entry_id, 'add' );
     197
    195198    } else {
    196199        GFCommon::log_debug( 'Weight entry did not save correctly :(' );
  • weight-loss-tracker/tags/10.18.1/pro-features/web-hooks.php

    r3171955 r3181509  
    148148 * Manually fire an a web hook for this weight entry
    149149 */
    150 function ws_ls_webhooks_manually_fire_weight( $user_id, $entry_id ) {
     150function ws_ls_webhooks_manually_fire_weight( $user_id, $entry_id, $mode_label = 'resend' ) {
    151151
    152152    if ( true === empty( $user_id ) ) {
     
    160160    $entry = ws_ls_entry_get( [ 'user-id' => $user_id, 'id' => $entry_id, 'meta' => true ] );
    161161
    162     ws_ls_webhooks_weight_target( [ 'type' => 'weight', 'mode' => 'resend' ], $entry );
     162    ws_ls_webhooks_weight_target( [ 'type' => 'weight', 'mode' => $mode_label ], $entry );
    163163}
    164164
  • weight-loss-tracker/tags/10.18.1/readme.txt

    r3171955 r3181509  
    44Requires at least: 6.0
    55Tested up to: 6.5
    6 Stable tag: 10.18
     6Stable tag: 10.18.1
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    170170
    171171== Changelog ==
     172
     173= 10.18.1 =
     174
     175* Bug fix: Fire data to web hooks (if enabled) on GravityForm submissions.
    172176
    173177= 10.18 =
  • weight-loss-tracker/tags/10.18.1/weight-loss-tracker.php

    r3171955 r3181509  
    66 * Plugin Name:         Weight Tracker
    77 * Description:         Allow your users to track their weight, body measurements, photos and other pieces of custom data. Display in charts, tables, shortcodes and widgets. Manage their data, issue awards, email notifications, etc! Provide advanced data on Body Mass Index (BMI), Basal Metabolic Rate (BMR), Calorie intake, Harris Benedict Formula, Macronutrients Calculator and more.
    8  * Version:             10.18
     8 * Version:             10.18.1
    99 * Requires at least:   6.0
    1010 * Tested up to:        6.5
     
    1818 */
    1919
    20 define( 'WE_LS_CURRENT_VERSION', '10.18' );
     20define( 'WE_LS_CURRENT_VERSION', '10.18.1' );
    2121define( 'WS_LS_ABSPATH', plugin_dir_path( __FILE__ ) );
    2222define( 'WS_LS_BASE_URL', plugin_dir_url( __FILE__ ) );
  • weight-loss-tracker/trunk/pro-features/hook-gravity-forms.php

    r2965347 r3181509  
    179179
    180180    // Add weight entry!
    181     $result = ws_ls_db_entry_set( $weight , $user_id );
    182 
    183     if ( false === empty( $result ) ) {
     181    $entry_id = ws_ls_db_entry_set( $weight , $user_id );
     182
     183    if ( false === empty( $entry_id ) ) {
    184184
    185185        GFCommon::log_debug( 'Weight entry saved!' );
     
    187187        foreach ( $meta as $key => $value ) {
    188188
    189             $meta_field = [ 'entry_id' => $result, 'key' => $key, 'value' => $value ];
     189            $meta_field = [ 'entry_id' => $entry_id, 'key' => $key, 'value' => $value ];
    190190
    191191            GFCommon::log_debug( 'Adding meta data: ' . print_r( $meta_field, true ) );
     
    193193            ws_ls_meta_add_to_entry( $meta_field );
    194194        }
     195
     196        ws_ls_webhooks_manually_fire_weight( $user_id, $entry_id, 'add' );
     197
    195198    } else {
    196199        GFCommon::log_debug( 'Weight entry did not save correctly :(' );
  • weight-loss-tracker/trunk/pro-features/web-hooks.php

    r3171955 r3181509  
    148148 * Manually fire an a web hook for this weight entry
    149149 */
    150 function ws_ls_webhooks_manually_fire_weight( $user_id, $entry_id ) {
     150function ws_ls_webhooks_manually_fire_weight( $user_id, $entry_id, $mode_label = 'resend' ) {
    151151
    152152    if ( true === empty( $user_id ) ) {
     
    160160    $entry = ws_ls_entry_get( [ 'user-id' => $user_id, 'id' => $entry_id, 'meta' => true ] );
    161161
    162     ws_ls_webhooks_weight_target( [ 'type' => 'weight', 'mode' => 'resend' ], $entry );
     162    ws_ls_webhooks_weight_target( [ 'type' => 'weight', 'mode' => $mode_label ], $entry );
    163163}
    164164
  • weight-loss-tracker/trunk/readme.txt

    r3171955 r3181509  
    44Requires at least: 6.0
    55Tested up to: 6.5
    6 Stable tag: 10.18
     6Stable tag: 10.18.1
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    170170
    171171== Changelog ==
     172
     173= 10.18.1 =
     174
     175* Bug fix: Fire data to web hooks (if enabled) on GravityForm submissions.
    172176
    173177= 10.18 =
  • weight-loss-tracker/trunk/weight-loss-tracker.php

    r3171955 r3181509  
    66 * Plugin Name:         Weight Tracker
    77 * Description:         Allow your users to track their weight, body measurements, photos and other pieces of custom data. Display in charts, tables, shortcodes and widgets. Manage their data, issue awards, email notifications, etc! Provide advanced data on Body Mass Index (BMI), Basal Metabolic Rate (BMR), Calorie intake, Harris Benedict Formula, Macronutrients Calculator and more.
    8  * Version:             10.18
     8 * Version:             10.18.1
    99 * Requires at least:   6.0
    1010 * Tested up to:        6.5
     
    1818 */
    1919
    20 define( 'WE_LS_CURRENT_VERSION', '10.18' );
     20define( 'WE_LS_CURRENT_VERSION', '10.18.1' );
    2121define( 'WS_LS_ABSPATH', plugin_dir_path( __FILE__ ) );
    2222define( 'WS_LS_BASE_URL', plugin_dir_url( __FILE__ ) );
Note: See TracChangeset for help on using the changeset viewer.