Disable WooCommerce Marketing menu
Add the following code to the functions.php of your active theme.
add_filter( 'woocommerce_marketing_menu_items', '__return_empty_array' );
This will remove the following Marketing menu added in WooCommerce 4.0


Add the following code to the functions.php of your active theme.
add_filter( 'woocommerce_marketing_menu_items', '__return_empty_array' );
This will remove the following Marketing menu added in WooCommerce 4.0


WordPress comes with a number of in-built widgets which allow you to easily add additional functionality to your WordPress theme. You can use WordPress Widgets to add content and features to your sidebars or to any other predefined widget locations. But nobody uses all the default widgets. In fact, there are probably a few default…

By OutsourcedContent — on April 19, 2018 Using the get_file_data() function. More efficient than using get_plugin_data() function. $plugin_data = get_file_data( WP_PLUGIN_DIR . ‘/plugin-folder-name-in-wp-content-plugins-folder/plugin-main-file.php’, array( ‘Version’ => ‘Version’ ) ); $plugin_data[‘Version’] will have the version. To read version from within the same plugin: $plugin_data = get_file_data( __FILE__, array( ‘Version’ => ‘Version’ ) ); Refer: https://wordpress.stackexchange.com/a/285644/90061 Pro…

If you are new to WordPress then you might be used to visiting the help tab in the top right corner of the WordPress admin panel. WordPress has added a help tab which reveals a series of helpful topics related to the current page. For example, on the Dashboard, the tab offers an overview of…

By OutsourcedContent — on June 29, 2021 WordPress by default will preserve capitalisation in filename for images. To make filenames lowercase automatically, add the following to the functions.php of your active theme. /** * Convert filename to lowercase * * @author Arun Basil Lal * @refer https://codex.wordpress.org/Plugin_API/Filter_Reference/wp_handle_upload_prefilter */ function prefix_convert_filename_to_lowercase( $file ) { $image_extensions =…

While working on a WooCommerce project recently, my client asked me if there is a way to show a message to seller on their own product items. A simple message like “you are the seller of this item” if the product page is previewed by the seller itself. Typically WooCommerce is a plugin which essentially…

Often when designing a WordPress theme, designers choose to have different styling for odd/even comments. But recently while working on a project, I required to style odd and even blog posts differently. To do this, I needed to add odd and even class to WordPress posts. While searching for a solution, I found many tutorials…