Product Slider – hook for each item?

0
Product Slider - hook for each item? 1
jakevoelcker
Jan 02, 2021 02:18 AM 1 Answers
Member Since Jan 2021
Subscribed Subscribe Not subscribe
Flag(0)

Hi,

I love the PickPlugins Product Slider plugin, it\'s really powerful and easily customised.

I was delighted to discover today that action and filter hooks are available to customise it further 🙂

I have read about the wcps_slider_before_items and wcps_slider_item hooks.

But is there a hook that will allow me to filter each slider item? For example, if I want to conditionally change the thumbnail, or programmatically add a query string to each product link?

1 Subscribers
Product Slider - hook for each item? 1
Submit Answer
Please login to submit answer.
1 Answers
Sort By:
Best Answer
0
Product Slider - hook for each item? 3
PickPlugins
Jan 02, 2021
Flag(0)

Welcome to our forum.

you probably looking for element hooks, please go following documentation
https://pickplugins.com/documentation/woocommerce-products-slider/action-hooks/wcps_layout_element_id/

Regards

Product Slider - hook for each item? 4
jakevoelcker
- Jan 05, 2021 03:21 AM
Flag (0)
0

I have found my own answer:
remove_action('wcps_layout_element_thumbnail', 'wcps_layout_element_thumbnail', 10);

Sorry to create an unnecessary post!

Product Slider - hook for each item? 4
jakevoelcker
- Jan 05, 2021 03:14 AM
Flag (0)
0

How can I remove an existing element action hook please?

I have written a simple function to display a custom thumbnail image, and I have hooked it using:
add_action('wcps_layout_element_thumbnail','my_new_function', 90);

But how can I prevent the default thumbnail from being displayed?
Should I use remove_action()? If so, what arguments does it need?

Many thanks!

Product Slider - hook for each item? 4
jakevoelcker
- Jan 02, 2021 05:18 PM
Flag (0)
0

Perfect! Thank you!

1+ more comments. Sign in to Reply
Replying as Submit