Plugin Directory

Changeset 3081802


Ignore:
Timestamp:
05/06/2024 08:59:38 AM (2 years ago)
Author:
firmafy
Message:

Update to version 1.2.1 from GitHub

Location:
firmafy
Files:
13 edited
1 copied

Legend:

Unmodified
Added
Removed
  • firmafy/assets/screenshot-5.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • firmafy/assets/screenshot-6.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • firmafy/assets/screenshot-7.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • firmafy/tags/1.2.1/firmafy.php

    r3050518 r3081802  
    44 * Plugin URI:  https://firmafy.com
    55 * Description: Validate legally your forms in WordPress.
    6  * Version:     1.2.0
     6 * Version:     1.2.1
    77 * Author:      Firmafy
    88 * Author URI:  https://firmafy.com
     
    2424defined( 'ABSPATH' ) || die( 'No script kiddies please!' );
    2525
    26 define( 'FIRMAFY_VERSION', '1.2.0' );
     26define( 'FIRMAFY_VERSION', '1.2.1' );
    2727define( 'FIRMAFY_PLUGIN', __FILE__ );
    2828define( 'FIRMAFY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
  • firmafy/tags/1.2.1/includes/class-firmafy-admin-widgets.php

    r3050518 r3081802  
    6161     */
    6262    public function metabox_show_order( $post ) {
    63         $order       = wc_get_order( $post->get_id() );
     63        $order_id    = method_exists( $post, 'get_id' ) ? $post->get_id() : $post->ID;
     64        $order       = wc_get_order( $order_id );
    6465        $sign_csv    = $order->get_meta( '_firmafy_csv' );
    6566        $sign_status = $order->get_meta( '_firmafy_status' );
  • firmafy/tags/1.2.1/includes/class-helpers-firmafy.php

    r3050518 r3081802  
    374374            $pdf_content = $html2pdf->Output( $filename, 'S' );
    375375        } catch ( Html2PdfException $e ) { //phpcs:ignore
    376             //error
    377376            $formatter = new ExceptionFormatter( $e ); //phpcs:ignore
    378377            error_log( 'Unexpected Error!<br>Can not load PDF this time! ' . $formatter->getHtmlMessage() );
     
    393392        $result_api = $this->api_post( $settings, 'request', $query );
    394393
     394        if ( 'error' === $result_api['status'] ) {
     395            $result_api['message'] = isset( $result_api['data'] ) ? $result_api['data'] : '';
     396        }
    395397        return $result_api;
    396398    }
     
    464466        $content = str_replace( '{referencia}', $post_id, $content );
    465467
     468        // Page Break.
     469        //$content = str_replace( '<!--nextpage-->', '<pagebreak>', $content );
     470
    466471        return $content;
    467472    }
  • firmafy/tags/1.2.1/includes/forms/class-gravityforms.php

    r3050518 r3081802  
    181181            // Normal WAY.
    182182            foreach ( $field_maps as $var_key => $field_id ) {
    183                 $field = RGFormsModel::get_field( $form, $field_id );
    184    
     183                $field      = RGFormsModel::get_field( $form, $field_id );
     184                $field_type = RGFormsModel::get_input_type( $field );
     185
    185186                if ( isset( $field['type'] ) && GFCommon::is_product_field( $field['type'] ) && rgar( $field, 'enablePrice' ) ) {
    186                     $ary          = explode('|', $entry[ $field_id ] );
    187                     $product_name = count($ary) > 0 ? $ary[0] : '';
    188                     $merge_vars[] = array(
    189                         'name' => $var_key,
     187                    $ary          = explode( '|', $entry[ $field_id ] );
     188                    $product_name = count( $ary ) > 0 ? $ary[0] : '';
     189                    $merge_vars[] = array(
     190                        'name'  => $var_key,
    190191                        'value' => $product_name,
    191192                    );
    192                 } elseif ( $field && RGFormsModel::get_input_type( $field ) == 'checkbox' ) {
     193                } elseif ( $field && 'checkbox' === $field_type ) {
    193194                    $value = '';
    194195                    foreach ( $field['inputs'] as $input ) {
     
    205206                        'value' => $value,
    206207                    );
    207                 } elseif ( $field && RGFormsModel::get_input_type( $field ) == 'multiselect' ) {
     208                } elseif ( $field && 'multiselect' === $field_type ) {
    208209                    $value = apply_filters( 'firmafy_field_value', rgar( $entry, $field_id ), $form['id'], $field_id, $entry );
    209210                    $value = str_replace( ',', '|', $value );
     
    213214                        'value' => $value,
    214215                    );
    215                 } elseif ( $field && RGFormsModel::get_input_type( $field ) == 'textarea' ) {
     216                } elseif ( $field && 'textarea' === $field_type ) {
    216217                    $value        = apply_filters( 'firmafy_field_value', rgar( $entry, $field_id ), $form['id'], $field_id, $entry );
    217218                    $value        = str_replace( array( "\r", "\n" ), ' ', $value );
     219                    $merge_vars[] = array(
     220                        'name'  => $var_key,
     221                        'value' => $value,
     222                    );
     223                } elseif ( $field && 'name' === $field_type ) {
     224                    $value        = rgar( $entry, $field_id . '.3' );
     225                    $value       .= ' ' . rgar( $entry, $field_id . '.6' );
    218226                    $merge_vars[] = array(
    219227                        'name'  => $var_key,
  • firmafy/tags/1.2.1/readme.txt

    r3050518 r3081802  
    55Requires PHP: 5.6
    66Tested up to: 6.5
    7 Stable tag: 1.2.0
    8 Version: 1.2.0
     7Stable tag: 1.2.1
     8Version: 1.2.1
    99License: GPL2
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    9191
    9292== Changelog ==
     93= 1.2.1 =
     94*  Added: Support Gravity Forms Field name.
     95*    Fix: Prevents error in order widget for HPOS.
     96
    9397= 1.2.0 =
    9498*    Added Self signers for company users.
  • firmafy/trunk/firmafy.php

    r3050518 r3081802  
    44 * Plugin URI:  https://firmafy.com
    55 * Description: Validate legally your forms in WordPress.
    6  * Version:     1.2.0
     6 * Version:     1.2.1
    77 * Author:      Firmafy
    88 * Author URI:  https://firmafy.com
     
    2424defined( 'ABSPATH' ) || die( 'No script kiddies please!' );
    2525
    26 define( 'FIRMAFY_VERSION', '1.2.0' );
     26define( 'FIRMAFY_VERSION', '1.2.1' );
    2727define( 'FIRMAFY_PLUGIN', __FILE__ );
    2828define( 'FIRMAFY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
  • firmafy/trunk/includes/class-firmafy-admin-widgets.php

    r3050518 r3081802  
    6161     */
    6262    public function metabox_show_order( $post ) {
    63         $order       = wc_get_order( $post->get_id() );
     63        $order_id    = method_exists( $post, 'get_id' ) ? $post->get_id() : $post->ID;
     64        $order       = wc_get_order( $order_id );
    6465        $sign_csv    = $order->get_meta( '_firmafy_csv' );
    6566        $sign_status = $order->get_meta( '_firmafy_status' );
  • firmafy/trunk/includes/class-helpers-firmafy.php

    r3050518 r3081802  
    374374            $pdf_content = $html2pdf->Output( $filename, 'S' );
    375375        } catch ( Html2PdfException $e ) { //phpcs:ignore
    376             //error
    377376            $formatter = new ExceptionFormatter( $e ); //phpcs:ignore
    378377            error_log( 'Unexpected Error!<br>Can not load PDF this time! ' . $formatter->getHtmlMessage() );
     
    393392        $result_api = $this->api_post( $settings, 'request', $query );
    394393
     394        if ( 'error' === $result_api['status'] ) {
     395            $result_api['message'] = isset( $result_api['data'] ) ? $result_api['data'] : '';
     396        }
    395397        return $result_api;
    396398    }
     
    464466        $content = str_replace( '{referencia}', $post_id, $content );
    465467
     468        // Page Break.
     469        //$content = str_replace( '<!--nextpage-->', '<pagebreak>', $content );
     470
    466471        return $content;
    467472    }
  • firmafy/trunk/includes/forms/class-gravityforms.php

    r3050518 r3081802  
    181181            // Normal WAY.
    182182            foreach ( $field_maps as $var_key => $field_id ) {
    183                 $field = RGFormsModel::get_field( $form, $field_id );
    184    
     183                $field      = RGFormsModel::get_field( $form, $field_id );
     184                $field_type = RGFormsModel::get_input_type( $field );
     185
    185186                if ( isset( $field['type'] ) && GFCommon::is_product_field( $field['type'] ) && rgar( $field, 'enablePrice' ) ) {
    186                     $ary          = explode('|', $entry[ $field_id ] );
    187                     $product_name = count($ary) > 0 ? $ary[0] : '';
    188                     $merge_vars[] = array(
    189                         'name' => $var_key,
     187                    $ary          = explode( '|', $entry[ $field_id ] );
     188                    $product_name = count( $ary ) > 0 ? $ary[0] : '';
     189                    $merge_vars[] = array(
     190                        'name'  => $var_key,
    190191                        'value' => $product_name,
    191192                    );
    192                 } elseif ( $field && RGFormsModel::get_input_type( $field ) == 'checkbox' ) {
     193                } elseif ( $field && 'checkbox' === $field_type ) {
    193194                    $value = '';
    194195                    foreach ( $field['inputs'] as $input ) {
     
    205206                        'value' => $value,
    206207                    );
    207                 } elseif ( $field && RGFormsModel::get_input_type( $field ) == 'multiselect' ) {
     208                } elseif ( $field && 'multiselect' === $field_type ) {
    208209                    $value = apply_filters( 'firmafy_field_value', rgar( $entry, $field_id ), $form['id'], $field_id, $entry );
    209210                    $value = str_replace( ',', '|', $value );
     
    213214                        'value' => $value,
    214215                    );
    215                 } elseif ( $field && RGFormsModel::get_input_type( $field ) == 'textarea' ) {
     216                } elseif ( $field && 'textarea' === $field_type ) {
    216217                    $value        = apply_filters( 'firmafy_field_value', rgar( $entry, $field_id ), $form['id'], $field_id, $entry );
    217218                    $value        = str_replace( array( "\r", "\n" ), ' ', $value );
     219                    $merge_vars[] = array(
     220                        'name'  => $var_key,
     221                        'value' => $value,
     222                    );
     223                } elseif ( $field && 'name' === $field_type ) {
     224                    $value        = rgar( $entry, $field_id . '.3' );
     225                    $value       .= ' ' . rgar( $entry, $field_id . '.6' );
    218226                    $merge_vars[] = array(
    219227                        'name'  => $var_key,
  • firmafy/trunk/readme.txt

    r3050518 r3081802  
    55Requires PHP: 5.6
    66Tested up to: 6.5
    7 Stable tag: 1.2.0
    8 Version: 1.2.0
     7Stable tag: 1.2.1
     8Version: 1.2.1
    99License: GPL2
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    9191
    9292== Changelog ==
     93= 1.2.1 =
     94*  Added: Support Gravity Forms Field name.
     95*    Fix: Prevents error in order widget for HPOS.
     96
    9397= 1.2.0 =
    9498*    Added Self signers for company users.
Note: See TracChangeset for help on using the changeset viewer.