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

Re-Style Flatsome Pages

remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_title’, 5 ); remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_price’, 10 ); remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_excerpt’, 20 ); remove_action(‘woocommerce_after_shop_loop_item_title’,’woocommerce_template_single_excerpt’, 30); add_action(‘woocommerce_after_shop_loop_item_title’,’woocommerce_template_single_excerpt’, 8); add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_excerpt’, 8 ); add_action( ‘woocommerce_single_product_summary’, ‘the_content’, 9 ); add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_price’, 10 ); add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_title’, 5 );Continue reading