Automattic\WooCommerce\Blocks\Payments
PaymentMethodRegistry::get_all_active_payment_method_script_dependencies()
Gets an array of all registered payment method script handles, but only for active payment methods.
Метод класса: PaymentMethodRegistry{}
Хуков нет.
Возвращает
Строку[]
.
Использование
$PaymentMethodRegistry = new PaymentMethodRegistry(); $PaymentMethodRegistry->get_all_active_payment_method_script_dependencies();
Код PaymentMethodRegistry::get_all_active_payment_method_script_dependencies() PaymentMethodRegistry::get all active payment method script dependencies WC 8.7.0
public function get_all_active_payment_method_script_dependencies() { $script_handles = []; $payment_methods = $this->get_all_active_registered(); foreach ( $payment_methods as $payment_method ) { $script_handles = array_merge( $script_handles, is_admin() ? $payment_method->get_payment_method_script_handles_for_admin() : $payment_method->get_payment_method_script_handles() ); } return array_unique( array_filter( $script_handles ) ); }