/** * Removes the ‘woocommerce_package_rates’ filter added by the Caddy plugin. * * Removes the filter that hides other WooCommerce shipping rates * when free shipping is available, allowing all rates to show. * * @author Mike Valera * @plugin…Continue reading
add_filter(‘aioseo_schema_output’, ‘aioseo_remove_health_and_beauty_business_schema’); function aioseo_remove_health_and_beauty_business_schema($graphs) { foreach ($graphs as $index => $value) { if (isset($value[‘@type’]) && $value[‘@type’] === ‘HealthAndBeautyBusiness’) { unset($graphs[$index]); } } return $graphs; }Continue reading
/** * Add autocomplete setting to form fields. */ add_action( ‘elementor/element/form/section_form_fields/before_section_end’, function( \Elementor\Widget_Base $widget ) { $elementor = \ElementorPro\Plugin::elementor(); $control_data = $elementor->controls_manager->get_control_from_stack( $widget->get_unique_name(), ‘form_fields’ ); if( is_wp_error( $control_data ) ) { return; } $control_data[‘fields’] = $control_data[‘fields’] + [ ‘namespace_autocomplete’ =>…Continue reading
function ele_disable_page_title( $return ) { return false; } add_filter( ‘hello_elementor_page_title’, ‘ele_disable_page_title’ );Continue reading
add_filter( ‘woocommerce_coupon_message’, ‘modify_woocommerce_coupon_message’, 10, 3 ); function modify_woocommerce_coupon_message( $msg, $msg_code, $coupon ) { if( $msg === __( ‘Coupon code applied successfully.’, ‘woocommerce’ ) ) { $msg = sprintf( __( “You are getting $%s discounts.”, “woocommerce” ), ‘‘ . $coupon->get_amount() .…Continue reading
/** * Snippet Name: Gravity Forms Login User After Registration. */ remove_action(“gform_post_submission”, array(“GFUser”, “gf_create_user”)); add_action(“gform_after_submission”, array(“GFUser”, “gf_create_user”), 10, 2); add_action(“gform_user_registered”, “gforms_autologin”, 10, 4); function gforms_autologin($user_id, $config, $entry, $password) { $form = RGFormsModel::get_form_meta($entry[‘form_id’]); $user_login = apply_filters(“gform_username_{$form[‘id’]}”, apply_filters(‘gform_username’, GFUser::get_meta_value(‘username’, $config, $form, $entry),…Continue reading
add_filter(‘woocommerce_consel_plans_filter’, function($plans, $order) { if ($order != null) { //se prodotto in promo è contenuto nel carrello, ed è l’unico prodotto $items = $order->get_items(); $product = $order->get_product_from_item( array_pop(array_reverse($items)) ); print_r($product->get_sku()); if ($items && count($items) === 1 && in_array($product->get_sku(), array(‘NMZ640’, ‘NMZ642’,…Continue reading
// Remove tags add_filter(‘wpcf7_autop_or_not’, ‘__return_false’);Continue reading
add_filter(‘wpcf7_autop_or_not’, ‘__return_false’);Continue reading
add_filter( ‘yith_ywpo_pre_order_product_label’, function($message, $pre_order, $id, $cart_item) { return ‘Questo prodotto potrebbe subire ritardi rispetto ai tempi di spedizione standard’; }, 10, 4 );Continue reading