mermberfix logo x200 - How to sell your Zoom Webinars using WooCommerce
The MemberFix Teamโ€™s got you covered.
Membership plugins

How to sell your Zoom Webinars using WooCommerce

woo zoom zapier 768x384 - How to sell your Zoom Webinars using WooCommerce

Overview

In this guide you’ll learn how to sell your Zoom webinars on your site using the WooCommerce WordPress shopping cart plugin and a simple Zapier integration.  

Requirements

Configuring your webinar product in WooCommerce

I’m going to assume you already have WooCommerce configured on a basic level (in particular, that you have your payment processor set up).

Now you’ll want to add a basic product in WooCommerce (go to Products => Add new). 

Note: If you are only going to sell one Webinar through WooCommerce, then you can skip this step and go directly to “Setting up Zap Trigger and Action” section.

First go to your Zoom and navigate to My Webinars tab and Copy Webinar ID that you are going to sell with this product.

90465598 - How to sell your Zoom Webinars using WooCommerce

Go to your WooCommerce product and under Product data section click on Attributes tab.
Click on the “Add” button and set name and value as shown below:

Name: webinar_id
Value: YOUR WEBINAR ID


90465667 - How to sell your Zoom Webinars using WooCommerce

In the Value field, paste the Webinar ID we copied from Zoom and remove all hyphens between the numbers (eg. 123456789). Then click “Save attributes” button. Also make sure you check “Virtual” checkbox as shown in the screenshot above and Update/Publish your product.

Add our custom function 

*If you are going to sell only one Webinar through WooCommerce, then you can skip this step.

For Zapier to be able to tell which Webinar a customer is buying, we need to send it a custom parameter with the Webinar ID. So let’s go and add this function to your theme’s functions.php file.

Better yet, add it to your child theme so you don’t lose the changes when you update your theme. Perhaps the easiest option would be to install the “My Custom Functions” plugin. This is the safest way to add functions to your theme without losing changes during updates, and this is what I’ll be using in this guide.

Note: I strongly discourage you from adding this directly to your functions.php file.

After you have successfully installed the “My Custom Functions” plugin, navigate to Settings => PHP Inserter.

Add this code:

// add hidden field in order after checkout
add_action“woocommerce_checkout_before_customer_details”“my_custom_checkout_hidden_field”101 );
function my_custom_checkout_hidden_field( $checkout ) {
foreach ( WC()->cart->get_cart() as $cart_item ) {
$product = $cart_item;
if(!empty($product)){
$webinar_id = $product->get_attribute“webinar_id” );
// Output the hidden field
echo “<div id=”user_link_hidden_checkout_field”>
<input type=”hidden” class=”input-hidden” name=”webinar_id” id=”webinar_id” value=”” . $webinar_id . “”>
</div>”;
}
}
}
// save hidden field in the order
add_action“woocommerce_checkout_update_order_meta”“save_custom_checkout_hidden_field”101 );
function save_custom_checkout_hidden_field( $order_id ) {
if ( ! empty$_POST ) )
update_post_meta$order_id“_webinar_id”sanitize_text_field$_POST ) );
}
//only 1 prod in cart for WooC
add_filter“woocommerce_add_to_cart_validation”“bbloomer_only_one_in_cart”992 );
function bbloomer_only_one_in_cart( $passed, $added_product_id ) {
// empty cart first: new item will replace previous
wc_empty_cart();
return $passed;
}

90466063 - How to sell your Zoom Webinars using WooCommerce

Switch the toggle to “ON” and click Save changes.

 

Setting up the trigger and action in Zapier

  1. Go to Zapier and Create a new Zap.
    90464307 - How to sell your Zoom Webinars using WooCommerce
  2. Search for WooCommerce and select it.

    90464864 - How to sell your Zoom Webinars using WooCommerce

  3. Chose a Trigger you need (in this guide I’ll be using “New Order” trigger for one-time payment product).
  4. Copy the URL that is given in this step.
    90464900 - How to sell your Zoom Webinars using WooCommerce
  5. Go to your WordPress Dashboard and open WooCommerce => Zapier Feeds.
  6. Click Add New.

    90464941 - How to sell your Zoom Webinars using WooCommerce

  7. Select the same Trigger you selected in Zapier.
  8. Paste the URL we copied from the step above in the Webhook URL field.
  9. Type something that describes your Zap (eg. Webinar) in Title.
  10. Click Publish.
  11. Go and make a test purchase of your Webinar.
  12. After you successfully purchased your webinar, go back to your Zap and click “Ok, I did this” button.

    90464998 - How to sell your Zoom Webinars using WooCommerce

  13. In this step, select your order, but make sure it is from the test purchase you just made.
    If you can’t find your order there, then go back and make a test purchase again. Go back to Zap and click “Get More Samples”.

     

  14. Click Continue.
  15. Go to Action step.
  16. Search for Zoom in Action App and select it.

    90465080 - How to sell your Zoom Webinars using WooCommerce

  17. Choose Action you need (in this guide I’ll be using “Create Registrant” action).
  18. Click Save+Continue button.
  19. Click “Connect an Account” button and connect your Zoom account. If you don’t know how to connect your Zoom account, click here.
  20. Click Save+Continue button.

Setting up your Zap Template

Upcoming Webinar

if you are going to sell only one Webinar, then you can just select that webinar for this field and you can skip the Upcoming Webinar step. But if you are selling more than one, then select “Use a Custom Value (advanced)” option. In this guide I’ll be using Custom Value.

Click on the plus icon next to Custom Value field and search for “webinar”
90465275 - How to sell your Zoom Webinars using WooCommerce

Select Meta Data Webinar ID.

 

Other fields

Select the appropriate values for the other fields. Eg. for First name select “Billing First Name” etc.

Choose whether to send confirmation email or not, it’s up to you.

After you have set all fields you can click Continue. Then on the test step, click Send Test To Zoom.

If your test was successful you can click Finish, if there are errors review the steps above and make sure you have set up everything correctly.

Now you should be able to sell your Webinars using these WooCommerce products.

Conclusion

This integration makes an automated and smooth process for your customers. 
That means, webinar registration is done automatically in the background for them. So after they purchase your Webinar product on your WordPress website, they will get an email you set up on in your Zoom Webinar Settings with the link to the Webinar and all other details.

 

Additional content

How to connect your Zoom account to Zapier

  1. Login to your Zoom account and then go to this link.

     

  2. Scroll down to bottom and find “key” and “Secret” numbers.
  3. Open your Zap.
  4. Click Connect an Account.

    90466138 - How to sell your Zoom Webinars using WooCommerce

  5. A new window will open, paste “key” in API Key field and paste “Secret” in API Secret field.
  6. Click “Yes, Continue” button.
  7. That’s it.

You may also enjoy...

WordPress based membership sites have certain requirements, and make use of certain applications that, in my experience, makes most of the popular hosting providers a poor choice.

Learn how to properly integrate your MemberPress site with Hubspot CRM using Zapier…

This post will show you how to manually extend your members’ access in MemberPress using transactions.
Subscribe
Notify of
guest
21 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Marten Benatar
May 25, 2019 9:24 am

Hello,
I tried your code after installing My Custom Functions plugin and I get this error message.

“Sorry but you code causes a “fatal error”, so it is not applied!
Please, check the code and try again.

Marten Benatar
Reply to  Marten Benatar
May 25, 2019 11:54 am

Retried after I uninstalled and reinstalled your plugin. Entered the code. Got the same error message. Got locked out of my admin with an error message.

โ€œThe site is experiencing technical difficulties. Please check your site admin email inbox for instructions.โ€

Uninstalled your plugin again to regain access to my wordpress admin. The plugin does not work like advertised.

Sorin Marta
Admin
Reply to  Marten Benatar
June 10, 2019 7:19 am

Hi Marten,

There might be a conflict between ‘My Custom Functions’ and one of the plugins you have installed on your website.

Please try one of this alternative:
https://wordpress.org/plugins/insert-php/

Please let us know if that fixed your issue.

Best,
Sorin

senki
senki
May 26, 2019 6:55 pm

Hi,

It looks like your code snippet is broken, at least when I tried to copy it. All the quotation marks are converted to curly one.

Sorin Marta
Admin
Reply to  senki
June 10, 2019 7:16 am

Hi Senki,

I double checked and the code is correct.

Where did you copy it to? If you are using a code editor and you used that, it might cause that.

Best,
Sorin

Richard Cantwell
July 15, 2019 10:21 am

Dositej – this is an excellent solution and works perfectly (if you replace those quotes in that sample code) – well done for the article! I do have a question however – where i’m at is that all the above works great – but i can’t figure out straight off how i can distinguish this process for one specific type of product only – ie a product that’s in a specific category say or even a specific product? From my testing this afternoon – i did notice that if i underscored the webinar_id (ie ‘__webinar_id’) product attribute name and tested… Read more »

Vic Dorfman
Admin
Reply to  Richard Cantwell
July 16, 2019 2:53 am

Hi Richard, thanks for the kind word!

@Dositej is testing a solution for you now in Zapier and will follow up with a comment for you soon. ๐Ÿ™‚

My guess is that this is simply a matter of creating a filter step in Zapier but I could be wrong. Let’s see what Dos says.

Richard Cantwell
Reply to  Vic Dorfman
August 29, 2019 12:56 pm

Thanks for the reply Vic!

Richard Cantwell
Reply to  Dositej
August 29, 2019 12:56 pm

Hi Dositej – sorry it took so long to respond – i was off that project for a few weeks – you’re an absolute star for the response – going to look into this right now! Thanks again!!!!!

Richard Cantwell
September 26, 2019 4:11 am

Dositej – i’m currently implementing this solution for another client but i noticed that your solution only allows for one webinar in the cart at any one time. I see that you add the webinar ID to the order META at some stage during the checkout process and obviously this is what Zapier is looking for.

Is there any way – and i’m not asking you to provide the code – do you think this procedure could be expanded to allow multiple webinars to be purchased?

Thanks for any direction you can point me in.

Vic Dorfman
Admin
Reply to  Richard Cantwell
September 26, 2019 7:00 pm

Hi Richard, excellent question.

Yes, this can be achieved by modifying the code, and updating the zap with conditional branches that would check which product is being purchased and perform the corresponding action(s).

We could whip it up for you if you’d like, just ping me at vic(at)memberfix.rocks and we can have a chat about it. ๐Ÿ™‚

Cheers,
Vic

Greg
Greg
April 2, 2020 9:37 pm

Two issues- why is there code here to limit the cart to only 1 product? That doesn’t make any sense…

After removing that code, my registrations seem broken, getting errors at the creation point in Zap: ”
[{“code”:”300″,”message”:”The parameter is required: job_title”,”description”:”Refer to URL: https://zoomappdocs.docs.stoplight.io/zapier“}]

No clue why job title or description would be necessary…

Ardian Lumi
Reply to  Greg
April 8, 2020 11:23 am

Hi Greg,

Thank you for reaching out!

The article states that there is a filter (the last piece of code) which makes the script to work only for 1 product. But if you remove that filter it will work for multiple products.

We’d be happy to help you configure it, please feel free to get in touch via our contact form if you need our help.

Kind Regards,
Ardian

Stephen
April 4, 2020 7:18 am

Dositej many thanks for taking the time to write this article, it’s very useful, particularly in the current climate.

Sheila
Sheila
April 25, 2020 2:44 am

Can this work for Zoom meetings as well?

Vic Dorfman
Admin
Reply to  Sheila
August 17, 2020 2:06 am

Hi Sheila,

Yes in theory it should work with Zoom meetings as well. But it would require modifying the code and zap a bit. Happy to help with that if you’d like. Please contact us on our MemberFix services page.

Abdul
Abdul
January 22, 2021 6:51 pm

Hey, I just tried this and my website crashed after including the php code via “My custom functions”. We are working with php8, might this be the cause? Thank you!

Victor Barannik
Reply to  Abdul
January 29, 2021 3:49 pm

Hello Abdul,

I’ve updated the script in the article. There was deprecated symbols. Please try the new code and let me know if it’s working on your side.

Thank you!

Kristina
Kristina
July 9, 2021 9:54 am

Thank you for the informative article!

—————–
Kristina
https://switzerland-company.com

Last edited 2 years ago by Kristina
Kristina
Kristina
July 13, 2021 1:36 pm

Thank you for the informative article!

—————–
Kristina
https://switzerland-company.com

Last edited 2 years ago by Kristina