Wondering if anybody has already move the activate.php
file to a Sage theme. This file was used by User Registration add-on for Gravity Forms and, according this tutorial , can be override.
What I try until now:
add_action( 'wp', function() {
$is_activate_page = isset($_GET['gfur_activation']);
if ( ! $is_activate_page ) {
return;
}
template('gfur-activate-template.activate');
exit();
}, 9);
But the screen becomes blank.
ben
September 16, 2021, 7:37pm
2
What version of Sage are you using?
@benword Using version 9.0.10
This is working better:
add_action('wp', function() {
$is_activate_page = isset($_GET['gfur_activation']);
if (!$is_activate_page) {
return;
}
echo template('activate');
exit();
}, 9);
But it cannot access methods from Controller/App.php. e.g:
PHP Notice: Undefined variable: get_header
I found another solution:
Remove the action that include the template:
add_action(‘init’, function () {
$object = \GF_User_Registration::get_instance();
remove_action(‘wp’, [$object, ‘maybe_activate_user’]);
}, 20);
Implement the template features in the theme, using this repo as a base.
system
Closed
October 28, 2021, 6:39pm
6
This topic was automatically closed after 42 days. New replies are no longer allowed.