oont-contents/plugins/tamara-checkout/tamara-checkout.php
2025-02-08 15:10:23 +01:00

36 lines
1.4 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* Plugin Name: Tamara Checkout
* Plugin URI: https://tamara.co/
* Description: This plugin enables Tamara Buy Now Pay later on your WooCommerce store. With Tamara, you can split your payments totally interest-free. Accepts payments from Mada, Apple Pay, or Credit Cards.
* Author: dev@tamara.co
* Author URI: https://tamara.co/
* Version: 1.9.8
* Text Domain: tamara
*/
use Tamara\Wp\Plugin\TamaraCheckout;
defined('TAMARA_CHECKOUT_VERSION') || define('TAMARA_CHECKOUT_VERSION', '1.9.8');
// Use autoload if it isn't loaded before
// phpcs:ignore PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace
if ( ! class_exists(TamaraCheckout::class)) {
require __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
}
$config = require(__DIR__ . DIRECTORY_SEPARATOR . 'config.php');
$config = array_merge($config, [
'pluginFilename' => __FILE__,
]);
// We need to set up the main instance for the plugin.
// Use 'woocommerce_init' to execute after WC init.
add_action('woocommerce_init', function () use ($config) {
TamaraCheckout::initInstanceWithConfig($config);
register_activation_hook(__FILE__, [TamaraCheckout::getInstance(), 'activatePlugin']);
register_deactivation_hook(__FILE__, [TamaraCheckout::getInstance(), 'deactivatePlugin']);
TamaraCheckout::getInstance()->initPlugin();
});