Site logo

Archived topic

Insert JavaScript with Hooks - Cart Recovery

5 replies · Started by David on May 24, 2020

Viewing posts 1–6 of 6

Hello GP Team!

I'm trying to insert a JS Code for a Tidio Cart Recovery with a Hooks element.

The official instructions (link here) are:

"The chat needs to know where is the cart on your site and where starts the checkout area. In order to point out to the app where the visitor proceeds from the cart, you’ll need to use this code and specify the cart page as the ‘start’ point, and the checkout page as the ‘end’ point. The code needs to be added after the chat’s installation script."

I see the option "Customized hook". Do yo have any guide to work with this?

Thank you :)

Hi there,

That instruction isn't very clear unfortunately.

The theme itself doesn't deal with cart or checkout page functionality as that's all handled by WooCommerce.

Can you ask the code author how to add it if you are using a twenty series WP theme?

The method should be exactly the same when using GP.

Let me know :)

Hi Leo!

Thanks for you reply.

Here the answer from Tidio:

***
On WordPress, the Tidio installation code ought to be placed in the Theme Footer file, it's usually called footer.php -- and the script needs to be at the end, directly above the closing </body> tag. If you have a child theme and parent/main theme separately, make sure to place the script in the parent/main theme.
***

I think we can do this with hooks...yes? :)

Hi there,

you can use the WP_footer hook and set the Priority to 999

It works David. Thank you :)

You're welcome

This archived topic is closed to new replies.