13 | Normally, to create NFTs on different blockchains, you would need to have access to blockchain nodes
14 | and create wallets on each blockchain. With NFT Maker, you can simply use an API key to connect to
15 | different blockchains through Tatum, and everything else is taken care of for you.
16 |
20 | If you want to sell NFTs but don’t want to build an entire NFT marketplace from scratch, then NFT Maker
21 | is the plugin you’ve been waiting for.
22 |
23 |
24 | Lazy Minting. Free IPFS Storage, forever. Supports Ethereum, Polygon, Binance Smart Chain, Celo, and
25 | Harmony.
26 |
27 |
28 | NFT Maker by Tatum allows you to turn your Woocommerce store into an NFT store with a simple plugin.
29 | Install our plugin, follow your usual WordPress product publishing flow, and just tick which blockchain
30 | you’d like to mint your NFTs on.
31 |
16 | If you want to work with the Mainnet network you need to have paid API key. If you dont have one, you
17 | can buy paid subscription at{" "}
18 |
19 | Tatum dashboard
20 |
21 | .
22 |
23 | )
24 | };
25 |
26 | const message = errorMessages[error.errorCode];
27 | return message ?? error.message;
28 | };
29 |
--------------------------------------------------------------------------------
/plugins/tatum/src/public/ts/widget.tsx:
--------------------------------------------------------------------------------
1 | /* istanbul ignore file: we do not need to care about the entry point file as errors are detected through E2E */
2 |
3 | /**
4 | * The entrypoint for the WordPress frontend widget.
5 | */
6 |
7 | import "@tatum/utils"; // Import once for startup polyfilling (e. g. setimmediate)
8 | import { render } from "react-dom";
9 | import { Widget } from "./widget/";
10 | import "./style/widget.scss";
11 |
12 | // Query DOM for all widget wrapper divs
13 | const widgets = document.querySelectorAll("div.react-demo-wrapper");
14 |
15 | // Iterate over the DOM nodes and render a React component into each node
16 | widgets.forEach((item) => render(, item));
17 |
--------------------------------------------------------------------------------
/plugins/tatum/src/public/ts/widget/index.tsx:
--------------------------------------------------------------------------------
1 | import { FC } from "react";
2 | import { __ } from "../utils";
3 |
4 | /* istanbul ignore next: Example implementations gets deleted the most time after plugin creation! */
5 | const Widget: FC<{}> = () => (
6 |
7 |
{__("Hello, World!")}
8 |
{__("I got generated from your new plugin!")}
9 |
10 | );
11 |
12 | export { Widget };
13 |
--------------------------------------------------------------------------------
/plugins/tatum/src/uninstall.php:
--------------------------------------------------------------------------------
1 | query("DELETE FROM $wpdb->options WHERE option_name LIKE 'tatum\_%';");
14 | $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "tatum_lazy_nft;");
15 | $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "tatum_prepared_nft;");
16 | wp_cache_flush();
--------------------------------------------------------------------------------
/plugins/tatum/test/cypress/integration/adminPage.feature:
--------------------------------------------------------------------------------
1 | Feature: Admin page
2 |
3 | Test all functionality available in the registered WP admin page
4 |
5 | # Temporarely deactivate this test as not supported in cypress@4
6 | # Scenario: Click REST API link
7 | # Given I am logged in WP admin dashboard
8 | # Then I open admin page
9 | # Then I click on REST API link in the admin notice and alert contains "hello"
10 |
11 | Scenario: Add and remove todo list item
12 | Given I am logged in WP admin dashboard
13 | Then I open admin page
14 | Then I type "Test Todo Item" and add todo, check it, afterwards delete it
--------------------------------------------------------------------------------
/plugins/tatum/test/cypress/step-definitions/adminPage/AdminPageObject.ts:
--------------------------------------------------------------------------------
1 | import * as pkg from "../../../../package.json";
2 |
3 | const PAGE_ID = `${pkg.slug}-component`;
4 |
5 | class AdminPageObject {
6 | static get todoContainer() {
7 | return cy.get(`#${PAGE_ID} > div > div.wp-styleguide--buttons`);
8 | }
9 |
10 | static todoItem(eq: number) {
11 | return this.todoContainer.find(`> ul > li:eq(${eq})`);
12 | }
13 |
14 | static todoItemRemoveLink(eq: number) {
15 | return this.todoItem(eq).find("a");
16 | }
17 |
18 | static get todoInput() {
19 | return this.todoContainer.children("input");
20 | }
21 |
22 | static get todoAddButton() {
23 | return this.todoInput.next();
24 | }
25 |
26 | static get menuPageLink() {
27 | return cy.get(`#toplevel_page_${PAGE_ID} > a`);
28 | }
29 |
30 | static get restApiLink() {
31 | return cy.get(`#${PAGE_ID} > div > div:nth-child(3) > p > a`);
32 | }
33 | }
34 |
35 | export { PAGE_ID, AdminPageObject };
36 |
--------------------------------------------------------------------------------
/plugins/tatum/test/cypress/step-definitions/adminPage/adminPage.ts:
--------------------------------------------------------------------------------
1 | import { Then } from "cypress-cucumber-preprocessor/steps";
2 | import { AdminPageObject } from "./AdminPageObject";
3 |
4 | Then("I open admin page", () => {
5 | AdminPageObject.menuPageLink.click();
6 | });
7 |
8 | Then("I click on REST API link in the admin notice and alert contains {string}", (alertText: string) => {
9 | const stub = cy.stub();
10 | cy.on("window:alert", stub);
11 |
12 | AdminPageObject.restApiLink
13 | .click()
14 | .wait(1000)
15 | .then(() => {
16 | expect(stub.getCall(0)).to.be.calledWith(Cypress.sinon.match(new RegExp(alertText)));
17 | });
18 | });
19 |
20 | Then("I type {string} and add todo, check it, afterwards delete it", (todo: string) => {
21 | AdminPageObject.todoInput.type(todo);
22 | AdminPageObject.todoAddButton.click();
23 | AdminPageObject.todoItem(0).should("contain.text", "Test Todo Item").find(":checkbox").check().should("be.checked");
24 | AdminPageObject.todoItemRemoveLink(0).click();
25 | AdminPageObject.todoItem(0).should("have.text", "No entries");
26 | });
27 |
--------------------------------------------------------------------------------
/plugins/tatum/test/cypress/step-definitions/common/common.ts:
--------------------------------------------------------------------------------
1 | import { Given } from "cypress-cucumber-preprocessor/steps";
2 |
3 | Given("I am logged in WP admin dashboard", () => {
4 | cy.visit("/wp-login.php?autologin=wordpress");
5 | cy.url().should("contain", "wp-admin");
6 | });
7 |
--------------------------------------------------------------------------------
/plugins/tatum/test/cypress/step-definitions/common/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./common";
2 |
--------------------------------------------------------------------------------
/plugins/tatum/test/cypress/support/commands.ts:
--------------------------------------------------------------------------------
1 | // ***********************************************
2 | // This example commands.js shows you how to
3 | // create various custom commands and overwrite
4 | // existing commands.
5 | //
6 | // For more comprehensive examples of custom
7 | // commands please read more here:
8 | // https://on.cypress.io/custom-commands
9 | // ***********************************************
10 | //
11 | //
12 | // -- This is a parent command --
13 | // Cypress.Commands.add("login", (email, password) => { ... })
14 | //
15 | //
16 | // -- This is a child command --
17 | // Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
18 | //
19 | //
20 | // -- This is a dual command --
21 | // Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
22 | //
23 | //
24 | // -- This is will overwrite an existing command --
25 | // Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
26 |
--------------------------------------------------------------------------------
/plugins/tatum/test/cypress/support/index.ts:
--------------------------------------------------------------------------------
1 | // ***********************************************************
2 | // This example support/index.js is processed and
3 | // loaded automatically before your test files.
4 | //
5 | // This is a great place to put global configuration and
6 | // behavior that modifies Cypress.
7 | //
8 | // You can change the location of this file or turn off
9 | // automatically serving support files with the
10 | // 'supportFile' configuration option.
11 | //
12 | // You can read more here:
13 | // https://on.cypress.io/configuration
14 | // ***********************************************************
15 |
16 | // Import commands.js using ES2015 syntax:
17 | import "./commands";
18 | import "cypress-plugin-retries";
19 |
20 | // Alternatively you can use CommonJS syntax:
21 | // require('./commands')
22 |
23 | // See https://docs.cypress.io/api/cypress-api/cookies.html#Whitelist-accepts
24 | Cypress.Cookies.defaults({
25 | whitelist: /wordpress_/
26 | });
27 |
28 | // `window.fetch` does not work yet with cypress (https://git.io/JfFdL)
29 | Cypress.on("window:before:load", (win: Window) => {
30 | win.fetch = null;
31 | });
32 |
--------------------------------------------------------------------------------
/plugins/tatum/test/cypress/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "allowJs": true,
4 | "target": "ES5",
5 | "esModuleInterop": true,
6 | "baseUrl": "../node_modules",
7 | "types": ["cypress", "node"],
8 | "resolveJsonModule": true
9 | },
10 | "include": ["**/*.*"]
11 | }
12 |
--------------------------------------------------------------------------------
/plugins/tatum/test/jest.config.js:
--------------------------------------------------------------------------------
1 | // Unfortunately the jest config can not be placed directly to package.json
2 | // because then it does not support inheritance.
3 |
4 | const base = require("../../../common/jest.base");
5 |
6 | module.exports = base;
7 |
--------------------------------------------------------------------------------
/plugins/tatum/test/jest/store/__mocks__/wp.tsx:
--------------------------------------------------------------------------------
1 | /* eslint-disable import/no-default-export */
2 | export default {};
3 |
--------------------------------------------------------------------------------
/plugins/tatum/test/jest/store/option.test.tsx:
--------------------------------------------------------------------------------
1 | import { OptionStore } from "../../../src/public/ts/store/option";
2 | import { RootStore } from "../../../src/public/ts/store";
3 |
4 | jest.mock(`${process.env.PACKAGE_SCOPE}/utils`);
5 | jest.mock("../../../src/public/ts/store/stores");
6 | jest.mock("mobx", () => ({
7 | observable: jest.fn(),
8 | runInAction: jest.fn().mockImplementation((callback) => callback())
9 | }));
10 |
11 | const mobx = require("mobx");
12 | const { BaseOptions } = require(`${process.env.PACKAGE_SCOPE}/utils`);
13 |
14 | describe("OptionStore", () => {
15 | it("should call the constructor correctly", () => {
16 | const slug = "jest";
17 |
18 | BaseOptions.getPureSlug.mockImplementation(() => slug);
19 |
20 | const actual = new OptionStore({} as RootStore);
21 |
22 | expect(actual.pureSlug).toEqual(slug);
23 | expect(actual.pureSlugCamelCased).toEqual(slug);
24 | expect(actual.rootStore).toEqual({});
25 | expect(mobx.runInAction).toHaveBeenCalledWith(expect.any(Function));
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/plugins/tatum/test/patchwork.json:
--------------------------------------------------------------------------------
1 | {
2 | "redefinable-internals": ["define"]
3 | }
4 |
--------------------------------------------------------------------------------
/plugins/tatum/test/phpunit.bootstrap.php:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 | phpunit
15 | ./phpunit/ActivatorTest.php
16 | ./phpunit/AssetsTest.php
17 | ./phpunit/CoreTest.php
18 |
19 |
20 |
21 |
22 | ../src/inc/
23 |
24 | ../src/inc/base/others
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/plugins/tatum/test/phpunit/ActivatorTest.php:
--------------------------------------------------------------------------------
1 | activator = Mockery::mock(Activator::class);
17 | }
18 |
19 | public function testActivate() {
20 | $this->activator->shouldReceive('activate')->passthru();
21 |
22 | $this->activator->activate();
23 |
24 | $this->addToAssertionCount(1);
25 | }
26 |
27 | public function testDeactivate() {
28 | $this->activator->shouldReceive('deactivate')->passthru();
29 |
30 | $this->activator->deactivate();
31 |
32 | $this->addToAssertionCount(1);
33 | }
34 |
35 | public function testDbDelta() {
36 | $this->activator->shouldReceive('dbDelta')->passthru();
37 |
38 | $this->activator->dbDelta(false);
39 |
40 | $this->addToAssertionCount(1);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/plugins/tatum/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../common/tsconfig.json",
3 | "include": ["src/public/ts/**/*", "scripts/**/*.ts", "test/jest/**/*"],
4 | "compilerOptions": {
5 | "outDir": "types/"
6 | },
7 | "typedocOptions": {
8 | "mode": "modules",
9 | "out": "docs/js"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/plugins/tatum/wordpress.org/assets/banner-1544x500.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tatumio/wordpress-plugin/d9160a8f2f50d9fc6b7ce8f5ad47732af34138b0/plugins/tatum/wordpress.org/assets/banner-1544x500.png
--------------------------------------------------------------------------------
/plugins/tatum/wordpress.org/assets/banner-772x250.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tatumio/wordpress-plugin/d9160a8f2f50d9fc6b7ce8f5ad47732af34138b0/plugins/tatum/wordpress.org/assets/banner-772x250.png
--------------------------------------------------------------------------------
/plugins/tatum/wordpress.org/assets/icon-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tatumio/wordpress-plugin/d9160a8f2f50d9fc6b7ce8f5ad47732af34138b0/plugins/tatum/wordpress.org/assets/icon-128x128.png
--------------------------------------------------------------------------------
/plugins/tatum/wordpress.org/assets/icon-256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tatumio/wordpress-plugin/d9160a8f2f50d9fc6b7ce8f5ad47732af34138b0/plugins/tatum/wordpress.org/assets/icon-256x256.png
--------------------------------------------------------------------------------
/plugins/tatum/wordpress.org/assets/screenshot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tatumio/wordpress-plugin/d9160a8f2f50d9fc6b7ce8f5ad47732af34138b0/plugins/tatum/wordpress.org/assets/screenshot-1.png
--------------------------------------------------------------------------------
/plugins/tatum/wordpress.org/assets/screenshot-10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tatumio/wordpress-plugin/d9160a8f2f50d9fc6b7ce8f5ad47732af34138b0/plugins/tatum/wordpress.org/assets/screenshot-10.png
--------------------------------------------------------------------------------
/plugins/tatum/wordpress.org/assets/screenshot-11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tatumio/wordpress-plugin/d9160a8f2f50d9fc6b7ce8f5ad47732af34138b0/plugins/tatum/wordpress.org/assets/screenshot-11.png
--------------------------------------------------------------------------------
/plugins/tatum/wordpress.org/assets/screenshot-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tatumio/wordpress-plugin/d9160a8f2f50d9fc6b7ce8f5ad47732af34138b0/plugins/tatum/wordpress.org/assets/screenshot-2.png
--------------------------------------------------------------------------------
/plugins/tatum/wordpress.org/assets/screenshot-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tatumio/wordpress-plugin/d9160a8f2f50d9fc6b7ce8f5ad47732af34138b0/plugins/tatum/wordpress.org/assets/screenshot-3.png
--------------------------------------------------------------------------------
/plugins/tatum/wordpress.org/assets/screenshot-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tatumio/wordpress-plugin/d9160a8f2f50d9fc6b7ce8f5ad47732af34138b0/plugins/tatum/wordpress.org/assets/screenshot-4.png
--------------------------------------------------------------------------------
/plugins/tatum/wordpress.org/assets/screenshot-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tatumio/wordpress-plugin/d9160a8f2f50d9fc6b7ce8f5ad47732af34138b0/plugins/tatum/wordpress.org/assets/screenshot-5.png
--------------------------------------------------------------------------------
/plugins/tatum/wordpress.org/assets/screenshot-6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tatumio/wordpress-plugin/d9160a8f2f50d9fc6b7ce8f5ad47732af34138b0/plugins/tatum/wordpress.org/assets/screenshot-6.png
--------------------------------------------------------------------------------
/plugins/tatum/wordpress.org/assets/screenshot-7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tatumio/wordpress-plugin/d9160a8f2f50d9fc6b7ce8f5ad47732af34138b0/plugins/tatum/wordpress.org/assets/screenshot-7.png
--------------------------------------------------------------------------------
/plugins/tatum/wordpress.org/assets/screenshot-8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tatumio/wordpress-plugin/d9160a8f2f50d9fc6b7ce8f5ad47732af34138b0/plugins/tatum/wordpress.org/assets/screenshot-8.png
--------------------------------------------------------------------------------
/plugins/tatum/wordpress.org/assets/screenshot-9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tatumio/wordpress-plugin/d9160a8f2f50d9fc6b7ce8f5ad47732af34138b0/plugins/tatum/wordpress.org/assets/screenshot-9.png
--------------------------------------------------------------------------------
/plugins/tatum/wordpress.org/main.yml:
--------------------------------------------------------------------------------
1 | # This is a basic workflow to help you get started with Actions
2 |
3 | name: WordPress Plugin Deploy
4 |
5 | # Controls when the workflow will run
6 | on:
7 | push:
8 | tags:
9 | - "*"
10 |
11 | # Allows you to run this workflow manually from the Actions tab
12 | workflow_dispatch:
13 |
14 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel
15 | jobs:
16 | tag:
17 | name: Deploy to SVN
18 | runs-on: ubuntu-latest
19 | steps:
20 | - uses: actions/checkout@master
21 | - name: WordPress Plugin Deploy
22 | uses: 10up/action-wordpress-plugin-deploy@stable
23 | env:
24 | SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
25 | SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
26 | SLUG: tatum
--------------------------------------------------------------------------------