Remove HealthAndBeautyBusiness Schema

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

Elementor Form Autofill

/** * 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

Modify WooCommerce Coupon Message

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

Gravity Forms Login User After Registration.

/** * 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

Finanziamento Sella con maxirata solo per Z6III

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