Automattic\WooCommerce\Internal\Fulfillments\Providers

EimskipShippingProvider{}WC 1.0└─ AbstractShippingProvider

Eimskip Shipping Provider class.

No Hooks.

Usage

$EimskipShippingProvider = new EimskipShippingProvider();
// use class methods

Methods

  1. public get_icon()
  2. public get_key()
  3. public get_name()
  4. public get_tracking_url( string $tracking_number )

EimskipShippingProvider{} code WC 10.3.3

class EimskipShippingProvider extends AbstractShippingProvider {
	/**
	 * Get the key of the shipping provider.
	 *
	 * @return string
	 */
	public function get_key(): string {
		return 'eimskip';
	}

	/**
	 * Get the name of the shipping provider.
	 *
	 * @return string
	 */
	public function get_name(): string {
		return 'Eimskip';
	}

	/**
	 * Get the icon of the shipping provider.
	 *
	 * @return string
	 */
	public function get_icon(): string {
		return esc_url( WC()->plugin_url() ) . '/assets/images/shipping_providers/eimskip.png';
	}

	/**
	 * Get the tracking URL for a given tracking number.
	 *
	 * @param string $tracking_number The tracking number.
	 * @return string The tracking URL.
	 */
	public function get_tracking_url( string $tracking_number ): string {
		return 'https://www.eimskip.is/track/' . $tracking_number;
	}
}