Automattic\WooCommerce\EmailEditor\Integrations\Core\Renderer\Blocks

Social_Links::get_service_png_pathpublicWC 1.0

Gets the service PNG path.

Method of the class: Social_Links{}

No Hooks.

Returns

String. The service PNG path.

Usage

$Social_Links = new Social_Links();
$Social_Links->get_service_png_path( $service, $image_type );
$service(string) (required)
The service name.
$image_type(string)
The image type. e.g 'white', 'brand'.
Default: 'white'

Social_Links::get_service_png_path() code WC 10.5.0

public function get_service_png_path( $service, $image_type = 'white' ) {
	if ( empty( $service ) ) {
		return '';
	}

	$image_type = empty( $image_type ) ? 'white' : $image_type;
	$file_name  = "/icons/{$service}/{$service}-{$image_type}.png";
	return __DIR__ . $file_name;
}