Basic WP escaping functions

// ❌ Don’t use _e(), __(), _x() etc. to output data // ✅ Use the escaped versions instead esc_html_e(), esc_html__(), esc_html_x() etc. // ❌ Don’t echo any HTML attributes without escapingContinue reading

Disable delayed customer recalculations

/** * Bypasses the CRON event that is scheduled 5 minutes after a purchase that recalculates a customers stats. * * Note: This may impact the performance of the checkout process. */ add_filter( ‘edd_recalculate_bypass_cron’, ‘__return_true’ );Continue reading

Allow SVG Files Upload (copy)

/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading

After Checkout Event In WooCommerce

add_action( ‘woocommerce_thankyou’, ‘pe_wc_checkout_script’, 10, 1); function pe_wc_checkout_script($order_id) { $cart_campaign_name = ‘Enter cart abandonment campaign name’; do_action(‘pe_wpcode_wc_checkout_script’, $order_id, $cart_campaign_name); }Continue reading