Improve the add-to-cart message [EN]

add_filter( ‘wc_add_to_cart_message’, ‘bbloomer_custom_add_to_cart_message’ ); function bbloomer_custom_add_to_cart_message() { global $woocommerce; $return_to = get_permalink(woocommerce_get_page_id(‘cart’)); $message = sprintf(‘%s %s‘, __(‘Great choice! 🙂 The product has been added to your cart.’, ‘woocommerce’), $return_to, __(‘Go to cart?’, ‘woocommerce’) ); return $message; }Continue reading

WP Simple Pay: Multiple Price Option Label Smart Tag

add_filter( ‘simpay_payment_details_template_tags’, function( $smart_tags ) { $smart_tags[] = ‘selected-price-label’; return $smart_tags; } ); add_filter( ‘simpay_payment_confirmation_template_tag_selected-price-label’, function( $value, $payment_confirmation_data ) { if ( empty( $payment_confirmation_data[‘subscriptions’] ) ) { $payments = $payment_confirmation_data[‘paymentintents’]; $payment = current( $payments ); return $payment->description; } $subscriptions =…Continue reading