get_id(); $expires_at = $order->get_meta( '_afridirect_expires_at' ); // Load payment instructions data if available. $form_id = $order->get_meta( '_afridirect_form_id' ); $method_id = $order->get_meta( '_afridirect_method_id' ); $method = null; $field_labels = array(); $qr_url = ''; if ( ! empty( $method_id ) ) { $method = AfriDirect_Payment_Methods::get( $method_id ); if ( $method ) { $field_labels = AfriDirect_Payment_Methods::get_field_labels( $method['type'] ); $qr_url = $method['qr_attachment_id'] ? wp_get_attachment_image_url( $method['qr_attachment_id'], 'full' ) : ''; } } // Detect WooCommerce context. $is_wc_context = false; if ( class_exists( 'WooCommerce' ) ) { $is_wc_context = is_wc_endpoint_url( 'order-received' ) || ( ! empty( get_query_var( 'key' ) ) && $order instanceof WC_Order ) || is_wc_endpoint_url( 'view-order' ); } ?>
| : |
|---|