woocommerce_printable_order_receipt_css
Filter to customize the CSS styles used to render the receipt.
See Templates/order-receipt.php for guidance on the existing HTMl elements and their ids. See Templates/order-receipt-css.php for the original CSS styles.
Usage
add_filter( 'woocommerce_printable_order_receipt_css', 'wp_kama_woocommerce_printable_order_receipt_css_filter', 10, 2 ); /** * Function for `woocommerce_printable_order_receipt_css` filter-hook. * * @param string $css The original CSS styles to use. * @param WC_Order $order The order for which the receipt is being generated. * * @return string */ function wp_kama_woocommerce_printable_order_receipt_css_filter( $css, $order ){ // filter... return $css; }
- $css(string)
- The original CSS styles to use.
- $order(WC_Order)
- The order for which the receipt is being generated.
Changelog
Since 9.0.0 | Introduced. |
Where the hook is called
woocommerce_printable_order_receipt_css
woocommerce/src/Internal/ReceiptRendering/ReceiptRenderingEngine.php 199
$data['css'] = apply_filters( 'woocommerce_printable_order_receipt_css', $css, $order );