/** * When a formidable form submitted, add form's connected product to cart. */ add_action('frm_after_create_entry', 'ff_take_user_to_wc_checkout_for_payment', 20, 2); function ff_take_user_to_wc_checkout_for_payment($entry_id, $form_id) { $linked_products = get_posts([ 'post_type' => 'product', 'post_status' => 'publish', 'numberposts' => 1, 'meta_key' => '_attached_formidable_form', 'meta_value' => $form_id, 'cache_results' => false, ]); if (empty($linked_products)) { return; } $product_id = $linked_products[0]->ID; if (!function_exists('WC') || !WC()->session) { return; } if (method_exists(WC()->session, 'set_customer_session_cookie')) { WC()->session->set_customer_session_cookie(true); } WC()->cart->empty_cart(); $entry = FrmEntry::getOne($entry_id, true); $form_data = $entry->metas; $addon_total = 0; foreach ($form_data as $value) { if (is_string($value) && strpos(trim($value), '$') === 0) { $price = floatval(str_replace(['$', ','], '', $value)); $addon_total += $price; } } WC()->session->set('addon_total', $addon_total); WC()->cart->add_to_cart($product_id, 1, 0, [], ['addon_total' => $addon_total]); if (empty($_POST['frm_ajax'])) { wp_safe_redirect(wc_get_checkout_url()); exit; } } /** * When an item is added to the cart, remove other products. */ add_filter( 'woocommerce_add_to_cart_validation', 'ff_keep_only_one_product_in_the_cart', 10, 3 ); function ff_keep_only_one_product_in_the_cart( $valid, $product_id, $quantity ) { if( ! empty ( WC()->cart->get_cart() ) && $valid ) { WC()->cart->empty_cart(); } return $valid; } /** * Disable add to cart confirmation message. */ add_filter( 'wc_add_to_cart_message_html', '__return_false' ); /** * Redirect user to checkout page after adding a product to cart. */ add_filter ('add_to_cart_redirect', 'ff_redirect_to_checkout'); function ff_redirect_to_checkout() { global $woocommerce; $checkout_url = $woocommerce->cart->get_checkout_url(); return $checkout_url; } /** * Calculate formidable add-on prices and add them to the total price in WC checkout. */ add_action('woocommerce_before_calculate_totals', 'ff_apply_addon_total_to_cart_price', 10, 1); function ff_apply_addon_total_to_cart_price($cart) { if (is_admin() && !defined('DOING_AJAX')) { return; } foreach ($cart->get_cart() as $cart_item) { if (!empty($cart_item['addon_total'])) { $base_price = $cart_item['data']->get_price(); $addon_price = floatval($cart_item['addon_total']); $cart_item['data']->set_price($base_price + $addon_price); } } } /** * Use different Authorize.net accounts in checkout. */ add_filter( 'option_woocommerce_authorizeaim_settings', function( $woocommerce_authorizeaim_settings ) { global $woocommerce; if ( function_exists( 'is_checkout' ) && function_exists( 'get_field' ) && is_checkout() ) { foreach ( $woocommerce->cart->get_cart() as $cart_item ) { $product_id = $cart_item['product_id']; $api_login_id = get_post_meta( $product_id, 'api_login_id', true ); $transaction_key = get_post_meta( $product_id, 'transaction_key', true ); if ( !empty( $api_login_id ) && !empty( $transaction_key ) ) { $woocommerce_authorizeaim_settings['login_id'] = $api_login_id; $woocommerce_authorizeaim_settings['transaction_key'] = $transaction_key; break; } } } return $woocommerce_authorizeaim_settings; } ); /** * When placing a new WC order by submitting formidable, * set order's customer detail according to the submitted information. */ add_action( 'woocommerce_new_order', 'ff_update_customer_data', 10, 2 ); function ff_update_customer_data($order_id,$order){ $postdata = $_POST; $email = $postdata['la_email']; $username = $postdata['la_email']; $args = array( 'user_email' => $email, 'display_name' => $postdata['la_first_name'], 'first_name' => $postdata['la_first_name'], 'last_name' => $postdata['la_last_name'] ); $userdata = wc_create_new_customer($email,$username,'',$args); $userdata = json_decode(json_encode($userdata), true); if(isset($userdata['errors'])){ $customer = get_user_by('email',$email); if($customer){ $user_id = $customer->ID; } }else{ $user_id = $userdata; update_user_meta($user_id, "first_name",$postdata['la_first_name']); update_user_meta($user_id, "last_name",$postdata['la_last_name']); } $address = array( 'first_name' => $postdata['la_first_name'], 'last_name' => $postdata['la_last_name'], 'email' => $email, 'phone' => $postdata['la_ower_phone'], 'address_1' => $postdata['la_buisiness_adddress_1'], 'address_2' => $postdata['la_buisiness_adddress_2'], 'city' => $postdata['la_buisiness_adddress_city'], 'state' => $postdata['la_buisiness_adddress_state'], 'postcode' => $postdata['la_buisiness_adddress_zipcode'], 'country' => 'US' ); $order = new WC_Order($order_id); $order->set_customer_id($user_id); $order->set_address($address, 'billing'); $order->set_address($address, 'shipping'); $order->save(); } /** * Link formidable entry with woocommerce order. -- ⇩⇩⇩ -- */ // 1. Store formidable entry ID in the customer session. add_action( 'frm_after_create_entry', function( $entry_id, $form_id ) { WC()->session->set( 'frm_entry_id', $entry_id ); }, 20, 2 ); // 2. Set formidable entry id from session to the order as an order meta. add_action( 'woocommerce_checkout_create_order', function( $order, $data ) { if ( $entry_id = WC()->session->get( 'frm_entry_id' ) ) { $order->update_meta_data( '_frm_entry_id', $entry_id ); } }, 10, 2 ); // 3. Display the link to the formidable entry on the order details page. add_filter( 'woocommerce_order_item_display_meta_key', function( $display_value, $meta ) { if ( $meta->key == '_formidable_form_data' ) { $display_value = __( 'Formidable Entry', 'formidable-woocommerce' ); } return $display_value; }, 10, 2 ); Passport Renewals Archives - Mon, 19 Oct 2020 21:31:12 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.5 https://dev.fastfilings.pomdev.net/wp-content/uploads/2020/09/cropped-icon2-32x32.png Passport Renewals Archives - 32 32 Complete Travel Checklist for Traveling Outside of the U.S. https://dev.fastfilings.pomdev.net/complete-travel-checklist-for-traveling-outside-of-the-us/ https://dev.fastfilings.pomdev.net/complete-travel-checklist-for-traveling-outside-of-the-us/#respond Sun, 13 Sep 2020 22:24:29 +0000 https://dev.fastfilings.pomdev.net/?p=1188 Planning an international trip can be an exciting experience, and the more planning you can do before you leave, the more enjoyable your vacation will be. We list some of the most important items to include on your international travel packing checklist. Clothing and Important Extras Clothing is kind of a given where it comes […]

