🤑 Black Friday Sale: 30% OFF for all plans. Coupon: BFD2022
Days
Hours
Minutes
Seconds
GET FREE VERSION GET THE PRO VERSION

Hooks Settings

With special hooks option it is possible to change default WordPress hooks that used to show labels. Use it if labels are not displayed for your theme or if you want to change labels positions.

By default plugin labels must work fine with almost all WordPress themes.
To display label plugin use some standard WooCommerce hooks that use nearly all themes.

For archive pages:

On image position - woocommerce_before_shop_loop_item_title | 10
Before title position - woocommerce_shop_loop_item_title | 9

For single product page:

On image position - woocommerce_product_thumbnails | 10
Before title position - woocommerce_single_product_summary | 4

In most cases you don't need to change this hooks in order to display labels. But sometimes in rare cases you will have such a need. And the plugin has a special option for this inside its settings page.

Hooks settings

Hooks settings

With Hooks settings it is possible to simply change hooks that are used for each labels positions. You can choose a predefined hook from the list or set any custom ones.

Also, if you are familiar with coding skills, it is possible to use a special plugin filter called awl_labels_hooks. With this filter it is possible to change any hooks right from php code.

Example:

add_filter( 'awl_labels_hooks', 'awl_labels_hooks' );
function awl_labels_hooks( $hooks ) {
     $hooks['on_image']['archive'] = array( 'woocommerce_before_shop_loop_item' => array( 'priority' => 10 ) );
    return $hooks;
}