add_action(‘login_head’, function () { $tokens = rd_client_get_brand_tokens(); $css = ‘:root{‘.rd_client_brand_css_vars_from_tokens($tokens).’}’; echo ‘ ‘; echo ‘ ‘; }); // Change Login Logo Link to Rosso Digital with UTM Parameters add_filter(‘login_headerurl’, function () { $site_title = rawurlencode(get_bloginfo(‘name’)); // Encode Site Title return…Continue reading
add_filter(‘rd_client_brand_tokens’, function ($t) { return array_merge($t, [ // Colours ‘color_primary’ => ‘#231f20’, ‘color_accent’ => ‘#881721’, ‘color_bg’ => ‘#ffffff’, ‘color_bg_alt’ => ‘#881721’, ‘color_text’ => ‘#231f20’, ‘color_link’ => ‘#231f20’, ‘color_link_hover’ => ‘#881721’, // Fonts ‘font_family’ => ‘Roboto, system-ui, -apple-system, “Segoe UI”, Roboto,…Continue reading
function rd_client_brand_css_vars_from_tokens(array $tokens): string { $vars = []; foreach ($tokens as $key => $val) { // Convert underscores in PHP keys to hyphens for CSS vars $css_key = str_replace(‘_’, ‘-‘, $key); $vars[] = “–rd-client-{$css_key}: {$val};”; } return implode(”, $vars); }…Continue reading
// ************************************************************************************************* // General woocommerce overrides // ************************************************************************************************* // ————————————————————————————————- // don’t show removed from cart message add_filter( ‘woocommerce_cart_item_removed_notice_type’, ‘__return_false’ ); // ————————————————————————————————- // override standard added to cart message add_filter( ‘wc_add_to_cart_message’, ‘asa_custom_wc_add_to_cart_message’, 10, 2 ); function asa_custom_wc_add_to_cart_message( $message, $product_id…Continue reading
// ————————————————————————————————- // Format player name and division/team // add_action( ‘wpo_wcpdf_after_shipping_address’, ‘add_custom_billing_fields_to_pdf’, 10, 2 ); function add_custom_billing_fields_to_pdf ($document_type, $order) { if ($document_type == ‘packing-slip’) { $billing_playername = ”; $site_title = get_bloginfo(‘name’); if ($site_title == ‘Oakville Raiders’ || $site_title == ‘Seasiders…Continue reading
// Reformat Billing/Shipping Address By Country add_filter( ‘woocommerce_localisation_address_formats’, ‘asa_format_address’ ); function asa_format_address( $address ) { $address[‘default’] = “{company}\n{name}\n{address_1}\n{address_2}\n{city} ” . ” ” . ” {state_code} ” . ” ” . ” {postcode}”; $address[‘AU’] = “{company}\n{name}\n{address_1}\n{address_2}\n{city} ” . ” ” . ” {state_code} ”…Continue reading
add_filter( ‘woocommerce_product_variation_title_include_attributes’, ‘__return_false’ );Continue reading
add_action( ‘wpo_wcpdf_after_customer_notes’, ‘wpo_wcpdf_custom_text’, 10, 2 ); function wpo_wcpdf_custom_text ($document_type, $order) { if ($document_type == ‘packing-slip’) { ?> If you need a return or exchange, or have any concerns about your order, please contact ASA via [email protected]. Please include your…Continue reading
add_action( ‘wpo_wcpdf_after_shipping_address’, ‘add_custom_billing_fields_to_pdf’, 10, 2 ); function add_custom_billing_fields_to_pdf ($document_type, $order) { if ($document_type == ‘packing-slip’) { $billing_playername = ”; $site_title = get_bloginfo(‘name’); if ($site_title == ‘Oakville Raiders’ || $site_title == ‘Seasiders Baseball Club’ || $site_title == ‘Peninsula Softball Club’) {…Continue reading