Plugin Directory

Changeset 3020409


Ignore:
Timestamp:
01/11/2024 02:23:55 PM (2 years ago)
Author:
extendago
Message:

Version 1.4.6

Location:
extendago-wp-connection/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extendago-wp-connection/trunk/extendago-wp-connection.php

    r3019318 r3020409  
    44Plugin URI:  http://www.arture.nl/extendago
    55Description: The Wordpress plugin for connecting Woocommerce with Extenda GO / Wallmob. You can manage your products inside Extenda GO or make your webshop as leading foor product manangement. You Stock changes will be two-way binding.
    6 Version:     1.4.5
     6Version:     1.4.6
    77Author:      Arture B.V.
    88Author URI:  https://arture.nl/
  • extendago-wp-connection/trunk/includes/admin/class-extendago-wp-connection-admin.php

    r3019318 r3020409  
    774774                                <td>
    775775                                    <select name="<?php echo $VatRate['id']; ?>">
    776                                         <option value="null"><?php echo __( 'Select tax rate', 'extendago-wp-connection-plugin' ); ?></option>
     776                                        <option value=""><?php echo __( 'Select tax rate', 'extendago-wp-connection-plugin' ); ?></option>
     777                                        <option value="null">Default <?php echo $default_tax; ?>%</option>
    777778                                        <?php
    778779                                        // Iterate Woocommerce vat rates
     
    791792                    </table>
    792793                    <div class="info"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
    793                         <?php echo __('Leave blank if you want to use the default VAT rate of Woocommerce: ', 'extendago-wp-connection-plugin') . $default_tax . '%'; ?>
     794                        <?php echo __('Important: If not set these VAT rates VAT value will be empty and no VAT is be calculated!', 'extendago-wp-connection-plugin'); ?>
    794795                    </div>
    795796                    <?php
  • extendago-wp-connection/trunk/includes/cronjob/class-extendago-cronjob-functions.php

    r3019700 r3020409  
    282282        $products_query = new WP_Query( $args );
    283283
     284        $extendago_costs_field = get_option('extendago_costs_field');
     285
    284286        $products = array();
    285287        foreach( $products_query->posts as $product_id ){
     
    398400                            }
    399401
    400                             $product_data['variations'][] = array(
     402                            $variant_data = array(
    401403                                'id' => $product_variation_id,
    402404                                'product_variant_name' => $product_variant_name,
     
    408410                                'vat_rate_id' => $vat_rate_id,
    409411                            );
     412
     413                            // Costs of goods
     414                            if ( isset($extendago_costs_field) && !empty($extendago_costs_field) ) {
     415                                $variant_data['cost_price'] = get_post_meta($product_variation_id, $extendago_costs_field, true);
     416                            }
     417
     418                            $product_data['variations'][] = $variant_data;
     419
    410420                        }
    411421                    }
     
    416426                $product_data['quantity'] = $product->get_stock_quantity();
    417427                $product_data['status'] = $product->get_stock_status();
     428            }
     429
     430            // Costs of goods
     431            if ( isset($extendago_costs_field) && !empty($extendago_costs_field) ) {
     432                $cost_price = get_post_meta($product->get_id(), $extendago_costs_field, true);
     433                $product_data['cost_price'] = number_format(((float)$cost_price * 100), 0, '.', '');
    418434            }
    419435
  • extendago-wp-connection/trunk/readme.txt

    r3019318 r3020409  
    55Requires at least: 6.0
    66Tested up to: 6.4.2
    7 Stable tag: 1.4.5
     7Stable tag: 1.4.6
    88Requires PHP: 7.4
    99License: GPLv2 or later
     
    3131== Changelog ==
    3232
     33= 1.4.6 =
     34* Some small improvements and tooltips
     35
    3336= 1.4.5 =
    3437* New feature for processing costs price
Note: See TracChangeset for help on using the changeset viewer.