Changeset 3050918
- Timestamp:
- 03/14/2024 09:24:58 AM (2 years ago)
- File:
-
- 1 edited
-
litcommerce/trunk/litcommerce.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
litcommerce/trunk/litcommerce.php
r3041796 r3050918 3 3 Plugin Name: LitCommerce 4 4 Description: Helps you easily integrate your WooCommerce store with LitCommerce. 5 Version: 1.1. 35 Version: 1.1.4 6 6 Author: LitCommerce 7 7 Author URI: https://litcommerce.com … … 393 393 function litc_woocommerce_hidden_order_itemmeta($arr) { 394 394 $arr[] = '_litc_item_tax'; 395 $arr[] = '_litc_order_id'; 395 396 return $arr; 396 397 } 397 398 398 399 add_filter('woocommerce_hidden_order_itemmeta', 'litc_woocommerce_hidden_order_itemmeta', 10, 1); 400 function litc_woocommerce_find_rates( $matched_tax_rates, $args ) { 401 if(@$_GET['from_litc'] == 1 && @$_GET['litc_custom_tax_rate']){ 402 return [ 403 0 => ['rate' => $_GET['litc_custom_tax_rate'], 404 'label' => @$_GET['litc_custom_tax_label']?$_GET['litc_custom_tax_label']:'Tax1', 405 'shipping' => 'yes', 406 'compound' => 'no' ,] 407 ]; 408 } 409 return $matched_tax_rates; 410 411 412 } 413 414 add_filter('woocommerce_find_rates', 'litc_woocommerce_find_rates', 10, 3); 415 function litc_woocommerce_rate_label( $rate_name, $key ) { 416 if(@$_GET['litc_custom_tax_label']){ 417 return @$_GET['litc_custom_tax_label']; 418 } 419 return $rate_name; 420 421 422 } 423 424 add_filter('woocommerce_rate_label', 'litc_woocommerce_rate_label', 10, 3);
Note: See TracChangeset
for help on using the changeset viewer.