Last active
August 16, 2019 04:06
-
-
Save wooexperte/fe9596a3f310e718037baab8a257f5f1 to your computer and use it in GitHub Desktop.
WooCommerce Gebühr Warenkorb
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
function add_checkout_fee() { | |
global $woocommerce; | |
$woocommerce->cart->add_fee( __('Gebühr', 'woocommerce'), 5 ); // Text im Warenkorb und Gebühr anpassen | |
} | |
add_action( 'woocommerce_cart_calculate_fees', 'add_checkout_fee' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how can I set this to apply the fee only when an item from a certain category is added?
[wie kann ich dies einstellen, dass die Gebühr nur verwendet wird, wenn ein Artikel aus einer Bestimmten Kategorie hinzugefügt wird?]
Ciao, Karsten