TplMng
// This code is part of the template, $tplData[‘hasShellZip’] is provided through TplMng $hasShellZip = $tplData[‘hasShellZip’]; if ($hasShellZip) { esc_html_e(‘The “Shell Zip” mode allows…’, ‘duplicator-pro’); ?>Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
// This code is part of the template, $tplData[‘hasShellZip’] is provided through TplMng $hasShellZip = $tplData[‘hasShellZip’]; if ($hasShellZip) { esc_html_e(‘The “Shell Zip” mode allows…’, ‘duplicator-pro’); ?>Continue reading
// ❌ The output of this function is not readable public function displayHtml() { //some logic here echo ‘ ‘; echo ‘‘; echo ‘‘; echo __(‘Some text’, ‘duplicator-pro’); echo ‘ ‘; } // ❌ This function needs to escape large…Continue reading
// ❌ Don’t use html tags in escaping functions like esc_html, esc_attr and their localized equivalents // Expected output: This part of the text is bold and this part underlined. esc_html_e( ‘This part of the text is bold and this…Continue reading
// ❌ 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
// Don’t log license activations and deactivations. add_filter( ‘edd_sl_log_license_activation’, ‘__return_false’ ); add_filter( ‘edd_sl_log_license_deactivation’, ‘__return_false’ );Continue reading
/** * 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
remove_filter( ‘comment_text’, ‘make_clickable’, 9 );Continue reading
add_filter( ‘astra_v4_block_editor_compat’, “__return_true” );Continue reading
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
add_action( ‘woocommerce_add_to_cart’, ‘pe_wc_cart_script’, 10, 6); add_action( ‘wp_enqueue_scripts’, ‘pe_wc_cart_ajax_script’ ); function pe_wc_cart_script( $cart_item_key, $product_id, …$rest_params ) { $browse_campaign_name = ‘Enter browse abandonment campaign name’; $cart_campaign_name = ‘Enter cart abandonment campaign name’; do_action(‘pe_wpcode_wc_cart_script’, $product_id, $browse_campaign_name, $cart_campaign_name); } function pe_wc_cart_ajax_script() { $browse_campaign_name =…Continue reading