wpdesk/wp-ups-shipping-method

UPS Shipping Method


README

pipeline status coverage report Latest Stable Version Total Downloads License

UPS Shipping Method

Allows to integrate WooCommerce shipping methods interface with UPS 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-ups-shipping-method

Example usage

<?php

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

	/**
	 * Adds shipping method to Woocommerce.
	 *
	 * @param array $methods Methods.
	 *
	 * @return array
	 */
	public function add_ups_shipping_method( $methods ) {
		$methods['flexible_shipping_ups'] = \WPDesk\WooCommerceShipping\Ups\UpsShippingMethod::class;

		return $methods;
	}

...