SubPortal icon
Payments & Donations

SubPortal hooks reference

SubPortal 1.1.4 has 1 actions and 5 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.

How to use these hooks

Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.

functions.phpyour child theme
// Run your own code when SubPortal fires an action
add_action( 'woocommerce_my_subscriptions_actions', function( $subscription ) {
	// Your code runs here.
}, 10, 1 );

// Change a value SubPortal is about to use
add_filter( 'subportal_action_allowed', function( $allowed, $action, $subscription, $user_id ) {
	// Change $allowed here.
	return $allowed;
}, 10, 4 );

Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.

All hooks

  • app/policy/class-policy.php line 81
    /**
     * Filter the final policy decision for a customer action.
     */
    apply_filters( 'subportal_action_allowed', $allowed, $action, $subscription, $user_id );
  • app/actions/class-action-cancel.php line 55
    /**
     * Filter the cancellation reason list.
     */
    apply_filters( 'subportal_cancel_reasons', array( 'too_expensive' => __( 'It is too expensive', 'subportal' ), 'no_longer_needed' => __( 'I no longer need it', 'subportal' ), 'trying_alternative' => __( 'I am switching to a different product or service', 'subportal' ), 'delivery_issues' => __( 'I had delivery problems', 'subportal' ), 'product_issues' => __( 'I was not happy with the product', 'subportal' ), 'other' => __( 'Other', 'sub... );
  • app/frontend/class-my-account.php line 82
    /**
     * Filter whether the SubPortal dashboard replaces the WCS list.
     */
    apply_filters( 'subportal_enable_dashboard', SubPortal_Settings::is_dashboard_enabled() );
  • app/actions/class-action-pause.php line 311
    /**
     * Filter the pause preset list.
     */
    apply_filters( 'subportal_pause_presets', array( array( 'days' => 7, 'label' => __( '1 week', 'subportal' ), ), array( 'days' => 14, 'label' => __( '2 weeks', 'subportal' ), ), array( 'days' => 30, 'label' => __( '1 month', 'subportal' ), ), array( 'days' => 60, 'label' => __( '2 months', 'subportal' ), ), array( 'days' => 90, 'label' => __( '3 months', 'subportal' ), ), ) );
  • templates/myaccount/subportal-subscription-card.php line 147
    do_action( 'woocommerce_my_subscriptions_actions', $subscription );
  • templates/myaccount/subportal-dashboard.php line 40
    apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) );

Generated from SubPortal's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.

Done for you

Rather have it built for you?

Tell us what should change and we’ll write and test the code using these hooks.

Plugin customisation

from $149

New features or changed behaviour, without editing the plugin’s files.

  • Built as a companion plugin, so updates never wipe it
  • Exact quote before we start
  • Tested on staging, then deployed

Typical turnaround: 3–7 business days

Choose this

Not sure which fits? Describe what you need and we’ll suggest the simplest option.

Can't find the right hook?

We can build the customisation for you. Describe what you need: