Changeset 2591181
- Timestamp:
- 08/31/2021 03:29:28 AM (5 years ago)
- Location:
- kledo/trunk
- Files:
-
- 1 deleted
- 3 edited
-
.gitignore (deleted)
-
includes/helpers.php (modified) (1 diff)
-
includes/requests/class-wc-kledo-request-invoice.php (modified) (4 diffs)
-
kledo.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kledo/trunk/includes/helpers.php
r2591179 r2591181 189 189 } 190 190 } 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 $product197 *198 * @return string199 * @since 1.1.0200 */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 26 26 * @throws \Exception 27 27 * @since 1.0.0 28 * @since 1.1.0 Add ` include_tax` field.28 * @since 1.1.0 Add `has_tax` field. 29 29 */ 30 30 public function create_invoice( WC_Order $order ) { … … 40 40 'due_date' => $order->get_date_completed()->format( 'Y-m-d' ), 41 41 '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 ), 43 43 'items' => $this->get_items( $order ), 44 44 'warehouse' => wc_kledo_get_warehouse(), … … 80 80 * @throws \Exception 81 81 * @since 1.0.0 82 * @since 1.1.0 Added `has_tax` field.83 82 * 84 83 * @noinspection PhpPossiblePolymorphicInvocationInspection … … 98 97 'regular_price' => $product->get_regular_price(), 99 98 'sale_price' => $product->get_sale_price(), 100 'has_tax' => wc_kledo_product_has_tax( $product ),101 99 'photo' => wp_get_attachment_url( $product->get_image_id() ) ?: null, 102 100 'category_name' => 'WooCommerce', -
kledo/trunk/kledo.php
r2591179 r2591181 27 27 * @since 1.0.0 28 28 */ 29 const VERSION = '1.1. 0';29 const VERSION = '1.1.1'; 30 30 31 31 /**
Note: See TracChangeset
for help on using the changeset viewer.