Server IP : 162.0.217.223 / Your IP : 216.73.216.168 Web Server : LiteSpeed System : Linux premium269.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : mypckeys ( 1539) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/mypckeys/www/wp-content/plugins/woo-stripe-payment/packages/germanmarket/src/ |
Upload File : |
<?php namespace PaymentPlugins\Stripe\GermanMarket; use PaymentPlugins\Stripe\Assets\AssetsApi; class Package { public static function init() { add_action( 'woocommerce_init', [ __CLASS__, 'initialize' ] ); } public static function initialize() { if ( self::is_enabled() ) { $assets = new AssetsApi( dirname( __DIR__ ) . '/', trailingslashit( plugin_dir_url( __DIR__ ) ), stripe_wc()->version() ); $assets->register_style( 'wc-stripe-german-market', 'build/styles.css' ); $assets->register_script( 'wc-stripe-german-market-checkout', 'build/checkout.js' ); add_action( 'wp_enqueue_scripts', function () use ( $assets ) { if ( wc_post_content_has_shortcode( 'woocommerce_de_check' ) ) { wp_enqueue_style( 'wc-stripe-german-market' ); } if ( is_checkout() ) { wp_enqueue_script( 'wc-stripe-german-market-checkout' ); wp_localize_script( 'wc-stripe-german-market-checkout', 'wc_stripe_german_market_params', [ 'second_checkout' => get_option( 'woocommerce_de_secondcheckout', 'off' ) ] ); } } ); } } private static function is_enabled() { return \class_exists( 'Woocommerce_German_Market' ); } }