Download the PHP package arraypress/wp-conditions without Composer

On this page you can find all versions of the php package arraypress/wp-conditions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wp-conditions

Conditions

Let a shop owner build a rule — "logged-in customers in the UK, on a weekend" — from an admin screen, and check it in code.

What it does

Anything with rules ends up needing this: a discount that applies to some carts, a fee that applies to some countries, a notice shown to some users. Hard-coding them means a release every time one changes; a settings field means parsing whatever the owner typed.

This gives the owner a builder — pick a condition, an operator, a value, and group them with any/all — and gives you one call that answers true or false.

Features

Installation

Quick start

Register the set, and the screen that edits it:

Then, at the point the rule matters:

check_conditions() is true when any rule set matches; check_all_conditions() requires all of them.

Behind a proxy

The IP and country conditions read the visitor's address from the request. Behind Cloudflare or a load balancer the address they see is the proxy's, and the real one arrives in a header any client could also send — so forwarded headers are believed only from proxies on a trusted list. Cloudflare's ranges are on it by default; add your own with the ARRAYPRESS_TRUSTED_PROXIES constant or the arraypress_trusted_proxies filter from wp-ip-utils.

Requirements

License

GPL-2.0-or-later


All versions of wp-conditions with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
arraypress/wp-abuseipdb Version dev-main
arraypress/wp-accept-language-utils Version dev-main
arraypress/wp-array-utils Version dev-main
arraypress/wp-composer-assets Version dev-main
arraypress/wp-countries Version dev-main
arraypress/wp-email-utils Version dev-main
arraypress/wp-ip-utils Version dev-main
arraypress/wp-ipinfo Version dev-main
arraypress/wp-ipqualityscore Version dev-main
arraypress/wp-proxycheck Version dev-main
arraypress/wp-referrer-utils Version dev-main
arraypress/wp-string-utils Version dev-main
arraypress/wp-user-agent-utils Version dev-main
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package arraypress/wp-conditions contains the following files

Loading the files please wait ...