woocommerce_thankyou_order_received_text

woocommerce_thankyou_order_received_text

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_thankyou_order_received_text') is found 2 times:

  • /src/Blocks/BlockTypes/OrderConfirmation/Status.php line 64
    	 */
    	protected function render_content( $order, $permission = false, $attributes = [], $content = '' ) {
    		if ( ! $permission ) {
    			// phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
    			return '<p>' . wp_kses_post( apply_filters( 'woocommerce_thankyou_order_received_text', esc_html__( 'Thank you. Your order has been received.', 'woocommerce' ), null ) ) . '</p>';
    		}
    
    		$content = $this->get_hook_content( 'woocommerce_before_thankyou', [ $order->get_id() ] );
    		$status  = $order->get_status();
    
    		// Unlike the core handling, this includes some extra messaging for completed orders so the text is appropriate for other order statuses.
    
  • /src/Blocks/BlockTypes/OrderConfirmation/Status.php line 108
    				) . '</p>';
    				break;
    			case 'failed':
    				// phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
    				$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 );
    				$actions             = '<a href="' . esc_url( $order->get_checkout_payment_url() ) . '" class="button">' . esc_html__( 'Try again', 'woocommerce' ) . '</a> ';
    
    				if ( wc_get_page_permalink( 'myaccount' ) ) {
    					$actions .= '<a href="' . esc_url( wc_get_page_permalink( 'myaccount' ) ) . '" class="button">' . esc_html__( 'My account', 'woocommerce' ) . '</a> ';
    				}
    
    

See this hook used in plugins: