Title: Code not working after auto update
Last modified: June 14, 2022

---

# Code not working after auto update

 *  Resolved [zmzdtc888](https://wordpress.org/support/users/zmzdtc888/)
 * (@zmzdtc888)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/code-not-working-after-auto-update/)
 * Hi there
 * My code snippets was updated to 3.1.1 this morning. However, after the update,
   my code just stopped working.
 * Basically, my SG optimizer combines the JS from Square Payment so I add a filter
   to it.
 *     ```
       add_filter( 'sgo_javascript_combine_exclude', 'js_combine_exclude' );
       function js_combine_exclude( $exclude_list ) {
           $exclude_list[] = 'wc-square-payment-form';
           $exclude_list[] = 'wc-square-payment-gateway-payment-form';
           $exclude_list[] = 'wc-square';
           $exclude_list[] = 'wc-square-digital-wallet';
   
           return $exclude_list;
       }
       ```
   
 * The code worked so far and there is no other change between the plugin update
   and the new error. Could you advise any possible cause?

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

 *  Plugin Contributor [Verdi Heinz](https://wordpress.org/support/users/ver3/)
 * (@ver3)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/code-not-working-after-auto-update/#post-15736797)
 * We’re looking into it and will get back to you asap!
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/code-not-working-after-auto-update/#post-15776996)
 * Hi [@zmzdtc888](https://wordpress.org/support/users/zmzdtc888/),
 * I don’t believe we changed anything in the plugin that should affect this. I’d
   recommend contacting the SiteGround people and checking whether the code snippet
   is still current.
 * As an additional note, I’d avoid using generic function names like `js_combine_exclude`.
   It’s much better to write snippets using anonymous functions, like this:
 *     ```
       add_filter( 'sgo_javascript_combine_exclude', function ( $exclude_list ) {
           $exclude_list[] = 'wc-square-payment-form';
           $exclude_list[] = 'wc-square-payment-gateway-payment-form';
           $exclude_list[] = 'wc-square';
           $exclude_list[] = 'wc-square-digital-wallet';
   
           return $exclude_list;
       } );
       ```
   

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

The topic ‘Code not working after auto update’ 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/)

 * 2 replies
 * 3 participants
 * Last reply from: [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/code-not-working-after-auto-update/#post-15776996)
 * Status: resolved