Add free not first 30 inbox target#2132
Conversation
WalkthroughThe changes in the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (3)
classes/models/FrmInbox.php (3)
236-254: Update @SInCE version tagsThe
@since x.xtags should be updated with the actual version number for these new methods.
412-422: Consider using a constant for the time periodThe implementation is good, but consider extracting the '30 days' value into a class constant for better maintainability and reusability.
+ private const TRIAL_PERIOD_DAYS = 30; private function is_first_30() { $activation_timestamp = get_option( 'frm_first_activation' ); if ( false === $activation_timestamp ) { return false; } - $cutoff = strtotime( '-30 days' ); + $cutoff = strtotime( '-' . self::TRIAL_PERIOD_DAYS . ' days' ); return $activation_timestamp > $cutoff; }
423-441: Update @SInCE version tags and LGTM!The implementation is clean and follows good practices. Just update the
@since x.xtags with the actual version number.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
classes/models/FrmInbox.php(3 hunks)
🔇 Additional comments (2)
classes/models/FrmInbox.php (2)
212-223: LGTM! Clean implementation of new user type checks.
The additional conditions for user type verification maintain good readability and follow the existing pattern. The code effectively delegates specific checks to dedicated helper methods.
404-405: LGTM! Good refactoring.
The method has been cleanly refactored to use the new helper methods, improving code reusability and maintainability.
No description provided.