Automattic\WooCommerce\Internal\Admin\Settings
PaymentsRestController::get_extension_suggestions
Get the payment extension suggestions (other) for the given location.
Метод класса: PaymentsRestController{}
Хуков нет.
Возвращает
Массив[]. The payment extension suggestions for the given location, excluding the ones part of the main providers list.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_extension_suggestions( $location ): array;
- $location(строка) (обязательный)
- The location for which the suggestions are being fetched.
Код PaymentsRestController::get_extension_suggestions() PaymentsRestController::get extension suggestions WC 10.5.0
private function get_extension_suggestions( string $location ): array {
// If the requesting user can't install plugins, we don't suggest any extensions.
if ( ! current_user_can( 'install_plugins' ) ) {
return array();
}
$suggestions = $this->payments->get_payment_extension_suggestions( $location );
return $suggestions['other'] ?? array();
}