/**
* 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 );
File For an Annual Report in Your State | Fast Filings
Complete your annual report in minutes.
LLCs and corporations are generally required to file an annual report each year to stay compliant and remain in existence. File today to avoid state penalties or dissolution.
✓ Required for nearly all LLCs and Corporations. ✓ Stay compliant with state regulations. ✓ Fully tax deductible. ✓ Rush processing.
FastFilings is a private permit, license, and government document filing service. We offer filing services and document assistance services to individuals and businesses alike. Whether you need to renew a passport or obtain a permit for your business, we are here to help. We perform government filings and prepare government documents, but we are not a government agency. You can always file on your own directly with the issuing government office if you prefer.
Our goal is to help you avoid the hassle and headache of preparing and filing government documents by yourself. We error check and rush all orders.
An annual report filing goes by different names, depending on the state of incorporation. For example, in California, the term is Statement of Information, and in New York the term is Biennial Statement.
Regardless of the term the particular state uses, the concept is essentially the same: this filing renews an LLC or corporation with the state, and provides an updated report to the state with various entity information.
An annual report is an essential filing that keeps an LLC or corporation active and in good standing with the Secretary of State. Failure to file an annual report generally causes an entity to fall into bad standing, to be deactivated or terminated by the state, and to incur hefty fines.
How do I file?
Like most business filings, you can file them a service, or through the issuing government office directly. To obtain the document through the government office directly, you would want to contact the Secretary of State office in the state that the entity is incorporated in. They can guide you and provide information to complete the filing on your own.
However, it is often times faster, easier, and more convenient to use a professional service to complete a filing for you, and most charge only a small fee.
If you’d like to use our service to to file your annual report, you can complete the request in under 5 minutes by clicking here. We charge only a small fee, and we file very quickly.
If you prefer instead to contact your Secretary of State directly, click here for a link to all Secretary of State websites.
File your corp/LLC Annual Report Today
We work hard to make the document retrieval process easy for you. Focus on your business, not on messy paperwork.
We have handled the paperwork and filings for thousands of businesses. Smart business owners know how to outsource menial tasks.
We specialize in State filings, and have since 2013. We have performed tens of thousands of state specific filings over the years.
As a small, hard working business, we always listen to our customers. Which is why we know you value security (so do we, who wouldn't?).
Fast Filings is a private permit, license and other government document filing service. We offer filing services and document assistance services for various personal and business filings needs. Whether you need to renew a passport, or your business needs a permit or license to operate, we are here to help. We perform government filings and prepare government documents, but we are not a government agency. You may file on your own directly with the issuing government office and avoid our service fee if you’d like.
Our goal is to help you avoid the hassle and headache with preparing or filing government documents on your own. We error check and rush all orders.
Fast Filings is private filing service, specializing in a business filings. Fast Filings is NOT AFFILIATED with any government agency. Instead, we offer services to prepare and and/or assist in filing forms and documents. You may file on your own directly through a government office for free or at a reduced fee.