Customize the checkout page
Walley Checkout for WooCommerce was previously known as Collector Checkout for WooCommerce and there may be some remnants of this in the documentation or plugin. For instance in the code snippets and/or some of the settings.
Hooks in WordPress essentially allow you to change or add code without editing core files. They are used extensively throughout WordPress and WooCommerce and are very useful for developers.
Read more about action and filter hooks here:
In Walley Checkout for WooCommerce there are some action hooks available, mainly for how the checkout page should be displayed.
The default layouts of the checkout page
The appearance of the Walley Checkout page comes with a few set layout options:
- One column checkout
- Two column checkout (Walley Checkout in the right column)
- Two column checkout (Walley Checkout in the left column)
- Two column checkout (Walley Checkout in the left column – Storefront light)
These layouts all have the following sections displayed:
- Shopping cart delivery options.
- Customer order note.
- Select another payment method button (if offering other payment methods).
- B2C / B2B switcher (if selling to both customer types).
- Walleys checkout (where you enter personal information and choose payment method)
One column checkout
Two column checkout
Switch between the tabs to see the different layouts.
Sometimes you need to change the design of the checkout page and with Walley Checkout for WooCommerce it is possible in a couple of different ways, as presented below.
Remove, add and move with action hooks
If you want to make some more extensive changes to the layout of the checkout page, it is recommended to work with action hooks.
The checkout template file
On the Walley Checkout template page, there are several action hooks you can use to add code or content. These hooks have the following names:
Through these action hooks, you can easily add information to different locations on the checkout page.
Create your own template file
If you need to make changes that can’t be accomplished via action hooks, then you are able to overwrite the checkout template file via your theme. The plugin supports WooCommerce’s way of handling template files.
The template file used for displaying Walley Checkout is called collector-checkout.php and it is located in the
templates folder in the plugin. To overwrite the file, copy it from the plugin, then paste it into the
/woocommerce folder in your theme. Now you have the opportunity to make the changes you want. Keep in mind that the action hooks
collector_wc_after_iframe must remain for the plugin to work properly.