Show Terms By Default

function sumobi_edd_show_terms_agreement() { global $edd_options; /*print_r($edd_options);*/ if ( isset( $edd_options[‘show_agree_to_terms’] ) ) { ?>Continue reading

Remove Decimals

function pw_edd_remove_decimals( $decimals ) { return 0; } add_filter( ‘edd_format_amount_decimals’, ‘pw_edd_remove_decimals’ );Continue reading

REST API Shopping Cart Endpoint for EDD

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

Custom Countries

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

Page Slug Body Class

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