I can add the code as a plugin and activate it. But I don’t think the code is being called soon enough to work. From the snippet…
// THE FOLLOWING CAN BE COMMENTED OUT AND THEN ADDED ANYWHERE IN YOUR SYSTEM CODE (ASSUMING THIS FILE IS LOADED)
// AS LONG AS IT IS CALLED >> BEFORE << THE WORDPRESS "pre_get_posts" HOOK AT PRIORITY 10
// THIS MEANS THAT THE ARRAY OF PRODUCTS CAN BE GENERATED DYNAMICALLY USING PRODUCT DATA FROM ANOTHER CART.
// TO UPDATE THE SYSTEM AFTER A PRODUCT IS SOLD, YOU CAN HOOK INTO THE FOLLOWING FILTER:
// "AHEE__bc_ee_add_product_surcharge__add_product__product_added"
// WHICH IS FOUND IN THE <code>bc_ee_add_product_surcharge::add_product()</code> METHOD
new bc_ee_add_product_surcharge($products);
The code within the .php file within the custom functions plugin loads well before the pre_get_posts hook.
Viewing 3 reply threads
The support post ‘Where to insert code snippet?’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.