Skip to content

Instantly share code, notes, and snippets.

@furahaclothing
Created May 7, 2014 10:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save furahaclothing/bba575c6fcce4243d8ab to your computer and use it in GitHub Desktop.
Save furahaclothing/bba575c6fcce4243d8ab to your computer and use it in GitHub Desktop.
welcart消費税別にした際、合計金額に消費税を足す
//総合計金額をフィルター
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