Skip to content

Instantly share code, notes, and snippets.

@paulgoodchild
Created September 23, 2020 11:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulgoodchild/d60b5cc70780fccb4d710720bccd3233 to your computer and use it in GitHub Desktop.
Save paulgoodchild/d60b5cc70780fccb4d710720bccd3233 to your computer and use it in GitHub Desktop.
Customise the hook/location where Shield's Antibot feature will output any content
<?php
/**
* Use this filter to change the precise location where Shield's Antibot features will be
* output within the Woocommerce checkout form.
*/
add_filter( 'icwp-wpsf-woocommerce_checkout_hook_location', function ( $hook ) {
/**
* This is the default hook location used by Shield.
*/
$hook = 'woocommerce_after_checkout_registration_form';
/**
* You can change the hook to be somewhere else, for example 'before' instead of 'after'
*/
$hook = 'woocommerce_before_checkout_registration_form';
// ALWAYS return $hook.
return $hook;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment