service( 'options' )->get_usage_timestamp(); // If the usage timestamp is empty, add it and bail. if ( empty( $usage_timestamp ) ) { // Add the activation timestamp. woo_additional_terms()->service( 'options' )->add_usage_timestamp(); return; } // Bail early if the plugin recently installed. if ( time() < ( $usage_timestamp + WEEK_IN_SECONDS ) ) { return; } // Enqueue the assets. wp_enqueue_style( 'woo-additional-terms-rate' ); wp_enqueue_script( 'woo-additional-terms-dismiss' ); // Display the notice. woo_additional_terms()->service( 'template_manager' )->echo_template( 'notices/rate.php', array( 'usage_timestamp' => human_time_diff( $usage_timestamp ), ) ); } }