| |
| <?php
|
| <?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| defined( 'ABSPATH' ) || exit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| add_action( 'admin_init', 'funbird_create_verification_table' );
|
| function funbird_create_verification_table() {
|
| global $wpdb;
|
| $table = $wpdb->prefix . 'funbird_email_verifications';
|
|
|
| if ( $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $table ) ) === $table ) {
|
| return;
|
| }
|
|
|
| $charset = $wpdb->get_charset_collate();
|
| $sql = "CREATE TABLE {$table} (
|
| id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
| email VARCHAR(200) NOT NULL,
|
| token VARCHAR(64) NOT NULL UNIQUE,
|
| type VARCHAR(50) NOT NULL DEFAULT 'newsletter',
|
| status VARCHAR(20) NOT NULL DEFAULT 'pending',
|
| created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| verified_at DATETIME NULL,
|
| PRIMARY KEY (id),
|
| KEY email (email),
|
| KEY token (token)
|
| ) {$charset};";
|
|
|
| require_once ABSPATH . 'wp-admin/includes/upgrade.php';
|
| dbDelta( $sql );
|
| }
|
|
|
|
|
|
|
|
|
|
|
| add_action( 'wp_ajax_nopriv_funbird_subscribe', 'funbird_handle_subscribe' );
|
| add_action( 'wp_ajax_funbird_subscribe', 'funbird_handle_subscribe' );
|
| function funbird_handle_subscribe() {
|
| check_ajax_referer( 'funbird_subscribe_nonce', 'nonce' );
|
|
|
| $email = isset( $_POST['email'] ) ? sanitize_email( wp_unslash( $_POST['email'] ) ) : '';
|
|
|
| if ( ! is_email( $email ) ) {
|
| wp_send_json_error( array( 'message' => 'Please enter a valid email address.' ) );
|
| }
|
|
|
| global $wpdb;
|
| $table = $wpdb->prefix . 'funbird_email_verifications';
|
|
|
|
|
| $existing = $wpdb->get_row(
|
| $wpdb->prepare( "SELECT * FROM {$table} WHERE email = %s AND type = 'newsletter' AND status = 'verified'", $email )
|
| );
|
|
|
| if ( $existing ) {
|
| wp_send_json_error( array( 'message' => 'This email is already subscribed.' ) );
|
| }
|
|
|
|
|
| $token = bin2hex( random_bytes( 32 ) );
|
|
|
|
|
| $wpdb->delete( $table, array( 'email' => $email, 'type' => 'newsletter', 'status' => 'pending' ), array( '%s', '%s', '%s' ) );
|
|
|
|
|
| $wpdb->insert(
|
| $table,
|
| array(
|
| 'email' => $email,
|
| 'token' => $token,
|
| 'type' => 'newsletter',
|
| 'status' => 'pending',
|
| 'created_at' => current_time( 'mysql' ),
|
| ),
|
| array( '%s', '%s', '%s', '%s', '%s' )
|
| );
|
|
|
|
|
| $verify_url = add_query_arg(
|
| array(
|
| 'funbird_verify' => 'newsletter',
|
| 'token' => $token,
|
| 'email' => rawurlencode( $email ),
|
| ),
|
| home_url( '/' )
|
| );
|
|
|
| $subject = 'Confirm your FUNBIRD LLC subscription — Step 2 of 2';
|
| $body = funbird_build_verify_email( $email, $verify_url, 'newsletter' );
|
| $headers = array( 'Content-Type: text/html; charset=UTF-8' );
|
|
|
| wp_mail( $email, $subject, $body, $headers );
|
|
|
| wp_send_json_success( array(
|
| 'message' => 'Almost there! Check your inbox for a confirmation email. You must click the link to complete your subscription (Step 2 of 2).',
|
| ) );
|
| }
|
|
|
|
|
|
|
|
|
| add_action( 'template_redirect', 'funbird_process_verification_link' );
|
| function funbird_process_verification_link() {
|
| if ( ! isset( $_GET['funbird_verify'] ) || ! isset( $_GET['token'] ) ) {
|
| return;
|
| }
|
|
|
| $type = sanitize_text_field( wp_unslash( $_GET['funbird_verify'] ) );
|
| $token = sanitize_text_field( wp_unslash( $_GET['token'] ) );
|
| $email = isset( $_GET['email'] ) ? sanitize_email( rawurldecode( wp_unslash( $_GET['email'] ) ) ) : '';
|
|
|
| global $wpdb;
|
| $table = $wpdb->prefix . 'funbird_email_verifications';
|
|
|
| $record = $wpdb->get_row(
|
| $wpdb->prepare(
|
| "SELECT * FROM {$table} WHERE token = %s AND email = %s AND type = %s AND status = 'pending'",
|
| $token, $email, $type
|
| )
|
| );
|
|
|
| if ( ! $record ) {
|
| wp_die(
|
| '<h2>Verification link invalid or expired.</h2><p>Please <a href="' . esc_url( home_url( '/free-resources/' ) ) . '">subscribe again</a>.</p>',
|
| 'Verification Failed',
|
| array( 'response' => 400 )
|
| );
|
| }
|
|
|
|
|
| $created = strtotime( $record->created_at );
|
| $now = current_time( 'timestamp' );
|
| $age_hours = ( $now - $created ) / 3600;
|
|
|
| if ( $age_hours > 24 ) {
|
| $wpdb->delete( $table, array( 'id' => $record->id ), array( '%d' ) );
|
| wp_die(
|
| '<h2>Verification link expired.</h2><p>Links are valid for 24 hours. Please <a href="' . esc_url( home_url( '/free-resources/' ) ) . '">subscribe again</a>.</p>',
|
| 'Link Expired',
|
| array( 'response' => 410 )
|
| );
|
| }
|
|
|
|
|
| $wpdb->update(
|
| $table,
|
| array( 'status' => 'verified', 'verified_at' => current_time( 'mysql' ) ),
|
| array( 'id' => $record->id ),
|
| array( '%s', '%s' ),
|
| array( '%d' )
|
| );
|
|
|
|
|
|
|
|
|
|
|
| $welcome_url = home_url( '/free-resources/' );
|
| $subject = 'Welcome to FUNBIRD LLC — you are confirmed!';
|
| $body = funbird_build_welcome_email( $email, $welcome_url );
|
| $headers = array( 'Content-Type: text/html; charset=UTF-8' );
|
| wp_mail( $email, $subject, $body, $headers );
|
|
|
|
|
| wp_safe_redirect( add_query_arg( 'subscribed', '1', home_url( '/free-resources/' ) ) );
|
| exit;
|
| }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| add_action( 'woocommerce_checkout_order_processed', 'funbird_send_payment_verification', 10, 3 );
|
| function funbird_send_payment_verification( $order_id, $posted_data, $order ) {
|
|
|
| if ( ! $order->needs_payment() ) {
|
| return;
|
| }
|
|
|
|
|
| $code = sprintf( '%06d', random_int( 100000, 999999 ) );
|
|
|
|
|
| update_post_meta( $order_id, '_funbird_verify_code', $code );
|
| update_post_meta( $order_id, '_funbird_verify_expires', time() + 900 );
|
| update_post_meta( $order_id, '_funbird_verify_attempts', 0 );
|
|
|
|
|
| $order->update_status( 'on-hold', 'Awaiting 2-step payment verification (Step 2 of 2).' );
|
|
|
|
|
| $email = $order->get_billing_email();
|
| $subject = 'FUNBIRD LLC — Your verification code: ' . $code;
|
| $body = funbird_build_payment_verify_email( $email, $code, $order_id, $order );
|
| $headers = array( 'Content-Type: text/html; charset=UTF-8' );
|
| wp_mail( $email, $subject, $body, $headers );
|
|
|
|
|
| WC()->session->set( 'funbird_pending_order', $order_id );
|
| }
|
|
|
|
|
|
|
|
|
|
|
| add_action( 'woocommerce_thankyou', 'funbird_show_verification_form', 5 );
|
| function funbird_show_verification_form( $order_id ) {
|
| $order = wc_get_order( $order_id );
|
| $status = $order ? $order->get_status() : '';
|
|
|
| if ( 'on-hold' !== $status ) {
|
| return;
|
| }
|
|
|
| $expires = (int) get_post_meta( $order_id, '_funbird_verify_expires', true );
|
| $remaining = max( 0, $expires - time() );
|
| $minutes = floor( $remaining / 60 );
|
| $secs = $remaining % 60;
|
| $email = $order->get_billing_email();
|
| $masked = substr( $email, 0, 3 ) . str_repeat( '*', strpos( $email, '@' ) - 3 ) . substr( $email, strpos( $email, '@' ) );
|
|
|
| echo '<div style="background:#0f1a2e;border:2px solid #0fa6c0;border-radius:12px;padding:32px;max-width:480px;margin:0 auto 32px;text-align:center;">';
|
| echo '<div style="width:56px;height:56px;background:rgba(15,166,192,.15);border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto 16px;">';
|
| echo '<svg width="28" height="28" fill="#0fa6c0" viewBox="0 0 24 24"><path d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>';
|
| echo '</div>';
|
| echo '<h2 style="color:#e6edf3;font-size:1.2rem;font-weight:700;margin:0 0 8px;font-family:Space Grotesk,sans-serif;">Step 2: Verify your payment</h2>';
|
| echo '<p style="color:#8b949e;font-size:13px;margin:0 0 6px;">A 6-digit code was sent to <strong style="color:#0fa6c0;">' . esc_html( $masked ) . '</strong></p>';
|
| echo '<p style="color:#8b949e;font-size:12px;margin:0 0 24px;">Code expires in: <span id="funbird-timer" style="color:#0fa6c0;font-family:monospace;font-size:14px;">' . esc_html( sprintf( '%02d:%02d', $minutes, $secs ) ) . '</span></p>';
|
|
|
|
|
| echo '<form method="post" id="funbird-verify-form">';
|
| wp_nonce_field( 'funbird_payment_verify_' . $order_id, 'funbird_payment_nonce' );
|
| echo '<input type="hidden" name="funbird_verify_order" value="' . esc_attr( $order_id ) . '">';
|
| echo '<input type="text" name="funbird_code" maxlength="6" pattern="[0-9]{6}" placeholder="Enter 6-digit code" required
|
| style="width:100%;padding:12px;font-size:1.4rem;letter-spacing:.25em;text-align:center;border:1px solid rgba(15,166,192,.4);background:#161b22;color:#e6edf3;border-radius:6px;margin-bottom:16px;">';
|
| echo '<button type="submit" name="funbird_submit_verify"
|
| style="background:#0fa6c0;color:#fff;padding:12px 28px;border:none;border-radius:6px;font-size:1rem;font-weight:600;cursor:pointer;width:100%;">Confirm & Complete Purchase</button>';
|
| echo '</form>';
|
|
|
| echo '<p style="color:#8b949e;font-size:12px;margin:16px 0 0;">Didn\'t receive the code? <a href="?resend_verify=' . esc_attr( $order_id ) . '" style="color:#0fa6c0;">Resend code</a></p>';
|
| echo '</div>';
|
|
|
|
|
| echo '<script>
|
| (function(){
|
| var s=' . (int) $remaining . ';
|
| var el=document.getElementById("funbird-timer");
|
| if(!el)return;
|
| var t=setInterval(function(){
|
| s--;
|
| if(s<=0){clearInterval(t);el.textContent="Expired — please resend";el.style.color="#e53e3e";return;}
|
| var m=Math.floor(s/60),sc=s%60;
|
| el.textContent=(m<10?"0"+m:m)+":"+(sc<10?"0"+sc:sc);
|
| },1000);
|
| })();
|
| </script>';
|
| }
|
|
|
|
|
|
|
|
|
| add_action( 'template_redirect', 'funbird_process_payment_verify' );
|
| function funbird_process_payment_verify() {
|
| if ( ! isset( $_POST['funbird_submit_verify'] ) || ! isset( $_POST['funbird_verify_order'] ) ) {
|
| return;
|
| }
|
|
|
| $order_id = (int) $_POST['funbird_verify_order'];
|
|
|
| if ( ! wp_verify_nonce(
|
| sanitize_text_field( wp_unslash( $_POST['funbird_payment_nonce'] ?? '' ) ),
|
| 'funbird_payment_verify_' . $order_id
|
| ) ) {
|
| wc_add_notice( 'Security check failed. Please try again.', 'error' );
|
| return;
|
| }
|
|
|
| $order = wc_get_order( $order_id );
|
| $entered = preg_replace( '/\D/', '', sanitize_text_field( wp_unslash( $_POST['funbird_code'] ?? '' ) ) );
|
| $stored = get_post_meta( $order_id, '_funbird_verify_code', true );
|
| $expires = (int) get_post_meta( $order_id, '_funbird_verify_expires', true );
|
| $attempts = (int) get_post_meta( $order_id, '_funbird_verify_attempts', true );
|
|
|
|
|
| if ( $attempts >= 5 ) {
|
| $order->update_status( 'failed', 'Too many incorrect verification attempts.' );
|
| wc_add_notice( 'Too many incorrect attempts. Your order has been cancelled. Please place a new order.', 'error' );
|
| wp_safe_redirect( wc_get_cart_url() );
|
| exit;
|
| }
|
|
|
|
|
| if ( time() > $expires ) {
|
| wc_add_notice( 'Your verification code has expired. Click "Resend code" to get a new one.', 'error' );
|
| return;
|
| }
|
|
|
|
|
| if ( ! hash_equals( (string) $stored, (string) $entered ) ) {
|
| update_post_meta( $order_id, '_funbird_verify_attempts', $attempts + 1 );
|
| $remaining_tries = 4 - $attempts;
|
| wc_add_notice( 'Incorrect code. ' . $remaining_tries . ' attempt(s) remaining.', 'error' );
|
| return;
|
| }
|
|
|
|
|
| delete_post_meta( $order_id, '_funbird_verify_code' );
|
| delete_post_meta( $order_id, '_funbird_verify_expires' );
|
| update_post_meta( $order_id, '_funbird_payment_verified', '1' );
|
| update_post_meta( $order_id, '_funbird_verified_at', current_time( 'mysql' ) );
|
|
|
| $order->update_status( 'processing', '2-step payment verification confirmed by customer.' );
|
| $order->add_order_note( 'Payment verified via 2-step email code at ' . current_time( 'mysql' ) );
|
|
|
|
|
| $order->payment_complete();
|
|
|
| wc_add_notice( 'Payment verified! Your order is confirmed.', 'success' );
|
| wp_safe_redirect( $order->get_checkout_order_received_url() );
|
| exit;
|
| }
|
|
|
|
|
|
|
|
|
| add_action( 'template_redirect', 'funbird_resend_verify_code' );
|
| function funbird_resend_verify_code() {
|
| if ( ! isset( $_GET['resend_verify'] ) ) {
|
| return;
|
| }
|
|
|
| $order_id = (int) $_GET['resend_verify'];
|
| $order = wc_get_order( $order_id );
|
|
|
| if ( ! $order || 'on-hold' !== $order->get_status() ) {
|
| return;
|
| }
|
|
|
|
|
| $last_sent = (int) get_post_meta( $order_id, '_funbird_last_resend', true );
|
| if ( $last_sent && ( time() - $last_sent ) < 60 ) {
|
| wc_add_notice( 'Please wait 60 seconds before requesting another code.', 'notice' );
|
| wp_safe_redirect( $order->get_checkout_order_received_url() );
|
| exit;
|
| }
|
|
|
| $code = sprintf( '%06d', random_int( 100000, 999999 ) );
|
| update_post_meta( $order_id, '_funbird_verify_code', $code );
|
| update_post_meta( $order_id, '_funbird_verify_expires', time() + 900 );
|
| update_post_meta( $order_id, '_funbird_verify_attempts', 0 );
|
| update_post_meta( $order_id, '_funbird_last_resend', time() );
|
|
|
| $email = $order->get_billing_email();
|
| $subject = 'FUNBIRD LLC — New verification code: ' . $code;
|
| $body = funbird_build_payment_verify_email( $email, $code, $order_id, $order );
|
| $headers = array( 'Content-Type: text/html; charset=UTF-8' );
|
| wp_mail( $email, $subject, $body, $headers );
|
|
|
| wc_add_notice( 'A new verification code has been sent to your email.', 'success' );
|
| wp_safe_redirect( $order->get_checkout_order_received_url() );
|
| exit;
|
| }
|
|
|
|
|
|
|
|
|
| add_action( 'wp_enqueue_scripts', 'funbird_enqueue_subscribe_js' );
|
| function funbird_enqueue_subscribe_js() {
|
| if ( ! is_page( 'free-resources' ) ) {
|
| return;
|
| }
|
| wp_localize_script( 'jquery', 'funbird_ajax', array(
|
| 'url' => admin_url( 'admin-ajax.php' ),
|
| 'nonce' => wp_create_nonce( 'funbird_subscribe_nonce' ),
|
| ) );
|
| add_action( 'wp_footer', 'funbird_subscribe_inline_js' );
|
| }
|
|
|
| function funbird_subscribe_inline_js() {
|
| ?>
|
| <script>
|
| (function($){
|
| $(document).on('click','[data-funbird-subscribe]',function(e){
|
| e.preventDefault();
|
| var btn=$(this);
|
| var email=$('input[name="funbird_email_sub"]').val();
|
| if(!email){alert('Please enter your email address.');return;}
|
| btn.text('Sending...').prop('disabled',true);
|
| $.post(funbird_ajax.url,{
|
| action:'funbird_subscribe',
|
| email:email,
|
| nonce:funbird_ajax.nonce
|
| },function(res){
|
| if(res.success){
|
| $('.funbird-subscribe-form').html('<div style="background:rgba(15,166,192,.1);border:1px solid #0fa6c0;border-radius:8px;padding:20px;text-align:center;color:#0fa6c0;">'+res.data.message+'</div>');
|
| }else{
|
| btn.text('Subscribe').prop('disabled',false);
|
| alert(res.data.message);
|
| }
|
| });
|
| });
|
| })(jQuery);
|
| </script>
|
| <?php
|
| }
|
|
|
|
|
|
|
|
|
|
|
| function funbird_build_verify_email( $email, $verify_url, $type ) {
|
| $site = get_bloginfo( 'name' );
|
| $logo = 'https://techicsavvy.com/wp-content/uploads/2024/04/cropped-Brand-Logo.png';
|
| return '<!DOCTYPE html><html><body style="margin:0;padding:0;background:#0d1117;font-family:Arial,sans-serif;">
|
| <div style="max-width:520px;margin:40px auto;background:#161b22;border:1px solid rgba(15,166,192,.25);border-radius:12px;overflow:hidden;">
|
| <div style="background:#0f1a2e;padding:24px;text-align:center;border-bottom:2px solid #0fa6c0;">
|
| <p style="color:#0fa6c0;font-size:12px;letter-spacing:.1em;text-transform:uppercase;margin:0;">Step 2 of 2 — Confirm your email</p>
|
| </div>
|
| <div style="padding:32px;">
|
| <h2 style="color:#e6edf3;font-size:1.3rem;font-weight:700;margin:0 0 16px;">Confirm your subscription</h2>
|
| <p style="color:#8b949e;font-size:14px;line-height:1.7;margin-bottom:24px;">You subscribed to <strong style="color:#e6edf3;">' . esc_html( $site ) . '</strong> using <strong style="color:#0fa6c0;">' . esc_html( $email ) . '</strong>.<br>Click the button below to confirm and get access to your free resources.</p>
|
| <div style="text-align:center;margin-bottom:24px;">
|
| <a href="' . esc_url( $verify_url ) . '" style="background:#0fa6c0;color:#fff;padding:14px 32px;border-radius:6px;text-decoration:none;font-weight:600;font-size:1rem;display:inline-block;">Confirm Subscription</a>
|
| </div>
|
| <p style="color:#8b949e;font-size:12px;line-height:1.6;border-top:1px solid rgba(255,255,255,.08);padding-top:16px;margin:0;">This link expires in 24 hours. If you did not subscribe, ignore this email — nothing will happen. Your email will not be added without your confirmation.</p>
|
| </div>
|
| <div style="background:#0d1117;padding:16px;text-align:center;border-top:1px solid rgba(255,255,255,.06);">
|
| <p style="color:#8b949e;font-size:11px;margin:0;">FUNBIRD LLC · Newark, NJ · <a href="' . esc_url( home_url( '/legal/' ) ) . '" style="color:#0fa6c0;">Privacy Policy</a></p>
|
| </div>
|
| </div>
|
| </body></html>';
|
| }
|
|
|
| function funbird_build_welcome_email( $email, $resource_url ) {
|
| return '<!DOCTYPE html><html><body style="margin:0;padding:0;background:#0d1117;font-family:Arial,sans-serif;">
|
| <div style="max-width:520px;margin:40px auto;background:#161b22;border:1px solid rgba(15,166,192,.25);border-radius:12px;overflow:hidden;">
|
| <div style="background:#0f1a2e;padding:24px;text-align:center;border-bottom:2px solid #0fa6c0;">
|
| <p style="color:#0fa6c0;font-size:13px;font-weight:700;letter-spacing:.06em;margin:0;">Subscription confirmed!</p>
|
| </div>
|
| <div style="padding:32px;">
|
| <h2 style="color:#e6edf3;font-size:1.3rem;font-weight:700;margin:0 0 14px;">Welcome to FUNBIRD LLC</h2>
|
| <p style="color:#8b949e;font-size:14px;line-height:1.75;margin-bottom:20px;">You are now confirmed and subscribed. Every week you will receive blue team tips, Wireshark lab walkthroughs, CySA+ exam guides, and exclusive subscriber discounts.</p>
|
| <div style="text-align:center;margin-bottom:24px;">
|
| <a href="' . esc_url( $resource_url ) . '" style="background:#0fa6c0;color:#fff;padding:12px 28px;border-radius:6px;text-decoration:none;font-weight:600;display:inline-block;">Access Your Free Resources</a>
|
| </div>
|
| </div>
|
| <div style="background:#0d1117;padding:14px;text-align:center;">
|
| <p style="color:#8b949e;font-size:11px;margin:0;">FUNBIRD LLC · <a href="' . esc_url( home_url( '/legal/' ) ) . '" style="color:#0fa6c0;">Unsubscribe</a> · <a href="' . esc_url( home_url( '/legal/' ) ) . '" style="color:#0fa6c0;">Privacy Policy</a></p>
|
| </div>
|
| </div>
|
| </body></html>';
|
| }
|
|
|
| function funbird_build_payment_verify_email( $email, $code, $order_id, $order ) {
|
| $total = $order->get_formatted_order_total();
|
| $items = array();
|
| foreach ( $order->get_items() as $item ) {
|
| $items[] = $item->get_name();
|
| }
|
| $items_str = implode( ', ', $items );
|
|
|
| return '<!DOCTYPE html><html><body style="margin:0;padding:0;background:#0d1117;font-family:Arial,sans-serif;">
|
| <div style="max-width:520px;margin:40px auto;background:#161b22;border:1px solid rgba(15,166,192,.25);border-radius:12px;overflow:hidden;">
|
| <div style="background:#0f1a2e;padding:24px;text-align:center;border-bottom:2px solid #0fa6c0;">
|
| <p style="color:#0fa6c0;font-size:12px;letter-spacing:.1em;text-transform:uppercase;margin:0;">Step 2 of 2 — Payment Verification</p>
|
| </div>
|
| <div style="padding:32px;">
|
| <h2 style="color:#e6edf3;font-size:1.3rem;font-weight:700;margin:0 0 8px;">Your verification code</h2>
|
| <p style="color:#8b949e;font-size:14px;margin:0 0 24px;">Enter this code on the order confirmation page to complete your purchase.</p>
|
| <div style="background:#0d1117;border:2px solid #0fa6c0;border-radius:10px;padding:24px;text-align:center;margin-bottom:24px;">
|
| <div style="font-size:2.5rem;font-weight:700;color:#0fa6c0;letter-spacing:.35em;font-family:monospace;">' . esc_html( $code ) . '</div>
|
| <p style="color:#8b949e;font-size:12px;margin:8px 0 0;">Valid for 15 minutes</p>
|
| </div>
|
| <div style="background:#161b22;border:1px solid rgba(255,255,255,.08);border-radius:8px;padding:16px;margin-bottom:20px;">
|
| <p style="color:#8b949e;font-size:13px;margin:0 0 6px;"><strong style="color:#e6edf3;">Order #' . esc_html( $order_id ) . '</strong></p>
|
| <p style="color:#8b949e;font-size:13px;margin:0 0 4px;">' . esc_html( $items_str ) . '</p>
|
| <p style="color:#0fa6c0;font-size:14px;font-weight:700;margin:0;">Total: ' . wp_kses_post( $total ) . '</p>
|
| </div>
|
| <p style="color:#8b949e;font-size:12px;line-height:1.65;border-top:1px solid rgba(255,255,255,.08);padding-top:16px;margin:0;"><strong style="color:#e6edf3;">Did not make this purchase?</strong><br>Do not share this code with anyone. FUNBIRD LLC will never ask for your password. If you did not place this order, contact us immediately at [email protected]</p>
|
| </div>
|
| <div style="background:#0d1117;padding:14px;text-align:center;">
|
| <p style="color:#8b949e;font-size:11px;margin:0;">FUNBIRD LLC · Newark, NJ · This is an automated security message</p>
|
| </div>
|
| </div>
|
| </body></html>';
|
| }
|
|
|
| |
| |
Comments