• Skip to primary navigation
  • Skip to main content

Artifex Routing Co

  • Plugins
  • Docs
  • Support
  • About
  • My Account
Coupon Creator mark COUPON CREATOR By Artifex Routing Co
OVERVIEW DEMOS PRO ADD-ONS COMPARE PRICING FAQ GET PRO
  • Can I change the print-view URL?
  • Can I combine an image and text in one coupon?
  • Can I display a coupon in a sidebar or widget?
  • Can I track the print view in Google Analytics?
  • How do I keep coupons out of site search?
  • How do I run custom code snippets safely?
  • How do I turn on automatic paragraphs (wpautop)?
  • What are Coupon Creator’s system requirements?
  • What size should my image coupon be?
  • Where does the shortcode go?
  • Which add-ons require Coupon Creator Pro?
  • Will I lose my coupons if I deactivate the plugin?
  • Advanced Templates
  • Click Reveal
  • Coupon Categories
  • Coupon Loop & Filter Bar
  • Coupon Options & Defaults
  • Creating a Coupon
  • Creating a Pro Coupon
  • Creating an Image Coupon
  • Customizing Coupons
  • Displaying Coupons
  • Dynamic Code
  • Email Delivery
  • Email Gate
  • Expiration & Recurring Expiration
  • Expiration Dates
  • Expiration Display
  • Getting Started with Coupon Creator
  • Installing & Activating Add-ons
  • Installing & Activating Pro
  • Locations & Vendors
  • MultiPrint
  • Print Features
  • Printing Coupons
  • Pro Options, Tab by Tab
  • Pro Styling & Image Coupons
  • The Coupon Counter
  • Troubleshooting 404 Errors
  • Troubleshooting 404 Errors
  • Troubleshooting 404 Errors
  • Troubleshooting Conflicts
  • Troubleshooting Conflicts
  • Troubleshooting Conflicts
  • Troubleshooting JavaScript Errors
  • Troubleshooting JavaScript Errors
  • Troubleshooting JavaScript Errors
  • WooCommerce Coupons
  • An update is out but my site is not showing it
  • How do I increase the WordPress memory limit?
  • How do I turn on WordPress debug mode?
  • My coupon was working but stopped displaying
  • My recurring expiration isn’t updating — how do I fix it?
  • The inserter, uploader, or date/color pickers aren’t working
  • Two “Click to Print” Links on a Modern Ticket
  • What information does the Site Health section show?
  • Why isn’t my Email Gate working?
  • Actions & Filters
  • Add an Expired Message to the Print View
  • Add Google Fonts to the Print View
  • Coupon Capabilities
  • Coupon Custom Fields (Post Meta)
  • Coupon Post Type & Taxonomy
  • Coupon Shortcode Reference
  • CSS Reference
  • Customizing the Counter
  • Disable the Colorbox Script
  • Email settings reference
  • Filter the Recurring Limit
  • Filter the Shortcode Query
  • Hide or Change the Dashed Border
  • Logged-In User Snippets
  • Pro Conditionals
  • Pro CSS Reference
  • Pro Custom Fields
  • Remove Print View Links
  • Terms Field Formatting
  • The Expiration Date on Image Coupons
  • Themer’s Guide
  • Translate or Change Text
  • A new version is out — why doesn’t my Plugins screen show it?
  • Does Coupon Creator Pro stop working when my license expires?
  • How do I activate my Coupon Creator Add-ons license?
  • How do I activate my license for Pro or add-ons?
  • How do I install Pro manually (upload, FTP, or cPanel)?
  • How do I manually update or downgrade the plugin?
  • How do I renew my license?
  • How do I transfer my license to another site?
  • How do I upgrade my license to more sites?
  • What does the license include?
  • What support can I expect?
  • Where do I add my license key?
  • Where do I find my license key?
  • Can I upgrade my license to a higher tier?
  • Do I need the free Coupon Creator plugin to run Pro?
  • Does Coupon Creator Pro support WordPress Multisite?
  • What payment methods do you accept?
  • What version of Coupon Creator do I need for Pro?
  • Is Coupon Creator GDPR compliant?
  • What languages does Coupon Creator support?
  • What software license does the plugin use?
  • What usage data does Coupon Creator collect?
  • Which browsers are supported?
  • Coupon Creator 3.6.2 — August 9th 2026
  • Coupon Creator 3.6.1 — August 7th 2026
  • Coupon Creator 3.6.0 — August 6th 2026
  • Coupon Creator Changelog
  • Coupon Creator Pro Changelog
  • Coupon Creator Add-ons Changelog
View Categories
  • Home
  • Docs
  • Coupon Creator Pro
  • Logged-In User Snippets

Logged-In User Snippets

1 min read

Snippets for showing coupons only to logged-in users and printing the current user's name on the print template.

These use standard WordPress functions together with Coupon Creator Pro hooks. Add them to a child theme's functions.php or a snippet plugin.

Show coupons only to logged-in users #

The simplest approach is to gate the shortcode output with is_user_logged_in():

add_shortcode( 'members_coupons', function () {
	if ( ! is_user_logged_in() ) {
		return '<p>Please log in to view coupons.</p>';
	}

	return do_shortcode( '[coupon_creator_multiple]' );
} );

For finer control, filter the loop query so logged-out visitors get no results. Pro exposes the coupon loop query args:

add_filter( 'cctor_pro_loop_shortcode_query_args', function ( $args ) {
	if ( ! is_user_logged_in() ) {
		$args['post__in'] = [ 0 ]; // match nothing
	}

	return $args;
} );

Print the logged-in user's name on the print template #

The print template fires cctor_print_before_coupon (and cctor_action_print_template) before the coupon renders. Hook it and echo the current user's name:

add_action( 'cctor_print_before_coupon', function ( $coupon_id ) {
	if ( ! is_user_logged_in() ) {
		return;
	}

	$user = wp_get_current_user();
	printf(
		'<p class="coupon-holder">%s</p>',
		esc_html( sprintf( __( 'Issued to %s', 'coupon-creator-pro' ), $user->display_name ) )
	);
} );

To place the name inside the on-page coupon (shortcode view) as well, use cctor_before_coupon or cctor_pro_before_coupon, both of which receive the coupon ID.

See Print Features for other print-template hooks and Pro CSS Reference for styling the output.

Updated on August 8, 2026
FAQ Reference

What are your Feelings

  • Happy
  • Normal
  • Sad

Share This Article :

  • Facebook
  • X
  • LinkedIn
  • Pinterest
Remove Print View LinksCustomizing the Counter
Table of Contents
  • Show coupons only to logged-in users
  • Print the logged-in user's name on the print template

Artifex Routing Co

Dependable WordPress plugins from one small team.

Plugins
Coupon CreatorSteuard
Company
  • Terms of Service
  • Privacy Policy
  • My Account
© 2026 Artifex Routing Co
Plugins for WordPress
7ads6x98y

Contact us

Have a license? Log in and we will fill in your details.

Log into Your Account

Lost Password?

Or just send us a message

"*" indicates required fields

This field is for validation purposes and should be left unchanged.
What can we help with?*
Your Name:*
(uses account display name)
(uses account email)
Looking for a refund? Please fill out the refund form

Technical details

Drop files here or
Accepted file types: jpg, png, pdf, Max. file size: 2 MB, Max. files: 5.