The post Complete Travel Checklist for Traveling Outside of the U.S. appeared first on .

]]>
Planning an international trip can be an exciting experience, and the more planning you can do before you leave, the more enjoyable your vacation will be. We list some of the most important items to include on your international travel packing checklist.

Clothing and Important Extras

Clothing is kind of a given where it comes to packing for any trip, but it’s important to be prepared for the weather and having to walk farther than you anticipated. Pack clothing that you can layer should temperatures change.

Comfortable walking shoes will be an absolute must, and you won’t want to forget your bathing suit! Accessories like sunscreen, an electric outlet adapter, local currency, and any medications are also must-packs for any trip.

Documents, Cards, and Paperwork

You’ll want to arrange for travel insurance and notify your bank and credit card companies that you will be traveling, to avoid your accounts being frozen due to suspicious activity. Ask whether or not your debit and credit cards will be accepted by ATMs and point-of-sale terminals in the country you’ll be visiting.

Tourist Visa and Vaccinations

Some countries will require travelers to have a tourist visa, which will likely require you to get specific vaccinations. It’s a good idea to check online for CDC vaccination recommendations, as some must be given over a period of several weeks.

Passport

PassportChecking your passport for an expiration date is one of the most important things to add to your international travel checklist. You should do this several weeks in advance of your trip. Some countries require visitor passports to have a minimum of six months of validity remaining. If you need to renew before you leave, standard passport processing can take up to six weeks. This wait time can be shortened to between two and three weeks if you choose expedited processing.

Of course, you will need time to complete the necessary paperwork to obtain or renew a passport and confirm you’ve provided all of the needed information. Otherwise, your application could be rejected, and your processing delayed. The fastest way is to renew your passport online, as this doesn’t require you to visit a passport office.

Once your passport arrives, make two copies of the ID page, giving one to a trusted friend or family member and keeping the other in your carry-on bag. You’ll also want to photocopy any other important documents, such as your ID, social security number, and travel permissions and ID pages of the passports of children who are traveling with you.

Stress-Free Passport Renewal Services

When you’re ready to enjoy international travel, don’t let long passport renewal processing times get in your way; Fast Filings prepares your passport renewal online and sends it to you in one or two days.

Just sign your pre-prepared documents, gather your other required items, put them into the prepaid envelope we include, and mail. Then, just wait for your passport to arrive. It’s that easy; discover all of the benefits of fast passport processing. Visit Fast Filings online today.

The post Complete Travel Checklist for Traveling Outside of the U.S. appeared first on .

]]>
https://dev.fastfilings.pomdev.net/complete-travel-checklist-for-traveling-outside-of-the-us/feed/ 0
Out-of-Country Packing Tips https://dev.fastfilings.pomdev.net/out-of-country-packing-tips/ https://dev.fastfilings.pomdev.net/out-of-country-packing-tips/#respond Wed, 09 Sep 2020 22:27:25 +0000 https://dev.fastfilings.pomdev.net/?p=1194 Getting away from it all by visiting another country can be the experience of a lifetime—but, before you can travel, you must pack! These are some of the most important items to include in your luggage. Clothing Must-Haves Check the average temperatures and weather patterns before leaving so you know what to expect. Then, pack […]

The post Out-of-Country Packing Tips appeared first on .

]]>
Getting away from it all by visiting another country can be the experience of a lifetime—but, before you can travel, you must pack! These are some of the most important items to include in your luggage.

Clothing Must-Haves

Check the average temperatures and weather patterns before leaving so you know what to expect. Then, pack clothing according to your itinerary, being sure to include items you can layer for warmth and protection against heat or cold.

Essential Documents

There are certain documents you should never travel without, including your ID and passport, which will benefit from being in a protective cover. Don’t forget to print tickets and reservation confirmations and pack them beforehand!

Don’t-Forget Tech

Being in a different country can mean dealing with different outlets. Where this is the case, an outlet adapter in the right shape and voltage can be one of the most practical things you pack. You’ll also want to remember to pack some cash in your destination’s currency and any medications you are taking.

Want even more great tips for what to pack before an international trip? Check out this great infographic from FastFiling.com for what you need to prepare.

Out-of-Country Packing Tips

The post Out-of-Country Packing Tips appeared first on .

]]>
https://dev.fastfilings.pomdev.net/out-of-country-packing-tips/feed/ 0