Last active
April 7, 2021 15:02
-
-
Save skyshab/8c1598a04416f38e6a5c783c802bea4a to your computer and use it in GitHub Desktop.
Fix for javascript errors due to Page Optimize conflict with Event Tickets plugins.
This file contains hidden or 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 | |
| // Filter to remove tickets plugins scripts that conflict with the Page Optimize plugin. | |
| add_filter( 'js_do_concat', function( $do_concat, $handle ) { | |
| // Exclude any scripts with "tribe-" in the handle. | |
| if ( strpos($handle, 'tribe-') !== false ) { | |
| return false; | |
| } | |
| // Return original value for all other assets. | |
| return $do_concat; | |
| }, 100, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment