WPRuby Logo WPRuby
Log in Get started
  • Plugins
  • Themes
  • Docs
  • Blog
    • eCommerce
    • Plugins
    • How to
    • Coding
  • Affiliate Area
  • Contact Us
  • About Us
  • Plugins
  • Themes
  • Docs
  • Blog
    • eCommerce
    • Plugins
    • How to
    • Coding
  • Affiliate Area
  • Contact Us
  • About Us

WPRuby Account

4
  • How to upgrade your license
  • How to renew your license
  • How to change your plugin’s license domain
  • How to cancel your subscription.

WooCommerce Australia Post Shipping Method Pro

14
  • Installation
  • How to activate your Australia Post Pro license
  • How to Upgrade from Free to Pro
  • Australia Post Zone Settings
  • Australia Post Global Settings
  • Australia Post Tracking
  • Pre-Paid Satchels
  • How to Mark a Product to be Shipped Individually?
  • TroubleShooting and Common issues
  • Available WordPress Actions and Filters
  • [Labels Pro] How to connect the plugin with your MyPost Business account
  • [Labels Pro] How to connect Labels Pro with your eParcel account
  • [Labels Pro] How to print labels and create shipping orders.
  • [Labels Pro] How to Mark a Product as Containing Hazardous Materials?

WooCommerce Custom Payment Gateway Pro

11
  • Getting Started
  • Custom Payment Gateway Settings
  • Custom Checkout Field Builder
  • Conditional Display Rules
  • Sending Payment Data to an External API
  • How to Create a Pay by Invoice Payment Method
  • How to Create a Manual Payment Link or Review-Based Payment Method
  • Troubleshooting
  • Frequently Asked Questions
  • Security and Sensitive Payment Data
  • How to Upgrade from Free to Pro

WooCommerce Royal Mail Shipping Calculator Pro

4
  • Installation
  • Settings
  • TroubleShooting and Common issues
  • How to activate your plugin license

Controlled Admin Access Pro

3
  • Available Actions for a Restricted Admin
  • Installation
  • Settings

WooCommerce Simple Table Rates Pro

8
  • Installation
  • Settings
  • Rules and Actions
  • How to Setup Weight Based Shipping
  • How To Setup Shipping By Shipping Class
  • How to Setup Shipping by Cart Total
  • How to Setup Shipping by Product
  • How to Setup Shipping by Product Category

WooCommerce Address Guard Pro

7
  • Get Started
  • Configuring Address Providers
  • Configuring Checkout Validation
  • Creating Address Rules
  • Customizing Customer Messages
  • Using the Address Tester
  • Reviewing Address Quality Inside WooCommerce Orders

WooCommerce Pack IQ

5
  • Installation
  • How to activate your plugin license
  • How to add a new box
  • How to change the boxes weight and dimensions units
  • How to view the packing results

WooCommerce Restricted Shipping and Payment Pro

4
  • Installation
  • Setting Up Shipping Methods Conditions
  • Available Shipping & Payment Rules
  • Setting Up Payment Gateways Conditions

Affiliate Butler PRO

9
  • Installation and Upgrade
  • Quick Start Guide
  • Settings
  • Keywords Management
  • Installation
  • Frequently Asked Questions
  • Files Structure
  • Links Types
  • Statistics

WooCommerce Adyen Payment Gateway

2
  • Setup the Adyen payment gateway
  • How to configure Adyen Webhook notifications? 

WooCommerce Free Shipping Per Product

2
  • Installation
  • How to setup free shipping for a certain product

WooCommerce UPS Shipping Method Pro

4
  • Installation
  • UPS Zone Settings
  • UPS Global Settings
  • How to get the UPS Access Key?

Delivery Promise for WooCommerce

9
  • Getting Started
  • Understanding Processing Time vs Transit Time
  • Setting the Cutoff Countdown
  • Configuring Default Delivery Estimates
  • Creating Delivery Rules
  • Setting Working Days and Holidays
  • Using Rule Presets
  • Product-Level Lead Times
  • Why the “Order Within” Countdown Is Not Showing

Cartavera

16
  • Cartavera documentation
  • Install Cartavera
  • Activate your licence
  • Import a starter site
  • Styles, colours and fonts
  • Headers and footers
  • The homepage
  • Catalog and filters
  • The product page
  • Cart and checkout
  • Translation and right-to-left languages
  • Child themes
  • Hooks and filters reference
  • Troubleshooting
  • FAQ
  • Changelog

Candy Shop

14
  • Candy Shop documentation
  • Install Candy Shop
  • Activate your licence
  • Import a starter site
  • Set up your products
  • Food information and allergens
  • Shop pages and filters
  • Styles, colors and fonts
  • Headers, footers and menus
  • The homepage
  • Child theme
  • Hooks and filters
  • FAQ
  • Changelog

Foliowick

16
  • Foliowick documentation
  • Install Foliowick
  • Activate your licence
  • Import a demo store
  • Authors and author pages
  • Book details and editions
  • Genres, reading lists and the Editor’s Pick
  • Secondhand copies and forthcoming books
  • Shop pages, search and book pages
  • Styles, colors and fonts
  • Headers, footers and menus
  • The homepage
  • The journal and editorial pages
  • Hooks and filters
  • FAQ
  • Changelog

