Skip to content

Commit

Permalink
debug file
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaspijak committed Jun 21, 2023
1 parent fbd60ea commit 565884d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
src/debug.php
.idea
vendor
composer.lock
Expand Down
8 changes: 8 additions & 0 deletions src/debug.default.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php declare(strict_types=1);

/**
* @author Lukáš Piják 2023 TOPefekt s.r.o.
* @link https://www.bulkgate.com/
*/

const BulkGateDebugUrl = 'https://portal.bulkgate.com';
4 changes: 1 addition & 3 deletions woosms-sms-module-for-woocommerce-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
Woosms_Print_widget();

$logo = plugins_url('assets/icon.svg', __FILE__);
echo <<<CSS
echo <<<HTML
<style>
@keyframes logo {
0% {
Expand Down Expand Up @@ -87,8 +87,6 @@
box-sizing: border-box; /* realne se tyka pouze web-componenty */
}
</style>
CSS;
echo <<<HTML
<div id="bulkgate-plugin" style="--primary: #955a89; --secondary: #0094F0; --content: #f1f1f1;">
<gate-ecommerce-plugin>
Expand Down
7 changes: 5 additions & 2 deletions woosms-sms-module-for-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@
/**
* Init BulkGate DI container
*/
include_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/vendor/autoload.php';


!file_exists(__DIR__ . '/src/debug.php') ?: include_once __DIR__ . '/src/debug.php';

add_action('init', fn () => Factory::setup(fn () => [
'db' => $GLOBALS['wpdb'],
'debug' => WP_DEBUG,
'gate_url' => 'https://dev1.bulkgate.com',
'gate_url' => defined('BulkGateDebugUrl') ? BulkGateDebugUrl : 'https://portal.bulkgate.com',
'language' => substr(get_locale(), 0, 2) ?: 'en',
'country' => function_exists('wc_get_base_location') ? wc_get_base_location()['country'] ?? null : null,
'name' => html_entity_decode(get_option('blogname', 'WooSMS Store'), ENT_QUOTES),
Expand Down

0 comments on commit 565884d

Please sign in to comment.