Automattic\WooCommerce\Blocks\Shipping

PickupLocation::translate_meta_data()publicWC 1.0

Translates meta data for the shipping method.

Method of the class: PickupLocation{}

No Hooks.

Return

String.

Usage

$PickupLocation = new PickupLocation();
$PickupLocation->translate_meta_data( $label, $name, $product );
$label(string) (required)
Meta label.
$name(string) (required)
Meta key.
$product(mixed) (required)
Product if applicable.

PickupLocation::translate_meta_data() code WC 9.8.1

public function translate_meta_data( $label, $name, $product ) {
	if ( $product ) {
		return $label;
	}
	switch ( $name ) {
		case 'pickup_location':
			return __( 'Pickup location', 'woocommerce' );
		case 'pickup_address':
			return __( 'Pickup address', 'woocommerce' );
		case 'pickup_details':
			return __( 'Pickup details', 'woocommerce' );
	}
	return $label;
}