Add to Cart Without a Page Reload on Product Pages
Adds simple products to the cart in the background from the product page, updating the mini cart and showing a confirmation instead of reloading the page.
Snippet Library
3,040 free snippets from the WPIDE team and the community. Copy the code, or add any snippet to your site in one click with WPIDE.
Adds simple products to the cart in the background from the product page, updating the mini cart and showing a confirmation instead of reloading the page.
Makes screen readers announce when a product is added to the cart with AJAX on shop and category pages, which otherwise happens silently.
Adds a column to the Posts list with a switch that opens or closes comments on each post in one click, without opening the editor or Quick Edit.
Stops the cart fragments script, which fires an extra uncached AJAX request on every page, everywhere except the shop, product, cart and checkout pages.
Keeps the Heartbeat API (autosave and post locking) in the editor but turns it off on every other admin and front-end page to save server requests.
Counts admin-ajax.php requests per action (and whether they come from the front end or the dashboard) for the current day and the previous six, and shows the busiest ones under Tools > AJAX Usage.
Sends GA4 ecommerce events when a shopper views a product page and when they add a product to the cart, from the product page or with AJAX buttons on shop pages.
Redirects users who cannot edit posts (subscribers, customers) to the homepage when they try to open the admin area. AJAX and admin-post requests keep working.
Replaces the Gravity Forms AJAX loading spinner with a small inline SVG spinner in your brand color, with no extra file to download.
Adds a star column to the Posts screen that marks or unmarks a post as featured with one click, saving a "featured" custom field your theme or queries can use.
Submits the comment form in the background and shows the new comment (or the "awaiting moderation" note) right away, instead of reloading the page.
Adds a quantity field next to the add to cart button for simple products in shop listings, so shoppers can add several at once without opening the product.
Sends subscribers, customers and other users without editing rights from wp-admin to the WooCommerce My Account page or the homepage, with options to keep the profile screen open and hide the admin bar. AJAX and front-end forms keep working.
Prints a small window.siteSettings object with the home URL, REST API root, AJAX URL, language and, for logged-in users, a REST nonce, so your custom JavaScript never hard-codes addresses.
Reduces admin AJAX traffic by running the Heartbeat API every 60 seconds instead of every 15 to 60, and turns it off on the front end.
Sends a generate_lead event to Google Analytics 4 or Google Tag Manager when a Gravity Forms form shows its confirmation, including AJAX forms.
Sends a generate_lead event to Google Analytics 4 or Google Tag Manager when an AJAX WPForms form is submitted successfully.
Refreshes the classic cart totals as soon as a quantity is changed, so shoppers do not need to press "Update cart". The button is hidden.