add_filter( ‘woocommerce_product_single_add_to_cart_text’, ‘saphie_custom_add_to_cart_text’ ); add_filter( ‘woocommerce_product_add_to_cart_text’, ‘saphie_custom_add_to_cart_text’ ); function saphie_custom_add_to_cart_text() { return ‘ADD TO BAG’; }Continue reading
if ( ! defined( ‘ABSPATH’ ) ) { return; } if ( ! class_exists( ‘WooCommerce’ ) ) { return; } if ( ! function_exists( ‘wcs_get_subscription’ ) ) { return; } function rd_aw_backfill_sub_original_delivery_meta( $workflow ) { if ( ! is_object( $workflow…Continue reading
if ( ! defined( ‘ABSPATH’ ) ) { return; } if ( ! function_exists( ‘rd_aw_wds_get_config’ ) ) { function rd_aw_wds_get_config() { $config = array( ‘cutoff_weekday_iso’ => 4, ‘cutoff_hour’ => 22, ‘cutoff_minute’ => 0, ‘delivery_weekdays_iso’ => array( 7, 1, 2, 3…Continue reading
if ( ! defined( ‘ABSPATH’ ) ) { return; } if ( ! class_exists( ‘WooCommerce’ ) || ! class_exists( ‘WC_Shipping_Zones’ ) ) { return; } if ( ! function_exists( ‘rd_get_order_shipping_zone_id’ ) ) { function rd_get_order_shipping_zone_id( $order ) { if (…Continue reading
/** * Add custom text to the Completed Order email for non-wholesale customers only. */ add_action( ‘woocommerce_email_before_order_table’, function( $order, $sent_to_admin, $plain_text, $email ) { // Only target the Completed Order email if ( ‘customer_completed_order’ !== $email->id ) { return; }…Continue reading
/** * Customize the Completed Order Email Template Subject for wholesalers */ add_filter( ‘woocommerce_email_subject_customer_completed_order’, function( $subject, $order ) { if ( ! $order ) return $subject; $customer_id = $order->get_customer_id(); if ( ! $customer_id ) return $subject; $wholesale_roles = [ ‘wholesale_customer’,…Continue reading
/** * Add custom text to the Completed Order email for wholesale customers only. */ add_action( ‘woocommerce_email_before_order_table’, function( $order, $sent_to_admin, $plain_text, $email ) { // Only target the Completed Order email if ( ‘customer_completed_order’ !== $email->id ) { return; }…Continue reading