Title: fatal error when I copy paste css
Last modified: July 7, 2020

---

# fatal error when I copy paste css

 *  Resolved [Matteo](https://wordpress.org/support/users/theoshold/)
 * (@theoshold)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-when-i-copy-paste-css/)
 * Hello,
 * I installed thw code snippet plugin and I would like to migrate all customized
   css, from theme additional css to code snippet plugin, but when I do copy/past
   into code snippet plugin new snippet I obtain a fatal error.
 * .ign-wl-modal {
    z-index: 99999 !important; } /* Links */
 * #main a { color: #3d9cd2; }
    .woocommerce #content input.button.alt:hover, .woocommerce#
   respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce
   button.button.alt:hover, .woocommerce input.button.alt:hover, .woocommerce-page#
   content input.button.alt:hover, .woocommerce-page #respond input#submit.alt:hover,.
   woocommerce-page a.button.alt:hover, .woocommerce-page button.button.alt:hover,.
   woocommerce-page input.button.alt:hover {
 * background:#3d9cd2 !important;
 * background-color:#3d9cd2 !important;
 * color:white !important;
 * text-shadow: transparent !important;
 * box-shadow: none;
 * border-color:#3d9cd2 !important;
 * }
 * .woocommerce #content input.button:hover, .woocommerce #respond input#submit:
   hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce
   input.button:hover, .woocommerce-page #content input.button:hover, .woocommerce-
   page #respond input#submit:hover, .woocommerce-page a.button:hover, .woocommerce-
   page button.button:hover, .woocommerce-page input.button:hover {
 * background:#3d9cd2 !important;
 * background-color:#3d9cd2 !important;
 * color:white !important;
 * text-shadow: transparent !important;
 * box-shadow: none;
 * border-color:#3d9cd2 !important;
 * }
 * .woocommerce #content input.button, .woocommerce #respond input#submit, .woocommerce
   a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce-
   page #content input.button, .woocommerce-page #respond input#submit, .woocommerce-
   page a.button, .woocommerce-page button.button, .woocommerce-page input.button{
 * background: #3d9cd2 !important;
 * color:white !important;
 * text-shadow: transparent !important;
 * border-color:#3d9cd2 !important;
 * }
 * .woocommerce #content input.button.alt:hover, .woocommerce #respond input#submit.
   alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover,.
   woocommerce input.button.alt:hover, .woocommerce-page #content input.button.alt:
   hover, .woocommerce-page #respond input#submit.alt:hover, .woocommerce-page a.
   button.alt:hover, .woocommerce-page button.button.alt:hover, .woocommerce-page
   input.button.alt:hover {
 * background: #3d9cd2 !important;
 * box-shadow: none;
 * text-shadow: transparent !important;
 * color:white !important;
 * border-color:#3d9cd2 !important;
 * }
    .woocommerce-pagination .page-numbers .current, .woocommerce-pagination .page-
   numbers li a:hover { padding: 8px 10px !important; background: #3D9CD2 !important;
   color: #fff !important; } .woocommerce-checkout #payment div.payment_box { background:
   white !important; color: black !important; } .woocommerce-checkout #payment {
   background: white !important; } .woocommerce-checkout #payment ul.payment_methods{
   border-bottom: 0px solid white !important; }

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-when-i-copy-paste-css/#post-13090842)
 * You can’t paste CSS directly into a new snippet – it’s expecting PHP code.
 * Instead, you need to wrap it in some PHP:
 *     ```
       add_action( 'wp_head', function () { ?>
       <style>
   
       /* your CSS code goes here */
   
       </style>
       <?php } );
       ```
   
 * Version 3.0 pro will include native support for CSS code, but currently wrapping
   in PHP is the best solution.
 *  Thread Starter [Matteo](https://wordpress.org/support/users/theoshold/)
 * (@theoshold)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-when-i-copy-paste-css/#post-13100446)
 * thank you, so I tried with this code that works on my css theme:
 * .wc-block-grid__products .wc-block-grid__product .wp-block-button__link, .added_to_cart{
   
   background-color: #3d9cd2 !important; border-color: #3d9cd2 !important; color:
   white !important; text-decoration: none !important; } .wp-block-button__link:
   not(.has-background):hover, .wp-block-button__link:not(.has-background):focus,.
   wp-block-button__link:not(.has-background):active { border-color: #3d9cd2 !important;
   background-color: #3d9cd2 !important; text-decoration: none !important; }
 * And I added this code:
 * add_action( ‘wp_head’, function () { ?>
    <style>
 * .wc-block-grid__products .wc-block-grid__product .wp-block-button__link, .added_to_cart{
   
   background-color: #3d9cd2 !important; border-color: #3d9cd2 !important; color:
   white !important; text-decoration: none !important; } .wp-block-button__link:
   not(.has-background):hover, .wp-block-button__link:not(.has-background):focus,.
   wp-block-button__link:not(.has-background):active { border-color: #3d9cd2 !important;
   background-color: #3d9cd2 !important; text-decoration: none !important; }
 * </style>
    <?php } )
 * But the results is fatal error 🙁
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-when-i-copy-paste-css/#post-13100502)
 * You’re missing a `;` on the last line of your code.
 * It should be:
 * `<?php } );`
 *  Thread Starter [Matteo](https://wordpress.org/support/users/theoshold/)
 * (@theoshold)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-when-i-copy-paste-css/#post-13100517)
 * it’s true, thank you very much
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-when-i-copy-paste-css/#post-13100548)
 * Glad to hear it’s working.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘fatal error when I copy paste css’ is closed to new replies.

 * ![](https://ps.w.org/code-snippets/assets/icon.svg?rev=2148878)
 * [Code Snippets](https://wordpress.org/plugins/code-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/code-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-snippets/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-when-i-copy-paste-css/#post-13100548)
 * Status: resolved