/**
* Plugin Name: MultiDrop Scheduler for WooCommerce
* Text Domain: multidrop-scheduler-for-woocommerce
* Domain Path: /languages
* Plugin URI: https://github.com/aimbrenda/woocommerce-pickup-manager
* Description: Manage multiple pickup locations with weekly schedules, date overrides, and advance booking limits
* Version: 3.1.1
* Author: Alessandro Imbrenda
* Text Domain: multidrop-scheduler-for-woocommerce
* Requires at least: 6.2
* Requires PHP: 7.4
* License: GPL v3 or later
* License URI: https://www.gnu.org/licenses/gpl-3.0.txt
* WC requires at least: 6.0
* WC tested up to: 9.0
*/
if (!defined('ABSPATH')) exit;
define('WC_MULTIDROP_SCHEDULER_VERSION', '3.1.1');
define('WC_MULTIDROP_SCHEDULER_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('WC_MULTIDROP_SCHEDULER_PLUGIN_URL', plugin_dir_url(__FILE__));
$wc_multidrop_scheduler_active_plugins = apply_filters(
'wc_multidrop_scheduler_active_plugins',
(array) get_option( 'wc_multidrop_scheduler_active_plugins', get_option( 'active_plugins', array() ) )
);
if ( ! in_array( 'woocommerce/woocommerce.php', $wc_multidrop_scheduler_active_plugins, true ) ) {
add_action( 'admin_notices', function () {
echo '
MultiDrop Scheduler for WooCommerce requires WooCommerce to be installed and active.
';
} );
return;
}
require_once WC_MULTIDROP_SCHEDULER_PLUGIN_DIR . 'includes/class-database.php';
require_once WC_MULTIDROP_SCHEDULER_PLUGIN_DIR . 'includes/class-admin.php';
require_once WC_MULTIDROP_SCHEDULER_PLUGIN_DIR . 'includes/class-checkout.php';
require_once WC_MULTIDROP_SCHEDULER_PLUGIN_DIR . 'includes/class-import-export.php';
require_once WC_MULTIDROP_SCHEDULER_PLUGIN_DIR . 'includes/class-email-notifications.php';
class WC_Multidrop_Scheduler {
private static $instance = null;
public static function get_instance() {
if (null === self::$instance) {
self::$instance = new self();
}
return self::$instance;
}
private function __construct() {
add_action('plugins_loaded', array($this, 'init'));
register_activation_hook(__FILE__, array($this, 'activate'));
}
public function init() {
WC_Multidrop_Scheduler_Database::get_instance();
WC_Multidrop_Scheduler_Database::create_tables();
if (is_admin()) {
WC_Multidrop_Scheduler_Admin::get_instance();
WC_Multidrop_Scheduler_Import_Export::get_instance();
}
WC_Multidrop_Scheduler_Checkout::get_instance();
WC_Multidrop_Scheduler_Email_Notifications::get_instance();
}
public function activate() {
WC_Multidrop_Scheduler_Database::create_tables();
update_option('wc_multidrop_scheduler_version', WC_MULTIDROP_SCHEDULER_VERSION);
}
}
function wc_multidrop_scheduler_maybe_upgrade() {
$stored_version = get_option('wc_multidrop_scheduler_version', '0.0.0');
if ($stored_version === WC_MULTIDROP_SCHEDULER_VERSION) {
return;
}
WC_Multidrop_Scheduler_Database::create_tables();
update_option('wc_multidrop_scheduler_version', WC_MULTIDROP_SCHEDULER_VERSION);
}
add_action('plugins_loaded', 'wc_multidrop_scheduler_maybe_upgrade', 1);
WC_Multidrop_Scheduler::get_instance();
function wc_multidrop_scheduler_show_pickup_on_thankyou( $order_id ) {
if ( ! $order_id ) {
return;
}
$fulfillment_type = get_post_meta( $order_id, '_fulfillment_type', true );
if ( 'delivery' === $fulfillment_type ) {
$delivery_note = get_post_meta( $order_id, '_delivery_note', true );
$processing_date = get_post_meta( $order_id, '_delivery_processing_date', true );
if ( ! $delivery_note && ! $processing_date ) {
return;
}
echo '';
echo '' . esc_html__( 'Delivery information', 'multidrop-scheduler-for-woocommerce' ) . '
';
if ( $delivery_note ) {
echo '' . esc_html( $delivery_note ) . '
';
}
if ( $processing_date ) {
try {
$date_obj = new DateTime( $processing_date );
$formatted_processing_date = date_i18n( get_option( 'date_format' ), $date_obj->getTimestamp() );
echo '' . esc_html__( 'Next possible delivery day:', 'multidrop-scheduler-for-woocommerce' ) . ' ' . esc_html( $formatted_processing_date ) . '
';
} catch ( Exception $e ) {
// Ignore malformed dates to avoid breaking thank-you rendering.
}
}
echo '';
return;
}
$name = get_post_meta( $order_id, '_pickup_location_name', true );
$address = get_post_meta( $order_id, '_pickup_location_address', true );
$date = get_post_meta( $order_id, '_pickup_date', true );
$map = get_post_meta( $order_id, '_pickup_location_map_link', true );
if ( ! $name || ! $date ) {
return;
}
$date_obj = new DateTime( $date );
$formatted_date = date_i18n( get_option( 'date_format' ), $date_obj->getTimestamp() );
echo '';
echo '' . esc_html__( 'Pickup information', 'multidrop-scheduler-for-woocommerce' ) . '
';
echo '' . esc_html__( 'Location:', 'multidrop-scheduler-for-woocommerce' ) . ' ' . esc_html( $name ) . '
';
if ( $address ) {
echo '' . esc_html__( 'Address:', 'multidrop-scheduler-for-woocommerce' ) . '
' . nl2br( esc_html( $address ) ) . '
';
}
echo '' . esc_html__( 'Pickup date:', 'multidrop-scheduler-for-woocommerce' ) . ' ' . esc_html( $formatted_date ) . '
';
if ( $map ) {
echo '' .
esc_html__( 'View on map', 'multidrop-scheduler-for-woocommerce' ) . '
';
}
echo '';
}
add_action( 'woocommerce_thankyou', 'wc_multidrop_scheduler_show_pickup_on_thankyou', 20 );
add_filter( 'gettext', 'wc_multidrop_scheduler_change_shipping_to_text_on_cart', 9999, 3 );
function wc_multidrop_scheduler_change_shipping_to_text_on_cart( $translated, $text, $domain ) {
// Only affect frontend & WooCommerce strings
if ( is_admin() || 'woocommerce' !== $domain ) {
return $translated;
}
// Only on cart ("winkelmand") page
if ( ! is_cart() ) {
return $translated;
}
if ( 'Shipping to %s.' === $text ) {
// Your custom message
$translated = esc_html__( 'Shipping to: next step.', 'multidrop-scheduler-for-woocommerce' );
}
return $translated;
}
https://glutenvrijewinkelamsterdam.nl/post-sitemap.xml
2024-07-29T14:18:22+00:00
https://glutenvrijewinkelamsterdam.nl/page-sitemap.xml
2026-06-03T13:37:34+00:00
https://glutenvrijewinkelamsterdam.nl/attachment-sitemap1.xml
2026-06-05T10:13:21+00:00
https://glutenvrijewinkelamsterdam.nl/attachment-sitemap2.xml
2026-06-04T14:40:14+00:00
https://glutenvrijewinkelamsterdam.nl/attachment-sitemap3.xml
2026-06-04T09:30:20+00:00
https://glutenvrijewinkelamsterdam.nl/attachment-sitemap4.xml
2026-06-04T09:30:17+00:00
https://glutenvrijewinkelamsterdam.nl/attachment-sitemap5.xml
2026-06-04T09:30:13+00:00
https://glutenvrijewinkelamsterdam.nl/product-sitemap.xml
2026-06-11T20:15:58+00:00
https://glutenvrijewinkelamsterdam.nl/hgr_testimonials-sitemap.xml
2014-04-15T08:30:50+00:00
https://glutenvrijewinkelamsterdam.nl/category-sitemap.xml
2024-07-29T14:18:22+00:00
https://glutenvrijewinkelamsterdam.nl/product_cat-sitemap.xml
2026-06-11T20:15:58+00:00