Questions tagged [hook]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
13
votes
2answers
764 views

Testing Extensions / Calling Hooks

I'm about to embark on writing a new extension for the Ecommerce module "Store" though this should relate to any extension hook. I am planning to "hook" into "store_order_complete_end" in order to ...
9
votes
1answer
181 views

Turn off extension in Control Panel

I would like to make sure an extension isn't run, via sessions_end hook, in the control panel. I'm currently doing this like so: if ($this->EE->input->get_post('D') == "cp") { return ...
8
votes
2answers
746 views

Add Postmaster hook to my custom plugin

I have a custom plugin that logs into a database each time someone downloads an image. This is achieved through a module installed with my mod files etc. The plugin records the current logged-in ...
6
votes
1answer
180 views

template_fetch_template hook $row parameter

I'm considering writing an extension that greatly depends on hooks that are available before and during template parsing. I see in the ExpressionEngine hook documentation that there is a hook called '...
6
votes
2answers
216 views

What hook should I use that executes before a channel entries tag is parsed?

Suppose I have a template with a channel entries tag on it. I need to execute an extension method during a hook that runs before the channel entries query takes place. It doesn't matter what ...
5
votes
1answer
523 views

Multiple Hooks, One Extension

In the documentation the code to add enable extension hooks is like this $data = array( 'class' => __CLASS__, 'method' => 'truncate_this', 'hook' => '...
4
votes
1answer
2k views

How to get the logged in member id from PHP / hooks?

Is there a hook-independent way to get the logged in member id inside a hook handler? Something like a function or a global variable?
3
votes
2answers
352 views

Updating status with hook does not trigger email

First, thanks in advance for any insight. I'm using the following in a simple extension to set the status for new orders with the aim that I can send an email template based on the customer's member ...
3
votes
1answer
198 views

How do I check if a field value has changed in a entry_submission_ready hook handler?

I am writing an extension for the hook entry_submission_ready I see that it has 3 params(meta, data, autosave). I look at data and I see there is channel data in there and a revision post data ...
3
votes
1answer
174 views

New 'Category' Hook or Action?

When adding/deleting/editing a category in the CP, I would like to send that data to Mailchimp (where I ultimately will have the same categories) How can this be achieved? Using a Action or a Hook? ...
3
votes
1answer
54 views

Are there hooks I can use to log file downloads

I'm working on a module to log some statistics on downloads from anywhere in the site. My module setup is fine, it installs and creates the necessary tables. Now I want to hook into the events, file ...
2
votes
1answer
333 views

before_channel_entry_save hook

I am writing an extension on EE 3.5.11 and I am using the before_channel_entry_save hook. In the EE documentation it says and modifications to the object will be saved. I am doing something like this ...
2
votes
2answers
275 views

Expresso Store tax hook help?

I’m creating an AvaTax Tax Calculator extension for Expresso Store utilizing the ‘store_order_taxes’ hook. After getting a response from the API, I'm modifying the value of the tax rate as follows: ...
2
votes
2answers
253 views

entry_submission_start does not fire as expected

I am trying to use the entry_submission_start hook to be able to check the current settings before the extension updates them. I expected the hook to fire before the entry is submitted, but when I ...
2
votes
1answer
78 views

In EE 2.X what replaces the submit_new_entry_end hook?

I'm working on converting an old 1.X extension over to EE 2.X, but my hook was 'submit_new_entry_end'. I can't seem to find a reference to what hook should replace it. My guess is '...
2
votes
3answers
363 views

With the hook entry_submission_end, is it possible to know if the entry is inserted or updated?

I'm working on an extension that indexes the content of the entry when publish form is submitted, but I need to know if the entry is a new one or an updated one, and in both case, I need the entry_id (...
2
votes
2answers
2k views

What is the best way to start using hooks?

I've used EE for a while now but I'm new to creating extensions or modules. I want to add a functionality where a bunch of email addresses stored in a database get notified when an entry is submitted ...
2
votes
1answer
116 views

What can I further do to test these Expresso Store hooks that appear to be not happening?

EE 2.7.2 Store 2.0.3 It doesn't look like the hook (store_order_recalculate_end) is happening as advertised. Works fine when adding the first item to the cart. But upon cart update or adding more ...
2
votes
1answer
185 views

How do I set a field value in entry_submission_ready hook handler?

It seems that changing the values of the $data argument variable doesn't change anything. Is there a way to change the value of some channel fields inside the entry_submission_ready hook?
2
votes
2answers
108 views

Altering item data from store_order_item_add hooks (_start or _end)

I'm not sure if is deliberate, but the way hooks have been implemented in Exp:resso Store don't seem to allow the modification of data? Using pass by reference has no effect (because of EE's hook ...
2
votes
1answer
311 views

Expresso Store Hook store_order_complete_end

I am very new to EE2 and using Expresso Store in one of my websites in EE2 and need to use this hook when the order has completed and payment has been made successfully. The code I need to call is ...
2
votes
1answer
133 views

is there a hook when a member resets it's password?

is there a hook when a member uses the forget password feature? Looking at the hooks documentation, I don't see any hook in there that might do this.
2
votes
1answer
39 views

Cancelling member deletion in member_delete hook handler

I am trying to implement some codein the member_delete hook in EE. But for testing purposes, I just want the hook to trigger but don't go ahead with the actual delete. Is there a way to do this? In ...
1
vote
1answer
158 views

entry_submission_ready Hook Not Working

I have created an extension to manipulate saved data when an entry is saved. I can't get this to work using entry_submission hooks, I cannot find that much information about this online. I believe I ...
1
vote
2answers
104 views

Expresso Checkout conditional (use hook?)

So, at the end of the checkout process (where it becomes an order) I want to fire off an SQL query wrapped inside AJW export (which creates an xml file). However, within the confines of ...
1
vote
2answers
139 views

Hooks when a member is moved to another member group

Is there a hook in ExpressionEngine that triggers when any one member is moved from group to another?
1
vote
2answers
315 views

$this->EE->api_channel_entries->data (via entry_submission_ready hook) not working on front end

I have the following entry_submission_ready method in an extension to update a field's data. This works fine when saving an entry in the control panel, but it doesn't change the field value on the ...
1
vote
1answer
42 views

Updating hooks from v2 to v4

My company has a legacy add-on from version 2 and has now updated to version 4 of EE. With the upgrade, the hooks that fire when a new entry of a specific channel type are no longer triggering. After ...
1
vote
1answer
37 views

Custom add-on accessing method from another custom add-on …

I've got a custom add-on/extension that extends the Store module by tapping into the store_order_complete_end hook to save details of an order to an XML file stored on the server. I want to access ...
1
vote
1answer
34 views

Solspace Friends - Friend Request Hook

Is there a hook I can use when a friend request is made in Solspace Friends add-on? After a friend request is made, I want to send a notification to the "friendee" (e.g. by email, Ajax notification, ...
1
vote
1answer
44 views

New comment email notification and ‘insert_comment_insert_array’ hook

I hame some input fields on my comment form, that I show for non-registered members. They are: ‘name’, ‘email’ and ‘comment text’. And my task was to add string “Guest” to text user typed in the ...
1
vote
1answer
78 views

What is the best way to modify entry data when submitting and updating entries

I am looking to modify a counter which is a field in a channel when i submit or update an entry. I am looking to count the number of matrix rows and then add that into the input field to act as the ...
1
vote
1answer
28 views

Access segments in hooks

Is it possible to access segment or page information in the hooks? Each hook has different parameters so I can't rely on those to get segment information.
1
vote
2answers
127 views

How to get data from a hook?

How do I get the last "ID" (row) created after using the "channel_form_submit_entry_end" hook? Can the hook send me the "ID"? EE5
1
vote
1answer
45 views

Hook when member updates password

I can't seem to find a hook for when a member updates their password. I am using EE v3.5.4 and just using the built in member templates. I am sure on existing but I can't seem to find it. Anyone ...
1
vote
1answer
36 views

Cannot modify $item->modifiers in store_order_item_add_end hook

I have an extension using the store_order_item_add_end hook. I can set field values such as $item->price and $item->weight - but I cannot change the content of $item->modifiers. I've also tried ...
1
vote
1answer
55 views

Error on Postmaster Parcel or Hook save

I'm working in EE v2.9.0 and Postmaster 1.5.0. Every time I save a parcel or a hook, I get the same error: Error The page you requested was not found. The information saves, however, I need to go ...
1
vote
1answer
72 views

cp_menu_array hook : nav_ not getting picked up

I am hooking in to cp_menu_array - which seems light on the old documentation - to stick up a menu for my module. All works as expected, except the language strings. public function cp_menu($menu) { ...
1
vote
1answer
63 views

Addon - Forget Password Email Hook [duplicate]

Is there an add-on that can provide a hook to change the forget password email?
1
vote
1answer
280 views

Check if user is logged-in inside sessions_start hook handler

I am aware that in sessions_start handler function, the session object is not yet set. Since I can't use the session object, are there alternative ways to check if you are logged in in this function ...
1
vote
1answer
164 views

Change cart subtotal in cartthrob using hook

I've set up the cartthrob_pre_process hook to look something like this: public function cartthrob_pre_process($data) { $data['subtotal'] = 500.00; } It then goes to PayPal, which is the selected ...
1
vote
2answers
152 views

What hook for immediately after user is logged in?

I'm trying to find what hook there is for immediately after the user logged in? I've been looking at sessions_start and sessions_end but I'm not sure how exactly they work and nothing seems to be ...
1
vote
1answer
81 views

Changing languages in sessions_start hook

I am trying to implement a multilanguage site. I have a hook handler for the hook sessions_start that is supposed to set the language for a page. Here are the lines of code from the hook to change ...
1
vote
1answer
140 views

Extension Development : Redirect on error

I'm developing an extension that uses the member_update_end hook. This extension requires communicating with a 3rd party API, which I can't guarantee will always be active. As a side note, the hook ...
1
vote
1answer
177 views

Undefined property session in cp_js_end hook

Currently facing the following error in the cp_js_end hook. Undefined property: Javascript::$session it looks like the session class isn`t loading anymore in EE 2.6+ It whas working in older ...
1
vote
1answer
124 views

Filter comments by Entry Author in the Control Panel

I've been looking up the hooks that can be used with the Comment Module. But I don't think there is one I could use to filter the list of comments by entry author in the Control Panel. I'm trying to ...
1
vote
1answer
56 views

freeform multipage reset some values from other pages

I have a multi-page form set up as following : question 1 > question 2 > question 3 > question 4 if answered yes > question 5 question 4 if answered no > question 6 All my questions have a return ...
1
vote
0answers
56 views

Cancel Entry Update / Display Error using EE3 Extension Hook

I am using a 'Channel Entry Model Extension Hook' in EE3 to allow me to carry out further validation of a selection of fields. This is working fine, currently with the 'before_channel_entry_update' ...
1
vote
1answer
47 views

Get IDs of deleted entries

I’m creating an ExpressionEngine extension. I want to get the IDs of any records that are deleted. I’m aware of the delete_entries_end() and delete_entries_loop() hooks, but they both return void ...
1
vote
0answers
66 views

How do I add custom styles to Wygwam using a hook?

I want to add an extension to wygwam that allows me to add my own customized dropdown to the toolbar with different css styles. No idea where to start. I want simple styles for pull-quotes and lists. ...