woocommerce_helper_subscription_activate_error

woocommerce_helper_subscription_activate_error

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.9.7.1

do_action('woocommerce_helper_subscription_activate_error') is found 3 times:

  • /includes/admin/helper/class-wc-helper.php line 1086
    1082
    1083
    1084
    1085
    1086
    1087
    1088
    1089
    1090
    1091
    1092
         * @param int    $product_id Product ID being activated.
         * @param string $product_key Subscription product key.
         * @param array  $activation_response The response object from wp_safe_remote_request().
         */
        do_action( 'woocommerce_helper_subscription_activate_error', $product_id, $product_key, $activation_response );
        throw new Exception( $body['message'] ?? __( 'Unknown error', 'woocommerce' ) );
    }
     
    // Attempt to activate this plugin.
    $local = self::_get_local_from_product_id( $product_id );
    if ( $local && 'plugin' === $local['_type'] && current_user_can( 'activate_plugins' ) && ! is_plugin_active( $local['_filename'] ) ) {
  • /includes/admin/helper/class-wc-helper.php line 2014
    2010
    2011
    2012
    2013
    2014
    2015
    2016
    2017
    2018
    2019
             * @param string $product_key Subscription product key.
             * @param array  $activation_response The response object from wp_safe_remote_request().
             * @since 9.7
             */
            do_action( 'woocommerce_helper_subscription_activate_error', $product_id, $product_key, $activation_response );
        }
     
        self::_flush_subscriptions_cache();
        self::_flush_updates_cache();
    }
  • /includes/admin/helper/class-wc-helper.php line 2083
    2079
    2080
    2081
    2082
    2083
    2084
    2085
    2086
    2087
    2088
             * @param int    $product_id Product ID being activated.
             * @param string $product_key Subscription product key.
             * @param array  $activation_response The response object from wp_safe_remote_request().
             */
            do_action( 'woocommerce_helper_subscription_activate_error', $product_id, $product_key, $activation_response );
        }
     
        self::_flush_subscriptions_cache();
        self::_flush_updates_cache();
    }