Created
May 7, 2014 10:31
-
-
Save furahaclothing/bba575c6fcce4243d8ab to your computer and use it in GitHub Desktop.
welcart消費税別にした際、合計金額に消費税を足す
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//総合計金額をフィルター | |
add_filter('usces_filter_set_cart_fees_total_full_price', 'my_filter_set_cart_fees_total_full_price', 10, 6); | |
function my_filter_set_cart_fees_total_full_price(){ | |
global $usces; | |
$args = func_get_args(); | |
$tax = $usces->getTax( $args[1] ); | |
$total_full_price = $args[1] + $tax + $args[2] + $args[3] + $args[4] + $args[5]; | |
return $total_full_price; | |
} | |
//商品合計をフィルター | |
add_filter('usces_filter_set_cart_fees_total_price', 'my_usces_filter_set_cart_fees_total_price', 10, 6); | |
function my_usces_filter_set_cart_fees_total_price(){ | |
$args = func_get_args(); | |
$total_price = $args[1] + $args[2] + $args[3] + + $args[5]; | |
return $total_price; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment