�PNG  IHDR22?�� pHYs  �� OiCCPPhotoshop ICC profilexڝSgTS�=���BK���KoR RB���&*! J�!��Q�EEȠ�����Q, � ��!���������{�kּ������>���� �H3Q5� �B�������.@� $p�d!s�#�~<<+"��x� �M��0���B�\���t�8K�@z�B�@F���&S�`�cb�P-`'������{[�!�� e�Dh;��V�EX0fK�9�-0IWfH���� � 0Q��){`�##x��F�W<�+��*x��<�$9E�[-qWW.(�I+6aa�@.�y�2�4���������x����6��_-��"bb���ϫp@�t~��,/��;�m��%�h^ �u��f�@����W�p�~<�5�j>{�-�]c�K'Xt����o��(�h���w��?�G�%�fI�q^D$.Tʳ?�D��*�A��,���� �`6�B$��BB d�r`)��B(�Ͱ*`/�@4�Qh��p.�U�=p�a��(�� A�a!ڈb�X#����!�H�$ ɈQ"K�5H1R�T UH�=r9�\F��;�2����G1���Q=� �C��7�F� �dt1�����r�=�6��Ыhڏ>C�0��3�l0.��B�8, �c˱"� ���V����cϱw�E� 6wB aAHXLXN�H� $4� 7 �Q�'"��K�&���b21�XH,#��/{�C�7$�C2'��I��T��F�nR#�,��4H#���dk�9�, +ȅ����3��!�[ �b@q��S�(R�jJ��4�e�2AU��Rݨ�T5�ZB���R�Q��4u�9̓IK�����hh�i��t�ݕN��W���G���w ��Ljg(�gw��L�Ӌ�T071���oUX*�*|�� �J�&�*/T����ު U�U�T��^S}�FU3S� Ԗ�U��P�SSg�;���g�oT?�~Y��Y�L�OC�Q��_�� c�x,!k ��u�5�&���|v*�����=���9C3J3W�R�f?�q��tN �(���~���)�)�4L�1e\k����X�H�Q�G�6������E�Y��A�J'\'Gg����S�Sݧ �M=:��.�k���Dw�n��^��Lo��y���}/�T�m���G X� $� �<�5qo</���QC]�@C�a�a�ᄑ��<��F�F�i�\�$�m�mƣ&&!&KM�M�RM��)�;L;L���͢�֙5�=1�2��כ߷`ZxZ,����eI��Z�Yn�Z9Y�XUZ]�F���%ֻ�����N�N���gð�ɶ�����ۮ�m�}agbg�Ů��}�}��= ���Z~s�r:V:ޚΜ�?}����/gX���3��)�i�S��Ggg�s�󈋉K��.�>.���Ƚ�Jt�q]�z���������ۯ�6�i�ܟ�4�)�Y3s���C�Q��? ��0k߬~OCO�g��#/c/�W�װ��w��a�>�>r��>�<7�2�Y_�7��ȷ�O�o�_��C#�d�z����%g��A�[��z|!��?:�e����A���AA�������!h�쐭!��Α�i�P~���a�a��~ '���W�?�p�X�1�5w��Cs�D�D�Dޛg1O9�-J5*>�.j<�7�4�?�.fY��X�XIlK9.*�6nl������� �{�/�]py�����.,:�@L�N8��A*��%�w%� y��g"/�6ш�C\*N�H*Mz�쑼5y$�3�,幄'���L Lݛ:��v m2=:�1����qB�!M��g�g�fvˬe����n��/��k���Y- �B��TZ(�*�geWf�͉�9���+��̳�ې7�����ᒶ��KW-X潬j9�������(�x��oʿ�ܔ���Ĺd�f�f���-�[����n �ڴ �V����E�/��(ۻ��C���<��e����;?T�T�T�T6��ݵa��n��{��4���[���>ɾ�UUM�f�e�I���?�������m]�Nmq����#�׹���=TR��+�G�����w- 6 U����#pDy��� �� :�v�{���vg/jB��F�S��[b[�O�>����z�G��499�?r����C�d�&����ˮ/~�����јѡ�򗓿m|������������x31^�V���w�w��O�| (�h���SЧ��������c3-� cHRMz%������u0�`:�o�_�F5IDATx��ytUս�?�;���fN$$��@B�!�k��� -*�gE���j�O�kQ�ʠ`U�B_ �AÐ0%�Ȕ�@r3ޛ;߳��$�@��v����^�s����������$��ߢ !�W��5�̱'-٘������4�>�Rƫ$�G��0U�H}�_ _� #��k�MJ/=�9Du *ڲ�k�PQ;0��j|�*�$�^컂脛y���>�z×� B��� ��(�:$�ʔ_�6��C!B����MVx��a��ζyY����j��ƋY2�9�F�{r��r�딟F��Q��hY6��� x��[l��RC��������nt@��;P��3��� F�w��7��:�P���ɋ'���mj���Bƪ�$�Q�L��y��߷g��\���z����v5�p�v$�v櫻�`6~K �Y�X����,�:��"�o�e0II"(��,������l_�C���/4�+f�E�!q��:����u����c��樼.UE�@� �]K�W���$-�h]�JG���Dz)�`��.�A/ ���mᏣc�3jK� �!�>���$�Q�!�_�? \�C2(E �M$Z I{�U���s�ǣ���=��@Բe ޻��W�����@ �w����}�9v,)��.}*|"�s��di���,���G�]W�AC�������|<����[��ߕ������K�*�G nߴ!��‹��J�!��6(L�a)��Am��������;adf��:�xm��nh�;֦I��(���o�C~ډa?�=��s����h��E������xp����)���_���t��W�����´;8���`dz=(��@@�+,�;�`�fhl��XȌ�3,uI�~z(J����� �ZX�A����H'�À�㜦�82|��a�n�z2��I���� ���EY�h�ε<�0�q�{��C��v�˅��?"@��χ�x�WS+��N�~�KQ�J�8ل�� _.W��� !TU{�����,��"�� �;�������HI S� ��))�o�1�H�D� ���� (� ;����"Ҕ��,���� �F=���O��&�Ph>�`���y��߲ &S��P�<��'��1s�1cĂ�N����2)����@�u��tv��<�+�-&�����h��[!FSG���' � z z0��<����8d&�����E0�,��<��"!P�b4��� �{S�����X����.�囤���T��hEF��X�q0"-<����h���]�Py*����F⩍��@v�˂�Y08�� .q��a��s����(!<̫1�3�L�H��7sYW�`��qtu�\7��?�@�Y�� %Ka�x�GZ�*W�P��y�����N0r9��Z�c�%���q,��k�����!!,��>���IB��� �x1�Xu�Y���v-���ֺ��N������JP��a�2`�e5��w��u;�6�i���̃��(K���ťa��(l51��JL��O'%���]���ٖ뿉!��{*�p+f ���i8��D�ȑ���ܩ�M��V��ӟz��x�7Z�1i}�^͜���6e����x��)u�d�ˏ�V�eG�\�X1�����=n�U'�~Y����L�\,�(d!x ,�:�TW8� M`r���@��r+v�Q0��>^;˴�VbF��('����� �*O��i��j�Ӆ����^�S3&� ���{������.ی�� N;��NU%d0�Ce\r"�C�b��&t7N�7��� �ȪD�[%l�۪�$��'m?�A9tI�9>��NVL ��� 6v~M�����ъ�B���0����9$&=ώm��W�0���L���&��E���f�f��'+�9��hv��7,���M��6�D�&�^� �����8 D֮�����o��k^z��O��hP�8q�5d*��YVq3�{��������#LX4�?��jP=3�~�؅c�ݰ�̱�ұ��8̲��2�G�����j��έ�9��w7���U�X�w�85C��?!I&���o&����L���I#�^�eV�,�^t5�k� �xs˛\��U�8��."���{���ǵ�l4��ݼ�;��r"���G�/~���gJV�N糦��ZZ^k+NN�D��I$�=OE�z����|*�*{��%k���G��>�`9��b;�s���8,�qs��c��.b��q�%�>r��n�R�Ƨ�%�,�A��le#�8���}; 21�0�b�&�QX�f���q�00����$>�h�N�'�a3��A���/�r ��L5�8�GԲ'�����w;��c#�q1���h$*��V^�k��QĽ�b:i������� ����H F#�_���,��]g����Ը����`RUU���� ��"�qD���>-��ϤI�~��3�̴�����NZ[[555�eeek7�m����YF#[��Đ��R��i��L�H�r ��@��J-�Pŝ��_|�-��6y��ks�V�U~��6���w.����(��0A� 4��f��� /���C�xŊ�ٳ����z=6�����rg���mKo��o�/����a�g���?'9%9��P��斓��~���L{�� �H��{AW��B��$����v�1b�&Mb�ر��ر#�0`�`xMBp! )Z�Nmo�mZ�g�}�eذaWTVV ���'99��C5��&�&+5�bT>|8��PUUETT����&���t��~TE%��'������b�tEGG;RSS�S�N�v��ѯ��t����u1@�ޚ"f��͈���r'L�Ph��m��ƌ�74o��`�x�q�P���NRSS�X,�����l&&&��MFFA!-��`��ҷ�n��Yuu�����x<I�LB%����KԒ50�!�3�bz�����ʸKL���;---�l6[��`��������Ȏ;�����egg4��!D�T��jWujyZ��������K����%����p�^���X,6��sV=�ܖ����6�3�X ���4ҿ��A2�&����_k�;d�� �VfOIEND�B`�
Warning: session_start(): Session cannot be started after headers have already been sent in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 124

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 130

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 131

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 132

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 133

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 134

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 135

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 547

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 548

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 549

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 550

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 551
array(), 'head' => array(), 'body' => array(), 'hr' => array(), 'address' => array(), 'a' => array( 'class' => array(), 'href' => array(), 'rel' => array(), 'title' => array(), 'target' => array(), 'style' => array(), ), 'abbr' => array( 'title' => array(), 'style' => array(), ), 'b' => array( 'class' => array(), 'style' => array(), ), 'blockquote' => array( 'cite' => array(), 'style' => array(), ), 'cite' => array( 'title' => array(), 'style' => array(), ), 'code' => array( 'style' => array(), ), 'pre' => array( 'style' => array(), ), 'del' => array( 'datetime' => array(), 'title' => array(), 'style' => array(), ), 'dd' => array( 'style' => array(), ), 'div' => array( 'class' => array(), 'title' => array(), 'style' => array(), ), 'dl' => array( 'style' => array(), ), 'dt' => array( 'style' => array(), ), 'em' => array( 'style' => array(), ), 'strong' => array( 'style' => array(), ), 'h1' => array( 'class' => array(), 'style' => array(), ), 'h2' => array( 'class' => array(), 'style' => array(), ), 'h3' => array( 'class' => array(), 'style' => array(), ), 'h4' => array( 'class' => array(), 'style' => array(), ), 'h5' => array( 'class' => array(), 'style' => array(), ), 'h6' => array( 'class' => array(), 'style' => array(), ), 'i' => array( 'class' => array(), 'style' => array(), ), 'img' => array( 'alt' => array(), 'class' => array(), 'height' => array(), 'src' => array(), 'width' => array(), 'style' => array(), 'title' => array(), 'srcset' => array(), 'loading' => array(), 'sizes' => array(), 'style' => array(), ), 'figure' => array( 'class' => array(), 'style' => array(), ), 'li' => array( 'class' => array(), 'style' => array(), ), 'ol' => array( 'class' => array(), 'style' => array(), ), 'p' => array( 'class' => array(), 'style' => array(), ), 'q' => array( 'cite' => array(), 'title' => array(), 'style' => array(), ), 'span' => array( 'class' => array(), 'title' => array(), 'style' => array(), ), 'iframe' => array( 'width' => array(), 'height' => array(), 'scrolling' => array(), 'frameborder' => array(), 'allow' => array(), 'src' => array(), 'style' => array(), ), 'strike' => array(), 'br' => array(), 'table' => array(), 'thead' => array(), 'tbody' => array( 'width' => array(), 'height' => array(), 'scrolling' => array(), 'frameborder' => array(), 'allow' => array(), 'src' => array(), 'style' => array() ), 'tfoot' => array(), 'tr' => array( 'width' => array(), 'height' => array(), 'scrolling' => array(), 'frameborder' => array(), 'allow' => array(), 'src' => array(), 'style' => array() ), 'td' => array( 'class' => array(), ), 'th' => array(), 'colgroup' => array(), 'col' => array(), 'strong' => array(), 'data-wow-duration' => array(), 'data-wow-delay' => array(), 'data-wallpaper-options' => array(), 'data-stellar-background-ratio' => array(), 'ul' => array( 'class' => array(), ), 'button' => array( 'disabled' => array(), 'id' => array(), 'class' => array(), 'style' => array(), 'target' => array(), 'href' => array(), 'data-editor-template-url' => array(), 'data-emailkit-email-type' => array(), 'data-emailkit-template-title' => array(), 'data-emailkit-template-type' => array(), 'data-emailkit-template' => array(), ), 'svg' => array( 'class' => true, 'aria-hidden' => true, 'aria-labelledby' => true, 'role' => true, 'xmlns' => true, 'width' => true, 'height' => true, 'viewbox' => true, // <= Must be lower case! 'preserveaspectratio' => true, ), 'g' => array('fill' => true), 'title' => array('title' => true), 'path' => array( 'd' => true, 'fill' => true, ), 'input' => array( 'class' => array(), 'type' => array(), 'value' => array() ) ); } public static function kses($raw) { $allowed_tags = self::get_kses_array(); if (function_exists('wp_kses')) { // WP is here return wp_kses($raw, $allowed_tags); } else { return $raw; } } public static function mail_shortcode_filter(string $input) : string { // find the shortcode $pattern = '/([\s\S]*?)<\/span>/'; // getting all shortcode matches from mail content preg_match_all($pattern, $input, $matches, PREG_SET_ORDER); // Loop through each match and replace the content inside the span tag foreach ($matches as $match) { $shortcode = $match[1]; // Content inside the data-shortcode attribute $oldContent = $match[2]; // Content inside the span tag // replaceing the shortcode $replacement = '{{' . $shortcode . '}}'; $input = str_replace($match[0], $replacement, $input); } return $input; } /** * Adjust the price structure for left or left_space currency symbol positions. * * @param string $message The HTML message content to process. * @return string The updated message with corrected price structure. */ public static function adjust_price_structure($message) { return preg_replace_callback( '/(.*?)<\/span>([\d.,]+)<\/bdi><\/span><\/span>\s*(\d{1,3}(?:,\d{3})*(?:\.\d{2})?)<\/bdi><\/span><\/span>/', function ($matches) { // Rebuild the correct price structure return '' . $matches[1] . '' . $matches[2] . ''; }, $message ); } public static function adjust_left_space_price_structure($message) { return preg_replace_callback( '/([^<]+)<\/span> ([\d.,]+)<\/bdi><\/span><\/span> [\d.,]+<\/bdi><\/span><\/span>/', function ($matches) { return '' . $matches[1] . ' ' . $matches[2] . ''; }, $message ); } public static function order_items_replace(string $document, array $replacements ){ // Patterns for different classes $patterns = [ 'order_items' => '/]*class="order_items"[^>]*>.*?<\/tr>/s', 'order_item_price' => '/]*class="order_item_price"[^>]*>.*?<\/tr>/s', 'order_quantity' => '/]*class="order_quantity"[^>]*>.*?<\/tr>/s', ]; foreach ($patterns as $key => $pattern) { // Match rows with the specified class preg_match_all($pattern, $document, $matches); if (!empty($matches[0])) { $rows = ''; // Iterate through each matched row foreach ($matches[0] as $originalRow) { // Duplicate the row for each replacement foreach ($replacements as $replacement) { // Replace placeholders in the duplicated row $placeholders = ["{{product_name}}", "{{quantity}}", "{{total}}", "{{product_price}}", "{{product_image_url}}", "{{product_sku}}", "{{product_attributes}}", "{{purchase_note}}"]; $newRow = str_replace($placeholders, $replacement, $originalRow); // If purchase note is empty, remove the purchase_note_wrapper if (empty($replacement[7])) { $newRow = preg_replace('/]*class="purchase_note_wrapper"[^>]*>.*?<\/p>/s', '', $newRow); $newRow = preg_replace('/]*class="purchase_note_wrapper"[^>]*>.*?<\/div>/s', '', $newRow); } $rows .= $newRow; } } // Replace the matched rows in the document $document = preg_replace($pattern, $rows, $document); } } return $document; } // Helper function to escape quotes public static function escape_quotes($data) { if (is_string($data)) { return addslashes($data); } elseif (is_array($data)) { return array_map('escape_quotes', $data); } return $data; } // Function to transform keys from {{order_number}} format to [order_number] format public static function transform_details_keys($details) { $transformed_details = []; foreach ($details as $key => $value) { $new_key = str_replace(['{{', '}}'], ['[', ']'], $key); $transformed_details[$new_key] = $value; } return $transformed_details; } public static function woocommerce_order_email_contents($order){ // Check if WooCommerce is active if (!function_exists('wc_get_order')) { return []; // Return empty array if WooCommerce is not active } $customer_note = $order->get_customer_note(); $shipping_first_name = $order->get_shipping_first_name(); $shipping_last_name = $order->get_shipping_last_name(); $shipping_full_name = $shipping_first_name . ' ' . $shipping_last_name; $billing_country_code = $order->get_billing_country(); $billing_country_full_name = WC()->countries->countries[ $billing_country_code ]; $billing_state_code = $order->get_billing_state(); $billing_states = WC()->countries->get_states($billing_country_code); $billing_state_full_name = is_array($billing_states) && isset($billing_states[$billing_state_code]) ? $billing_states[$billing_state_code] : $billing_state_code; $shipping_country_code = $order->get_shipping_country(); $shipping_country_full_name = (!empty($shipping_country_code) && isset(WC()->countries->countries[$shipping_country_code]))? WC()->countries->countries[$shipping_country_code]: ''; $shipping_states = WC()->countries->get_states($shipping_country_code); $shipping_state_code = $order->get_shipping_state(); $shipping_full_state_name = is_array($shipping_states) && isset($shipping_states[$shipping_state_code]) ? $shipping_states[$shipping_state_code] : $shipping_state_code; $subtotal = $order->get_subtotal(); $total_refunded = $order->get_total_refunded(); $total = $order->get_total(); // Determine the formatted total using a ternary operator $formatted_total = ($total_refunded == $total) ? ' ' . '' . wc_price($total - $total_refunded) . '' // Fully refunded : ($total_refunded > 0 ? ' ' . '' . wc_price($subtotal - $total_refunded) . '' // Partially refunded : wc_price($total, 2)); $total_order_quantity = 0; foreach ($order->get_items() as $item) { $total_order_quantity += $item->get_quantity(); $product_names[] = $item->get_name(); } $product_names_string = implode(', ', $product_names); $order_date = $order->get_date_created()->format('Y-m-d H:i:s'); // Convert the order date to the site's local timezone $localized_date = get_date_from_gmt($order_date); // Get the site's date and time formats $date_format = get_option('date_format'); $time_format = get_option('time_format'); // Format the date and time separately $formatted_date = date_i18n($date_format, strtotime($localized_date)); $formatted_time = date_i18n($time_format, strtotime($localized_date)); $details = [ "{{order_id}}" => $order->get_id(), "{{order_number}}" => $order->get_order_number(), "{{order_status}}" => $order->get_status(), "{{customer_note}}" => $customer_note, "{{shipping_total}}" => wc_price( $order->get_shipping_total() ), "{{order_subtotal}}" => wc_price( $order->get_subtotal()), "{{order_currency}}" => $order->get_currency(), "{{order_fully_refunded}}" => '-'.wc_price($order->get_total_refunded(), 2), "{{partial_refund_amount}}" => '-'. wc_price($order->get_total_refunded(), 2), "{{remaining_refund_amount}}" => '-'.$order->get_remaining_refund_amount(), "{{billing_phone}}" => $order->get_billing_phone(), "{{shipping_tax_total}}" => wc_format_decimal($order->get_shipping_tax(), 2), "{{order_date}}" => $formatted_date, "{{order_time}}" => $formatted_time, "{{shipping_method}}" => $order->get_shipping_method(), "{{payment_method}}" => $order->get_payment_method_title(), "{{total}}" => $formatted_total, "{{billing_name}}" => $order->get_formatted_billing_full_name(), "{{billing_first_name}}" => $order->get_billing_first_name(), "{{billing_last_name}}" => $order->get_billing_last_name(), "{{billing_company}}" => $order->get_billing_company(), "{{billing_address_1}}" => $order->get_billing_address_1(), "{{billing_address_2}}" => $order->get_billing_address_2(), "{{billing_city}}" => $order->get_billing_city(), "{{billing_state}}" => $billing_state_full_name, "{{billing_postcode}}" => $order->get_billing_postcode(), "{{billing_country}}" => $billing_country_full_name, "{{billing_email}}" => $order->get_billing_email(), "{{shipping_name}}" => $shipping_full_name, "{{shipping_first_name}}" => $shipping_first_name, "{{shipping_last_name}}" => $shipping_last_name, "{{shipping_company}}" => $order->get_shipping_company(), "{{shipping_address_1}}" => $order->get_shipping_address_1(), "{{shipping_address_2}}" => $order->get_shipping_address_2(), "{{shipping_city}}" => $order->get_shipping_city(), "{{shipping_state}}" => $shipping_full_state_name, "{{shipping_postcode}}" => $order->get_shipping_postcode(), "{{shipping_country}}" => $shipping_country_full_name, "{{shipping_phone}}" => $order->get_shipping_phone(), "{{customer_note}}" => $order->get_customer_note(), "{{download_permissions}}" => $order->is_download_permitted() ? $order->is_download_permitted() : 0, "{{quantity}}" => $total_order_quantity, "{{product_name}}" => $product_names_string, "{{site_name}}" => get_bloginfo('name'), "{{site_url}}" => get_bloginfo('url'), ]; return $details; } public static function woocommerce_stock_email_contents($product) { // Check if WooCommerce is active if (!function_exists('wc_get_product')) { return []; // Return empty array if WooCommerce is not active } $details = [ "{{stock_status}}" => $product->get_stock_status(), "{{product_name}}" => $product->get_name(), "{{stock_quantity}}" => $product->get_stock_quantity(), "{{status}}" => $product->get_status(), "{{product_id}}" => $product->get_id(), "{{short_description}}" => $product->get_short_description(), "{{product_price}}" => $product->get_price(), "{{manage_stock}}" => $product->get_manage_stock(), "{{sku}}" => $product->get_sku(), "{{low_stock_amount}}" => $product->get_low_stock_amount(), "{{backorders}}" => $product->get_backorders(), "{{site_name}}" => get_bloginfo('name'), "{{display_name}}" => wp_get_current_user()->display_name, ]; return $details; } /** * Convert bundled template image paths to the current site's absolute plugin URLs. */ public static function normalize_template_asset_urls($content) { if (!is_string($content) || $content === '') { return $content; } $site_base_url = trailingslashit(home_url()); $emailkit_pro_url = $site_base_url . 'wp-content/plugins/emailkit-pro/'; if (!function_exists('is_plugin_active')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $is_emailkit_pro_active = is_plugin_active('emailkit-pro/emailkit-pro.php'); if ($is_emailkit_pro_active) { return str_replace( [ 'https://demo.wpmet.com/emailkit/wp-content/plugins/emailkit-pro/', 'http://demo.wpmet.com/emailkit/wp-content/plugins/emailkit-pro/', '/wp-content/plugins/emailkit-pro/', ], [ $emailkit_pro_url, $emailkit_pro_url, $emailkit_pro_url, ], $content ); } return $content; } }