Created
April 5, 2018 14:50
-
-
Save clifgriffin/93aac8f25a920bc42c5465e5e5082120 to your computer and use it in GitHub Desktop.
Add a custom stylesheet to checkout page.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Do NOT include the opening php tag. | |
// Place in your theme's functions.php file | |
// This is an example. You will need to modify the following to fit your specific site. | |
// Enqueue the stylesheet | |
add_action( 'wp_enqueue_scripts', function() { | |
wp_enqueue_style( 'your-stylesheet-handle', $foo, $bar ); | |
} ); | |
// Add it to the allowed list of stylesheets for Checkout for WooCommerce | |
add_filter( 'cfw_allowed_style_handles', function($allowed_styles) { | |
$allowed_styles[] = 'your-stylesheet-handle'; | |
return $allowed_styles; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment