woocommerce_thankyou_order_received_text
This renders the content of the block within the wrapper.
Usage
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(string|false)
- If the current user can view the order details or not.
Where the hook is called
woocommerce_thankyou_order_received_text
woocommerce/src/Blocks/BlockTypes/OrderConfirmation/Status.php 68
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 94-98
apply_filters( 'woocommerce_thankyou_order_received_text', esc_html__( 'Your order has been cancelled.', 'woocommerce' ), $order )
woocommerce/src/Blocks/BlockTypes/OrderConfirmation/Status.php 113-118
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 134-138
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 143
$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 173-177
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 );
Where the hook is used in WooCommerce
woocommerce/includes/gateways/paypal/class-wc-gateway-paypal.php 136
add_filter( 'woocommerce_thankyou_order_received_text', array( $this, 'order_received_text' ), 10, 2 );