Skip to content

Instantly share code, notes, and snippets.

View Anatal's full-sized avatar

Anatal Anatal

View GitHub Profile
@Anatal
Anatal / Generate leads on checkout page (woocommerce)
Last active January 20, 2022 21:45
Generate leads on checkout page (woocommerce) - call JS one checkout page only
After a user is inactive on the checkout page, send an email with the user's data to admin email if the user has provided a phone number, email, or both.
The details in the lead to send:
1. Products in cart and quantity of each
2. Cart total
3. Any fields filled by the user
@Anatal
Anatal / gist:07e2c597685c9d82e815950dd8d0d640
Last active December 12, 2022 09:45
Disable Gutenberg Posts & Post Type (or for sfwd-certificates post type in LMS LearnDash)
<?php
// disable gutenberg for posts
//==============================
add_filter('use_block_editor_for_post', '__return_false', 10);
// disable gutenberg for post types
//===========================
add_filter('use_block_editor_for_post_type', '__return_false', 10);
@Anatal
Anatal / functions.php
Last active February 6, 2024 14:11
WP Ajax
function hello_elementor_child_enqueue_scripts() {
wp_enqueue_style(
'hello-elementor-child-style',
get_stylesheet_directory_uri() . '/style.css',
[
'hello-elementor-theme-style',
],
'1.0.0'
);