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.
Использование
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_Abstract_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(строка)
- The original CSS styles to use.
- $order(WC_Abstract_Order)
- The order for which the receipt is being generated.
Список изменений
С версии 9.0.0 | Введена. |
Где вызывается хук
woocommerce_printable_order_receipt_css
woocommerce/src/Internal/ReceiptRendering/ReceiptRenderingEngine.php 199
$data['css'] = apply_filters( 'woocommerce_printable_order_receipt_css', $css, $order );