/* PUBLIC API FINAL SYNC WITH LOGGING */ function send_stock_update_to_public_dodonipbl($product_id) { $product = wc_get_product($product_id); if (!$product) return; $ean = get_post_meta($product_id, 'isbn-13', true); if (empty($ean)) { $ean = $product->get_sku(); } $ean = preg_replace('/[^0-9]/', '', $ean); if (empty($ean)) return; $is_available = $product->is_in_stock(); $avail_text = $is_available ? 'True' : 'False'; $response = wp_remote_post('https://marketplace-external-api.public.gr/api/v1/offers/update-price-stock', array( 'headers' => array( 'Content-Type' => 'application/json', 'Authorization' => 'Bearer 0d32f506-896f-40e3-9831-29007e056d62', ), 'body' => json_encode(array(array( 'materialEan' => $ean, 'supplierId' => 'DODONIPBL', 'price' => (float)$product->get_price(), 'promiseDays' => 1, 'available' => $is_available ))), 'timeout' => 15, )); // ΑΥΤΟ ΘΑ ΓΡΑΦΕΙ ΣΤΟ LOG ΓΙΑ ΝΑ ΤΟ ΒΛΕΠΕΙΣ $log_file = WP_CONTENT_DIR . '/public-stock-sync.log'; $status = is_wp_error($response) ? 'ERR' : wp_remote_retrieve_response_code($response); $log_entry = "[" . date('Y-m-d H:i:s') . "] NEW SYNC: EAN $ean | Avail $avail_text | Status $status\n"; file_put_contents($log_file, $log_entry, FILE_APPEND); } add_action('admin_init', function() { if (isset($_GET['run_public_bulk_sync']) && $_GET['run_public_bulk_sync'] == '1') { $offset = isset($_GET['offset']) ? intval($_GET['offset']) : 0; $args = array( 'post_type' => 'product', 'posts_per_page' => 10, 'offset' => $offset, 'post_status' => 'publish', 'meta_query' => array( 'relation' => 'OR', array('key' => 'publisher', 'value' => '', 'compare' => '='), array('key' => 'publisher', 'compare' => 'NOT EXISTS') ) ); $products = get_posts($args); if (empty($products)) { wp_die("

✅ ΟΛΟΚΛΗΡΩΘΗΚΕ ΕΠΙΤΥΧΩΣ!

"); } foreach ($products as $p) { send_stock_update_to_public_dodonipbl($p->ID); } $next_offset = $offset + 10; $redirect_url = admin_url('?run_public_bulk_sync=1&offset=' . $next_offset); echo "

Συγχρονισμός σε εξέλιξη... ($offset)

Ελέγξτε το log αρχείο για επιβεβαίωση.

"; exit; } }); XML Sitemap

XML Sitemap Index

This XML sitemap is used by search engines which follow the XML sitemap standard. This file contains links to sub-sitemaps, follow them to see the actual sitemap content.

This file was dynamically generated using the WordPress content management system and XML Sitemap Generator for Google by Auctollo.

URL of sub-sitemapLast modified (GMT)
https://dodonipublications.gr/sitemap-misc.html2026-05-14T12:25:35+00:00
https://dodonipublications.gr/pwb-brand-sitemap.html2026-05-14T12:25:35+00:00
https://dodonipublications.gr/producttags-sitemap.html2026-05-14T12:25:35+00:00
https://dodonipublications.gr/productcat-sitemap.html2026-05-14T12:25:35+00:00
https://dodonipublications.gr/product-sitemap.html2026-05-14T11:15:51+00:00
https://dodonipublications.gr/product-sitemap2.html2026-05-14T11:15:51+00:00
https://dodonipublications.gr/product-sitemap3.html2026-05-14T11:15:51+00:00
https://dodonipublications.gr/product-sitemap4.html2026-05-14T11:15:51+00:00
https://dodonipublications.gr/product-sitemap5.html2026-05-14T11:15:51+00:00
https://dodonipublications.gr/product-sitemap6.html2026-05-14T11:15:51+00:00
https://dodonipublications.gr/product-sitemap7.html2026-05-14T11:15:51+00:00
https://dodonipublications.gr/product-sitemap8.html2026-05-14T11:15:51+00:00
https://dodonipublications.gr/product-sitemap9.html2026-05-14T11:15:51+00:00
https://dodonipublications.gr/writers-sitemap.html2026-05-14T12:25:35+00:00
https://dodonipublications.gr/writers-sitemap2.html2026-05-14T12:25:35+00:00
https://dodonipublications.gr/writers-sitemap3.html2026-05-14T12:25:35+00:00
https://dodonipublications.gr/writers-sitemap4.html2026-05-14T12:25:35+00:00
https://dodonipublications.gr/writers-sitemap5.html2026-05-14T12:25:35+00:00
https://dodonipublications.gr/writers-sitemap6.html2026-05-14T12:25:35+00:00
https://dodonipublications.gr/writers-sitemap7.html2026-05-14T12:25:35+00:00
https://dodonipublications.gr/writers-sitemap8.html2026-05-14T12:25:35+00:00
https://dodonipublications.gr/writers-sitemap9.html2026-05-14T12:25:35+00:00
https://dodonipublications.gr/post-sitemap.html2026-03-17T16:27:51+00:00
https://dodonipublications.gr/page-sitemap.html2026-04-02T15:20:34+00:00