wpdesk/wp-dhl-express-shipping-method

DHL Express Shipping Method

1.3.0 2022-07-07 13:01 UTC

This package is auto-updated.

Last update: 2024-12-07 18:40:32 UTC


README

pipeline status coverage report Latest Stable Version Total Downloads License

DHL Express Shipping Method

Allows to integrate WooCommerce shipping methods interface with DHL Express rates calculation mechanism and services.

This library uses the following:

Requirements

PHP 7.0 or later.

Installation via Composer

In order to install the bindings via Composer run the following command:

composer require wpdesk/wp-dhl-express-shipping-method

Example usage

<?php

...
	public function hooks() {
		add_filter( 'woocommerce_shipping_methods', array( $this, 'add_dhl_express_shipping_method' ) );
	}

	/**
	 * Adds shipping method to Woocommerce.
	 *
	 * @param array $methods Methods.
	 *
	 * @return array
	 */
	public function add_dhl_express_shipping_method( $methods ) {
		$methods['flexible_shipping_dhl_express'] = \WPDesk\WooCommerceShipping\DhlExpress\DhlExpressShippingMethod::class;

		return $methods;
	}

...