Automattic\WooCommerce\Internal\Admin\Settings

Payments::attach_payment_extension_suggestionpublicWC 1.0

Attach a payment extension suggestion.

This is only an internal recording of attachment. No actual extension installation or activation happens.

Method of the class: Payments{}

No Hooks.

Returns

true|false. True if the suggestion was successfully marked as attached, false otherwise.

Usage

$Payments = new Payments();
$Payments->attach_payment_extension_suggestion( $id ): bool;
$id(string) (required)
The ID of the payment extension suggestion to attach.

Payments::attach_payment_extension_suggestion() code WC 9.9.4

public function attach_payment_extension_suggestion( string $id ): bool {
	$result = $this->providers->attach_extension_suggestion( $id );

	if ( $result ) {
		// Record an event that the suggestion was attached.
		$this->record_event(
			'extension_suggestion_attached',
			array(
				'suggestion_id' => $id,
			)
		);
	}

	return $result;
}