/**
  * Bootstraps the class and hooks required actions & filters.
  *
  * @since 1.0
  */
 public static function init()
 {
     // Generate an order to keep a record of each subscription payment
     add_action('processed_subscription_payment', __CLASS__ . '::generate_paid_renewal_order', 10, 2);
     add_action('processed_subscription_payment_failure', __CLASS__ . '::generate_failed_payment_renewal_order', 10, 2);
     // If a subscription requires manual payment, generate an order to accept the payment
     add_action('scheduled_subscription_payment', __CLASS__ . '::maybe_generate_manual_renewal_order', 10, 2);
     // Make sure *manual* payment on a renewal order is correctly processed
     add_action('woocommerce_payment_complete', __CLASS__ . '::maybe_record_renewal_order_payment', 10, 1);
     // Make sure *manual* payment on renewal orders is correctly processed for gateways that do not call WC_Order::payment_complete()
     add_action('woocommerce_order_status_on-hold_to_processing', __CLASS__ . '::maybe_record_renewal_order_payment', 10, 1);
     add_action('woocommerce_order_status_on-hold_to_completed', __CLASS__ . '::maybe_record_renewal_order_payment', 10, 1);
     // Make sure payment on renewal orders is correctly processed when the *automatic* payment had previously failed
     add_action('woocommerce_order_status_failed_to_processing', __CLASS__ . '::process_failed_renewal_order_payment', 10, 1);
     add_action('woocommerce_order_status_failed_to_completed', __CLASS__ . '::process_failed_renewal_order_payment', 10, 1);
     add_action('woocommerce_order_status_failed', __CLASS__ . '::maybe_record_renewal_order_payment_failure', 10, 1);
     // Check if a user is requesting to create a renewal order for a subscription
     add_action('init', __CLASS__ . '::maybe_create_renewal_order_for_user', 100);
     // Used to detect if payment on failed order is being made from 'My Account'
     add_action('before_woocommerce_pay', __CLASS__ . '::before_woocommerce_pay', 10);
     // To handle virtual/non-downloaded that require store manager approval
     add_action('woocommerce_payment_complete', __CLASS__ . '::maybe_process_failed_renewal_order_payment', 10, 1);
     add_action('woocommerce_order_status_on-hold_to_processing', __CLASS__ . '::maybe_process_failed_renewal_order_payment', 10, 1);
     add_action('woocommerce_order_status_on-hold_to_completed', __CLASS__ . '::maybe_process_failed_renewal_order_payment', 10, 1);
     // Add a renewal orders section to the Related Orders meta box
     add_action('woocommerce_subscriptions_related_orders_meta_box', __CLASS__ . '::renewal_orders_meta_box_section', 10, 2);
     // The notice displayed when a subscription product has been deleted and the custoemr attempts to manually renew or make a renewal payment for a failed recurring payment for that product/subscription
     self::$product_deleted_error_message = apply_filters('woocommerce_subscriptions_renew_deleted_product_error_message', __('That product has been deleted and can no longer be renewed. Please choose a new product or contact us for assistance.', 'woocommerce-subscriptions'));
 }