rtCamp / wp-partytown

Add partytown support to WordPress sites.
75 stars 6 forks source link

The plugin usage #5

Open mmojadad opened 1 year ago

mmojadad commented 1 year ago

Hello I installed the plugin and enabled on a WordPress website, I need your help a small tutorial, How to use it. For example : For https://mydomain.com/wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart.min.js

At the end of Functions.php file of active theme i add the following code?

wp_enqueue_script( 'non-critical-script', plugins_url( 'add-to-cart.min.js', FILE ), array('partytown'), '1.0.0' );

Right?

thelovekesh commented 1 year ago

@mmojadad Yes, that seems correct.

Please take a look at usage in README.md for more resources.