/**
* 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 );
How to Obtain a Certificate of Good Standing in Oklahoma -
Skip to content
How To Obtain A Certificate of Good Standing in Oklahoma.
If you run a business in Oklahoma, at some point you may need to get a “certificate of good standing” to achieve your business goals.
For example, suppose you want to apply for a loan or open a new line of credit. It’s likely that the bank will ask for an Oklahoma certificate of good standing to prove that your organization is on the up and up with the Secretary of State.
A certificate of good standing (CGS) confirms that a business is properly registered and authorized to conduct business in a particular state.
To obtain a CGS, a business must be current with all required state filings, such as annual reports and tax returns, and must be in compliance with applicable state laws and regulations.
Other names for a certificate of good standing include:
Letter of good standing
Certificate of status
Certificate of existence
Certificate of facts
As in other states, an Oklahoma certificate of good standing proves that the OK Secretary of State considers the business safe and reliable to work with.
You aren’t required to have a certificate of good standing on file simply to conduct business in Oklahoma. But you may need one if you want to do certain things—like apply for a business loan or rent a commercial property. A potential business partner may also ask for one before they agree to sign a contract with your business.
You might also need a CGS to:
Apply for financing
Register to do business in another state
Apply for licenses and permits
Enter into contracts
Sell your business
An Oklahoma certificate of good standing can help you demonstrate your business’s legal and financial status to lenders, vendors, customers, and other stakeholders.
Which Types of Businesses Can Get a CGS?
In Oklahoma, corporations, limited liability companies (LLCs), partnerships, nonprofits, sole proprietorships, and trusts can request a certificate of good standing.
To obtain one, your organization must be current with all required state filings and paid up on taxes and other fees. In other words, you must be in “good standing.”
What Information Do I Need to Provide to Get a CGS?
Thankfully, requesting a certificate of good standing is not complicated. You won’t need to provide extensive details about your business, financial information, or any fancy charts or graphs. But you will need to know/gather some basic information about your business, including:
To start a business in Oklahoma, you must choose a business name and legal structure (corporation, LLC, partnership, etc.), register the business with the Oklahoma Secretary of State, obtain a federal tax ID, and get all necessary licenses and permits.
Corporations, LLCs partnerships, and nonprofits must also file an annual report, which keeps the state updated on vital information about the business from year to year.
All these things (and more, like paying taxes) are required to keep a business in “good standing” with the Oklahoma Secretary of State.
This is the purpose of a certificate of good standing. It proves that a business is up to date on its business filings and taxes, and that it is properly registered and authorized to do business in the state of Oklahoma.
Here is the information contained in an Oklahoma certificate of good standing:
Registered business name
Date of business formation
Declaration that business taxes and required fees have been paid and that the business has filed its annual report within the allowed timeline
Verification the business has not filed for dissolution
Declaration that the business is in good standing with the Oklahoma Secretary of State
Presenting a certificate of good standing to a bank, a prospective business partner, or a potential investor can help you achieve your business goals. In some instances, it may be specifically requested or required.
In the everyday grind of running a business it can be easy to miss a filing or fall behind on taxes or other obligations—especially if you’re just starting up.
If you’re researching how to get a certificate of good standing in Oklahoma, you need to first verify that you are in fact in good standing with the Secretary of State.
This means making sure your business is properly registered, that you have obtained all necessary licenses and permits, and that you’re up to date on your taxes and annual report filing. If you’re not sure, you can do a records search on the Oklahoma Secretary of State website.
You can apply for a certificate by mailing a paper form to the state, but applying online with a reputable company like FastFilings is the fastest option. All you’ll need is basic information, including your business name and address, and your Oklahoma filing number, plus a credit card for payment.
Our goal at FastFilings is to make it as easy and efficient as possible to get the business filings and certifications you need.
Here’s why we’re the best choice for getting your certificate of good standing in Oklahoma:
Fast – Our online filing process is significantly faster than traditional mail. Complete your application in less than 5 minutes using our simple form.
Reliable – We deliver your documents in a timely and secure manner. Unlike physical mail, there’s no long waiting times or risk of loss or damage during transit.
Accurate – We carefully review all information for accuracy before submitting it. You can rest assured that your application is error-free.
Experienced – We’ve been helping businesses for more than a decade. Since 2013, we’ve helped businesses file and obtain tens of thousands of vital documents.
Affordable – We strive to make our services affordable, because we understand that every penny counts, whether you’re a one-person startup or a large corporation.
Start your application for an Oklahoma certificate of good standing today on our easy-to-use platform.