Plugin Directory

Changeset 2591181


Ignore:
Timestamp:
08/31/2021 03:29:28 AM (5 years ago)
Author:
oggix
Message:

v1.1.1

Location:
kledo/trunk
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • kledo/trunk/includes/helpers.php

    r2591179 r2591181  
    189189    }
    190190}
    191 
    192 if ( ! function_exists( 'wc_kledo_product_has_tax' ) ) {
    193     /**
    194      * Check if the product has tax or not.
    195      *
    196      * @param  \WC_Product  $product
    197      *
    198      * @return string
    199      * @since 1.1.0
    200      */
    201     function wc_kledo_product_has_tax( WC_Product $product ) {
    202         $tax = $product->get_tax_status();
    203 
    204         return strtolower($tax) === 'none' ? 'no' : 'yes';
    205     }
    206 }
  • kledo/trunk/includes/requests/class-wc-kledo-request-invoice.php

    r2591179 r2591181  
    2626     * @throws \Exception
    2727     * @since 1.0.0
    28      * @since 1.1.0 Add `include_tax` field.
     28     * @since 1.1.0 Add `has_tax` field.
    2929     */
    3030    public function create_invoice( WC_Order $order ) {
     
    4040            'due_date'             => $order->get_date_completed()->format( 'Y-m-d' ),
    4141            'memo'                 => $order->get_customer_note(),
    42             'include_tax'          => wc_kledo_include_tax_or_not( $order ),
     42            'has_tax'              => wc_kledo_include_tax_or_not( $order ),
    4343            'items'                => $this->get_items( $order ),
    4444            'warehouse'            => wc_kledo_get_warehouse(),
     
    8080     * @throws \Exception
    8181     * @since 1.0.0
    82      * @since 1.1.0 Added `has_tax` field.
    8382     *
    8483     * @noinspection PhpPossiblePolymorphicInvocationInspection
     
    9897                'regular_price' => $product->get_regular_price(),
    9998                'sale_price'    => $product->get_sale_price(),
    100                 'has_tax'       => wc_kledo_product_has_tax( $product ),
    10199                'photo'         => wp_get_attachment_url( $product->get_image_id() ) ?: null,
    102100                'category_name' => 'WooCommerce',
  • kledo/trunk/kledo.php

    r2591179 r2591181  
    2727     * @since 1.0.0
    2828     */
    29     const VERSION = '1.1.0';
     29    const VERSION = '1.1.1';
    3030
    3131    /**
Note: See TracChangeset for help on using the changeset viewer.