<?php
/**
* @package CembraPay Payment Gateway for WooCommerce
* @author  Adrian Emil Tudorache
* @license GPL-2.0+
* @link    https://www.tudorache.me/
*/

namespace CembraPayWoo;

if ( ! defined( 'ABSPATH' ) ) {
	header( 'Status: 403 Forbidden' );
	header( 'HTTP/1.1 403 Forbidden' );
	exit;
}

/**
 * Set includes
 */
$files = array(
    'class-legacy.php'       => array( 'CembraPayWoo\Legacy' ),
    'class-logs.php'         => array( 'CembraPayWoo\LogsActions' ),
    'class-translations.php' => array( 'CembraPayWoo\Translations' ),
    'class-service.php'      => array(),
    'class-cembrapay.php'    => array(),
    'class-rest.php'         => array( 'CembraPayWoo\REST' ),
    'class-admin.php'        => array( 'CembraPayWoo\Admin' ),
	'class-woocommerce.php'  => array( 'CembraPayWoo\WooCommerce' )
);

/**
 * Include files
 */
foreach( $files as $file => $classes ) {

    require_once( __DIR__ . '/' . $file );
    if( $classes ) {
        foreach( $classes as $class ) {
            new $class;
        }
    }

}
?>
