summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules/simple-payments/simple-payments.php')
-rw-r--r--plugins/jetpack/modules/simple-payments/simple-payments.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/jetpack/modules/simple-payments/simple-payments.php b/plugins/jetpack/modules/simple-payments/simple-payments.php
index 7274024d..167c6008 100644
--- a/plugins/jetpack/modules/simple-payments/simple-payments.php
+++ b/plugins/jetpack/modules/simple-payments/simple-payments.php
@@ -35,7 +35,6 @@ class Jetpack_Simple_Payments {
wp_register_script( 'paypal-checkout-js', 'https://www.paypalobjects.com/api/checkout.js', array(), null, true );
wp_register_script( 'paypal-express-checkout', plugins_url( '/paypal-express-checkout.js', __FILE__ ),
array( 'jquery', 'paypal-checkout-js' ), self::$version );
- wp_enqueue_style( 'simple-payments', plugins_url( '/simple-payments.css', __FILE__ ) );
}
private function register_init_hook() {
add_action( 'init', array( $this, 'init_hook_action' ) );
@@ -104,6 +103,9 @@ class Jetpack_Simple_Payments {
if ( ! wp_script_is( 'paypal-express-checkout', 'enqueued' ) ) {
wp_enqueue_script( 'paypal-express-checkout' );
}
+ if ( ! wp_style_is( 'simple-payments', 'enqueued' ) ) {
+ wp_enqueue_style( 'simple-payments', plugins_url( 'simple-payments.css', __FILE__ ) );
+ }
wp_add_inline_script( 'paypal-express-checkout', sprintf(
"try{PaypalExpressCheckout.renderButton( '%d', '%d', '%s', '%d' );}catch(e){}",