Remove Submit Button from Form (Gravity Forms)
add_filter(‘gform_submit_button_my-for-id’, ‘__return_false’);Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
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_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_new_product_badge_shop_page() { global $product; $newness_days = 120; $created = strtotime($product->get_date_created()); if ((time() – (60 * 60 * 24 * $newness_days)) < $created) { echo '‘ . esc_html__(‘New!’, ‘woocommerce’) . ‘‘; } } add_action(‘woocommerce_before_shop_loop_item_title’, ‘g9_new_product_badge_shop_page’, 3);Continue reading
function mepr_remove_accordion_class( $classes ) { //Course class body $cs_index = array_search( ‘mpcs-course-with-accordion’, $classes ); if ( isset( $cs_index ) ) { unset( $classes[$cs_index] ); } //Sidebar class body $sb_index = array_search( ‘mpcs-sidebar-with-accordion’, $classes ); if ( isset( $sb_index ) )…Continue reading
function g9_nav_menus_load($field) { $menus = wp_get_nav_menus(); if (!empty($menus)) { foreach ($menus as $menu) { $field[‘choices’][$menu->slug] = $menu->name; } } return $field; } add_filter(‘acf/load_field/name=name_of_field’, ‘g9_nav_menus_load’);Continue reading
add_filter(‘woocommerce_product_related_products_heading’, function () { return ”; });Continue reading