PluginProbe
ووسلام – همگام سازی ووکامرس و باسلام / 1.10.19
ووسلام – همگام سازی ووکامرس و باسلام v1.10.19
1.10.19 1.10.20 1.10.18 1.10.17 1.10.15 1.10.14 1.10.13 1.10.12 1.10.10 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.2 1.9.1 1.9.0 1.8.8 1.8.5 1.8.6 All 53 releases
sync-basalam / templates / notifications / DuplicateConnectionAlert.php

DuplicateConnectionAlert.php in ووسلام – همگام سازی ووکامرس و باسلام 1.10.19, at templates/notifications/DuplicateConnectionAlert.php

83 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 defined('ABSPATH') || exit;
4
5 use SyncBasalam\Services\Products\DuplicateConnectionReport;
6
7 $syncBasalamDuplicateReport = DuplicateConnectionReport::all();
8
9 if (!$syncBasalamDuplicateReport) return;
10
11 echo '<div class="notice notice-warning basalam-p" style="text-align:right;">';
12 echo '<p><strong>ووسلا�
13 : چند �
14 حصول ووکا�
15 رس به یک �
16 حصول باسلا�
17
18 تصل بودند.</strong></p>';
19 echo '<p>این حالت �
20 ع�
21 ولا بعد از کپی گرفتن از یک �
22 حصول پیش �
23 ی‌آید؛ در این وضعیت بروزرسانی �
24 حصول کپی شده، �
25 حصول اصلی را در باسلا�
26 تغییر �
27 ی‌دهد (برگشتن قی�
28 ت قدی�
29 ی یا �
30 وجود شدن دوباره �
31 حصول نا�
32 وجود).</p>';
33 echo '<ul style="list-style:disc;padding-right:20px;">';
34
35 foreach ($syncBasalamDuplicateReport as $syncBasalamReportItem) {
36 $syncBasalamProductLinks = [];
37
38 foreach ($syncBasalamReportItem['product_ids'] as $syncBasalamProductId) {
39 $syncBasalamProductLinks[] = sprintf(
40 '<a href="%s" target="_blank">%s (#%d)</a>',
41 esc_url(get_edit_post_link($syncBasalamProductId) ?: ''),
42 esc_html(get_the_title($syncBasalamProductId) ?: '�
43 حصول حذف شده'),
44 (int) $syncBasalamProductId
45 );
46 }
47
48 if ($syncBasalamReportItem['type'] === 'repaired') {
49 $syncBasalamMessage = sprintf(
50 'اتصال �
51 حصول‌های %s قطع شد و فقط اتصال �
52 حصول #%d حفظ شد. اگر �
53 حصول اشتباهی حفظ شده است، از باکس «تنظی�
54 ات باسلا�
55 » در صفحه ویرایش �
56 حصول دوباره اتصال را برقرار کنید.',
57 implode('، ', $syncBasalamProductLinks),
58 (int) $syncBasalamReportItem['kept']
59 );
60 } else {
61 $syncBasalamMessage = sprintf(
62 '�
63 حصول‌های %s اتصال �
64 شترک دارند و ه�
65 گا�
66 ‌سازی آن‌ها تا اصلاح اتصال �
67 توقف شده است. لطفا در صفحه ویرایش �
68 حصول کپی شده، دک�
69 ه «قطع اتصال �
70 حصول» را بزنید.',
71 implode('، ', $syncBasalamProductLinks)
72 );
73 }
74
75 echo '<li>' . wp_kses($syncBasalamMessage, ['a' => ['href' => [], 'target' => []]]) . '</li>';
76 }
77
78 echo '</ul>';
79 echo '<p><a class="button" href="' . esc_url(DuplicateConnectionReport::dismissUrl()) . '">�
80 توجه شد�
81 </a></p>';
82 echo '</div>';
83