Pinterest for WooCommerce 1.6.4 has 9 actions and 41 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Pinterest for WooCommerce fires an action
add_action( 'wc_pinterest_error', function( $sprintf, $arg2 ) {
// Your code runs here.
}, 10, 2 );
// Change a value Pinterest for WooCommerce is about to use
add_filter( 'pinterest_for_woocommerce_feed_image_size', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Displays an error when an attribute is not supported for a product type. */ do_action( 'wc_pinterest_error', sprintf( 'Attribute "%s" is not supported for a "%s" product (ID: %s).', $attribute_id, $product->get_type(), $product->get_id() ), __METHOD__ ); -
/** * Get the image with a filter for default size. */ apply_filters( 'pinterest_for_woocommerce_feed_image_size', 'full' ); -
/** * Maximum number of batches allowed per generation cycle. phpcs:disable * WooCommerce.Commenting.CommentHooks.MissingSinceComment */ apply_filters( 'pinterest_for_woocommerce_max_feed_batches_per_cycle', self::MAX_BATCHES_PER_CYCLE ); -
/** * Actions to perform after getting the authorization token. */ do_action( 'pinterest_for_woocommerce_token_saved' ); -
wc_pinterest_attribute_applicable_product_types_{$attribute_id}
filter Copy link Customise this hook/** * This filter is documented in AttributeManager::map_attribute_types */ apply_filters( "wc_pinterest_attribute_applicable_product_types_{$attribute_id}", $applicable_types, $attribute_type ); -
/** * Filters whether to skip Conversions API events based on user consent. */ apply_filters( 'woocommerce_pinterest_disable_conversions_api_user_consent', false ); -
/** * Filters whether to disable tracking. */ apply_filters( 'woocommerce_pinterest_disable_tracking', $should_disable_tracking ); -
/** * Filters whether to disable tracking based on user consent. */ apply_filters( 'woocommerce_pinterest_disable_tracking_user_consent', false ); -
{PINTEREST_FOR_WOOCOMMERCE_OPTION_NAME}_feed_product_batch_size
filter Copy link Customise this hook/** * Returns products to process per batch. phpcs:disable * WooCommerce.Commenting.CommentHooks.MissingSinceComment */ apply_filters( "{PINTEREST_FOR_WOOCOMMERCE_OPTION_NAME}_feed_product_batch_size", self::DEFAULT_PRODUCT_BATCH_SIZE ); -
/** * Filters to determine if it is time to start refreshing the token. */ apply_filters( "{PINTEREST_FOR_WOOCOMMERCE_OPTION_NAME}_maybe_refresh_token", ( $refresh_time + $expires_in - 2 * DAY_IN_SECONDS ) <= time() ); -
/** * Before init action. phpcs:disable * WooCommerce.Commenting.CommentHooks.MissingSinceComment */ do_action( 'before_pinterest_for_woocommerce_init' ); -
/** * Threshold of failed actions. phpcs:disable * WooCommerce.Commenting.CommentHooks.MissingSinceComment */ apply_filters( 'pinterest_for_woocommerce_action_failure_threshold', 3 ); -
/** * Time period of failed actions. phpcs:disable * WooCommerce.Commenting.CommentHooks.MissingSinceComment */ apply_filters( 'pinterest_for_woocommerce_action_failure_time_period', 30 * MINUTE_IN_SECONDS ); -
/** * Filters the proxy URL. */ apply_filters( 'pinterest_for_woocommerce_connection_proxy_url', PINTEREST_FOR_WOOCOMMERCE_WOO_CONNECT_URL ); -
/** * Advertiser name. phpcs:disable * WooCommerce.Commenting.CommentHooks.MissingSinceComment */ apply_filters( 'pinterest_for_woocommerce_default_advertiser_name', esc_html__( 'Auto-created by Pinterest for WooCommerce', 'pinterest-for-woocommerce' ) ); -
/** * Filters the default merchant name: * pinterest_for_woocommerce_default_merchant_name. This vale appears in the * feed configuration page in Pinterest. */ apply_filters( 'pinterest_for_woocommerce_default_merchant_name', esc_html__( 'Auto-created by Pinterest for WooCommerce', 'pinterest-for-woocommerce' ) ); -
/** * Filters the default tag name. */ apply_filters( 'pinterest_for_woocommerce_default_tag_name', esc_html__( 'Auto-created by Pinterest for WooCommerce', 'pinterest-for-woocommerce' ) ); -
/** * Allow 3rd parties to disable Rich Pins content. */ apply_filters( 'pinterest_for_woocommerce_disable_rich_pins', false ); -
/** * Actions to perform disconnecting the merchant from the Pinterest platform. */ do_action( 'pinterest_for_woocommerce_disconnect' ); -
/** * Filter to disconnect the merchant from the Pinterest platform on * authentication failure. */ apply_filters( 'pinterest_for_woocommerce_disconnect_on_authentication_failure', '__return_true' ); -
/** * Returns array of excluded product types. phpcs:disable * WooCommerce.Commenting.CommentHooks.MissingSinceComment */ apply_filters( 'pinterest_for_woocommerce_excluded_product_types', array( 'grouped', 'variable', 'subscription', 'variable-subscription', ) ); -
/** * Returns array of excluded products by parent. phpcs:disable * WooCommerce.Commenting.CommentHooks.MissingSinceComment */ apply_filters( 'pinterest_for_woocommerce_excluded_products_by_parent', wc_get_products( array( 'type' => 'variable-subscription', 'limit' => -1, 'return' => 'ids', ) ) ); -
/** * Feed status hook. */ do_action( "pinterest_for_woocommerce_feed_{$state['status']}", $state ); -
/** * Filter that controls the attributes that will be added to the product XML * file. */ apply_filters( 'pinterest_for_woocommerce_feed_item_structure', self::$feed_item_structure, $product ); -
/** * Filter XML output for product */ apply_filters( 'pinterest_for_woocommerce_feed_item_xml', $xml, $product ); -
/** * Returns feed state. phpcs:disable * WooCommerce.Commenting.CommentHooks.MissingSinceComment */ apply_filters( 'pinterest_for_woocommerce_feed_state', array() ); -
/** * Returns array of included product types. phpcs:disable * WooCommerce.Commenting.CommentHooks.MissingSinceComment */ apply_filters( 'pinterest_for_woocommerce_included_product_types', array( 'simple', 'variation', ) ); -
/** * Init action. phpcs:disable * WooCommerce.Commenting.CommentHooks.MissingSinceComment */ do_action( 'pinterest_for_woocommerce_init' ); -
/** * Filters whether the current request is treated as a crawler. */ apply_filters( 'pinterest_for_woocommerce_is_crawler_request', $is_crawler, $raw_user_agent ); -
/** * Plugin loaded action. phpcs:disable * WooCommerce.Commenting.CommentHooks.MissingSinceComment */ do_action( 'pinterest_for_woocommerce_loaded' ); -
/** * Filter OpenGraph tags. */ apply_filters( 'pinterest_for_woocommerce_opengraph_tags', $tags, $args ); -
/** * Filters the brand value included in the Pinterest feed. */ apply_filters( 'pinterest_for_woocommerce_product_brand', $terms[0]->name, $product ); -
/** * Filters whether the shortcodes should be applied for product descriptions * when generating the feed or be stripped out. */ apply_filters( 'pinterest_for_woocommerce_product_description_apply_shortcodes', false, $product ); -
pinterest_for_woocommerce_rich_pins_post_description_apply_shortcodes
filter Copy link Customise this hook/** * Filters whether the shortcodes should be applied for product descriptions on * the rich pins or be stripped out. */ apply_filters( 'pinterest_for_woocommerce_rich_pins_post_description_apply_shortcodes', false, get_the_ID() ); -
pinterest_for_woocommerce_rich_pins_product_description_apply_shortcodes
filter Copy link Customise this hook/** * Filters whether the shortcodes should be applied for product descriptions on * the rich pins or be stripped out. */ apply_filters( 'pinterest_for_woocommerce_rich_pins_product_description_apply_shortcodes', false, $product ); -
/** * Rich Pins arguments. phpcs:disable * WooCommerce.Commenting.CommentHooks.MissingSinceComment */ apply_filters( 'pinterest_for_woocommerce_richpins_args', array( 'products' => array( 'enabled' => $rich_pins_on_products, 'enable_description' => true, 'enable_availability' => true, ), 'posts' => array( 'enabled' => $rich_pins_on_posts, 'enable_publish_time' => true, 'enable_author' => true, ), ) ); -
/** * Action used to intercept the Pinterest API exception with code and a message * and decide whether or not to show an admin notice for the exception. */ do_action( 'pinterest_for_woocommerce_show_admin_notice_for_api_exception', $e->getCode(), $e->get_pinterest_code(), $e->getMessage() ); -
/** * Returns template path. phpcs:disable * WooCommerce.Commenting.CommentHooks.MissingSinceComment */ apply_filters( 'pinterest_for_woocommerce_template_path', 'pinterest-for-woocommerce/' ); -
/** * Filters the default feed name: pinterest_for_woocommerce_unique_feed_name. * This vale appears in the Catalogues - Data sources page at Pinterest. */ apply_filters( 'pinterest_for_woocommerce_unique_feed_name', sprintf( esc_html__( 'Created by Pinterest for WooCommerce at %1$s %2$s|%3$s|%4$s', 'pinterest-for-woocommerce' ), esc_html( $name ), esc_html( $default_country ), esc_html( $default_locale ), esc_html( $default_currency ) ) ); -
/** * Filters the description used for a variation product entry in the Pinterest * feed XML. Use this to override the variation→parent fallback chain (e.g. * emit a translated description, prefer parent long over short, or inject a * per-variation string). */ apply_filters( 'pinterest_for_woocommerce_variation_description', $description, $product, $parent ); -
/** * Get plugin locale. phpcs:disable * WooCommerce.Commenting.CommentHooks.MissingSinceComment */ apply_filters( 'plugin_locale', get_locale(), 'pinterest-for-woocommerce' ); -
/** * Array of product types that the Pinterest tab can be displayed for. * phpcs:disable WooCommerce.Commenting.CommentHooks.MissingSinceComment */ apply_filters( 'wc_pinterest_attributes_tab_applicable_product_types', array( 'simple' => __( 'Simple product', 'pinterest-for-woocommerce' ), 'variable' => __( 'Variable product', 'pinterest-for-woocommerce' ), ) ); -
/** * Exception hook. phpcs:disable * WooCommerce.Commenting.CommentHooks.MissingSinceComment */ do_action( 'wc_pinterest_exception', $exception, __METHOD__ ); -
/** * Filters the shop's external business id. */ apply_filters( 'wc_pinterest_external_business_id', $id ); -
/** * Filters the list of available product attributes. */ apply_filters( 'wc_pinterest_product_attribute_types', self::ATTRIBUTES ); -
wc_pinterest_product_attribute_value_options_{$attribute::get_id()}
filter Copy link Customise this hook/** * Filters the list of value options for the given attribute. */ apply_filters( "wc_pinterest_product_attribute_value_options_{$attribute::get_id()}", $value_options ); -
/** * Check if WooCommerce Admin is enabled. phpcs:disable * WooCommerce.Commenting.CommentHooks.MissingSinceComment */ apply_filters( 'woocommerce_admin_disabled', false ); -
apply_filters( 'woocommerce_paypal_payments_is_simulating_cart', false );
Generated from Pinterest for WooCommerce's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: