# Woocommerce

The WooCommerce 8Pay Payment Gateway plugin allows merchants to receive crypto payments on their stores.

## Ensure Compatibility with WooCommerce 8.3+

As of WooCommerce version 8.3, the default checkout experience has shifted from classic shortcodes to a new block-based checkout. To continue using the  plugin , you must switch the checkout back to the classic shortcode.

> *<mark style="color:red;">**Leaving the default block-based checkout experience will result in a payment method not being detected it**</mark>*<mark style="color:red;">**&#x20;**</mark><mark style="color:red;">**will result in the checkout page displaying an error message stating,**</mark>**&#x20;**<mark style="color:orange;">**“There are no payment methods available.”**</mark>&#x20;

We will provide three methods to ensure that you are utilizing the Classic Cart and Checkout.

{% tabs %}
{% tab title="First Method" %}
From your wordpress admin page go to **Pages -> All Pages**, and then locate and edit the **Cart/Checkout** page.

1. Click to the **Document Overview**  <img src="https://1407092581-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MaSi4Xd7ZGMPukCzifF%2Fuploads%2FPYCjKZxJYK9AmNcE4Ko2%2Fimage.png?alt=media&#x26;token=51130120-2bff-45d2-b6fb-33545fae3789" alt="" data-size="line">&#x20;
2. Click on **Checkout** under the **List View** ![](https://1407092581-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MaSi4Xd7ZGMPukCzifF%2Fuploads%2FSbbUuIMwoPIv6IFpTaaP%2Fimage.png?alt=media\&token=17d26e17-2923-4383-97cd-1271dafda52d)
3. Click on **Checkout Totals** ![](https://1407092581-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MaSi4Xd7ZGMPukCzifF%2Fuploads%2FDLZElDhLdkKAAhZk4Uu6%2Fimage.png?alt=media\&token=6bebd147-2d8a-4533-beaf-a13781648481)
4. Click on Switch to classic Checkout

&#x20;<img src="https://1407092581-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MaSi4Xd7ZGMPukCzifF%2Fuploads%2FZpPa5FJo6ck8uXXJlXYS%2Fimage.png?alt=media&#x26;token=70b4ba95-d37e-49a9-9a07-08a73650b3b8" alt="" data-size="original">

Please refer to the attached screenshot for a comprehensive overview of all the steps involved.

<figure><img src="https://1407092581-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MaSi4Xd7ZGMPukCzifF%2Fuploads%2FJlWfcUkW6EgKarzONY9y%2Fimage.png?alt=media&#x26;token=8756fbc2-237e-4584-a6e6-c0f699aced90" alt=""><figcaption></figcaption></figure>

{% endtab %}

{% tab title="Second Method" %}

> *Please refer to the WooCommerce documentation section titled* [*Reverting to the Classic Cart and Checkout*](https://woocommerce.com/document/woocommerce-store-editing/customizing-cart-and-checkout/#reverting-to-the-classic-cart-and-checkout)

1. **If using a block theme**: Go to **Appearance -> Editor -> Pages ->** Select Cart or Checkout -> click the *Edit icon*\
   **localIf using a non-block theme**: Go to ***Pages -> All Pages***, and then locate and edit the Cart/Checkout page.
2. Open the List View and select the Cart or Checkout block.
3. Click the “**Transform**” button, which is leftmost in the block toolbar
4. Choose “**Classic Shortcode**”.
5. The block will be transformed into a Classic Shortcode placeholder block.
6. Save your changes by clicking the Save button in the top bar.

<figure><img src="https://1407092581-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MaSi4Xd7ZGMPukCzifF%2Fuploads%2F70QHJRHSn50c61NUQCmA%2Fimage.png?alt=media&#x26;token=927d64a1-fba1-4cf9-84ef-03498a65477a" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Third Method" %}

> The following youtube video shows how to manually switch the checkout  to the short-code version

{% embed url="<https://www.youtube.com/watch?v=3szAM1EJkHo>" %}

{% endtab %}
{% endtabs %}

## Installation

#### Automatic installation

Automatic installation is the easiest option as WordPress handles the file transfers itself and you don’t need to leave your web browser. To do an automatic install of the 8Pay Payment Gateway plugin, log in to your WordPress dashboard, navigate to the Plugins menu and click Add New.

In the search field type “8Pay Payment Gateway” and click Search Plugins. Once you’ve found our plugin you can view details about it such as the point release, rating, and description. Most importantly, of course, you can install it by simply clicking "Install Now", then "Activate".

#### Manual installation

The manual installation method involves downloading our plugin from [here](https://it.wordpress.org/plugins/8pay-payment-gateway/) and uploading it to your web server via your favorite FTP application. The WordPress codex contains instructions on how to do this [here](http://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation).

## Setup

### One-Time Payment

Navigate to the "Plugin" menu and click on "Settings" in the 8Pay Payment Gateway row.

![](https://1407092581-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MaSi4Xd7ZGMPukCzifF%2F-MedMG2OYPYZYB4waPJ9%2F-MedNXvskxTB29z8X2rJ%2F2021-07-15_105632.jpg?alt=media\&token=8230517c-4860-416f-bd52-19cc73de92ad)

Fill the following fields:

* Description: the payment method description visible on the checkout page
* API Key: the api key generated from the [API keys](https://app.8pay.network/keys) section of the web app
* Tokens: the tokens available at checkout
* Receiver: the blockchain address where payments will be received

![](https://1407092581-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MaSi4Xd7ZGMPukCzifF%2Fuploads%2FawVmD6WG1yIii3yV09We%2Fscreenshot-2.jpg?alt=media\&token=493aa7c1-d139-4cc4-8dbf-d8bb76f7144f)

![](https://1407092581-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MaSi4Xd7ZGMPukCzifF%2Fuploads%2FVnsTHGxpwmSAkrKosP5f%2Fscreenshot-3.jpg?alt=media\&token=50d564e1-4cfe-44b2-ae8e-3ec306ec9541)

### Recurring Payments

The plugin also supports recurring payment on subscription products created with the [WooCommerce Subscriptions](https://woocommerce.com/products/woocommerce-subscriptions/) plugin.

To setup a recurring payment for a product follow these steps:

* Create one or more Automatic Payment on the [Payments](https://app.8pay.network/payments) section of the web-app&#x20;
* Go to the WooCommerce "Products" section
* Click on your subscription product
* Scroll down to the product data section and select "Attributes"
* Add a new attribute "8pay\_plan\_ids" containing a comma separated list of plan ids that you want to associate to the product (up to one per chain)

<figure><img src="https://1407092581-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MaSi4Xd7ZGMPukCzifF%2Fuploads%2FCHgDAauJFRnCpJNd2TkW%2F2023-03-23%2012.02.47.jpg?alt=media&#x26;token=2e716d18-e6e8-40f7-8975-46132847a4e2" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1407092581-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MaSi4Xd7ZGMPukCzifF%2Fuploads%2Ft4Ggnzu0fTBQurWovF4p%2F2023-03-23%2012.04.29.jpg?alt=media&#x26;token=6d5e0082-4314-4ff5-b80e-c503445731c5" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1407092581-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MaSi4Xd7ZGMPukCzifF%2Fuploads%2F2EovwYW1VkAqTMShLWbE%2F2023-03-23%2012.07.15.jpg?alt=media&#x26;token=cd8c0aed-a779-43ed-b3f2-ad5ddda5c7c7" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1407092581-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MaSi4Xd7ZGMPukCzifF%2Fuploads%2FqgUqHWOmdvRialidbMt6%2F2023-03-22%2011.51.24.jpg?alt=media&#x26;token=ebc7bf02-830c-4f72-889a-41451b39077a" alt=""><figcaption></figcaption></figure>
