Skip to content

Instantly share code, notes, and snippets.

@clifgriffin
Created April 5, 2018 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clifgriffin/93aac8f25a920bc42c5465e5e5082120 to your computer and use it in GitHub Desktop.
Save clifgriffin/93aac8f25a920bc42c5465e5e5082120 to your computer and use it in GitHub Desktop.
Add a custom stylesheet to checkout page.
<?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