Elementor Popup doesnt run with Contact Form 7

https://www.easywayb.com/app/uploads/2023/12/Elementor-Popup-doesnt-run-with-Contact-Form-7.jpg

When you click Submit button (CF7) even if the form has errors in its fields, this ajax errors arent notified.. popup is closed automatically and you are redirected to https://www.easywayb.com/#wpcf7-f297-o1, the popup should not be closed automatically , you should be closed clicking to close or after a number of seconds that you define how it happens in other plugins as “popup maker”, but always when the submit is successful

Enquiry For Your Project

Solution here :


jQuery( document ).on( 'elementor/popup/show', ( event, id, instance ) => {
jQuery( '.elementor-popup-modal form.wpcf7-form' ).each( ( index, formElement ) => {
// store from i
$cf7From = jQuery( formElement );
// re-init for cf7 form.
wpcf7.init( $cf7From[0] );
// add class to avoid running again
$cf7From.addClass( 'elementor' );
} );
} );

Enquiry For Your Project

Woocommerce Confirm Booking Email to Show Customer and Additional Information

https://www.easywayb.com/app/uploads/2022/03/woocommerce-booking-additional-information-sync-booking-with-google-calendar.jpg

For Woocommerce Confirm Booking Email to Show Customer Information you need filter “woocommerce_bookings_gcalendar_sync”.
If you filter “woocommerce_bookings_gcalendar_sync” then update content of Google event when a booking is created or updated.
Woocommerce Booking use $event = apply_filters( 'woocommerce_bookings_gcalendar_sync', $event, $booking ); on includes/class-wc-bookings-google-calendar-connection.php file. You need to filter “woocommerce_bookings_gcalendar_sync”.

Enquiry For Your Project

Sample Code


add_filter( 'woocommerce_bookings_gcalendar_sync', 'easywayb_filter_bookings_gcalendar_sync', 10, 2 );
function easywayb_filter_bookings_gcalendar_sync( $event, $booking ){
$booking_id = $booking->id; // Woocommerce Booking ID
$order_id = $booking->order_id; // Woocommerce Order ID
$order = new WC_Order($order_id);

if(!empty($order)){
$description = '';
$description .= 'Customer name : '.$order->billing_first_name.' '.$order->billing_last_name;
$description .= 'Customer phone no : '.$order->billing_phone;
$description .= 'Customer shipping address : '.$order->shipping_address_1.', '.$order->shipping_address_2.', '.$order->shipping_city.', '.$order->shipping_state.', '.$order->shipping_postcode.', '.$order->shipping_country;
$description .= 'Customer provided note: : '.$order->get_customer_note();

$event['description'] .= $description;
}
return $event;
}

Or Visit https://stackoverflow.com/questions/71696716/woocommerce-confirm-booking-email-to-show-customer-and-additional-information.

Enquiry For Your Project

EasyWayB Testimonials Slider Plugin

https://www.easywayb.com/app/uploads/2022/03/easywayb-testimonials.png
We build testimonial plugin for our client for easy use.
BASIC INPUT FIELDS
  • Testimonial image
  • Testimonial title or Tagline
  • Testimonial content or Review message
FEATURES OF THIS PLUGIN
  • Fully Responsive and Mobile friendly.
  • Easy To Use – No Coding Required.
  • Shortcode Generator for each category.

Enquiry For Your Project

SHORTCODE


[ewb-testimonial count="10" order="ASC" orderby="date"]

Download this plugin now Click.

easywayb-testimonials

Create Google Shared Drive with Google API in php

https://www.easywayb.com/app/uploads/2021/11/Google-shared-drives.png
To run this quickstart, you need the following prerequisites
  • PHP 5.4 or greater with the command-line interface (CLI) and JSON extension installed
  • The Composer dependency management tool
  • A Google Cloud Platform project with the API enabled. To create a project and enable an API, refer to Create a project and enable the API
  • A Google account with Google Drive enabled.

Enquiry For Your Project

  • Install the Google Client Library :
    composer require google/apiclient:^2.0
  • Set up API : Create a file named quickstart.php in your working directory and copy in the following code:


    require __DIR__ . '/vendor/autoload.php';

    if (php_sapi_name() != 'cli') {
    throw new Exception('This application must be run on the command line.');
    }

    /**
    * Returns an authorized API client.
    * @return Google_Client the authorized client object
    */
    function getClient()
    {
    $client = new Google_Client();
    $client->setApplicationName('Google Drive API PHP Quickstart');
    $client->setScopes(Google_Service_Drive::DRIVE_METADATA_READONLY);
    $client->setAuthConfig('credentials.json');
    $client->setAccessType('offline');
    $client->setPrompt('select_account consent');

    // Load previously authorized token from a file, if it exists.
    // The file token.json stores the user's access and refresh tokens, and is
    // created automatically when the authorization flow completes for the first
    // time.
    $tokenPath = 'token.json';
    if (file_exists($tokenPath)) {
    $accessToken = json_decode(file_get_contents($tokenPath), true);
    $client->setAccessToken($accessToken);
    }

    // If there is no previous token or it's expired.
    if ($client->isAccessTokenExpired()) {
    // Refresh the token if possible, else fetch a new one.
    if ($client->getRefreshToken()) {
    $client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());
    } else {
    // Request authorization from the user.
    $authUrl = $client->createAuthUrl();
    printf("Open the following link in your browser:\n%s\n", $authUrl);
    print 'Enter verification code: ';
    $authCode = trim(fgets(STDIN));

    // Exchange authorization code for an access token.
    $accessToken = $client->fetchAccessTokenWithAuthCode($authCode);
    $client->setAccessToken($accessToken);

    // Check to see if there was an error.
    if (array_key_exists('error', $accessToken)) {
    throw new Exception(join(', ', $accessToken));
    }
    }
    // Save the token to a file.
    if (!file_exists(dirname($tokenPath))) {
    mkdir(dirname($tokenPath), 0700, true);
    }
    file_put_contents($tokenPath, json_encode($client->getAccessToken()));
    }
    return $client;
    }

    // Get the API client and construct the service object.
    $client = getClient();
    $service = new Google_Service_Drive($client);

  • Run the API
    Run the sample using the following command:

    php quickstart.php
    The first time you run the sample, it prompts you to authorize access:

    1. Browse to the provided URL in your web browser.
      If you are not already signed in to your Google account, you are be prompted to sign in. If you are signed in to multiple Google accounts, you are asked to select one account to use for the authorization.
    2. Click the Accept button.
    3. Copy the code you’re given, paste it into the command-line prompt, and press Enter.
  • Create Google Shared Drives:

    $folder_name = 'EasyWayB Drive';
    $metadata = new Google_Service_Drive_TeamDrive();
    $metadata->setName($folder_name);
    $resp = $service->teamdrives->create(uniqid(), $metadata);
    $teamdrive_id = $resp->id;

    shared-drives
  • Permissions Access Google Shared Drives:

    $email = 'easywayb.customer.service@gmail.com';
    $metadata = new Google_Service_Drive_Permission();
    $metadata->setKind('drive#permission');
    $metadata->setEmailAddress($email);
    $metadata->setType('user');
    $metadata->setRole('organizer');
    $optParams = [
    'supportsTeamDrives' => true
    ];
    $permision = $service->permissions->create($teamdrive_id, $metadata, $optParams);
    $permision_id = $permision->id;

Or visit https://stackoverflow.com/questions/71698428/create-google-shared-drive-with-google-api-in-php.

The journey of Website Creation

How Website is Created by EasyWayB
  • If you are thinking of creating a Website your thoughts must be racing around 3 main issues – How the website is created, how much it takes time and how much money is required.
  • Let’s discuss the details. Website creation mainly involves the following
    1. Discuss
    2. Discover
    3. Design
    4. Content Writing
    5. Development
    6. Deliver

Enquiry For Your Project

  • Discuss: Discussion mainly involves meeting and communicating with the client about the website details. Discussing and discovering the Purpose, Main Goals, and Target Audience of the business.
  • Discover: After the discussion, the research team with the designers, set themselves to discover trendy designs, features, functionalities of the Website design depending on the industry and goals of the business. Most often the agency sends demo designs to the client, as examples.
  • Design: During the design phase, the website takes shape. All the visual content, such as images, photos, and videos is created at this step. Layouts contain colors, logos, images. Once the design is completed it is forwarded to the client as a general understanding of the future product.
  • Content Writing: The very essence of communication is portrayed through words when it comes to a Website. Therefore, once the design is finalized, the content writer fills the demo texts with catchy headlines, call to actions, product or service descriptions and much more.
  • Development: Web Development means making the Website functional. Frameworks and CMS should be implemented to make sure that the server can handle the installation and the functionalities work smoothly. Testing is the most routine part of the process.
  • Deliver: After the coding and testing process is completed the developers and tester work for hand in hand to check and re-check a website. Once all the bugs are removed and the website has met the cross-browser compatibility the website is uploaded to a server known as FTP (File Transfer Protocol) software. Once all the files are deployed and the website works fine, it’s delivered to the client.
  • easywayb.com is one of the top web design and development companies in India. Contact us for a free quote on Website designing and development.

Enquiry For Your Project