Automattic\WooCommerce\Internal\Admin\Settings

PaymentsProviders::get_extension_suggestion_by_idpublicWC 1.0

Get a payment extension suggestion by ID.

Method of the class: PaymentsProviders{}

No Hooks.

Returns

?Array. The payment extension suggestion details, or null if not found.

Usage

$PaymentsProviders = new PaymentsProviders();
$PaymentsProviders->get_extension_suggestion_by_id( $id ): ?array;
$id(string) (required)
The ID of the payment extension suggestion.

PaymentsProviders::get_extension_suggestion_by_id() code WC 10.7.0

public function get_extension_suggestion_by_id( string $id ): ?array {
	$suggestion = $this->extension_suggestions->get_by_id( $id );
	if ( ! is_null( $suggestion ) ) {
		// Enhance the suggestion details.
		$suggestion = $this->enhance_extension_suggestion( $suggestion );
	}

	return $suggestion;
}