How to customize coupon markup and styling in a theme or snippet — Coupon Creator is customized through hooks and CSS, not by copying template files into your theme.
There is no theme template override for front-end coupons #
The shortcode and print views are not loaded with a theme-overridable template loader. The print view uses a fixed plugin file (src/functions/templates/print-coupon.php), swapped in on template_include by absolute path — copying it into your theme has no effect. Instead, both views build their output entirely from the action/filter API in actions-filters.
Customize markup by re-hooking #
The default output is attached by a builder function on each view (cctor_shortcode_functions on the shortcode, cctor_print_template on print). Unhook a default callback and add your own on the same action:
add_action( 'cctor_shortcode_template_functions', function () {
// Replace the default deal markup.
remove_action( 'cctor_coupon_deal', 'cctor_show_deal', 10 );
add_action( 'cctor_coupon_deal', 'my_theme_coupon_deal', 10, 1 );
} );
function my_theme_coupon_deal( $coupon_id ) {
$deal = get_post_meta( $coupon_id, 'cctor_amount', true );
echo '<div class="my-deal">' . esc_html( $deal ) . '</div>';
}
Use cctor_print_template_functions for the equivalent on the print view. The wrapper markup is filtered rather than actioned — return your own array from cctor_outer_content_wrap / cctor_inner_content_wrap (and the cctor_print_* variants).
Read coupon data #
Coupon values are post meta on the cctor_coupon post — see custom-fields for the keys (cctor_amount, cctor_description, cctor_image, etc.).
Styling #
Target the classes in css-reference. For the print view, which has no theme stylesheet, add CSS through the Custom CSS option, the cctor_filter_inline_css filter, or the coupon_print_head action.
Extension points that add markup without replacing anything #
cctor_before_coupon_wrap, cctor_before_coupon, cctor_before_coupon_inner_wrap, cctor_after_coupon (shortcode) and cctor_print_before_coupon / cctor_print_after_coupon (print) are empty by default — hook them to inject extra markup around each coupon.