diff --git a/wp-content/themes/cosmopet/functions.php b/wp-content/themes/cosmopet/functions.php
index 5aba1cf..49caa1f 100644
--- a/wp-content/themes/cosmopet/functions.php
+++ b/wp-content/themes/cosmopet/functions.php
@@ -6,10 +6,10 @@ Timber\Timber::init();
// require once вместо include использовать!
-require_once __DIR__ . '/temp-functions/cart-logic.php';
require_once __DIR__ . '/temp-functions/timber-logic.php';
-require_once __DIR__ . '/temp-functions/woocommerce-logic.php';
require_once __DIR__ . '/temp-functions/modules-logic.php';
+require_once __DIR__ . '/temp-functions/cart-logic.php';
+require_once __DIR__ . '/temp-functions/woocommerce-logic.php';
require_once __DIR__ . '/temp-functions/ajax-logic.php';
require_once __DIR__ . '/temp-functions/shortcodes-logic.php';
require_once __DIR__ . '/temp-functions/blog-logic.php';
@@ -22,9 +22,4 @@ require_once __DIR__ . '/temp-functions/login-logic.php';
// include_module('profile');
// include_module('footer');
// include_module('author');
-// include_module('layout');
-
-
-
-
-
+// include_module('layout');
\ No newline at end of file
diff --git a/wp-content/themes/cosmopet/global-functions/multilang-functions.php b/wp-content/themes/cosmopet/global-functions/multilang-functions.php
index 27f112c..ae615e7 100644
--- a/wp-content/themes/cosmopet/global-functions/multilang-functions.php
+++ b/wp-content/themes/cosmopet/global-functions/multilang-functions.php
@@ -1,4 +1,7 @@
site_region
add_action('init', function() {
diff --git a/wp-content/themes/cosmopet/global-functions/multisite-functions.php b/wp-content/themes/cosmopet/global-functions/multisite-functions.php
index 153ffc2..7aaa7d3 100644
--- a/wp-content/themes/cosmopet/global-functions/multisite-functions.php
+++ b/wp-content/themes/cosmopet/global-functions/multisite-functions.php
@@ -1,6 +1,8 @@
site_mode = $config['mode'];
$this->site_region = $config['region'];
}
+
}
+
add_filter('timber/twig', function (\Twig\Environment $twig) {
- $site_env = new SiteEnvironment();
+ global $site_env;
+
$twig->addGlobal('site_region', $site_env->site_region);
$twig->addGlobal('site_mode', $site_env->site_mode);
$twig->addGlobal('header_scripts', get_field('header_scripts', 'option')); // со страницы "Общих настроек контента ACF"
@@ -82,67 +87,12 @@ function custom_canonical_url() {
}
}
-add_action('woocommerce_thankyou', 'send_purchase_to_metrika');
-function send_purchase_to_metrika($order_id) {
- if (!$order_id) return; // Проверка, что заказ существует
-
- $order = wc_get_order($order_id);
- if ($order->get_status() !== 'processing' && $order->get_status() !== 'completed') return; // Отправляем только для оплаченных заказов
-
- $items = [];
- foreach ($order->get_items() as $item) {
- $product = $item->get_product();
- $items[] = [
- 'id' => $product->get_id(),
- 'name' => $product->get_name(),
- 'price' => $product->get_price(),
- 'quantity' => $item->get_quantity()
- ];
- }
-
- // Получаем валюту заказа
- $currency = $order->get_currency();
- ?>
-
- site_mode == 'production' and $site_env->site_region == 'ae') {
+ /* Передача просто по url */
add_action('wp_footer', 'add_facebook_pixel_events');
function add_facebook_pixel_events() {
// 1. Событие AddToCart (Добавление в корзину)
@@ -185,7 +135,7 @@ if($site_env->site_mode == 'production' and $site_env->site_region == 'ae') {
});
});
});
-
+
site_mode == 'production' and $site_env->site_region == 'ae') {
get_status() !== 'processing' && $order->get_status() !== 'completed')
+ return; // Отправляем только для оплаченных заказов
+
+ $items = [];
+ foreach ($order->get_items() as $item) {
+ $product = $item->get_product();
+ $items[] = [
+ 'id' => $product->get_id(),
+ 'name' => $product->get_name(),
+ 'price' => $product->get_price(),
+ 'quantity' => $item->get_quantity()
+ ];
+ }
+
+ // Получаем валюту заказа
+ $currency = $order->get_currency();
+ ?>
+
+ ' . "\n";
- echo '' . "\n";
- }
-}
-
-
+});
\ No newline at end of file
diff --git a/wp-content/themes/cosmopet/modules/blog/components/author-banner/assets/css/style.css b/wp-content/themes/cosmopet/modules/blog/components/author-banner/assets/css/style.css
index 5ca3c76..f2765ef 100644
--- a/wp-content/themes/cosmopet/modules/blog/components/author-banner/assets/css/style.css
+++ b/wp-content/themes/cosmopet/modules/blog/components/author-banner/assets/css/style.css
@@ -13,6 +13,7 @@
align-items: center;
justify-content: space-between;
padding: 35px 42px 35px 209px;
+ gap: 20px;
position: relative;
box-shadow: 6px 9px 20px rgba(0, 0, 0, 15%);
}