Gemelune

14
  • Gemelune documentation
  • Install Gemelune
  • Activate your licence
  • Import a starter site
  • Metals, sizes and swatches
  • Size guide, delivery and care pages
  • Shop pages, product cards and product pages
  • Styles, colors and fonts
  • Headers, footers and menus
  • The homepage
  • Child theme
  • Hooks and filters
  • FAQ
  • Changelog

Formafern

15
  • Formafern documentation
  • Install Formafern
  • Activate your licence
  • Import the demo store
  • Finishes and swatches
  • Dimensions, materials and care
  • Rooms and Shop the Room
  • Shop pages, product cards and product pages
  • Styles, colors and fonts
  • Headers, footers and menus
  • The homepage and editorial pages
  • Child theme
  • Hooks and filters
  • FAQ
  • Changelog

Pawtani

15
  • Pawtani documentation
  • Install Pawtani
  • Activate your licence
  • Install a starter site
  • Pets, sizes, flavours and product facts
  • Size & fit guides
  • Shop pages, filters and product pages
  • Repeat purchases, subscriptions and wishlists
  • Styles, colors and fonts
  • Headers, footers and menus
  • The homepage
  • Child theme
  • Hooks and filters
  • FAQ
  • Changelog
View Categories
  • Home
  • Knowledge Base
  • WPRuby Themes
  • Pawtani
  • Hooks and filters

Hooks and filters

Waseem
Updated on November 4, 2026

1 min read

0:00 / 2:15
  • View as Markdown Open this page as plain Markdown (opens in a new tab)
  • Open in ChatGPT Ask questions about this page (opens in a new tab)
  • Open in Claude Ask questions about this page (opens in a new tab)
  • Open in Google AI Studio Ask questions about this page (Google account required) (opens in a new tab)

Pawtani provides the filters below. Put the code in the child theme‘s functions.php or in a small plugin.

Table of Contents

Toggle
  • pawtani_shop_by_pet and pawtani_shop_by_need
  • pawtani_navigation_links
  • pawtani_filter_attribute_order
  • pawtani_filter_chip_attributes
  • pawtani_size_guide_id
  • pawtani_newsletter_form
  • pawtani_wishlist_url
  • pawtani_social_links
  • Data Pawtani stores

pawtani_shop_by_pet and pawtani_shop_by_need

The cards in the homepage’s Shop by pet and Shop by need sections, the header menu and the default footer. Each item is an array with slug (product category slug), label, text, image (a file in the theme’s assets/images/, used when the category has no thumbnail) and color (a palette slug for the card background).

add_filter( 'pawtani_shop_by_pet', function ( $pets ) {
	$pets[] = array(
		'slug'  => 'reptiles',
		'label' => __( 'Reptiles', 'my-store' ),
		'text'  => __( 'Heat, light and hideaways', 'my-store' ),
		'image' => 'pet-small.webp',
		'color' => 'highlight-soft',
	);
	return $pets;
} );

pawtani_navigation_links

The header menu’s blocks (serialized block markup), after Pawtani builds them from the categories or the Pawtani menu.

pawtani_filter_attribute_order

The attribute slugs shown first in the catalog filters, in order. Default pet, size, pack-size, flavor, life-stage. Other attributes follow.

pawtani_filter_chip_attributes

The attribute slugs shown as chips instead of checkboxes. Default pet, size, pack-size, life-stage.

add_filter( 'pawtani_filter_chip_attributes', function ( $slugs ) {
	$slugs[] = 'color';
	return $slugs;
} );

pawtani_size_guide_id

The size guide (a wp_block post ID, 0 for none) shown for a product. The second argument is the product ID.

add_filter( 'pawtani_size_guide_id', function ( $guide_id, $product_id ) {
	return has_term( 'gift-cards', 'product_cat', $product_id ) ? 0 : $guide_id;
}, 10, 2 );

pawtani_newsletter_form

The newsletter form’s HTML. Default: the shortcode set on Appearance → Pawtani, rendered. Return an empty string to show the journal link instead.

pawtani_wishlist_url

The wishlist page URL for the header’s heart icon. Default: the YITH or TI WooCommerce Wishlist page. Return a URL to support another plugin, or an empty string to hide the icon.

pawtani_social_links

The footer’s social links, as service => URL. Default: the profiles set on Appearance → Pawtani.

Data Pawtani stores

Where Key What
Option pawtani_settings Newsletter shortcode and social profiles
Product meta _pawtani_size_guide The product’s size guide
Category term meta pawtani_size_guide The category’s size guide
Option pawtani_starter The installed starter site and what it replaced
Option pawtani_demo_hidden Products and posts a starter moved to drafts
Post, term meta _pawtani_demo Marks sample content, so removing a starter deletes only that
Child themeFAQ
WPRuby Logo WPRuby

In 2015, WPRuby was established as an independent agency where we focus on producing and supporting many WordPress plugins. Each product we develop is simple to use and easy to customize and backed by awesome support and regular updates.

Resources

  • Knowledge Base
  • Affiliate Area
  • About Us
  • Nomad Jar
  • GarnerDocs
  • UnavailableToday

Legal

  • Privacy Policy
  • Terms of Use

Follow us

  • Github
  • X.com
  • LinkedIn
  • Facebook

© 2026 - WPRuby