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 Paypal 2.9%+0.50 surcharge to Woocommerce cart / checkout | |
function df_add_handling_fee( $cart_object ) { | |
global $woocommerce; | |
$spfee = 0.00; // initialize special fee | |
$spfeeperprod = 0.50; //special fee per product | |
$percentage = 0.029; //percentage | |
//Getting Cart Contents. | |
$cart = $woocommerce->cart->get_cart(); | |
//Calculating Quantity |