wpdesk/wp-australia-post-shipping-method

1.2.0 2022-08-10 07:12 UTC

This package is auto-updated.

Last update: 2024-10-10 11:40:17 UTC


README

pipeline status coverage report Latest Stable Version Total Downloads License

Australia Post Shipping Method

Allows to integrate WooCommerce shipping methods interface with Australia Post 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-australia-post-shipping-method

Example usage

<?php

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

	/**
	 * Adds shipping method to Woocommerce.
	 *
	 * @param array $methods Methods.
	 *
	 * @return array
	 */
	public function add_australia_post_shipping_method( $methods ) {
		$methods['flexible_shipping_australia_post'] = \WPDesk\WooCommerceShipping\AustraliaPost\AustraliaPostShippingMethod::class;

		return $methods;
	}

...