if ( is_array( $held_keys ) && 0 < count( $held_keys ) ) { $order->update_meta_data( '_coupon_held_keys', $held_keys ); } if ( is_array( $held_keys_for_user ) && 0 < count( $held_keys_for_user ) ) { $order->update_meta_data( '_coupon_held_keys_for_users', $held_keys_for_user ); } } /** * Release all coupons held by this order. * * @param WC_Order $order Current order object. * @param bool $save Whether to delete keys from DB right away. Could be useful to pass `false` if you are building a bulk request. */ public function release_held_coupons( $order, $save = true ) { $coupon_held_keys = $this->get_coupon_held_keys( $order ); if ( is_array( $coupon_held_keys ) ) { foreach ( $coupon_held_keys as $coupon_id => $meta_key ) { $coupon = new \WC_Coupon( $coupon_id ); $coupon->delete_meta_data( $meta_key ); $coupon->save_meta_data(); } } $order->delete_meta_data( '_coupon_held_keys' ); $coupon_held_keys_for_users = $this->get_coupon_held_keys_for_users( $order ); if ( is_array( $coupon_held_keys_for_users ) ) { foreach ( $coupon_held_keys_for_users as $coupon_id => $meta_key ) { $coupon = new \WC_Coupon( $coupon_id ); $coupon->delete_meta_data( $meta_key ); $coupon->save_meta_data(); } } $order->delete_meta_data( '_coupon_held_keys_for_users' ); if ( $save ) { $order->save_meta_data(); } } /** * Performs actual query to get orders. Uses `OrdersTableQuery` to build and generate the query. * * @param array $query_vars Query variables. * * @return array|object List of orders and count of orders. */ public function query( $query_vars ) { if ( ! isset( $query_vars['paginate'] ) || ! $query_vars['paginate'] ) { $query_vars['no_found_rows'] = true; } if ( isset( $query_vars['anonymized'] ) ) { $query_vars['meta_query'] = $query_vars['meta_query'] ?? array(); // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query if ( $query_vars['anonymized'] ) { $query_vars['meta_query'][] = array( 'key' => '_anonymized', 'value' => 'yes', ); } else { $query_vars['meta_query'][] = array( 'key' => '_anonymized', 'compare' => 'NOT EXISTS', ); } } try { $query = new OrdersTableQuery( $query_vars ); } catch ( \Exception $e ) { $query = (object) array( 'orders' => array(), 'found_orders' => 0, 'max_num_pages' => 0, ); } if ( isset( $query_vars['return'] ) && 'ids' === $query_vars['return'] ) { $orders = $query->orders; } else { $orders = WC()->order_factory->get_orders( $query->orders ); } if ( isset( $query_vars['paginate'] ) && $query_vars['paginate'] ) { return (object) array( 'orders' => $orders, 'total' => $query->found_orders, 'max_num_pages' => $query->max_num_pages, ); } return $orders; } //phpcs:enable Squiz.Commenting, Generic.Commenting /** * Get the SQL needed to create all the tables needed for the custom orders table feature. * * @return string */ public function get_database_schema() { global $wpdb; $collate = $wpdb->has_cap( 'collation' ) ? $wpdb->get_charset_collate() : ''; $orders_table_name = $this->get_orders_table_name(); $addresses_table_name = $this->get_addresses_table_name(); $operational_data_table_name = $this->get_operational_data_table_name(); $meta_table = $this->get_meta_table_name(); $max_index_length = $this->database_util->get_max_index_length(); $composite_meta_value_index_length = max( $max_index_length - 8 - 100 - 1, 20 ); // 8 for order_id, 100 for meta_key, 10 minimum for meta_value. $composite_customer_id_email_length = max( $max_index_length - 20, 20 ); // 8 for customer_id, 20 minimum for email. $sql = " CREATE TABLE $orders_table_name ( id bigint(20) unsigned, status varchar(20) null, currency varchar(10) null, type varchar(20) null, tax_amount decimal(26,8) null, total_amount decimal(26,8) null, customer_id bigint(20) unsigned null, billing_email varchar(320) null, date_created_gmt datetime null, date_updated_gmt datetime null, parent_order_id bigint(20) unsigned null, payment_method varchar(100) null, payment_method_title text null, transaction_id varchar(100) null, ip_address varchar(100) null, user_agent text null, customer_note text null, PRIMARY KEY (id), KEY status (status), KEY date_created (date_created_gmt), KEY customer_id_billing_email (customer_id, billing_email({$composite_customer_id_email_length})), KEY billing_email (billing_email($max_index_length)), KEY type_status_date (type, status, date_created_gmt), KEY parent_order_id (parent_order_id), KEY date_updated (date_updated_gmt) ) $collate; CREATE TABLE $addresses_table_name ( id bigint(20) unsigned auto_increment primary key, order_id bigint(20) unsigned NOT NULL, address_type varchar(20) null, first_name text null, last_name text null, company text null, address_1 text null, address_2 text null, city text null, state text null, postcode text null, country text null, email varchar(320) null, phone varchar(100) null, KEY order_id (order_id), UNIQUE KEY address_type_order_id (address_type, order_id), KEY email (email($max_index_length)), KEY phone (phone) ) $collate; CREATE TABLE $operational_data_table_name ( id bigint(20) unsigned auto_increment primary key, order_id bigint(20) unsigned NULL, created_via varchar(100) NULL, woocommerce_version varchar(20) NULL, prices_include_tax tinyint(1) NULL, coupon_usages_are_counted tinyint(1) NULL, download_permission_granted tinyint(1) NULL, cart_hash varchar(100) NULL, new_order_email_sent tinyint(1) NULL, order_key varchar(100) NULL, order_stock_reduced tinyint(1) NULL, date_paid_gmt datetime NULL, date_completed_gmt datetime NULL, shipping_tax_amount decimal(26,8) NULL, shipping_total_amount decimal(26,8) NULL, discount_tax_amount decimal(26,8) NULL, discount_total_amount decimal(26,8) NULL, recorded_sales tinyint(1) NULL, UNIQUE KEY order_id (order_id), KEY order_key (order_key) ) $collate; CREATE TABLE $meta_table ( id bigint(20) unsigned auto_increment primary key, order_id bigint(20) unsigned null, meta_key varchar(255), meta_value text null, KEY meta_key_value (meta_key(100), meta_value($composite_meta_value_index_length)), KEY order_id_meta_key_meta_value (order_id, meta_key(100), meta_value($composite_meta_value_index_length)) ) $collate; "; return $sql; } /** * Returns an array of meta for an object. * * @param WC_Data $object WC_Data object. * @return array */ public function read_meta( &$object ) { $raw_meta_data = $this->data_store_meta->read_meta( $object ); return $this->filter_raw_meta_data( $object, $raw_meta_data ); } /** * Deletes meta based on meta ID. * * @param WC_Data $object WC_Data object. * @param \stdClass $meta (containing at least ->id). * * @return bool */ public function delete_meta( &$object, $meta ) { global $wpdb; if ( $this->should_backfill_post_record() && isset( $meta->id ) ) { // Let's get the actual meta key before its deleted for backfilling. We cannot delete just by ID because meta IDs are different in HPOS and posts tables. $db_meta = $this->data_store_meta->get_metadata_by_id( $meta->id ); if ( $db_meta ) { $meta->key = $db_meta->meta_key; $meta->value = $db_meta->meta_value; } } $delete_meta = $this->data_store_meta->delete_meta( $object, $meta ); $changes_applied = $this->after_meta_change( $object, $meta ); if ( ! $changes_applied && $object instanceof WC_Abstract_Order && $this->should_backfill_post_record() && isset( $meta->key ) ) { self::$backfilling_order_ids[] = $object->get_id(); if ( is_object( $meta->value ) && '__PHP_Incomplete_Class' === get_class( $meta->value ) ) { $meta_value = maybe_serialize( $meta->value ); $wpdb->delete( _get_meta_table( 'post' ), array( 'post_id' => $object->get_id(), 'meta_key' => $meta->key, // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key 'meta_value' => $meta_value, // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value ), array( '%d', '%s', '%s' ) ); wp_cache_delete( $object->get_id(), 'post_meta' ); $logger = wc_get_container()->get( LegacyProxy::class )->call_function( 'wc_get_logger' ); $logger->warning( sprintf( 'encountered an order meta value of type __PHP_Incomplete_Class during `delete_meta` in order with ID %d: "%s"', $object->get_id(), var_export( $meta_value, true ) ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export } else { delete_post_meta( $object->get_id(), $meta->key, $meta->value ); } self::$backfilling_order_ids = array_diff( self::$backfilling_order_ids, array( $object->get_id() ) ); } return $delete_meta; } /** * Add new piece of meta. * * @param WC_Data $object WC_Data object. * @param \stdClass $meta (containing ->key and ->value). * * @return int|bool meta ID or false on failure */ public function add_meta( &$object, $meta ) { $add_meta = $this->data_store_meta->add_meta( $object, $meta ); $meta->id = $add_meta; $changes_applied = $this->after_meta_change( $object, $meta ); if ( ! $changes_applied && $object instanceof WC_Abstract_Order && $this->should_backfill_post_record() ) { self::$backfilling_order_ids[] = $object->get_id(); add_post_meta( $object->get_id(), $meta->key, $meta->value ); self::$backfilling_order_ids = array_diff( self::$backfilling_order_ids, array( $object->get_id() ) ); } return $add_meta; } /** * Update meta. * * @param WC_Data $object WC_Data object. * @param \stdClass $meta (containing ->id, ->key and ->value). * * @return bool The number of rows updated, or false on error. */ public function update_meta( &$object, $meta ) { $update_meta = $this->data_store_meta->update_meta( $object, $meta ); $changes_applied = $this->after_meta_change( $object, $meta ); if ( ! $changes_applied && $object instanceof WC_Abstract_Order && $this->should_backfill_post_record() ) { self::$backfilling_order_ids[] = $object->get_id(); update_post_meta( $object->get_id(), $meta->key, $meta->value ); self::$backfilling_order_ids = array_diff( self::$backfilling_order_ids, array( $object->get_id() ) ); } return $update_meta; } /** * Perform after meta change operations, including updating the date_modified field, clearing caches and applying changes. * * @param WC_Abstract_Order $order Order object. * @param \WC_Meta_Data $meta Metadata object. * * @return bool True if changes were applied, false otherwise. */ protected function after_meta_change( &$order, $meta ) { method_exists( $meta, 'apply_changes' ) && $meta->apply_changes(); // Prevent this happening multiple time in same request. if ( $this->should_save_after_meta_change( $order, $meta ) ) { $order->set_date_modified( current_time( 'mysql' ) ); $order->save(); return true; } else { $order_cache = wc_get_container()->get( OrderCache::class ); $order_cache->remove( $order->get_id() ); } return false; } /** * Helper function to check whether the modified date needs to be updated after a meta save. * * This method prevents order->save() call multiple times in the same request after any meta update by checking if: * 1. Order modified date is already the current date, no updates needed in this case. * 2. If there are changes already queued for order object, then we don't need to update the modified date as it will be updated ina subsequent save() call. * * @param WC_Order $order Order object. * @param \WC_Meta_Data|null $meta Metadata object. * * @return bool Whether the modified date needs to be updated. */ private function should_save_after_meta_change( $order, $meta = null ) { $current_time = $this->legacy_proxy->call_function( 'current_time', 'mysql', 1 ); $current_date_time = new \WC_DateTime( $current_time, new \DateTimeZone( 'GMT' ) ); return $order->get_date_modified() < $current_date_time && empty( $order->get_changes() ) && ( ! is_object( $meta ) || ! in_array( $meta->key, $this->ephemeral_meta_keys, true ) ); } } Why Your Company Needs a CMO (Even if You Don't Think You Do) - The Bean Online

Why Your Company Needs a CMO (Even if You Don’t Think You Do)

Category

Publish Date

May 22, 2023

Reading Time

Are you struggling to achieve your marketing goals? Are you unsure of how to take your company’s marketing to the next level? As a business owner, you may not think you need a Chief Marketing Officer (CMO), but hear us out. According to recent research, companies with a CMO achieve 15% higher revenue growth than those without one.

A CMO can provide strategic direction and valuable expertise that can greatly benefit your company’s marketing efforts. In this article, we will explore what a CMO does, their duties and responsibilities, the benefits of having a CMO, and when to hire one. We will also discuss the differences between a full-time CMO and a fractional CMO, and the benefits of each. By the end of this article, you will understand why your company needs a CMO (even if you don’t think you do) and how investing in the right person can take your marketing to the next level.

 

CMO Duties and Responsabilities

 

A CMO has a multitude of duties and responsibilities that are crucial for the success of a company’s marketing efforts. One of their primary responsibilities is to develop and execute marketing strategies that align with the company’s goals and objectives. This involves conducting market research, analyzing customer behavior, and understanding industry trends to identify opportunities for growth.

Additionally, a CMO manages the company’s brand image and ensures that all messaging and communications are consistent and effective. They oversee the creation of marketing content, such as advertisements, email campaigns, and social media posts, and work with creative teams to develop compelling visuals and messaging. A CMO also analyzes marketing data to measure the effectiveness of campaigns and adjust strategies as needed.

Other important duties of a CMO include developing and managing the marketing budget, building and nurturing relationships with key partners and stakeholders, and staying up-to-date with the latest marketing technologies and trends. With all of these responsibilities, it’s clear why having a CMO on your team is so important for the success of your company’s marketing efforts.

 

The Benefits of Having a CMO are numerous and wide-ranging, and we’ll explore them in the next section.

 

Having a CMO on your team comes with a multitude of benefits that can positively impact your company’s growth and success. Firstly, they bring expertise and experience in developing and executing effective marketing strategies that align with your overall business goals. This means that your marketing efforts are more likely to produce the results you desire, such as increased brand awareness and sales.

Secondly, a CMO can save you time and resources by managing your marketing team and ensuring that everyone is working towards the same objectives. This allows you to focus on other areas of your business, knowing that your marketing efforts are in capable hands.

Thirdly, a CMO can provide valuable insights and market research that can inform your business decisions and help you stay ahead of your competition. They are also responsible for staying up-to-date with the latest marketing technologies and trends, ensuring that your company is always at the forefront of innovation and able to adapt to changing market conditions.

Overall, having a CMO can provide a significant return on investment for your company’s marketing efforts. In the next section, we’ll explore the differences between a Fractional CMO and Full Time CMO to help you decide which option is best for your business.

 

Fractional CMO VS Full Time CMO

 

When it comes to hiring a CMO, one of the biggest decisions you’ll have to make is whether you want a full-time CMO or a fractional CMO. A full-time CMO is a permanent member of your team, while a fractional CMO is hired on a part-time or project basis. Both options have their pros and cons, and the best choice for your business will depend on your specific needs and budget.

The main advantage of a full-time CMO is that they are fully dedicated to your company and your marketing efforts. They are always available to provide guidance, insights, and recommendations, and they have a deep understanding of your brand and target audience. You can also expect a full-time CMO to be more invested in the success of your marketing campaigns and to work closely with other departments to ensure a cohesive and effective overall strategy.

However, a full-time CMO can also be expensive and may not be necessary for smaller businesses or those with limited marketing budgets. Additionally, if your company is going through a slow period, you may not need a full-time CMO to handle a reduced workload.

On the other hand, a fractional CMO can be a more affordable option, as you only pay for the hours or projects they work on. They can also bring a fresh perspective and new ideas to the table, as they work with multiple companies and industries. A fractional CMO can be particularly useful for small businesses or startups that need help developing a marketing strategy or launching a new product.

However, a fractional CMO may not have the same level of dedication or understanding of your company as a full-time CMO. They may also have limited availability if they are working with multiple clients at once, and may not be able to provide the same level of support during busy periods.

In the next section, we’ll explore the benefits of a fractional CMO in more detail to help you determine which option is the best fit for your business.

 

Benefits of a Fractional CMO

 

A fractional CMO, also known as an outsourced CMO, can be a great resource for businesses that don’t require a full-time CMO. While some may argue that a full-time CMO is necessary to have a deep understanding of the company and its culture, a fractional CMO can bring a fresh perspective and unbiased insight to the table. Additionally, a fractional CMO can often provide services on a more flexible and affordable basis than a full-time CMO, making it a more appealing option for smaller companies or those on a tighter budget.

One of the key benefits of a fractional CMO is the ability to tap into specialized expertise. Fractional CMOs often have experience in various industries and can provide insights and strategies that a full-time CMO may not have. They also tend to stay up-to-date on the latest marketing trends and technologies, which can be invaluable for businesses looking to stay ahead of the curve.

Another benefit of a fractional CMO is the ability to scale up or down as needed. If a business experiences a slow period or needs to cut costs, they can easily reduce the amount of services from the fractional CMO. On the other hand, if a business experiences a growth spurt or needs more support during a busy period, they can increase the amount of services from the fractional CMO to meet their needs.

Overall, while a fractional CMO may not provide the same level of dedication or availability as a full-time CMO, they can bring many benefits to businesses looking for specialized expertise and flexibility. In the next section, we’ll explore when it might be time to hire a CMO, whether full-time or fractional.

 

When to Hire a CMO

 

As a business owner, it can be challenging to determine when it’s time to bring on a Chief Marketing Officer (CMO). While some may believe that a CMO is only necessary for larger companies, there are several instances where even smaller businesses could benefit from their expertise.

One key indicator that it may be time to hire a CMO is when the business is experiencing stagnant growth. A CMO can provide valuable insight into why the company is not growing and develop a strategic marketing plan to help increase revenue.

Another instance where a CMO could be beneficial is when the business is entering a new market or launching a new product. A CMO can help ensure that the company’s message is effectively reaching the target audience and develop a successful launch strategy.

Additionally, if the business is struggling with branding or positioning in the market, a CMO can bring a fresh perspective and help establish a strong brand identity.

It’s also important to consider the overall workload of the existing marketing team. If they are overwhelmed or lacking in certain areas of expertise, a CMO can help alleviate the workload and provide additional support and guidance.

Ultimately, the decision to hire a CMO will depend on the specific needs and goals of the business. Whether it’s a full-time role or a fractional CMO, the expertise and strategic thinking they bring to the table can significantly benefit a company’s growth and success.

In summary, hiring a Chief Marketing Officer (CMO) can be a game changer for your business. A CMO can provide strategic direction, valuable expertise, and the leadership needed to take your marketing efforts to the next level. Whether you choose a full-time or fractional CMO, investing in the right person can greatly benefit your company’s marketing goals. Don’t let struggling marketing efforts hold your business back any longer. Consider hiring a CMO today and start achieving your business goals. Remember, as Peter Drucker once said, “The aim of marketing is to know and understand the customer so well the product or service fits them perfectly and sells itself.”

 

Unlock the full potential of your marketing efforts with The Bean Online’s Grounds for Growth, our Rent Your CMO service Starting at $999 a month we provide with the expertise of and experienced CMO to elevate your business without the commitment and cost

 

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Affiliate Disclosure

TheBeanOnline.com is a participant of various affiliate programs which means we may earn a commission when you buy something through links on our site. (at no extra cost to you).