/**
  * Check if order is renewal order
  * 
  * @access public
  * @param bool $is_renewal
  * @param object $order
  * @return bool
  */
 public function is_renewal_order($is_renewal, $order)
 {
     return Subscriptio_Order_Handler::order_is_renewal($order->id);
 }
示例#2
0
    /**
     * Send custom Subscriptio email
     * 
     * @access public
     * @param int $order_id
     * @return void
     */
    public function send_custom_email($order_id)
    {
        $order = new WC_Order($order_id);

        if (!$order) {
            return;
        }

        // Subscription order?
        if (Subscriptio_Order_Handler::order_is_renewal($order_id)) {
            Subscriptio_Mailer::send($this->get_woocommerce_email_type(current_filter()), $order);
        }
    }