Samply 1.0.12 has 25 actions and 40 filters, read directly from its source code on Nov 19, 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 Samply fires an action
add_action( 'woocommerce_cart_collaterals', function() {
// Your code runs here.
}, 10, 1 );
// Change a value Samply is about to use
add_filter( 'active_plugins', function( $active_plugins ) {
// Change $active_plugins here.
return $active_plugins;
}, 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
-
/** * Cart collaterals hook. */ do_action( 'woocommerce_cart_collaterals' ); -
/** * Hook: woocommerce_widget_shopping_cart_total. */ do_action( 'woocommerce_widget_shopping_cart_total' ); -
apply_filters( 'active_plugins', get_option('active_plugins') ); -
apply_filters( 'sample_price', 0, $data['product_id'] ); -
apply_filters( 'woocommerce_add_to_cart_validation', true, $product_id, $quantity ); -
apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ); -
apply_filters( 'woocommerce_add_to_cart_product_id', absint(wp_unslash($_REQUEST['simple-add-to-cart'])) ); -
apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key ); -
apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); -
apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); -
apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key ); -
apply_filters( 'woocommerce_cart_item_remove_link', sprintf( '<a href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">×</a>', esc_url( wc_get_cart_remove_url( $cart_item_key ) ), esc_html__( 'Remove this item', 'woocommerce' ), esc_attr( $product_id ), esc_attr( $_product->get_sku() ) ), $cart_item_key ); -
apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key ); -
apply_filters( 'woocommerce_order_item_name', $product_permalink ? sprintf( '<a href="%s">'.$sample.' (%s)</a>', $product_permalink, $item->get_name() ) : $item->get_name(), $item, $is_visible ); -
apply_filters( 'samply_builder_tabs', array( 'general_settings' => array( 'title' => __('General', 'samply'), 'icon' => '<svg fill="#000000" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18px" height="18px"><path d="M 9.6679688 2 L 9.1757812 4.5234375 C 8.3550224 4.8338012 7.5961042 5.2674041 6.9296875 5.8144531 L 4.5058594 4.9785156 L 2.1738281 9.0214844 L 4.1132812 10.707031 C 4.0445153 11.128986 4 11.558619 4 12 ... ); -
apply_filters( 'samply_default_options', $this->_defaultOptions ); -
apply_filters( 'samply_general_settings_sections', array( 'general_settings' => array( 'title' => __('Settings', 'samply'), 'fields' => array( array( 'name' => 'samply_enable', 'label' => __('Enable', 'samply'), 'type' => 'checkbox', 'class' => 'samply-settings-field', 'description' => __('', 'samply'), 'placeholder' => __('', 'samply'), ), array( 'name' => 'button_label', 'label' => __('Button Label', 'samply'), 'type' => 'text', 'class' => 's... ); -
apply_filters( 'samply_message_tab_sections', array( 'message' => array( 'title' => __('Message', 'samply'), 'fields' => array( array( 'name' => 'maximum_qty_message', 'label' => __('Maximum Quantity Message', 'samply'), 'type' => 'text', 'class' => 'samply-settings-field', 'description' => __('<strong>Note:</strong> {product} and {qty} for dynamic content.', 'samply'), 'placeholder' => __('', 'samply'), ), ) ) ) ); -
apply_filters( 'samply_price', 0.00, $product_id ); -
apply_filters( 'samply_product_tab', $paths ); -
apply_filters( 'samply_render_tabs_list', $tabs ); -
apply_filters( 'samply_sample_button', $button ); -
apply_filters( 'samply_setting_fields', $setting_fields ); -
do_action( 'samply_settings_header' ); -
apply_filters( 'woocommerce_add_to_cart_fragments', array( 'div.widget_shopping_cart_content' => '<div class="widget_shopping_cart_content">' . $mini_cart . '</div>', ) ); -
apply_filters( 'woocommerce_add_to_cart_handler', $adding_to_cart->get_type(), $adding_to_cart ); -
woocommerce_add_to_cart_item_name_in_quotes
filter Used by 9 plugins β Copy link Customise this hookapply_filters( 'woocommerce_add_to_cart_item_name_in_quotes', sprintf(_x('“%s”', 'Item name in quotes', 'woocommerce'), strip_tags($sample . get_the_title($product_id))), $product_id ); -
apply_filters( 'woocommerce_add_to_cart_qty_html', ($qty > 1 ? absint($qty) . ' × ' : ''), $product_id ); -
apply_filters( 'woocommerce_add_to_cart_redirect', $url, $adding_to_cart ); -
do_action( 'woocommerce_after_cart' ); -
do_action( 'woocommerce_after_cart_contents' ); -
do_action( 'woocommerce_after_cart_item_name', $cart_item, $cart_item_key ); -
do_action( 'woocommerce_after_cart_table' ); -
do_action( 'woocommerce_after_mini_cart' ); -
do_action( 'woocommerce_ajax_added_to_cart', $product_id ); -
do_action( 'woocommerce_before_cart' ); -
do_action( 'woocommerce_before_cart_collaterals' ); -
do_action( 'woocommerce_before_cart_contents' ); -
do_action( 'woocommerce_before_cart_table' ); -
do_action( 'woocommerce_before_mini_cart' ); -
do_action( 'woocommerce_before_mini_cart_contents' ); -
do_action( 'woocommerce_cart_actions' ); -
do_action( 'woocommerce_cart_contents' ); -
do_action( 'woocommerce_cart_coupon' ); -
woocommerce_cart_item_backorder_notification
filter Used by 49 plugins β Copy link Customise this hookapply_filters( 'woocommerce_cart_item_backorder_notification', '<p class="backorder_notification">' . esc_html__( 'Available on backorder', 'woocommerce' ) . '</p>', $product_id ); -
apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ); -
apply_filters( 'woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item ); -
apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); -
apply_filters( 'woocommerce_cart_item_visible', true, $cart_item, $cart_item_key ); -
apply_filters( 'woocommerce_cart_redirect_after_error', get_permalink( $product_id ), $product_id ); -
do_action( 'woocommerce_mini_cart_contents' ); -
apply_filters( 'woocommerce_mini_cart_item_class', 'mini_cart_item', $cart_item, $cart_item_key ); -
apply_filters( 'woocommerce_order_item_class', 'woocommerce-table__line-item order_item', $item, $order ); -
do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, false ); -
do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, false ); -
apply_filters( 'woocommerce_order_item_permalink', $is_visible ? $product->get_permalink( $item ) : '', $item, $order ); -
apply_filters( 'woocommerce_order_item_quantity_html', ' <strong class="product-quantity">' . sprintf( '× %s', $item->get_quantity() ) . '</strong>', $item ); -
apply_filters( 'woocommerce_order_item_visible', true, $item ); -
apply_filters( 'woocommerce_widget_cart_item_quantity', '<span class="quantity">' . sprintf( '%s × %s', $cart_item['quantity'], $product_price ) . '</span>', $cart_item, $cart_item_key ); -
apply_filters( 'woocommerce_widget_cart_item_visible', true, $cart_item, $cart_item_key ); -
woocommerce_widget_shopping_cart_after_buttons
action Used by 26 plugins β Copy link Customise this hookdo_action( 'woocommerce_widget_shopping_cart_after_buttons' ); -
woocommerce_widget_shopping_cart_before_buttons
action Used by 28 plugins β Copy link Customise this hookdo_action( 'woocommerce_widget_shopping_cart_before_buttons' ); -
woocommerce_widget_shopping_cart_buttons
action Used by 21 plugins β Copy link Customise this hookdo_action( 'woocommerce_widget_shopping_cart_buttons' );
Generated from Samply'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: