woocommerce_thankyou_order_received_text
This renders the content of the block within the wrapper.
Использование
add_filter( 'woocommerce_thankyou_order_received_text', 'wp_kama_woocommerce_thankyou_order_received_text_filter', 10, 2 ); /** * Function for `woocommerce_thankyou_order_received_text` filter-hook. * * @param \WC_Order $order Order object. * @param string|false $permission If the current user can view the order details or not. * * @return \WC_Order */ function wp_kama_woocommerce_thankyou_order_received_text_filter( $order, $permission ){ // filter... return $order; }
- $order(\WC_Order)
- Order object.
- $permission(строка|false)
- If the current user can view the order details or not.
Где вызывается хук
woocommerce_thankyou_order_received_text
woocommerce/src/Blocks/BlockTypes/OrderConfirmation/Status.php 78
return '<p>' . wp_kses_post( apply_filters( 'woocommerce_thankyou_order_received_text', esc_html__( 'Thank you. Your order has been received.', 'woocommerce' ), null ) ) . '</p>';
woocommerce/src/Blocks/BlockTypes/OrderConfirmation/Status.php 89-93
apply_filters( 'woocommerce_thankyou_order_received_text', esc_html__( 'Your order has been cancelled.', 'woocommerce' ), $order )
woocommerce/src/Blocks/BlockTypes/OrderConfirmation/Status.php 100-105
apply_filters( 'woocommerce_thankyou_order_received_text', // translators: %s: date and time of the order refund. esc_html__( 'Your order was refunded %s.', 'woocommerce' ), $order ),
woocommerce/src/Blocks/BlockTypes/OrderConfirmation/Status.php 113-117
apply_filters( 'woocommerce_thankyou_order_received_text', esc_html__( 'Thank you. Your order has been fulfilled.', 'woocommerce' ), $order )
woocommerce/src/Blocks/BlockTypes/OrderConfirmation/Status.php 122
$order_received_text = apply_filters( 'woocommerce_thankyou_order_received_text', esc_html__( 'Your order cannot be processed as the originating bank/merchant has declined your transaction. Please attempt your purchase again.', 'woocommerce' ), null );
woocommerce/src/Blocks/BlockTypes/OrderConfirmation/Status.php 137-141
apply_filters( 'woocommerce_thankyou_order_received_text', esc_html__( 'Thank you. Your order has been received.', 'woocommerce' ), $order )
woocommerce/templates/checkout/order-received.php 33-37
$message = apply_filters( 'woocommerce_thankyou_order_received_text', esc_html( __( 'Thank you. Your order has been received.', 'woocommerce' ) ), $order );
Где используется хук в WooCommerce
woocommerce/includes/gateways/paypal/class-wc-gateway-paypal.php 129
add_filter( 'woocommerce_thankyou_order_received_text', array( $this, 'order_received_text' ), 10, 2 );