getSlug() ) { return $this; } return $tip; }, 10, 2 ); add_action( 'submitpost_box', function ( WP_Post $post ) { if ( GlobalTieredPricingCPT::SLUG !== $post->post_type ) { return; } $this->render(); } ); } protected function isValid() : bool { if ( $this->isSeen() ) { return false; } $activationDate = TierPricingTablePlugin::getPluginActivationDate(); if ( !$activationDate ) { return false; } // If activation date is more than 2 months ago return time() - $activationDate > MONTH_IN_SECONDS * 2; } public function render() { if ( !$this->isValid() ) { return; } ?>