WooFill (v1.0) Documentation

Table of Contents

  1. Installation
  2. Usage
  3. Hooks for developers

A) Installation - top

WooFill for Woocommerce requires WordPress 3.8+ (may work on older version but has not been tested) and WooCommerce 2.0 or 2.1.

Just like every plugin, just copy the woofill folder in your wp-content/plugins folder then activate it through WordPress dashboard. If the installation went OK, the plugin is directly available on the checkout page of your site. There is no administration page.

B) Usage - top

C) Hooks for developers - top

a) Available filters

Nine filters are available for developers to manipulate default behavior of the plugin:

b) Usage examples

Disable the inclusion of the default css

// functions.php of the theme folder

function my_theme_woofill_use_css_filter($val)
{
	return false;
}
add_filter('woofill_use_css_filter', 'my_theme_woofill_use_css_filter');

Changing the order of the fields inside the grouped fields for billing address (putting country first)

// functions.php of the theme folder

function my_theme_woofill_billing_fields_to_group_filter($array)
{
	return array('billing_country', 'billing_address_1', 'billing_address_2', 'billing_city', 'billing_state', 'billing_postcode');
}
add_filter('woofill_billing_fields_to_group_filter', 'my_theme_woofill_billing_fields_to_group_filter');

Adding a custom (but already defined) shipping_address_3 to the grouped fields for shipping address

// functions.php of the theme folder

function my_theme_woofill_shipping_fields_to_group_filter($array)
{
	array('shipping_address_1', 'shipping_address_2' , 'shipping_address_3', 'shipping_city', 'shipping_state', 'shipping_postcode', 'shipping_country');
}
add_filter('woofill_shipping_fields_to_group_filter', 'my_theme_woofill_shipping_fields_to_group_filter');

Renaming the 'address not found?' link in the billing form

// functions.php of the theme folder

function my_theme_woofill_billing_address_not_found_label_filter($label)
{
	return 'My new label';
}
add_filter('woofill_billing_address_not_found_label_filter', 'my_theme_woofill_billing_address_not_found_label_filter');

Go To Table of Contents