Remove Decimals
function pw_edd_remove_decimals( $decimals ) { return 0; } add_filter( ‘edd_format_amount_decimals’, ‘pw_edd_remove_decimals’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
function pw_edd_remove_decimals( $decimals ) { return 0; } add_filter( ‘edd_format_amount_decimals’, ‘pw_edd_remove_decimals’ );Continue reading
function totc_edd_rest_endpoints() { register_rest_route( ‘totc/1.0’, ‘/edd/cart’, array( ‘methods’ => ‘GET’, ‘callback’ => ‘totc_edd_rest_cart’, ) ); } add_action( ‘rest_api_init’, ‘totc_edd_rest_endpoints’ ); /** * Respond to requests to the cart REST endpoint * * @param $request WP_REST_Request */ function totc_edd_rest_cart( WP_REST_Request $request…Continue reading
add_filter( ‘edd_user_registration_email_login_url’, ‘eddcustom_modify_user_login_url’ ); /** * Modifies the login URL for the default user registration email. * * @return string */ function eddcustom_modify_user_login_url() { return ‘https://www.google.com/login’; }Continue reading
function pw_edd_custom_countries( $countries = array() ) { $countries = array( ‘US’ => ‘United States’, ‘CA’ => ‘Canada’ ); return $countries; } add_filter( ‘edd_countries’, ‘pw_edd_custom_countries’ );Continue reading
function g9_add_slug_body_class($classes) { global $post; if (isset($post)) { $classes[] = $post->post_type . ‘-‘ . $post->post_name; } return $classes; } add_filter(‘body_class’, ‘g9_add_slug_body_class’);Continue reading
add_filter( ‘excerpt_length’, function( $length ) { return 20; } );Continue reading
function disable_google_fonts() { return false; } add_filter( ‘print_google_fonts’, ‘disable_google_fonts’ );Continue reading
add_filter( ‘elementor/frontend/print_google_fonts’, ‘__return_false’ );Continue reading
function custom_font_display( $current_value, $font_family, $data ) { return ‘swap’; } add_filter( ‘font_display’, ‘custom_font_display’, 10, 3 );Continue reading
add_filter( ‘elementor_pro/custom_fonts/font_display’, function( $current_value, $font_family, $data ) { return ‘swap’; }, 10, 3 );Continue reading