Scroll to the First Error (Gravity Forms)
function g9_scroll_to_first_error_focus($form) { ?>Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
function g9_scroll_to_first_error_focus($form) { ?>Continue reading
add_filter(‘gform_submit_button_my-for-id’, ‘__return_false’);Continue reading
function g9_sku_cart_page($item_name, $cart_item, $cart_item_key) { // The WC_Product object $product = $cart_item[‘data’]; // Get the SKU $sku = $product->get_sku(); // When sku doesn’t exist if (empty($sku)) return $item_name; // Add the sku $item_name .= ‘‘ . __(“SKU: “, “woocommerce”) .…Continue reading
function g9_woocommerce_add_to_cart_button_text_archives() { return __(‘Buy Now’, ‘woocommerce’); } add_filter(‘woocommerce_product_add_to_cart_text’, ‘g9_woocommerce_add_to_cart_button_text_archives’);Continue reading
remove_action(‘woocommerce_after_shop_loop_item_title’, ‘woocommerce_template_loop_rating’, 5);Continue reading
remove_action(‘woocommerce_product_thumbnails’, ‘woocommerce_show_product_thumbnails’, 20);Continue reading
function g9_add_woocommerce_support() { add_theme_support(‘woocommerce’); } add_action(‘after_setup_theme’, ‘g9_add_woocommerce_support’);Continue reading
if (function_exists(‘acf_add_options_page’)) { acf_add_options_page(array( ‘page_title’ => ‘Theme General Settings’, ‘menu_title’ => ‘Theme Settings’, ‘menu_slug’ => ‘theme-general-settings’, ‘capability’ => ‘edit_posts’, ‘redirect’ => false )); }Continue reading
function g9_hide_shipping_when_free_is_available($rates) { $free = array(); foreach ($rates as $rate_id => $rate) { if (‘free_shipping:1’ === $rate->id) { $free[$rate_id] = $rate; break; } } return !empty($free) ? $free : $rates; } add_filter(‘woocommerce_package_rates’, ‘g9_hide_shipping_when_free_is_available’, 100);Continue reading
function g9_remove_schedule_delete() { remove_action(‘wp_scheduled_delete’, ‘wp_scheduled_delete’); } add_action(‘init’, ‘g9_remove_schedule_delete’);Continue reading