How to load a web font into the standalone print template using the coupon_print_head action.
The print view is its own HTML page with no theme, so fonts enqueued for your site don't reach it. The print template fires two actions inside <head> you can hook to add a font: coupon_print_meta (early — meta and stylesheets) and coupon_print_head (after, used for inline CSS). Either works; coupon_print_head is the natural place for a font link.
add_action( 'coupon_print_head', function () {
echo '<link rel="stylesheet" '
. 'href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap">';
} );
Then apply the font. Because theme CSS doesn't load in the print view, set it through the Custom CSS option (Coupons → Options) or the cctor_filter_inline_css filter — both are injected into the print page:
add_filter( 'cctor_filter_inline_css', function ( $css ) {
return $css . 'body.print_coupon .cctor-terms { font-family: "Roboto", sans-serif; }';
} );
See css-reference for the print-view element classes you can target.