Comparing sensitive data, confidential files or internal emails?

Most legal and privacy policies prohibit uploading sensitive data online. Diffchecker Desktop ensures your confidential information never leaves your computer. Work offline and compare documents securely.

Untitled diff

Created Diff never expires
3 removals
9 lines
3 additions
9 lines
add_action( 'woocommerce_cart_calculate_fees', 'wcpf_testing_fees', 15 );
add_action( 'woocommerce_cart_calculate_fees', 'wcpf_testing_fees', 15 );
function wcpf_testing_fees() {
function wcpf_testing_fees( $cart ) {
WC()->cart->add_fee( 'Custom Fee', '5' );
$cart->add_fee( 'Custom Fee', '5' );


foreach( WC()->cart->get_cart() as $cart_item => $values ) {
foreach( $cart->get_cart() as $cart_item => $values ) {
error_log('looping through for product ID #' . $values['product_id']);
error_log('looping through for product ID #' . $values['product_id']);
}
}
}
}