Filter uncanny-automator

automator_woocommerce_order_summary_td_border_color

Filters the border color for order summary table data cells in WooCommerce, allowing customization of its appearance.

add_filter( 'automator_woocommerce_order_summary_td_border_color', $callback, 10, 1 );

Description

Filters the border color for table data cells in WooCommerce order summaries. Developers can modify this color to customize the appearance of order details within automations. The default is a light gray.


Usage

add_filter( 'automator_woocommerce_order_summary_td_border_color', 'your_function_name', 10, 1 );

Parameters

$order (mixed)
This parameter contains the default border color for table data cells in the WooCommerce order summary, defaulting to a light gray hex code.

Return Value

The filtered value.


Examples

/**
 * Filters the border color for table data cells (td) in the WooCommerce order summary.
 *
 * This example sets a custom border color to a light gray, overriding the default.
 *
 * @param string $td_border_colour The current border color for td elements.
 * @param WC_Order $order The WooCommerce order object.
 * @return string The modified border color.
 */
add_filter( 'automator_woocommerce_order_summary_td_border_color', function( $td_border_colour, $order ) {
    // You can add conditional logic here based on the order, user, etc.
    // For this example, we'll simply set a custom color.
    $custom_border_color = '#d3d3d3'; // A slightly darker gray than the default

    return $custom_border_color;
}, 10, 2 );

Placement

This code should be placed in the functions.php file of your active theme, a custom plugin, or using a code snippets plugin.


Source Code

src/integrations/woocommerce/tokens/wc-tokens.php:1003
src/integrations/wholesale-suite/tokens/wss-tokens.php:644
uncanny-automator-pro/src/integrations/woocommerce/tokens/wc-pro-tokens.php:2930

public function build_summary_style_html( $order ) {
		$font_colour      = apply_filters( 'automator_woocommerce_order_summary_text_color', '#000', $order );
		$font_family      = apply_filters( 'automator_woocommerce_order_summary_font_family', "'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif", $order );
		$table_styles     = apply_filters( 'automator_woocommerce_order_summary_table_style', '', $order );
		$border_colour    = apply_filters( 'automator_woocommerce_order_summary_border_color', '#eee', $order );
		$tr_border_colour = apply_filters( 'automator_woocommerce_order_summary_tr_border_color', '#e5e5e5', $order );
		$tr_text_colour   = apply_filters( 'automator_woocommerce_order_summary_tr_text_color', '#636363', $order );
		$td_border_colour = apply_filters( 'automator_woocommerce_order_summary_td_border_color', '#e5e5e5', $order );
		$td_text_colour   = apply_filters( 'automator_woocommerce_order_summary_td_text_color', '#636363', $order );
		
		// Add filters for container styling
		$max_width        = apply_filters( 'automator_woocommerce_order_summary_max_width', '640px', $order );
		$container_class  = apply_filters( 'automator_woocommerce_order_summary_container_class', 'automator-order-summary-container', $order );
		$container_id     = apply_filters( 'automator_woocommerce_order_summary_container_id', 'automator-order-summary-' . $order->get_id(), $order );
		$table_class      = apply_filters( 'automator_woocommerce_order_summary_table_class', 'automator-order-summary-table', $order );


Scroll to Top