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.8.7.0

do_action('woocommerce_helper_subscription_activate_error') is found 2 times:

  • /includes/admin/helper/class-wc-helper.php line 1084
    			 * @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 1892
    			 * @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();
    	}