Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'woocommerce_add_cart_item_data', function( $cart_item_data, $product_id ) {
- // Biite ID austauschen. Wenn Produkt A mit ID 54 im Warenkorb liegt, kommt Produkt B mit ID 56 automatisch im Warenkorb hinzu.
- if ( 54 == $product_id ) {
- WC()->cart->add_to_cart( 56 );
- }
- }, 10, 2 );
Add Comment
Please, Sign In to add comment