WC_Gateway_Paypal::admin_scripts
Load admin scripts.
Method of the class: WC_Gateway_Paypal{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Gateway_Paypal = new WC_Gateway_Paypal(); $WC_Gateway_Paypal->admin_scripts();
Changelog
| Since 3.3.0 | Introduced. |
WC_Gateway_Paypal::admin_scripts() WC Gateway Paypal::admin scripts code WC 10.8.1
public function admin_scripts() {
$screen = get_current_screen();
$screen_id = $screen ? $screen->id : '';
if ( 'woocommerce_page_wc-settings' !== $screen_id ) {
return;
}
$suffix = Constants::is_true( 'SCRIPT_DEBUG' ) ? '' : '.min';
$version = Constants::get_constant( 'WC_VERSION' );
wp_enqueue_script( 'woocommerce_paypal_admin', WC()->plugin_url() . '/includes/gateways/paypal/assets/js/paypal-admin' . $suffix . '.js', array(), $version, true );
}