[action] [license-activation] Add a new action that is triggered afte… - #828
Conversation
| $result['next_page'] = $next_page; | ||
| } | ||
|
|
||
| $this->do_action( 'after_license_activation', ( true === $result['success'] ) ); |
There was a problem hiding this comment.
How about we keep it simple now and just trigger the action if the activation was successful? Like
if ( $result['success'] ) {
$this->do_action...
}will that work?
| * | ||
| * @return bool | ||
| */ | ||
| protected function _activate_license( $background = false, $premium_license = null ) { |
There was a problem hiding this comment.
@fajardoleo how about you revert all these changes (and also line 23080 inside _handle_account_edits()) and at line 21673, before the $premium_license = new FS_Plugin_License( $license ); you fire the action directly?
$this->do_action( 'after_license_activation' );
again we fire it only when the license is actually activated. No need to pass a param suggesting the "status" of it, just to keep things simple and straightforward. (Conceptually one may not trigger an action that happens after license activation if the license wasn't activated to begin with ;) )
|
|
||
| if ( is_object( $fs ) ) { | ||
| $fs->_activate_license(); | ||
| $result = $fs->_activate_license(); |
There was a problem hiding this comment.
Please see my suggestion, perhaps we won't be needing this change too.
…r a license activation.
8dfdebf to
c162f02
Compare
…r a license activation.