├── packages
├── settings
│ ├── .gitignore
│ ├── README.md
│ ├── postcss.config.js
│ ├── src
│ │ ├── components
│ │ │ ├── snackbar
│ │ │ │ ├── index.tsx
│ │ │ │ ├── snackbar-list.tsx
│ │ │ │ ├── snackbar.tsx
│ │ │ │ ├── use-snackbar.tsx
│ │ │ │ └── provider.tsx
│ │ │ ├── label.tsx
│ │ │ ├── error.tsx
│ │ │ ├── tabs
│ │ │ │ ├── tab-item.tsx
│ │ │ │ ├── tab-bar.tsx
│ │ │ │ └── index.tsx
│ │ │ └── notice.tsx
│ │ ├── custom.d.ts
│ │ ├── translations
│ │ │ └── index.ts
│ │ ├── screens
│ │ │ ├── header.tsx
│ │ │ ├── checkout
│ │ │ │ └── order-status-select.tsx
│ │ │ ├── general
│ │ │ │ └── barcode-select.tsx
│ │ │ └── tools
│ │ │ │ └── index.tsx
│ │ ├── hooks
│ │ │ └── use-notices.tsx
│ │ └── index.tsx
│ ├── assets
│ │ ├── chevron-down.svg
│ │ ├── check.svg
│ │ ├── close-icon.svg
│ │ ├── email.svg
│ │ ├── drag-icon.svg
│ │ ├── book.svg
│ │ ├── comment-question.svg
│ │ ├── discord.svg
│ │ └── wcpos-icon.svg
│ ├── tailwind.config.js
│ ├── babel.config.js
│ └── tsconfig.json
├── eslint
│ ├── tsconfig.json
│ ├── README.md
│ ├── .github
│ │ ├── dependabot.yml
│ │ ├── workflows
│ │ │ └── publish-npm.yml
│ │ └── SECURITY.md
│ ├── index.js
│ ├── package.json
│ └── LICENSE
└── analytics
│ ├── babel.config.js
│ ├── tsconfig.json
│ └── src
│ ├── translations
│ └── index.ts
│ └── index.tsx
├── pnpm-workspace.yaml
├── .github
├── hookdoc-tmpl
│ ├── README.md
│ ├── static
│ │ └── README.md
│ └── layout.tmpl
├── ISSUE_TEMPLATE
│ ├── 2-Question.md
│ ├── 3-Feature_request.md
│ └── 1-Bug_report.md
├── SECURITY.md
├── dependabot.yml
└── workflows
│ ├── reusable
│ └── setup.yml
│ ├── sync-wporg-assets.yml
│ ├── build-docs.yml
│ ├── wporg-deploy.yml
│ ├── wp-engine.yml
│ ├── tests.yml
│ ├── manual-release.yml
│ └── update-pot.yml
├── assets
├── css
│ └── README.md
├── img
│ ├── README.md
│ ├── wcpos-icon.png
│ ├── icon-128x128.png
│ ├── icon-256x256.png
│ ├── icon-square.png
│ ├── wcpos-pro-icon.png
│ ├── wcpos-icon-b&w.svg
│ ├── icon-square.svg
│ ├── wcpos-icon.svg
│ ├── icon-round.svg
│ ├── wp-menu-icon.svg
│ └── animated
│ │ ├── pulsing-letters.svg
│ │ ├── drawn-letters.svg
│ │ └── slide-down.svg
├── js
│ └── README.md
└── fonts
│ └── Inter-Medium.4401ca19be5f325e28ee45d96516a35e.ttf
├── .env.example
├── .wordpress-org
├── banner-772x250.jpg
├── icon-128x128.png
├── icon-256x256.png
├── screenshot-1.png
├── banner-1544x500.jpg
├── icon-128x128-old.png
└── banner-772x250-old.jpg
├── includes
├── Services
│ ├── README.md
│ └── Cache.php
├── Pro.php
├── Admin
│ ├── Orders
│ │ └── HPOS_Single_Order.php
│ ├── templates
│ │ └── upgrade.php
│ ├── Products
│ │ └── templates
│ │ │ ├── variation-metabox-pos-barcode.php
│ │ │ ├── variation-metabox-visibility-select.php
│ │ │ └── quick-edit-visibility-select.php
│ ├── Analytics.php
│ ├── Notices.php
│ └── Permalink.php
├── updates
│ ├── update-1.8.0.php
│ ├── update-1.0.0-beta.1.php
│ ├── update-0.4.php
│ └── update-0.4.6.php
├── i18n.php
├── API
│ ├── Tax_Classes_Controller.php
│ ├── Shipping_Methods_Controller.php
│ └── Traits
│ │ ├── Query_Helpers.php
│ │ └── Product_Helpers.php
├── Integrations
│ ├── WPSEO.php
│ └── WePOS.php
├── Logger.php
├── Registry.php
├── Templates
│ └── Received.php
└── wcpos-store-functions.php
├── vendor_prefixed
├── firebase
│ └── php-jwt
│ │ └── src
│ │ ├── SignatureInvalidException.php
│ │ ├── ExpiredException.php
│ │ ├── BeforeValidException.php
│ │ ├── JWTExceptionWithPayloadInterface.php
│ │ └── Key.php
└── phpfastcache
│ └── phpfastcache
│ ├── bin
│ └── dependencies
│ │ └── Psr
│ │ ├── Cache
│ │ └── src
│ │ │ ├── CacheException.php
│ │ │ └── InvalidArgumentException.php
│ │ └── SimpleCache
│ │ └── src
│ │ ├── CacheException.php
│ │ └── InvalidArgumentException.php
│ └── lib
│ └── Phpfastcache
│ ├── Drivers
│ ├── Apcu
│ │ ├── Config.php
│ │ └── Item.php
│ ├── Devfalse
│ │ ├── Config.php
│ │ └── Item.php
│ ├── Devnull
│ │ ├── Config.php
│ │ └── Item.php
│ ├── Devtrue
│ │ ├── Config.php
│ │ └── Item.php
│ ├── Wincache
│ │ ├── Config.php
│ │ └── Item.php
│ ├── Zenddisk
│ │ ├── Config.php
│ │ └── Item.php
│ ├── Zendshm
│ │ ├── Config.php
│ │ └── Item.php
│ ├── Memstatic
│ │ ├── Config.php
│ │ └── Item.php
│ ├── Files
│ │ ├── Config.php
│ │ └── Item.php
│ ├── Sqlite
│ │ ├── Config.php
│ │ └── Item.php
│ ├── Leveldb
│ │ ├── Config.php
│ │ └── Item.php
│ ├── Cookie
│ │ ├── Config.php
│ │ └── Item.php
│ ├── Couchbasev3
│ │ ├── Config.php
│ │ └── Item.php
│ ├── Ssdb
│ │ └── Item.php
│ ├── Redis
│ │ └── Item.php
│ ├── Predis
│ │ └── Item.php
│ ├── Couchdb
│ │ └── Item.php
│ ├── Mongodb
│ │ └── Item.php
│ ├── Memcache
│ │ └── Item.php
│ ├── Cassandra
│ │ └── Item.php
│ ├── Couchbase
│ │ └── Item.php
│ └── Memcached
│ │ └── Item.php
│ ├── Cluster
│ ├── AggregatablePoolInterface.php
│ ├── Drivers
│ │ ├── FullReplication
│ │ │ └── Item.php
│ │ ├── SemiReplication
│ │ │ └── Item.php
│ │ ├── RandomReplication
│ │ │ ├── Item.php
│ │ │ └── RandomReplicationCluster.php
│ │ └── MasterSlaveReplication
│ │ │ └── Item.php
│ ├── ClusterPoolInterface.php
│ ├── ClusterPoolTrait.php
│ └── ItemAbstract.php
│ ├── Config
│ ├── Config.php
│ └── ConfigurationOptionInterface.php
│ ├── Exceptions
│ ├── PhpfastcacheCoreException.php
│ ├── PhpfastcacheLogicException.php
│ ├── PhpfastcacheDriverException.php
│ ├── PhpfastcacheDeprecatedException.php
│ ├── PhpfastcacheReplicationException.php
│ ├── PhpfastcacheDriverCheckException.php
│ ├── PhpfastcacheDriverConnectException.php
│ ├── PhpfastcacheDriverNotFoundException.php
│ ├── PhpfastcacheInstanceNotFoundException.php
│ ├── PhpfastcacheInvalidConfigurationException.php
│ ├── PhpfastcacheRootException.php
│ ├── PhpfastcacheUnsupportedOperationException.php
│ ├── PhpfastcacheExceptionInterface.php
│ ├── PhpfastcacheSimpleCacheException.php
│ ├── PhpfastcacheInvalidArgumentException.php
│ ├── PhpfastcacheInvalidArgumentTypeException.php
│ └── PhpfastcacheIOException.php
│ ├── Util
│ ├── ClassNamespaceResolverInterface.php
│ └── MemcacheDriverCollisionDetectorTrait.php
│ ├── Event
│ ├── EventManagerDispatcherInterface.php
│ ├── EventManagerDispatcherTrait.php
│ └── EventManagerInterface.php
│ ├── Entities
│ └── ItemBatch.php
│ ├── Core
│ └── Pool
│ │ └── AbstractDriverPoolTrait.php
│ └── Helper
│ └── CacheConditionalHelper.php
├── .distignore
├── tests
├── framework
│ ├── class-wc-unit-test-factory.php
│ └── class-wp-test-spy-rest-server.php
├── classes-with-mockable-static-methods.php
├── mockable-functions.php
├── includes
│ ├── Helpers
│ │ └── Utils.php
│ ├── Test_Setup.php
│ └── Test_Templates.php
├── Tools
│ └── CodeHacking
│ │ └── Hacks
│ │ └── BypassFinalsHack.php
└── Helpers
│ └── ShippingHelper.php
├── turbo.json
├── php-scoper
├── composer.json
└── scoper.inc.php
├── .vscode
├── settings.json
└── launch.json
├── .wp-env.json
├── .gitignore
├── .editorconfig
├── hookdoc-conf.json
├── .phpunit.xml.dist
├── scripts
└── clean-node-modules.js
├── package.json
└── uninstall.php
/packages/settings/.gitignore:
--------------------------------------------------------------------------------
1 | compilation-stats.json
--------------------------------------------------------------------------------
/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | packages:
2 | - "packages/*"
--------------------------------------------------------------------------------
/.github/hookdoc-tmpl/README.md:
--------------------------------------------------------------------------------
1 | Work in progress ...
2 |
--------------------------------------------------------------------------------
/assets/css/README.md:
--------------------------------------------------------------------------------
1 | CSS assets are compiled during CI
2 |
--------------------------------------------------------------------------------
/assets/img/README.md:
--------------------------------------------------------------------------------
1 | IMG assets are compiled during CI
2 |
--------------------------------------------------------------------------------
/assets/js/README.md:
--------------------------------------------------------------------------------
1 | JS assets are compiled during CI
2 |
--------------------------------------------------------------------------------
/.env.example:
--------------------------------------------------------------------------------
1 | # Use the development flag to use live js
2 | DEVELOPMENT=true
--------------------------------------------------------------------------------
/packages/settings/README.md:
--------------------------------------------------------------------------------
1 | Source folder for admin settings javascript and css
--------------------------------------------------------------------------------
/packages/eslint/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@wcpos/tsconfig/base.json"
3 | }
4 |
--------------------------------------------------------------------------------
/packages/eslint/README.md:
--------------------------------------------------------------------------------
1 | # Shared Eslint configuration for [WCPOS](https://wcpos.com) React Native app
--------------------------------------------------------------------------------
/assets/img/wcpos-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wcpos/woocommerce-pos/HEAD/assets/img/wcpos-icon.png
--------------------------------------------------------------------------------
/.github/hookdoc-tmpl/static/README.md:
--------------------------------------------------------------------------------
1 | Static files for HookDocs - https://wcpos.github.io/woocommerce-pos/
2 |
--------------------------------------------------------------------------------
/assets/img/icon-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wcpos/woocommerce-pos/HEAD/assets/img/icon-128x128.png
--------------------------------------------------------------------------------
/assets/img/icon-256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wcpos/woocommerce-pos/HEAD/assets/img/icon-256x256.png
--------------------------------------------------------------------------------
/assets/img/icon-square.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wcpos/woocommerce-pos/HEAD/assets/img/icon-square.png
--------------------------------------------------------------------------------
/assets/img/wcpos-pro-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wcpos/woocommerce-pos/HEAD/assets/img/wcpos-pro-icon.png
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/2-Question.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Question
3 | about: Ask a question.❓
4 | labels: "question"
5 | ---
6 |
--------------------------------------------------------------------------------
/.wordpress-org/banner-772x250.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wcpos/woocommerce-pos/HEAD/.wordpress-org/banner-772x250.jpg
--------------------------------------------------------------------------------
/.wordpress-org/icon-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wcpos/woocommerce-pos/HEAD/.wordpress-org/icon-128x128.png
--------------------------------------------------------------------------------
/.wordpress-org/icon-256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wcpos/woocommerce-pos/HEAD/.wordpress-org/icon-256x256.png
--------------------------------------------------------------------------------
/.wordpress-org/screenshot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wcpos/woocommerce-pos/HEAD/.wordpress-org/screenshot-1.png
--------------------------------------------------------------------------------
/.wordpress-org/banner-1544x500.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wcpos/woocommerce-pos/HEAD/.wordpress-org/banner-1544x500.jpg
--------------------------------------------------------------------------------
/.wordpress-org/icon-128x128-old.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wcpos/woocommerce-pos/HEAD/.wordpress-org/icon-128x128-old.png
--------------------------------------------------------------------------------
/.wordpress-org/banner-772x250-old.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wcpos/woocommerce-pos/HEAD/.wordpress-org/banner-772x250-old.jpg
--------------------------------------------------------------------------------
/packages/settings/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | '@tailwindcss/postcss': {},
4 | autoprefixer: {},
5 | },
6 | };
7 |
--------------------------------------------------------------------------------
/includes/Services/README.md:
--------------------------------------------------------------------------------
1 | ## Services
2 |
3 | Shared service classes, eg: between Frontend, Admin and API. Also note that the Pro plugin may use these Services.
--------------------------------------------------------------------------------
/packages/settings/src/components/snackbar/index.tsx:
--------------------------------------------------------------------------------
1 | export { SnackbarProvider } from './provider';
2 | export { useSnackbar as default } from './use-snackbar';
3 |
--------------------------------------------------------------------------------
/packages/settings/assets/chevron-down.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/3-Feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: You want something added to the boilerplate. 🎉
4 | labels: "enhancement"
5 | ---
6 |
--------------------------------------------------------------------------------
/packages/settings/src/custom.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.svg' {
2 | const content: React.FunctionComponent>;
3 | export default content;
4 | }
5 |
--------------------------------------------------------------------------------
/assets/fonts/Inter-Medium.4401ca19be5f325e28ee45d96516a35e.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wcpos/woocommerce-pos/HEAD/assets/fonts/Inter-Medium.4401ca19be5f325e28ee45d96516a35e.ttf
--------------------------------------------------------------------------------
/packages/settings/tailwind.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('tailwindcss').Config} */
2 | export default {
3 | darkMode: 'media',
4 | plugins: [require('@headlessui/tailwindcss')],
5 | };
6 |
--------------------------------------------------------------------------------
/vendor_prefixed/firebase/php-jwt/src/SignatureInvalidException.php:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/includes/Pro.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * @see https://wcpos.com
9 | */
10 |
11 | namespace WCPOS\WooCommercePOS;
12 |
13 | class Pro {
14 | }
15 |
--------------------------------------------------------------------------------
/includes/Admin/Orders/HPOS_Single_Order.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * @see http://wcpos.com
8 | */
9 |
10 | namespace WCPOS\WooCommercePOS;
11 |
12 | // Run template migration
13 | Templates\Defaults::run_migration();
14 |
15 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/bin/dependencies/Psr/SimpleCache/src/CacheException.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/packages/settings/src/translations/index.ts:
--------------------------------------------------------------------------------
1 | import * as Transifex from '@transifex/native';
2 | import { T, UT } from '@transifex/react';
3 |
4 | const tx = Transifex.tx;
5 | const t = Transifex.t;
6 |
7 | tx.init({
8 | token: '1/09853773ef9cda3be96c8c451857172f26927c0f',
9 | filterTags: 'wp-admin-settings',
10 | });
11 |
12 | export { tx, t, T, UT };
13 |
--------------------------------------------------------------------------------
/packages/settings/assets/email.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/tests/framework/class-wc-unit-test-factory.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/packages/eslint/.github/workflows/publish-npm.yml:
--------------------------------------------------------------------------------
1 | on: push
2 |
3 | jobs:
4 | publish:
5 | runs-on: ubuntu-latest
6 | steps:
7 | - uses: actions/checkout@v3
8 | - uses: actions/setup-node@v2.4.1
9 | with:
10 | node-version: 16.x
11 | - run: npm install
12 | - run: npm test
13 | - uses: JS-DevTools/npm-publish@v1
14 | with:
15 | token: ${{ secrets.NPM_TOKEN }}
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/bin/dependencies/Psr/SimpleCache/src/InvalidArgumentException.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/turbo.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://turbo.build/schema.v2.json",
3 | "tasks": {
4 | "lint": {
5 | "outputs": []
6 | },
7 | "test": {
8 | "dependsOn": [],
9 | "outputs": []
10 | },
11 | "build": {
12 | "dependsOn": [
13 | "^build"
14 | ],
15 | "outputs": [
16 | "build/**",
17 | "node_modules/.cache/metro/**"
18 | ]
19 | },
20 | "dev": {
21 | "cache": false,
22 | "persistent": true
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/bin/dependencies/Psr/Cache/src/InvalidArgumentException.php:
--------------------------------------------------------------------------------
1 | =7.4",
7 | "ext-json": "*",
8 | "firebase/php-jwt": "v6.9.0",
9 | "phpfastcache/phpfastcache": "^8.1"
10 | },
11 | "minimum-stability": "dev",
12 | "prefer-stable": true,
13 | "config": {
14 | "platform": {
15 | "php": "7.4"
16 | },
17 | "preferred-install": "dist",
18 | "sort-packages": true
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/vendor_prefixed/firebase/php-jwt/src/ExpiredException.php:
--------------------------------------------------------------------------------
1 | payload = $payload;
11 | }
12 | public function getPayload() : object
13 | {
14 | return $this->payload;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "editor.insertSpaces": false,
3 | "editor.detectIndentation": true,
4 | "editor.formatOnSave": true,
5 | "eslint.validate": [
6 | "javascript",
7 | "javascriptreact",
8 | {
9 | "language": "typescript",
10 | "autoFix": true
11 | },
12 | {
13 | "language": "typescriptreact",
14 | "autoFix": true
15 | }
16 | ],
17 | "typescript.tsdk": "node_modules/typescript/lib",
18 | "jest.jestCommandLine": "yarn jest"
19 | }
--------------------------------------------------------------------------------
/vendor_prefixed/firebase/php-jwt/src/BeforeValidException.php:
--------------------------------------------------------------------------------
1 | payload = $payload;
11 | }
12 | public function getPayload() : object
13 | {
14 | return $this->payload;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/includes/updates/update-1.0.0-beta.1.php:
--------------------------------------------------------------------------------
1 | add_cap( $cap );
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/php-scoper/scoper.inc.php:
--------------------------------------------------------------------------------
1 | 'WCPOS\\Vendor',
7 |
8 | 'finders' => array(
9 | Finder::create()->files()->in( 'vendor/firebase/php-jwt' )->name( '*.php' ),
10 | Finder::create()->files()->in( 'vendor/phpfastcache/phpfastcache' )->name( '*.php' ),
11 | ),
12 |
13 | 'patchers' => array(
14 | function ( string $filePath, string $prefix, string $content ) {
15 | return $content;
16 | },
17 | ),
18 |
19 | 'whitelist' => array(),
20 | );
21 |
--------------------------------------------------------------------------------
/vendor_prefixed/firebase/php-jwt/src/JWTExceptionWithPayloadInterface.php:
--------------------------------------------------------------------------------
1 | void;
8 | }
9 |
10 | export const SnackbarList = ({ snackbars, removeSnackbar }: SnackbarListProps) => {
11 | return (
12 | <>
13 | {snackbars.map((snackbar) => (
14 | removeSnackbar(snackbar.id)} key={snackbar.id} {...snackbar} />
15 | ))}
16 | >
17 | );
18 | };
19 |
--------------------------------------------------------------------------------
/packages/settings/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "lib": [
4 | "dom",
5 | "dom.iterable",
6 | "esnext"
7 | ],
8 | "sourceMap": true,
9 | "allowJs": true,
10 | "allowSyntheticDefaultImports": true,
11 | "skipLibCheck": true,
12 | "esModuleInterop": true,
13 | "strict": true,
14 | "forceConsistentCasingInFileNames": true,
15 | "moduleResolution": "node",
16 | "resolveJsonModule": true,
17 | "isolatedModules": true,
18 | "jsx": "react",
19 | },
20 | "include": [
21 | "src"
22 | ]
23 | }
--------------------------------------------------------------------------------
/tests/mockable-functions.php:
--------------------------------------------------------------------------------
1 |
10 | *
11 | * @see http://wcpos.com
12 | */
13 |
14 | namespace WCPOS\WooCommercePOS;
15 |
16 | class i18n {
17 |
18 | /**
19 | * Load the plugin text domain for translation.
20 | */
21 | public function construct() {
22 | load_plugin_textdomain( 'woocommerce-pos', false, PLUGIN_PATH . '/languages/' );
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/.github/workflows/sync-wporg-assets.yml:
--------------------------------------------------------------------------------
1 | name: Sync assets with wordpress.org
2 |
3 | on:
4 | workflow_dispatch:
5 |
6 | jobs:
7 | run:
8 | runs-on: ubuntu-latest
9 | name: Push assets to wporg
10 | steps:
11 | - uses: actions/checkout@v4
12 | - name: WordPress.org plugin asset/readme update
13 | uses: 10up/action-wordpress-plugin-asset-update@stable
14 | env:
15 | SLUG: woocommerce-pos
16 | IGNORE_OTHER_FILES: true
17 | SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
18 | SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
19 |
--------------------------------------------------------------------------------
/includes/Admin/templates/upgrade.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * @see http://www.kilbot.com
8 | */
9 | ?>
10 |
11 |
12 |
13 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | Thumbs.db
3 | wp-cli.local.yml
4 | node_modules/
5 | *.zip
6 | *.tar.gz
7 | .idea
8 | coverage/
9 | build/
10 | vendor/
11 | c3.php
12 | !/tests
13 | /tests/*.suite.yml
14 | /tests/_output
15 | .env
16 | .codeception.yml
17 | composer.lock
18 | .wp-env.override.json
19 | assets/js/*
20 | !assets/js/README.md
21 | !assets/js/indexeddb.worker.js
22 | assets/css/*
23 | !assets/css/README.md
24 | assets/asset-manifest.json
25 | assets/static
26 | assets/report.html
27 | yarn.lock
28 | .yarn/install-state.gz
29 | .yarn/cache
30 | hookdocs
31 | *.cache
32 | phpunit.xml
33 | tests/logs/junit.xml
34 | .turbo
35 | .cursor
--------------------------------------------------------------------------------
/packages/settings/src/components/label.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 |
3 | import { Tooltip, Icon } from '@wordpress/components';
4 |
5 | interface LabelProps {
6 | children: React.ReactNode;
7 | tip?: string;
8 | }
9 |
10 | const Label = ({ children, tip }: LabelProps) => {
11 | return (
12 |
13 | {children}
14 | {tip && (
15 |
16 |
17 |
18 |
19 |
20 | )}
21 |
22 | );
23 | };
24 |
25 | export default Label;
26 |
--------------------------------------------------------------------------------
/packages/settings/src/screens/header.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 |
3 | import PosIcon from '../../assets/wcpos-icon.svg';
4 | import { t } from '../translations';
5 |
6 | const Header = () => {
7 | return (
8 |
9 |
12 |
13 | {t('Settings', { _tags: 'wp-admin-settings' })}
14 |
15 |
16 | );
17 | };
18 |
19 | export default Header;
20 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # This file is for unifying the coding style for different editors and IDEs
2 | # editorconfig.org
3 |
4 | # WordPress Coding Standards
5 | # https://make.wordpress.org/core/handbook/coding-standards/
6 |
7 | root = true
8 |
9 | [*]
10 | end_of_line = lf
11 | insert_final_newline = true
12 | charset = utf-8
13 | trim_trailing_whitespace = true
14 |
15 | [*.php]
16 | indent_style = tab
17 | indent_size = 4
18 |
19 | [{*.ts, *.tsx, .jshintrc, *.json}]
20 | indent_style = tab
21 | indent_size = 4
22 |
23 | [*.yml]
24 | indent_style = space
25 | indent_size = 4
26 |
27 | [{*.txt, wp-config-sample.php}]
28 | end_of_line = crlf
29 |
--------------------------------------------------------------------------------
/tests/includes/Helpers/Utils.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Drivers\Apcu;
17 |
18 | use WCPOS\Vendor\Phpfastcache\Config\ConfigurationOption;
19 | class Config extends ConfigurationOption
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devfalse/Config.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Drivers\Devfalse;
17 |
18 | use WCPOS\Vendor\Phpfastcache\Config\ConfigurationOption;
19 | class Config extends ConfigurationOption
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devnull/Config.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Drivers\Devnull;
17 |
18 | use WCPOS\Vendor\Phpfastcache\Config\ConfigurationOption;
19 | class Config extends ConfigurationOption
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devtrue/Config.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Drivers\Devtrue;
17 |
18 | use WCPOS\Vendor\Phpfastcache\Config\ConfigurationOption;
19 | class Config extends ConfigurationOption
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Wincache/Config.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Drivers\Wincache;
17 |
18 | use WCPOS\Vendor\Phpfastcache\Config\ConfigurationOption;
19 | class Config extends ConfigurationOption
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zenddisk/Config.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Drivers\Zenddisk;
17 |
18 | use WCPOS\Vendor\Phpfastcache\Config\ConfigurationOption;
19 | class Config extends ConfigurationOption
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zendshm/Config.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Drivers\Zendshm;
17 |
18 | use WCPOS\Vendor\Phpfastcache\Config\ConfigurationOption;
19 | class Config extends ConfigurationOption
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/.github/workflows/build-docs.yml:
--------------------------------------------------------------------------------
1 | name: Hook Docs
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 | paths:
8 | - "**.php"
9 |
10 | jobs:
11 | build:
12 | runs-on: ubuntu-latest
13 |
14 | steps:
15 | - name: Checkout code
16 | uses: actions/checkout@v3
17 |
18 | - name: Build
19 | env:
20 | YARN_ENABLE_IMMUTABLE_INSTALLS: false
21 | run: |
22 | yarn install
23 | yarn build:docs
24 |
25 | - name: Deploy to GH Pages
26 | uses: peaceiris/actions-gh-pages@v3
27 | with:
28 | github_token: ${{ secrets.GITHUB_TOKEN }}
29 | publish_dir: ./hookdocs
30 |
--------------------------------------------------------------------------------
/packages/settings/src/components/snackbar/snackbar.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 |
3 | import { Snackbar as WPSnackbar } from '@wordpress/components';
4 |
5 | export interface SnackbarProps {
6 | id: string;
7 | message: string;
8 | onRemove?: () => void;
9 | timeout?: boolean;
10 | }
11 |
12 | export const Snackbar = ({ message, onRemove, timeout = true }: SnackbarProps) => {
13 | React.useEffect(() => {
14 | const timer = setTimeout(() => {
15 | timeout && onRemove && onRemove();
16 | }, 3000);
17 | return () => clearTimeout(timer);
18 | }, [message, onRemove, timeout]);
19 |
20 | return message ? {message} : null;
21 | };
22 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memstatic/Config.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Drivers\Memstatic;
17 |
18 | use WCPOS\Vendor\Phpfastcache\Config\ConfigurationOption;
19 | class Config extends ConfigurationOption
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/includes/Admin/Products/templates/variation-metabox-pos-barcode.php:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/1-Bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: You're having technical issues. 🐞
4 | labels: "bug"
5 | ---
6 |
7 |
8 |
9 | ## Expected Behavior
10 |
11 |
12 |
13 | ## Current Behavior
14 |
15 |
16 |
17 | ## Steps to Reproduce
18 |
19 |
20 |
21 |
22 | 1.
23 |
24 | 2.
25 |
26 | 3.
27 |
28 | 4.
29 |
30 | ## Your Environment
31 |
32 |
33 |
34 | - Operating System and version :
35 |
--------------------------------------------------------------------------------
/packages/settings/src/components/error.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 |
3 | import { get } from 'lodash';
4 | import { FallbackProps } from 'react-error-boundary';
5 |
6 | import Notice from './notice';
7 | import { t } from '../translations';
8 |
9 | const ErrorFallback = ({ error, resetErrorBoundary }: FallbackProps) => {
10 | const message = get(error, 'message', 'Unknown error');
11 |
12 | return (
13 |
14 |
15 |
16 | {t('Something went wrong', { _tags: 'wp-admin-settings' })}: {message}
17 |
18 |
19 |
20 | );
21 | };
22 |
23 | export default ErrorFallback;
24 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Cluster/AggregatablePoolInterface.php:
--------------------------------------------------------------------------------
1 |
12 | *
13 | */
14 | declare (strict_types=1);
15 | namespace WCPOS\Vendor\Phpfastcache\Cluster;
16 |
17 | use WCPOS\Vendor\Psr\Cache\CacheItemPoolInterface;
18 | /**
19 | * Interface ClusterInterface Aggregatable
20 | *
21 | * @package Phpfastcache\Cluster
22 | */
23 | interface AggregatablePoolInterface extends CacheItemPoolInterface
24 | {
25 | }
26 |
--------------------------------------------------------------------------------
/hookdoc-conf.json:
--------------------------------------------------------------------------------
1 | {
2 | "opts": {
3 | "destination": "hookdocs",
4 | "template": "node_modules/wp-hookdoc/template",
5 | "recurse": true,
6 | "readme": "./.github/hookdoc-tmpl/README.md"
7 | },
8 | "source": {
9 | "include": [
10 | "./woocommerce-pos.php",
11 | "./includes"
12 | ],
13 | "includePattern": ".+\\.(php)?$"
14 | },
15 | "plugins": [
16 | "node_modules/wp-hookdoc/plugin",
17 | "plugins/markdown"
18 | ],
19 | "templates": {
20 | "default": {
21 | "layoutFile": "./.github/hookdoc-tmpl/layout.tmpl",
22 | "staticFiles": {
23 | "include": [
24 | "./.github/hookdoc-tmpl/static"
25 | ]
26 | }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Config/Config.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Config;
17 |
18 | /**
19 | * Class Config
20 | * Alias of ConfigurationOption
21 | * @package phpFastCache\Config
22 | * @see ConfigurationOption
23 | */
24 | class Config extends ConfigurationOption
25 | {
26 | }
27 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheCoreException.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Exceptions;
17 |
18 | /**
19 | * Class PhpfastcacheCoreException
20 | * @package Phpfastcache\Exceptions
21 | */
22 | class PhpfastcacheCoreException extends PhpfastcacheRootException
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheLogicException.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Exceptions;
17 |
18 | /**
19 | * Class PhpfastcacheLogicException
20 | * @package Phpfastcache\Exceptions
21 | */
22 | class PhpfastcacheLogicException extends PhpfastcacheRootException
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/packages/settings/src/components/snackbar/use-snackbar.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 |
3 | import { SnackbarContext } from './provider';
4 |
5 | /**
6 | * Get a function for showing a Snackbar with the specified options.
7 | *
8 | * Simply call the function to show the Snackbar, which will be automatically
9 | * dismissed.
10 | *
11 | * @example
12 | * const showSnackbar = useSnackbar({ message: 'This is a Snackbar!' })
13 | *
14 | */
15 | export const useSnackbar = () => {
16 | const context = React.useContext(SnackbarContext);
17 |
18 | if (!context) {
19 | throw new Error(`useSnackbar must be called within SnackbarProvider`);
20 | }
21 |
22 | return context;
23 | };
24 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDriverException.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Exceptions;
17 |
18 | /**
19 | * Class PhpfastcacheDriverException
20 | * @package Phpfastcache\Exceptions
21 | */
22 | class PhpfastcacheDriverException extends PhpfastcacheRootException
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDeprecatedException.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Exceptions;
17 |
18 | /**
19 | * Class PhpfastcacheRootException
20 | * @package Phpfastcache\Exceptions
21 | */
22 | class PhpfastcacheDeprecatedException extends PhpfastcacheRootException
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheReplicationException.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Exceptions;
17 |
18 | /**
19 | * Class PhpfastcacheLogicException
20 | * @package Phpfastcache\Exceptions
21 | */
22 | class PhpfastcacheReplicationException extends PhpfastcacheRootException
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDriverCheckException.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Exceptions;
17 |
18 | /**
19 | * Class PhpfastcacheDriverCheckException
20 | * @package phpFastCache\Exceptions
21 | */
22 | class PhpfastcacheDriverCheckException extends PhpfastcacheDriverException
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Cluster/Drivers/FullReplication/Item.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Cluster\Drivers\FullReplication;
17 |
18 | use WCPOS\Vendor\Phpfastcache\Cluster\ItemAbstract;
19 | /**
20 | * Class ClusterItem
21 | * @package Phpfastcache\Cluster
22 | */
23 | class Item extends ItemAbstract
24 | {
25 | }
26 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Cluster/Drivers/SemiReplication/Item.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Cluster\Drivers\SemiReplication;
17 |
18 | use WCPOS\Vendor\Phpfastcache\Cluster\ItemAbstract;
19 | /**
20 | * Class ClusterItem
21 | * @package Phpfastcache\Cluster
22 | */
23 | class Item extends ItemAbstract
24 | {
25 | }
26 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDriverConnectException.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Exceptions;
17 |
18 | /**
19 | * Class PhpfastcacheDriverCheckException
20 | * @package phpFastCache\Exceptions
21 | */
22 | class PhpfastcacheDriverConnectException extends PhpfastcacheDriverException
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Cluster/Drivers/RandomReplication/Item.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Cluster\Drivers\RandomReplication;
17 |
18 | use WCPOS\Vendor\Phpfastcache\Cluster\ItemAbstract;
19 | /**
20 | * Class ClusterItem
21 | * @package Phpfastcache\Cluster
22 | */
23 | class Item extends ItemAbstract
24 | {
25 | }
26 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDriverNotFoundException.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Exceptions;
17 |
18 | /**
19 | * Class PhpfastcacheDriverNotFoundException
20 | * @package Phpfastcache\Exceptions
21 | */
22 | class PhpfastcacheDriverNotFoundException extends PhpfastcacheDriverException
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Files/Config.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Drivers\Files;
17 |
18 | use WCPOS\Vendor\Phpfastcache\Config\ConfigurationOption;
19 | use WCPOS\Vendor\Phpfastcache\Config\IOConfigurationOptionTrait;
20 | class Config extends ConfigurationOption
21 | {
22 | use IOConfigurationOptionTrait;
23 | }
24 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheInstanceNotFoundException.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Exceptions;
17 |
18 | /**
19 | * Class PhpfastcacheInstanceNotFoundException
20 | * @package Phpfastcache\Exceptions
21 | */
22 | class PhpfastcacheInstanceNotFoundException extends PhpfastcacheRootException
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Cluster/Drivers/MasterSlaveReplication/Item.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Cluster\Drivers\MasterSlaveReplication;
17 |
18 | use WCPOS\Vendor\Phpfastcache\Cluster\ItemAbstract;
19 | /**
20 | * Class ClusterItem
21 | * @package Phpfastcache\Cluster
22 | */
23 | class Item extends ItemAbstract
24 | {
25 | }
26 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Sqlite/Config.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Drivers\Sqlite;
17 |
18 | use WCPOS\Vendor\Phpfastcache\Config\ConfigurationOption;
19 | use WCPOS\Vendor\Phpfastcache\Config\IOConfigurationOptionTrait;
20 | class Config extends ConfigurationOption
21 | {
22 | use IOConfigurationOptionTrait;
23 | }
24 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheInvalidConfigurationException.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Exceptions;
17 |
18 | /**
19 | * Class PhpfastcacheInvalidConfigurationException
20 | * @package Phpfastcache\Exceptions
21 | */
22 | class PhpfastcacheInvalidConfigurationException extends PhpfastcacheRootException
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheRootException.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Exceptions;
17 |
18 | use Exception;
19 | /**
20 | * Class PhpfastcacheRootException
21 | * @package Phpfastcache\Exceptions
22 | */
23 | class PhpfastcacheRootException extends Exception implements PhpfastcacheExceptionInterface
24 | {
25 | }
26 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheUnsupportedOperationException.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Exceptions;
17 |
18 | /**
19 | * Class PhpfastcacheUnsupportedOperationException
20 | * @package Phpfastcache\Exceptions
21 | */
22 | class PhpfastcacheUnsupportedOperationException extends PhpfastcacheRootException
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/includes/Admin/Products/templates/variation-metabox-visibility-select.php:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
14 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheExceptionInterface.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Exceptions;
17 |
18 | use WCPOS\Vendor\Psr\Cache\CacheException;
19 | use Throwable;
20 | /**
21 | * Interface PhpfastcacheExceptionInterface
22 | * @package Phpfastcache\Exceptions
23 | */
24 | interface PhpfastcacheExceptionInterface extends CacheException, Throwable
25 | {
26 | }
27 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheSimpleCacheException.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Exceptions;
17 |
18 | use Exception;
19 | use WCPOS\Vendor\Psr\SimpleCache\CacheException;
20 | /**
21 | * Class PhpfastcacheRootException
22 | * @package Phpfastcache\Exceptions
23 | */
24 | class PhpfastcacheSimpleCacheException extends Exception implements CacheException
25 | {
26 | }
27 |
--------------------------------------------------------------------------------
/.phpunit.xml.dist:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 | ./tests/
13 | ./tests/
14 |
15 |
16 |
17 |
18 | includes
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Cluster/ClusterPoolInterface.php:
--------------------------------------------------------------------------------
1 |
12 | *
13 | */
14 | declare (strict_types=1);
15 | namespace WCPOS\Vendor\Phpfastcache\Cluster;
16 |
17 | use WCPOS\Vendor\Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface;
18 | /**
19 | * Interface ClusterInterface
20 | *
21 | * @package Phpfastcache\Cluster
22 | */
23 | interface ClusterPoolInterface extends ExtendedCacheItemPoolInterface
24 | {
25 | /**
26 | * @return ExtendedCacheItemPoolInterface[]
27 | */
28 | public function getClusterPools() : array;
29 | }
30 |
--------------------------------------------------------------------------------
/vendor_prefixed/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheInvalidArgumentException.php:
--------------------------------------------------------------------------------
1 | https://www.phpfastcache.com
12 | * @author Georges.L (Geolim4)
13 | *
14 | */
15 | declare (strict_types=1);
16 | namespace WCPOS\Vendor\Phpfastcache\Exceptions;
17 |
18 | use WCPOS\Vendor\Psr\Cache\InvalidArgumentException;
19 | /**
20 | * Class PhpfastcacheCoreException
21 | * @package Phpfastcache\Exceptions
22 | */
23 | class PhpfastcacheInvalidArgumentException extends PhpfastcacheRootException implements InvalidArgumentException
24 | {
25 | }
26 |
--------------------------------------------------------------------------------
/packages/settings/src/screens/checkout/order-status-select.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 |
3 | import Select from '../../components/select';
4 |
5 | interface OrderStatusSelectProps {
6 | selectedStatus: string;
7 | mutate: (data: Record) => void;
8 | }
9 |
10 | const OrderStatusSelect = ({ selectedStatus, mutate }: OrderStatusSelectProps) => {
11 | const order_statuses = window?.wcpos?.settings?.order_statuses;
12 |
13 | const options = React.useMemo(() => {
14 | return Object.entries(order_statuses).map(([value, label]) => ({ value, label }));
15 | }, [order_statuses]);
16 |
17 | return (
18 |
}>
40 |
41 |
42 |
43 |
44 |
45 |
46 | );
47 | };
48 |
49 | const Root = () => {
50 | return (
51 |
52 |
53 |
54 |
55 |
56 |
57 | );
58 | };
59 |
60 | const el = document.getElementById('woocommerce-pos-settings');
61 |
62 | if (createRoot) {
63 | createRoot(el).render();
64 | } else {
65 | render(, el);
66 | }
67 |
--------------------------------------------------------------------------------
/assets/img/animated/drawn-letters.svg:
--------------------------------------------------------------------------------
1 |
2 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/includes/Admin/Products/templates/quick-edit-visibility-select.php:
--------------------------------------------------------------------------------
1 |
9 |
10 |
65 |
--------------------------------------------------------------------------------
/assets/img/animated/slide-down.svg:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/includes/API/Traits/Product_Helpers.php:
--------------------------------------------------------------------------------
1 | wcpos_get_barcode_field();
19 |
20 | if ( '_sku' === $barcode_field ) {
21 | return $object->get_sku();
22 | }
23 | if ( '_global_unique_id' === $barcode_field ) {
24 | return $object->get_global_unique_id();
25 | }
26 |
27 | return $object->get_meta( $barcode_field );
28 | }
29 |
30 | /**
31 | * Get barcode field from settings.
32 | *
33 | * @return string
34 | */
35 | public function wcpos_get_barcode_field() {
36 | $barcode_field = woocommerce_pos_get_settings( 'general', 'barcode_field' );
37 |
38 | // Check for WP_Error
39 | if ( is_wp_error( $barcode_field ) ) {
40 | Logger::log( 'Error retrieving barcode_field: ' . $barcode_field->get_error_message() );
41 |
42 | return '';
43 | }
44 |
45 | // Check for non-string values
46 | if ( ! \is_string( $barcode_field ) ) {
47 | Logger::log( 'Unexpected data type for barcode_field. Expected string, got: ' . \gettype( $barcode_field ) );
48 |
49 | return '';
50 | }
51 |
52 | return $barcode_field;
53 | }
54 |
55 | /**
56 | * Get barcode field from settings.
57 | *
58 | * @return bool
59 | */
60 | public function wcpos_pos_only_products_enabled() {
61 | $pos_only_products_enabled = woocommerce_pos_get_settings( 'general', 'pos_only_products' );
62 |
63 | // Check for WP_Error
64 | if ( is_wp_error( $pos_only_products_enabled ) ) {
65 | Logger::log( 'Error retrieving pos_only_products: ' . $pos_only_products_enabled->get_error_message() );
66 |
67 | return false;
68 | }
69 |
70 | // make sure it's true, just in case there's a corrupt setting
71 | return true === $pos_only_products_enabled;
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/includes/Admin/Permalink.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * @see http://www.wcpos.com
9 | */
10 |
11 | namespace WCPOS\WooCommercePOS\Admin;
12 |
13 | use const WCPOS\WooCommercePOS\PLUGIN_NAME;
14 |
15 | class Permalink {
16 | public const DB_KEY = 'woocommerce_pos_settings_permalink';
17 |
18 | /**
19 | * Constructor.
20 | */
21 | public function __construct() {
22 | $this->init();
23 | $this->save();
24 | }
25 |
26 | /**
27 | * Output the POS field.
28 | */
29 | public function pos_slug_input(): void {
30 | $slug = self::get_slug();
31 | if ( 'pos' == $slug ) {
32 | $slug = ''; // use placeholder
33 | }
34 | echo '';
35 | wp_nonce_field( 'wcpos-permalinks', 'wcpos-permalinks-nonce' );
36 | }
37 |
38 | /**
39 | * Watch for $_POST and save POS setting
40 | * - sanitize field and remove slash from start and end.
41 | */
42 | public function save(): void {
43 | if ( isset( $_POST['woocommerce_pos_permalink'], $_POST['wcpos-permalinks-nonce'] ) && wp_verify_nonce( wp_unslash( $_POST['wcpos-permalinks-nonce'] ), 'wcpos-permalinks' ) ) {
44 | $permalink = trim( sanitize_text_field( wp_unslash( $_POST['woocommerce_pos_permalink'] ) ), '/\\' );
45 | update_option( self::DB_KEY, $permalink );
46 | }
47 | }
48 |
49 | /**
50 | * Return the custom slug, defaults to 'pos'.
51 | *
52 | * @return string
53 | */
54 | public static function get_slug(): string {
55 | $slug = get_option( self::DB_KEY );
56 |
57 | return empty( $slug ) ? 'pos' : sanitize_text_field( $slug );
58 | }
59 |
60 | /**
61 | * Hook into the permalinks setting api.
62 | */
63 | private function init(): void {
64 | add_settings_field(
65 | 'woocommerce-pos-permalink',
66 | _x( 'POS base', 'Permalink setting, eg: /pos', PLUGIN_NAME ),
67 | array( $this, 'pos_slug_input' ),
68 | 'permalink',
69 | 'optional'
70 | );
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/includes/wcpos-store-functions.php:
--------------------------------------------------------------------------------
1 | get_name();
67 | }
68 | }
69 |
--------------------------------------------------------------------------------