woocommerce_helper_subscription_activate_error, $product_id, $product_key, $activation_response
woocommerce_helper_subscription_activate_error, $product_id, $product_key, $activation_response
Appears in: woocommerce.11.0.0
Hook Type: action
Displaying hooks found in version: woocommerce.11.0.0do_action('woocommerce_helper_subscription_activate_error, $product_id, $product_key, $activation_response') is found 3 times:
- /includes/admin/helper/class-wc-helper.php line 1201
* @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 ); // Include HTTP status code and any extra data from the API response in the exception so callers can surface it. $status_code = function_exists( 'wp_remote_retrieve_response_code' ) ? (int) wp_remote_retrieve_response_code( $activation_response ) : (int) ( $body['data']['status'] ?? 400 ); $error_data = isset( $body['data'] ) && is_array( $body['data'] ) ? $body['data'] : array(); throw new WC_Data_Exception( esc_html( $body['code'] ?? 'unknown_error' ),
- /includes/admin/helper/class-wc-helper.php line 2308
* @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 ); } } /** * Connect theme to the WCCOM. *
- /includes/admin/helper/class-wc-helper.php line 2376
* @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(); }