Filter: wr_template_modify_TemplateRequest_selector
Allows you to modify the selector before a template is created.
e.g. you can set/change the id for an entry
Example: Add entry id to the selector
add_filter( "wr_template_modify_TemplateRequest_selector", array( $this, "set_entry_for_prefilling_stuff" ), 10, 2 );
public function set_entry_for_prefilling_stuff( $selector, $request_payload ) {
if ( isset( $selector['template'] ) && $selector['template'] === "my_wanted_template" ) {
$selector["id"] = 42;
}
return $selector;
}