Filter uncanny-automator

automator_woocommerce_order_summary_payment_method_title

Filters the title displayed for the payment method in the WooCommerce order summary.

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

Description

Filters the title displayed for the payment method in WooCommerce order summaries generated by Uncanny Automator. Developers can modify this title, for example, to be more specific to certain payment gateways or automations.


Usage

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

Return Value

The filtered value.


Examples

// Change the payment method title from "Payment method:" to "Method of Payment:" for a more formal tone.
add_filter( 'automator_woocommerce_order_summary_payment_method_title', 'my_custom_payment_method_title', 10, 1 );

function my_custom_payment_method_title( $title ) {
    // The hook provides the default title. We'll replace it if it matches the default.
    if ( $title === esc_attr__( 'Payment method:', 'uncanny-automator' ) ) {
        return esc_attr__( 'Method of Payment:', 'uncanny-automator' );
    }
    return $title; // Always return the filtered value
}

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:1107
src/integrations/wholesale-suite/tokens/wss-tokens.php:734
uncanny-automator-pro/src/integrations/woocommerce/tokens/wc-pro-tokens.php:3020

$html[] = '</tr>';
			}
		}
		// Payment method
		if ( true === apply_filters( 'automator_woocommerce_order_summary_show_payment_method', true, $order ) ) {
			$html[] = '<tr>';
			$html[] = $td;
			$html[] = apply_filters( 'automator_woocommerce_order_summary_payment_method_title', esc_attr__( 'Payment method:', 'uncanny-automator' ) );
			$html[] = '</td>';
			$html[] = $td_right;
			$html[] = $order->get_payment_method_title();
			$html[] = '</td>';
			$html[] = '</tr>';
		}
		// Total


Scroll to Top