Actions and filters available to developers extending Coupon Creator Pro. This reference is generated from the plugin source on each release.
Actions (39) #
'cctor_post_get_template_part_' . $slug'cctor_pre_get_template_part_' . $slugcctor_after_couponcctor_after_get_template_partcctor_before_couponcctor_before_coupon_inner_wrapcctor_before_coupon_wrapcctor_before_get_template_partcctor_category_after_the_titlecctor_category_before_the_titlecctor_no_show_couponcctor_pro_after_category_templatecctor_pro_after_couponcctor_pro_after_coupon_loopcctor_pro_after_footercctor_pro_after_footer_navcctor_pro_after_headercctor_pro_after_header_navcctor_pro_after_loopcctor_pro_before_category_templatecctor_pro_before_couponcctor_pro_before_coupon_loopcctor_pro_before_footercctor_pro_before_footer_navcctor_pro_before_headercctor_pro_before_header_navcctor_pro_before_loopcctor_pro_before_showing_couponcctor_pro_deactivatecctor_pro_filter_after_templatecctor_pro_filter_before_templatecctor_pro_filter_do_display_filterscctor_pro_on_save_expirationcctor_pro_pre_coupon_templatescctor_pro_recurrence_save_new_expirationcctor_pro_shortcode_endcctor_pro_template_choosercctor_shortcode_endcctor_shortcode_start
'cctor_post_get_template_part_' . $slug #
do_action( ''cctor_post_get_template_part_' . $slug', string $slug, null|string $name, array $data )
Post Get Template Part by Slug
$slug(string) —$name(null|string) —$data(array) — optional array of vars to inject into the template part
Since 2.2 · Source: src/functions/template-tags/general.php
'cctor_pre_get_template_part_' . $slug #
do_action( ''cctor_pre_get_template_part_' . $slug', string $slug, null|string $name, array $data )
Pre Get Template Part by Slug
$slug(string) —$name(null|string) —$data(array) — optional array of vars to inject into the template part
Since 2.2 · Source: src/functions/template-tags/general.php
cctor_after_coupon #
do_action( 'cctor_after_coupon', int $coupon_id )
After Core Shortcode Wrap
$coupon_id(int) —
Source: src/Cctor/Core_Shortcode.php
cctor_after_get_template_part #
do_action( 'cctor_after_get_template_part', string $template, null|string $file, string $slug, string $name )
After Get Template Part
$template(string) —$file(null|string) —$slug(string) —$name(string) —
Since 2.2 · Source: src/functions/template-tags/general.php
cctor_before_coupon #
do_action( 'cctor_before_coupon', int $coupon_id )
Before Core Coupon Shortcode Individual Coupon
$coupon_id(int) —
Source: src/Cctor/Core_Shortcode.php
cctor_before_coupon_inner_wrap #
do_action( 'cctor_before_coupon_inner_wrap', int $coupon_id )
Before Core Shortcode Individual Coupon Wrap
$coupon_id(int) —
Source: src/views/type/default.php
cctor_before_coupon_wrap #
do_action( 'cctor_before_coupon_wrap' )
Before Core Coupon Shortcode Wrap
Since 1.90 · Source: src/Cctor/Core_Shortcode.php
cctor_before_get_template_part #
do_action( 'cctor_before_get_template_part', string $template, null|string $file, string $slug, string $name )
Before Get Template Part
$template(string) —$file(null|string) —$slug(string) —$name(string) —
Since 2.2 · Source: src/functions/template-tags/general.php
cctor_category_after_the_title #
do_action( 'cctor_category_after_the_title' )
Fires after the title in the coupon category page header.
Source: src/views/category/content.php
cctor_category_before_the_title #
do_action( 'cctor_category_before_the_title' )
Fires before the title in the coupon category page header.
Source: src/views/category/content.php
cctor_no_show_coupon #
do_action( 'cctor_no_show_coupon', int $coupon_id, object $coupon_expiration )
coupon Expired Hook Only Shows for expired coupon
$coupon_id(int) —$coupon_expiration(object) —
Source: src/Cctor/Core_Shortcode.php
cctor_pro_after_category_template #
do_action( 'cctor_pro_after_category_template' )
Fires after the coupon category content template, inside the wrapper.
Source: src/views/category/category.php
cctor_pro_after_coupon #
do_action( 'cctor_pro_after_coupon', int $coupon_id )
Fires after each coupon in the Pro coupon loop, once its single-coupon template has loaded.
$coupon_id(int) — The coupon post ID.
Source: src/views/default/loop.php
cctor_pro_after_coupon_loop #
do_action( 'cctor_pro_after_coupon_loop' )
Fires after the coupon content template in the default wrapper.
Source: src/views/default/default-wrap.php
cctor_pro_after_footer #
do_action( 'cctor_pro_after_footer' )
Fires after the footer of the Pro coupon list, at the end of the content template.
Source: src/views/default/content.php
cctor_pro_after_footer_nav #
do_action( 'cctor_pro_after_footer_nav' )
Fires in the coupon list footer, once its navigation has been output.
Source: src/views/category/content.php
cctor_pro_after_header #
do_action( 'cctor_pro_after_header' )
Fires after the header of the Pro coupon list, before the coupon loop.
Source: src/views/default/content.php
cctor_pro_after_header_nav #
do_action( 'cctor_pro_after_header_nav' )
Fires after the navigation in the coupon list header.
Source: src/views/default/content.php
cctor_pro_after_loop #
do_action( 'cctor_pro_after_loop' )
Fires after the coupon loop template when the list has coupons to show.
Source: src/views/default/content.php
cctor_pro_before_category_template #
do_action( 'cctor_pro_before_category_template' )
Fires before the coupon category content template is loaded.
Source: src/views/category/category.php
cctor_pro_before_coupon #
do_action( 'cctor_pro_before_coupon', int $coupon_id )
Fires before each coupon in the Pro coupon loop, before its single-coupon template loads.
$coupon_id(int) — The coupon post ID.
Source: src/views/default/loop.php
cctor_pro_before_coupon_loop #
do_action( 'cctor_pro_before_coupon_loop' )
Fires before the coupon content template in the default wrapper.
The Pro filter bar hooks this action to render its filters above the coupon list.
Source: src/views/default/default-wrap.php
cctor_pro_before_footer #
do_action( 'cctor_pro_before_footer' )
Fires before the footer of the Pro coupon list.
Source: src/views/default/content.php
cctor_pro_before_footer_nav #
do_action( 'cctor_pro_before_footer_nav' )
Fires in the coupon list footer, before its navigation is output.
Source: src/views/category/content.php
cctor_pro_before_header #
do_action( 'cctor_pro_before_header' )
Fires before the header of the Pro coupon list, at the top of the content template.
Source: src/views/category/content.php
cctor_pro_before_header_nav #
do_action( 'cctor_pro_before_header_nav' )
Fires before the navigation in the coupon list header.
Source: src/views/category/content.php
cctor_pro_before_loop #
do_action( 'cctor_pro_before_loop' )
Fires before the coupon loop template when the list has coupons to show.
Source: src/views/default/content.php
cctor_pro_before_showing_coupon #
do_action( 'cctor_pro_before_showing_coupon', int $coupon_id )
Fires before a coupon that passed its expiration and view-limit checks is rendered.
$coupon_id(int) — The coupon post ID.
Source: src/views/default/single-coupon.php
cctor_pro_deactivate #
do_action( 'cctor_pro_deactivate' )
Fires on deactivation of Coupon Creator Pro
Avaiable when Pro is decativated users who have activate_plugins capability
Source: src/Cctor/Main.php
cctor_pro_filter_after_template #
do_action( 'cctor_pro_filter_after_template' )
Fires after the Pro filter bar markup is output.
Source: src/views/filter-bar/filter-bar.php
cctor_pro_filter_before_template #
do_action( 'cctor_pro_filter_before_template' )
Fires before the Pro filter bar markup is output.
Source: src/views/filter-bar/filter-bar.php
cctor_pro_filter_do_display_filters #
do_action( 'cctor_pro_filter_do_display_filters', array $cctor_atts )
Fires inside the filter bar form, where each filter control is rendered.
Pro hooks its category, per-page, order-by and keyword filters here. The Add-ons plugin hooks its vendor and location filters to the same action.
$cctor_atts(array) — The coupon shortcode attributes.
Source: src/views/filter-bar/filter-bar.php
cctor_pro_on_save_expiration #
do_action( 'cctor_pro_on_save_expiration', mixed $_POST, mixed $post_id )
Runs on Saving of New Recurring Expiration
$_POST(mixed) — [‘cctor_expiration’] string of new expiration$post_id(mixed) — int id of the current coupon being updated
Source: src/Cctor/Admin/Meta.php
cctor_pro_pre_coupon_templates #
do_action( 'cctor_pro_pre_coupon_templates' )
Fires at the top of the Pro coupon wrapper, before any coupon template loads.
The Multi Print add-on hooks this action to output its AJAX URLs and loader markup.
Source: src/views/default/default-wrap.php
cctor_pro_recurrence_save_new_expiration #
do_action( 'cctor_pro_recurrence_save_new_expiration', string $new_expiration, int $current_id )
Fires when a recurring coupon receives its new expiration date.
$new_expiration(string) — The new expiration date.$current_id(int) — ID of the coupon being updated.
Source: src/Cctor/Recurrence_Cron.php
cctor_pro_shortcode_end #
do_action( 'cctor_pro_shortcode_end' )
Fires on start of couponloop shortcode
Since 2.2 · Source: src/Cctor/Shortcode.php
cctor_pro_template_chooser #
do_action( 'cctor_pro_template_chooser' )
Runs when choosing a template
$template includes full path to template
Since 2.2 · Source: src/Cctor/Templates.php
cctor_shortcode_end #
do_action( 'cctor_shortcode_end' )
End Core Shortcode
Source: src/Cctor/Core_Shortcode.php
cctor_shortcode_start #
do_action( 'cctor_shortcode_start' )
Fires on start of couponloop shortcode
Since 2.2 · Source: src/Cctor/Shortcode.php
Filters (41) #
'cctor_get_template_part_path_' . $template'cctor_shortcode_query_args_' . $filterid'coupon_creator_pro_update_recurrence_expiration_' . $current_expiration_id$task['task'] . '_interval'artifex_license_store_urlcctor_coupon_access_allowedcctor_coupon_templatecctor_coupon_template_pathscctor_coupons_current_view_templatecctor_deal_inline_stylecctor_filter_recurring_limit_amountcctor_filter_taxonomy_display_classcctor_filter_terms_tagscctor_filter_x_days_optionscctor_get_current_templatecctor_get_template_part_contentcctor_get_template_part_pathcctor_get_template_part_templatescctor_pro_can_runcctor_pro_column_break_filtercctor_pro_coupon_per_row_filtercctor_pro_expiration_counter_singular_coupon_checkcctor_pro_filter_get_linkcctor_pro_filter_loop_columns_defaultscctor_pro_filter_orderby_dropdowncctor_pro_filter_per_page_dropdowncctor_pro_filter_show_linkcctor_pro_filter_show_print_clickcctor_pro_filterbar_breakpoint_filtercctor_pro_keyword_search_meta_keyscctor_pro_keyword_search_taxonomiescctor_pro_loop_cctor_attscctor_pro_loop_shortcode_query_argscctor_pro_loop_taxonomy_argscctor_pro_meta_index_row_limitcctor_pro_print_only_contentcctor_pro_qr_png_dircctor_shortcode_query_argscoupon_creator_pro_recurring_expiration_optionsfilter_cctor_pro_able_to_runfilter_coupon_filter_bar_category_query_args
'cctor_get_template_part_path_' . $template #
apply_filters( ''cctor_get_template_part_path_' . $template', string $file, null|string $template, string $slug, string $name )
Filter Specific File Template Path
$file(string) —$template(null|string) —$slug(string) —$name(string) —
Since 2.2 · Source: src/functions/template-tags/general.php
'cctor_shortcode_query_args_' . $filterid #
apply_filters( ''cctor_shortcode_query_args_' . $filterid', array $cctor_args )
Filter Core ShortCode Query Arguments by ID
$cctor_args(array) — .
Source: src/Cctor/Core_Shortcode.php
'coupon_creator_pro_update_recurrence_expiration_' . $current_expiration_id #
apply_filters( ''coupon_creator_pro_update_recurrence_expiration_' . $current_expiration_id', string $date, string $current_expiration, string $current_expiration_id, int $this->current_id )
Filter the Current Expiration
$date(string) — the date of the next expiration$current_expiration(string) — the date of the current expiration$current_expiration_id(string) — the id of the recurring expiration$this->current_id(int) — the id of the coupon having the expiration updated
Since 3.2.0 · Source: src/Cctor/Recurrence_Cron.php
$task['task'] . '_interval' #
apply_filters( '$task['task'] . '_interval'' )
Filter the interval at which to process recurring expiration queues.
By default ever 30mins is specified, however other intervals of “hourly”, “twicedaily” and “daily” could be substituted.
Source: coupon-creator-pro.php
artifex_license_store_url #
apply_filters( 'artifex_license_store_url', string $url, string $slug )
Filters the EDD licensing endpoint.
$url(string) — Store URL.$slug(string) — Plugin slug.
Source: src/Cctor/Admin/SDK_License.php
cctor_coupon_access_allowed #
apply_filters( 'cctor_coupon_access_allowed', bool $access_allowed, int $coupon_id )
Filters whether the current visitor is allowed to view the coupon.
The Email Gate add-on hooks this filter to withhold the coupon until the visitor supplies an email address. A denied load is not counted toward the coupon’s view limit.
$access_allowed(bool) — Whether the visitor may view the coupon. Default true.$coupon_id(int) — The coupon post ID.
Source: src/Cctor/Expiration.php
cctor_coupon_template #
apply_filters( 'cctor_coupon_template', string $file, string $template )
Filter the coupon template
$file(string) — the full path to a template including template$template(string) — the full template name
Source: src/Cctor/Templates.php
cctor_coupon_template_paths #
apply_filters( 'cctor_coupon_template_paths', array $ )
Filter base path for templates
$(array) — pngx( ‘cctor.pro’ )->plugin_path path an array for template paths
Source: src/Cctor/Templates.php
cctor_coupons_current_view_template #
apply_filters( 'cctor_coupons_current_view_template', string $template )
Filter the current template
$template(string) — a template name
Source: src/Cctor/Templates.php
cctor_deal_inline_style #
apply_filters( 'cctor_deal_inline_style', string $deal_style, int $coupon_id )
Filter the inline style on the deal element.
Shares the name and contract with the filter in Coupon Creator core, so a token-driven template (the ticket type, for example) suppresses the inline colours the same way whether or not Pro is active.
$deal_style(string) — The already-escaped inline style attribute value.$coupon_id(int) — The coupon post ID.
Since 3.6.0 · Source: src/functions/template-functions/cctor-pro-function-deal.php
cctor_filter_recurring_limit_amount #
apply_filters( 'cctor_filter_recurring_limit_amount', int $ )
Filter the options limit for recurring expiration meta
$(int) — 20 an integer
Source: src/Cctor/Meta/Fields.php
cctor_filter_taxonomy_display_class #
apply_filters( 'cctor_filter_taxonomy_display_class', string $class, int $depth )
Filter the taxonomy class based on the term depth
$class(string) — class as a string$depth(int) — numeric value of the depth, parent is 0
Source: src/Cctor/Filters/Categories.php
cctor_filter_terms_tags #
apply_filters( 'cctor_filter_terms_tags', string $cctor_terms_tags )
Filters the HTML tags allowed in the coupon terms text.
The value is passed as the allowed-tags argument of strip_tags(). Coupon Creator core hooks this filter to allow its standard content tags.
$cctor_terms_tags(string) — Allowed tags as a string of <code><tag></code> names. Default empty string, which strips all tags.
Source: src/functions/template-functions/cctor-pro-function-terms.php
cctor_filter_x_days_options #
apply_filters( 'cctor_filter_x_days_options', int $ )
Filter the options for expiration x days meta
$(int) — 60 an integer
Source: src/Cctor/Meta/Fields.php
cctor_get_current_template #
apply_filters( 'cctor_get_current_template' )
Fitler the current template name
Since 2.2 · Source: src/functions/template-tags/general.php
cctor_get_template_part_content #
apply_filters( 'cctor_get_template_part_content', string $html, null|string $template, string $file, string $slug, string $name )
Filter Template Content
$html(string) —$template(null|string) —$file(string) —$slug(string) —$name(string) —
Since 2.2 · Source: src/functions/template-tags/general.php
cctor_get_template_part_path #
apply_filters( 'cctor_get_template_part_path', string $file, null|string $template, string $slug, string $name )
Filter File Template Path
$file(string) —$template(null|string) —$slug(string) —$name(string) —
Since 2.2 · Source: src/functions/template-tags/general.php
cctor_get_template_part_templates #
apply_filters( 'cctor_get_template_part_templates', string $templates, null|string $slug, string $name )
Filter Template PArts
$templates(string) —$slug(null|string) —$name(string) —
Since 2.2 · Source: src/functions/template-tags/general.php
cctor_pro_can_run #
apply_filters( 'cctor_pro_can_run', bool $plugin_can_run )
Filter whether the plugin can run.
$plugin_can_run(bool) — Whether the plugin can run.
Since 3.0 · Source: coupon-creator-pro.php
cctor_pro_column_break_filter #
apply_filters( 'cctor_pro_column_break_filter', int $column_breaks )
Filter Column CSS Break Points
$column_breaks(int) — an array of breakpoints
Source: src/Cctor/Shortcode.php
cctor_pro_coupon_per_row_filter #
apply_filters( 'cctor_pro_coupon_per_row_filter', array $coupons_per_row )
Filter Coupons Per Row
$coupons_per_row(array) — an array of coupons per row based on breakpoint
Source: src/Cctor/Shortcode.php
cctor_pro_expiration_counter_singular_coupon_check #
apply_filters( 'cctor_pro_expiration_counter_singular_coupon_check', bool $is_single_coupon, \Cctor__Coupon__Pro__Expiration $this )
Allows filtering of whether on the single/print view of the coupon. Used for Multiprint.
$is_single_coupon(bool) — Whether on singular/print view of the coupon post type.$this(\Cctor__Coupon__Pro__Expiration) — An instance of the expiration object.
Since 3.4.0 · Source: src/Cctor/Expiration.php
cctor_pro_filter_get_link #
apply_filters( 'cctor_pro_filter_get_link', string[] $cctor_links, int $coupon_id, string $reveal )
Filter the Pro get link response.
$cctor_links(string[]) — An array of filter link attributes.$coupon_id(int) — The coupon id.$reveal(string) — The reveal setting for a coupon.
Source: src/functions/template-functions/cctor-pro-function-links.php
cctor_pro_filter_loop_columns_defaults #
apply_filters( 'cctor_pro_filter_loop_columns_defaults', int $max_columns )
Filters the highest column count offered in the coupon loop dropdown.
$max_columns(int) — Maximum number of loop columns. Default 6.
Source: src/Cctor/Assets/Provider.php
cctor_pro_filter_orderby_dropdown #
apply_filters( 'cctor_pro_filter_orderby_dropdown', array $args )
Filter Orderby Dropdown on the Filter Bar and in Options
$args(array) — an array of values
Since 2.2 · Source: src/Cctor/Filters/Defaults.php
cctor_pro_filter_per_page_dropdown #
apply_filters( 'cctor_pro_filter_per_page_dropdown', array $args )
Filter Per Page Dropdown on the Filter Bar and in Options
$args(array) — an array of values
Since 2.2 · Source: src/Cctor/Filters/Defaults.php
cctor_pro_filter_show_link #
apply_filters( 'cctor_pro_filter_show_link', string[] $cctor_links, int $coupon_id )
Filter the Pro show links.
$cctor_links(string[]) — An array of filter link attributes.$coupon_id(int) — The coupon id.
Since 3.3.0 · Source: src/functions/template-functions/cctor-pro-function-links.php
cctor_pro_filter_show_print_click #
apply_filters( 'cctor_pro_filter_show_print_click', string $reveal, int $coupon_id )
Filter the Pro show print click.
$reveal(string) — The reveal setting for a coupon.$coupon_id(int) — The coupon id.
Since 3.3.0 · Source: src/functions/template-functions/cctor-pro-function-links.php
cctor_pro_filterbar_breakpoint_filter #
apply_filters( 'cctor_pro_filterbar_breakpoint_filter', int|string $filter_css_breakpoint )
Filters the viewport width, in pixels, at which the filter bar switches to its desktop layout.
$filter_css_breakpoint(int|string) — The breakpoint width in pixels. Default is the ‘coupon-pro-filter-bar-breakpoint’ option, or 600.
Source: src/Cctor/Filters/Main.php
cctor_pro_keyword_search_meta_keys #
apply_filters( 'cctor_pro_keyword_search_meta_keys', string[] $meta_keys )
Filter the meta fields included in the coupon keyword search.
$meta_keys(string[]) — An array of meta keys to search.
Since 3.6 · Source: src/Cctor/Filters/Keyword.php
cctor_pro_keyword_search_taxonomies #
apply_filters( 'cctor_pro_keyword_search_taxonomies', string[] $taxonomies )
Filter the taxonomies included in the coupon keyword search.
$taxonomies(string[]) — An array of taxonomy names to search.
Since 3.6 · Source: src/Cctor/Filters/Keyword.php
cctor_pro_loop_cctor_atts #
apply_filters( 'cctor_pro_loop_cctor_atts', array $cctor_atts )
Filter the couponloop shortcode attributes
$cctor_atts(array) — an array of shortcode arguments
Source: src/Cctor/Shortcode.php
cctor_pro_loop_shortcode_query_args #
apply_filters( 'cctor_pro_loop_shortcode_query_args', array $cctor_args )
Filter the couponloop query arguments
$cctor_args(array) — an array of query arguments
Source: src/Cctor/Shortcode.php
cctor_pro_loop_taxonomy_args #
apply_filters( 'cctor_pro_loop_taxonomy_args', array $cctor_atts )
Filter the Taxonomy Arguement for Pro Loop Shortcode before setting up for Query
$cctor_atts(array) — an array of all shortcode attributes
Source: src/Cctor/Shortcode.php
cctor_pro_meta_index_row_limit #
apply_filters( 'cctor_pro_meta_index_row_limit', int $row_limit )
Filter the postmeta row count above which the sort index is not created automatically.
$row_limit(int) — The maximum estimated row count. Default 500000.
Since 3.6 · Source: src/Cctor/Admin/Updates.php
cctor_pro_print_only_content #
apply_filters( 'cctor_pro_print_only_content', string $meta, int $coupon_id, array $field )
Filter Front End Content for WPAutoP
$meta(string) — content to display$coupon_id(int) — id of post$field(array) — field attributes
Source: src/Cctor/Print.php
cctor_pro_qr_png_dir #
apply_filters( 'cctor_pro_qr_png_dir', string $subdir )
Filter the uploads sub-folder that stores email QR code PNGs.
$subdir(string) — Folder name under the uploads base directory.
Since 3.7.0 · Source: src/Cctor/QR/Png_File.php
cctor_shortcode_query_args #
apply_filters( 'cctor_shortcode_query_args', array $cctor_args )
Filter Core ShortCode Query Arguments
$cctor_args(array) — .
Source: src/Cctor/Core_Shortcode.php
coupon_creator_pro_recurring_expiration_options #
apply_filters( 'coupon_creator_pro_recurring_expiration_options', array $types )
Filter the Recurring Expiration Options
$types(array) — An array of recurrence options with id, name, and timeframe required
Since 3.2.0 · Source: src/Cctor/Recurrence.php
filter_cctor_pro_able_to_run #
apply_filters( 'filter_cctor_pro_able_to_run', bool $version_ok )
Filters whether the deprecated Pro loader may boot the plugin.
$version_ok(bool) — Whether Coupon Creator core meets the minimum version Pro requires.
Source: coupon-creator-pro.php
filter_coupon_filter_bar_category_query_args #
apply_filters( 'filter_coupon_filter_bar_category_query_args' )
Filter the arguments used to get all the coupon categories for the filter bar
Source: src/Cctor/Filters/Categories.php