Created
October 5, 2020 06:38
-
-
Save yousufansa/1f83279e97eee192f007333c1611eb54 to your computer and use it in GitHub Desktop.
Cartzilla - Globally Disable Visibility Sensor ( Lazy Load Effect )
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
| if ( ! function_exists( 'cartzilla_enqueue_script_globally_disable_visbilty_sensor' ) ) { | |
| function cartzilla_enqueue_script_globally_disable_visbilty_sensor() { | |
| $custom_script = ' | |
| var addFilter = wp.hooks.addFilter; | |
| addFilter("cartzillagb.globally.disable.visibility.sensor", "cartzilla-child/globally.disable.visibility.sensor", cartzillaGoballyDisableVisibilitySensor); | |
| function cartzillaGoballyDisableVisibilitySensor(enabled) { | |
| return true; | |
| }'; | |
| wp_add_inline_script( 'czgb-block-frontend-js', $custom_script ); | |
| } | |
| } | |
| add_action( 'wp_enqueue_scripts', 'cartzilla_enqueue_script_globally_disable_visbilty_sensor', 30 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment