Tricks-to-Customize-your-Woocommerce-Store-3
Once you have installed WooCommerce, sometimes you need to tweak some of its default features to suit your or your client’s needs. In this series of articles, I will discuss a few tips and tricks to customize your WooCommerce Store.

1. Import WooCommerce to facebook Store

Using the WooCommerce shop to Facebook plugin for wordpress, you can easily import all your products to your facebook shop along with other cool features.

2. Create Customer Order Status

Just add this code to your functions.php file

[code]

// Register New Order Statuses
function my_wc_register_post_statuses() {
register_post_status( ‘wc-custom-order-status’, array(
‘label’ => _x( ‘Custom Order Status Name’, ‘WooCommerce Order status’, ‘text_domain’ ),
‘public’ => true,
‘exclude_from_search’ => false,
‘show_in_admin_all_list’ => true,
‘show_in_admin_status_list’ => true,
‘label_count’ => _n_noop( ‘Approved (%s)’, ‘Approved (%s)’, ‘text_domain’ )
) );
}
add_filter( ‘init’, ‘my_wc_register_post_statuses’ );

// Add New Order Statuses to WooCommerce
function my_wc_add_order_statuses( $order_statuses ) {
$order_statuses[‘wc-custom-order-status’] = _x( ‘Custom Order Status Name’, ‘WooCommerce Order status’, ‘text_domain’ );
return $order_statuses;
}
add_filter( ‘wc_order_statuses’, ‘my_wc_add_order_statuses’ );

[/code]

 

replacing ‘Custom Order Status Name’ with the name you want in the status.

In case you want to add another status, just repeat the register_post_status function with a different name, label and IDs. Then add the new order status to the $order_statuses array in the my_wc_add_order_statuses function.

3. Download FREE eCommerce icons pack

You can take your WooCommerce store to the next level by downloading the free eCommerce icons by Freepik and use it in your website.
integrate-woocommerce-with-ERP-appseconnect

4. Replace Product placeholder image

You can replace your default WooCommerce products placeholder image by placing the code in your functions.php file

[code]

add_action( ‘init’, ‘custom_fix_thumbnail’ );

function custom_fix_thumbnail() {
add_filter(‘woocommerce_placeholder_img_src’, ‘my_custom_woocommerce_placeholder_img’);

function my_custom_woocommerce_placeholder_img( $src ) {
$upload_dir = wp_upload_dir();
$uploads = untrailingslashit( $upload_dir[‘baseurl’] );
$src = $uploads . ‘/2017/05/imagename.jpg’;

return $src;
}
}

[/code]

You just need to change the image name path with the current one.

5. Add a custom Currency to WooCommerce

You can add a new currency symbol for your products by placing the code snippet in your functions.php file

[code]

add_filter( ‘woocommerce_currencies’, ‘my_custom_currency’ );

function my_custom_currency( $currencies ) {
$currencies[‘NEWCURR’] = __( ‘Currency name’, ‘woocommerce’ );
return $currencies;
}

add_filter(‘woocommerce_currency_symbol’, ‘my_custom_currency_symbol’, 10, 2);

function my_custom_currency_symbol( $currency_symbol, $currency ) {
switch( $currency ) {
case ‘NEWCURR’: $currency_symbol = ‘@@’; break;
}
return $currency_symbol;
}

[/code]

The name of the currency is ‘NEWCURR” and the symbol is ‘@@’

6. Add Blind Carbon Copy (BCC) to all your WooCommerce emails

Adding the following code snippet with the custom email to your functions.php file, in case you want to BCC all your WooCommerce emails.

[code]
function woo_bcc_emails() {
return ‘Bcc: soumitra.c@insync.co.in’ . “\r\n”;
}
add_filter(‘woocommerce_email_headers’, ‘woo_bcc_emails’ );

[/code]
integrate-woocommerce-with-ERP-appseconnect
You may also like:
How to create Multiple Websites in Woocommerce
How to setup your ecommerce store using Woocommerce – A Beginner’s Guide
Why Integrate Dynamics NAV ERP with Woocommerce?