Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/give/build/assets/dist/js/admin-onboarding-wizard.asset.php
+++ b/give/build/assets/dist/js/admin-onboarding-wizard.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react', 'react-dom', 'wp-i18n'), 'version' => '682dae8d4f9c0b610622');
+<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-i18n'), 'version' => '2dedc2241d68b1ccec2f');
--- a/give/build/assets/dist/js/admin-reports-widget.asset.php
+++ b/give/build/assets/dist/js/admin-reports-widget.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('moment', 'react', 'react-dom', 'wp-i18n'), 'version' => '37c22e2bc4ae0e08484a');
+<?php return array('dependencies' => array('moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-i18n'), 'version' => '0175e38742cfd03ceb92');
--- a/give/build/assets/dist/js/admin-reports.asset.php
+++ b/give/build/assets/dist/js/admin-reports.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('moment', 'react', 'react-dom', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '70c699e12d056f6542ac');
+<?php return array('dependencies' => array('moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => 'e8bc8a42a4313cf9f79e');
--- a/give/build/assets/dist/js/donor-dashboards-app.asset.php
+++ b/give/build/assets/dist/js/donor-dashboards-app.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react', 'react-dom', 'wp-i18n'), 'version' => '0e33a3dfff2319a4aaab');
+<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-i18n'), 'version' => 'ebb948dd0f52222b5cbc');
--- a/give/build/assets/dist/js/give-log-list-table-app.asset.php
+++ b/give/build/assets/dist/js/give-log-list-table-app.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-core-data', 'wp-date', 'wp-i18n'), 'version' => '8c26a479e2afbf0ac9ce');
+<?php return array('dependencies' => array('moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-core-data', 'wp-date', 'wp-i18n'), 'version' => '632fc08ce473626bf247');
--- a/give/build/assets/dist/js/give-migrations-list-table-app.asset.php
+++ b/give/build/assets/dist/js/give-migrations-list-table-app.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-core-data', 'wp-date', 'wp-i18n'), 'version' => 'add39005b493b4542901');
+<?php return array('dependencies' => array('moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-core-data', 'wp-date', 'wp-i18n'), 'version' => 'aedab888789e6d50639f');
--- a/give/build/donationFormApp.asset.php
+++ b/give/build/donationFormApp.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '9b6485a5450acd11fae4');
+<?php return array('dependencies' => array('react', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'ea689e6efb32479bb98b');
--- a/give/build/formBuilderRegistrars.asset.php
+++ b/give/build/formBuilderRegistrars.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-primitives'), 'version' => '36f258ecf1d8c8bc28bc');
+<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-primitives'), 'version' => 'cbcca82410538a1febad');
--- a/give/give.php
+++ b/give/give.php
@@ -6,7 +6,7 @@
* Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
* Author: GiveWP
* Author URI: https://givewp.com/
- * Version: 4.16.7.2
+ * Version: 4.16.8
* Requires at least: 6.6
* Requires PHP: 7.4
* Text Domain: give
@@ -426,7 +426,7 @@
{
// Plugin version.
if (!defined('GIVE_VERSION')) {
- define('GIVE_VERSION', '4.16.7.2');
+ define('GIVE_VERSION', '4.16.8');
}
// Plugin Root File.
--- a/give/includes/admin/donors/donors.php
+++ b/give/includes/admin/donors/donors.php
@@ -213,6 +213,7 @@
/**
* Renders the donor view wrapper.
*
+ * @since 4.16.8 Relinking donors is handled only through the nonce-protected edit action.
* @since 1.0
*
* @param string $view The View being requested.
@@ -237,14 +238,8 @@
}
$donor_id = (int) $_GET['id'];
- $reconnect_user_id = ! empty( $_GET['user_id'] ) ? (int) $_GET['user_id'] : '';
$donor = new Give_Donor( $donor_id );
- // Reconnect User with Donor profile.
- if ( $reconnect_user_id ) {
- give_connect_user_donor_profile( $donor, array( 'user_id' => $reconnect_user_id ), array() );
- }
-
if ( empty( $donor->id ) ) {
give_set_error( 'give-invalid_donor', __( 'Invalid Donor ID.', 'give' ) );
$render = false;
--- a/give/includes/admin/tools/data/class-give-tools-reset-stats.php
+++ b/give/includes/admin/tools/data/class-give-tools-reset-stats.php
@@ -111,6 +111,7 @@
$sql = [];
$meta_table = give_v20_bc_table_details( 'form' );
+ $donor_meta_table_name = Give()->donor_meta->table_name;
foreach ( $step_ids as $type => $ids ) {
@@ -124,7 +125,7 @@
case 'customers':
// Delete all the Give related donor and its meta.
$sql[] = "DELETE FROM {$wpdb->donors}";
- $sql[] = "DELETE FROM {$wpdb->donormeta}";
+ $sql[] = "DELETE FROM {$donor_meta_table_name}";
break;
case 'forms':
$sql[] = "UPDATE {$meta_table['name']} SET meta_value = 0 WHERE meta_key = '_give_form_sales' AND {$meta_table['column']['id']} IN ($ids)";
--- a/give/includes/admin/upgrades/upgrade-functions.php
+++ b/give/includes/admin/upgrades/upgrade-functions.php
@@ -3113,7 +3113,9 @@
$give_updates = Give_Updates::get_instance();
- $wpdb->query( "DELETE FROM {$wpdb->donormeta} WHERE meta_key LIKE '%_give_anonymous_donor%' OR meta_key='_give_has_comment';" );
+ $donor_meta_table_name = Give()->donor_meta->table_name;
+
+ $wpdb->query( "DELETE FROM {$donor_meta_table_name} WHERE meta_key LIKE '%_give_anonymous_donor%' OR meta_key='_give_has_comment';" );
$give_updates->percentage = 100;
--- a/give/includes/class-give-donor.php
+++ b/give/includes/class-give-donor.php
@@ -245,7 +245,8 @@
*/
public function setup_address() {
global $wpdb;
- $meta_type = Give()->donor_meta->meta_type;
+ $meta_type = Give()->donor_meta->meta_type;
+ $meta_table_name = Give()->donor_meta->table_name;
$addresses = $this->get_addresses_from_meta_cache();
@@ -254,7 +255,7 @@
: $wpdb->get_results(
$wpdb->prepare(
"
- SELECT meta_key, meta_value FROM {$wpdb->donormeta}
+ SELECT meta_key, meta_value FROM {$meta_table_name}
WHERE meta_key
LIKE '%s'
AND {$meta_type}_id=%d
@@ -1387,6 +1388,7 @@
global $wpdb;
$meta_key_prefix = "_give_donor_address_{$address_type}_{address_name}";
$meta_type = Give()->donor_meta->meta_type;
+ $meta_table_name = Give()->donor_meta->table_name;
if ( $is_multi_address ) {
if ( is_null( $multi_address_id ) ) {
@@ -1394,7 +1396,7 @@
$multi_address_id = $wpdb->get_var(
$wpdb->prepare(
"
- SELECT meta_key FROM {$wpdb->donormeta}
+ SELECT meta_key FROM {$meta_table_name}
WHERE meta_key
LIKE '%s'
AND {$meta_type}_id=%d
@@ -1456,13 +1458,14 @@
$meta_key_prefix .= "_{$address_count}";
}
- $meta_type = Give()->donor_meta->meta_type;
+ $meta_type = Give()->donor_meta->meta_type;
+ $meta_table_name = Give()->donor_meta->table_name;
// Process query.
$row_affected = $wpdb->query(
$wpdb->prepare(
"
- DELETE FROM {$wpdb->donormeta}
+ DELETE FROM {$meta_table_name}
WHERE meta_key
LIKE '%s'
AND {$meta_type}_id=%d
@@ -1510,13 +1513,14 @@
$meta_key_prefix .= "_{$address_count}";
}
- $meta_type = Give()->donor_meta->meta_type;
+ $meta_type = Give()->donor_meta->meta_type;
+ $meta_table_name = Give()->donor_meta->table_name;
// Process query.
$row_affected = $wpdb->get_results(
$wpdb->prepare(
"
- SELECT meta_key FROM {$wpdb->donormeta}
+ SELECT meta_key FROM {$meta_table_name}
WHERE meta_key
LIKE '%s'
AND {$meta_type}_id=%d
--- a/give/includes/database/class-give-db-meta.php
+++ b/give/includes/database/class-give-db-meta.php
@@ -122,7 +122,6 @@
}
}
-
/**
* Retrieve payment meta field for a payment.
*
@@ -137,32 +136,38 @@
* is true.
*/
public function get_meta( $id = 0, $meta_key = '', $single = false ) {
- if ( ! $this->is_filter_callback ) {
- return get_metadata( $this->meta_type, $id, $meta_key, $single );
- }
+ $previousMetaTableName = $this->setMetaTableName();
- $id = $this->sanitize_id( $id );
+ try {
+ if ( ! $this->is_filter_callback ) {
+ return get_metadata( $this->meta_type, $id, $meta_key, $single );
+ }
- // Bailout.
- if ( ! $this->is_valid_post_type( $id ) ) {
- return $this->check;
- }
+ $id = $this->sanitize_id( $id );
- if ( $this->raw_result ) {
- if ( ! ( $value = get_metadata( $this->meta_type, $id, $meta_key, false ) ) ) {
- $value = $single ? '' : array();
+ // Bailout.
+ if ( ! $this->is_valid_post_type( $id ) ) {
+ return $this->check;
}
- // Reset flag.
- $this->raw_result = false;
+ if ( $this->raw_result ) {
+ if ( ! ( $value = get_metadata( $this->meta_type, $id, $meta_key, false ) ) ) {
+ $value = $single ? '' : array();
+ }
- } else {
- $value = get_metadata( $this->meta_type, $id, $meta_key, $single );
- }
+ // Reset flag.
+ $this->raw_result = false;
- $this->is_filter_callback = false;
+ } else {
+ $value = get_metadata( $this->meta_type, $id, $meta_key, $single );
+ }
+
+ $this->is_filter_callback = false;
- return $value;
+ return $value;
+ } finally {
+ $this->restoreMetaTableName( $previousMetaTableName );
+ }
}
@@ -182,24 +187,30 @@
* @return int|bool False for failure. True for success.
*/
public function add_meta( $id, $meta_key, $meta_value, $unique = false ) {
- if ( $this->is_filter_callback ) {
- $id = $this->sanitize_id( $id );
+ $previousMetaTableName = $this->setMetaTableName();
- // Bailout.
- if ( ! $this->is_valid_post_type( $id ) ) {
- return $this->check;
+ try {
+ if ( $this->is_filter_callback ) {
+ $id = $this->sanitize_id( $id );
+
+ // Bailout.
+ if ( ! $this->is_valid_post_type( $id ) ) {
+ return $this->check;
+ }
}
- }
- $meta_id = add_metadata( $this->meta_type, $id, $meta_key, $meta_value, $unique );
+ $meta_id = add_metadata( $this->meta_type, $id, $meta_key, $meta_value, $unique );
- if ( $meta_id ) {
- $this->delete_cache( $id );
- }
+ if ( $meta_id ) {
+ $this->delete_cache( $id );
+ }
- $this->is_filter_callback = false;
+ $this->is_filter_callback = false;
- return $meta_id;
+ return $meta_id;
+ } finally {
+ $this->restoreMetaTableName( $previousMetaTableName );
+ }
}
/**
@@ -223,24 +234,30 @@
* @return int|bool False on failure, true if success.
*/
public function update_meta( $id, $meta_key, $meta_value, $prev_value = '' ) {
- if ( $this->is_filter_callback ) {
- $id = $this->sanitize_id( $id );
+ $previousMetaTableName = $this->setMetaTableName();
- // Bailout.
- if ( ! $this->is_valid_post_type( $id ) ) {
- return $this->check;
+ try {
+ if ( $this->is_filter_callback ) {
+ $id = $this->sanitize_id( $id );
+
+ // Bailout.
+ if ( ! $this->is_valid_post_type( $id ) ) {
+ return $this->check;
+ }
}
- }
- $meta_id = update_metadata( $this->meta_type, $id, $meta_key, $meta_value, $prev_value );
+ $meta_id = update_metadata( $this->meta_type, $id, $meta_key, $meta_value, $prev_value );
- if ( $meta_id ) {
- $this->delete_cache( $id );
- }
+ if ( $meta_id ) {
+ $this->delete_cache( $id );
+ }
- $this->is_filter_callback = false;
+ $this->is_filter_callback = false;
- return $meta_id;
+ return $meta_id;
+ } finally {
+ $this->restoreMetaTableName( $previousMetaTableName );
+ }
}
/**
@@ -261,24 +278,30 @@
* @return bool False for failure. True for success.
*/
public function delete_meta( $id = 0, $meta_key = '', $meta_value = '', $delete_all = '' ) {
- if ( $this->is_filter_callback ) {
- $id = $this->sanitize_id( $id );
+ $previousMetaTableName = $this->setMetaTableName();
- // Bailout.
- if ( ! $this->is_valid_post_type( $id ) ) {
- return $this->check;
+ try {
+ if ( $this->is_filter_callback ) {
+ $id = $this->sanitize_id( $id );
+
+ // Bailout.
+ if ( ! $this->is_valid_post_type( $id ) ) {
+ return $this->check;
+ }
}
- }
- $is_meta_deleted = delete_metadata( $this->meta_type, $id, $meta_key, $meta_value, $delete_all );
+ $is_meta_deleted = delete_metadata( $this->meta_type, $id, $meta_key, $meta_value, $delete_all );
- if ( $is_meta_deleted ) {
- $this->delete_cache( $id );
- }
+ if ( $is_meta_deleted ) {
+ $this->delete_cache( $id );
+ }
- $this->is_filter_callback = false;
+ $this->is_filter_callback = false;
- return $is_meta_deleted;
+ return $is_meta_deleted;
+ } finally {
+ $this->restoreMetaTableName( $previousMetaTableName );
+ }
}
/**
@@ -586,4 +609,44 @@
return $status;
}
+
+ /**
+ * Temporarily re-assert the meta table name in the global $wpdb object.
+ *
+ * Other plugins can overwrite the global meta table property. For example, both GiveWP and
+ * Charitable register a "donor" meta type, and Charitable re-assigns $wpdb->donormeta to its
+ * own table after GiveWP loads. Point the global at GiveWP's own table before each metadata
+ * operation so data is always written to and read from GiveWP's table, then restore the
+ * previous value afterwards so other plugins are unaffected.
+ *
+ * @since 4.16.8
+ *
+ * @return string The previous meta table name to restore.
+ */
+ private function setMetaTableName() {
+ global $wpdb;
+
+ $metaTableProperty = $this->meta_type . 'meta';
+ $previousMetaTableName = $wpdb->{$metaTableProperty};
+
+ $wpdb->{$metaTableProperty} = $this->table_name;
+
+ return $previousMetaTableName;
+ }
+
+ /**
+ * Restore a previously saved meta table name.
+ *
+ * @since 4.16.8
+ *
+ * @param string $metaTableName The meta table name to restore.
+ *
+ * @return void
+ */
+ private function restoreMetaTableName( $metaTableName ) {
+ global $wpdb;
+
+ $wpdb->{$this->meta_type . 'meta'} = $metaTableName;
+ }
+
}
--- a/give/includes/emails/class-give-emails.php
+++ b/give/includes/emails/class-give-emails.php
@@ -29,6 +29,10 @@
*
* @since 1.0
*/
+// __set() accepts any key, so keys without a declared property become dynamic ones. PHP 8.2 deprecates
+// those, and the notice is printed mid-request, which breaks any redirect that follows.
+// PHP 7.4 reads this line as a comment, so it is safe on the minimum supported version.
+#[AllowDynamicProperties]
class Give_Emails {
/**
--- a/give/src/Campaigns/Actions/CreateDefaultCampaignForm.php
+++ b/give/src/Campaigns/Actions/CreateDefaultCampaignForm.php
@@ -18,6 +18,7 @@
class CreateDefaultCampaignForm
{
/**
+ * @since 4.16.8 Set formStatus on FormSettings so it agrees with the form's own status.
* @since 4.14.2 add formTitle to FormSettings
* @since 4.2.0 return if campaign already has default form set
* @since 4.1.0 Added inheritCampaignColors property to FormSettings
@@ -36,6 +37,7 @@
'status' => DonationFormStatus::PUBLISHED(),
'settings' => FormSettings::fromArray([
'formTitle' => $campaign->title,
+ 'formStatus' => DonationFormStatus::PUBLISHED,
'showHeader' => false,
'enableDonationGoal' => false,
'goalAmount' => $campaign->goal,
--- a/give/src/DonationForms/Actions/ConvertDonationAmountBlockToFieldsApi.php
+++ b/give/src/DonationForms/Actions/ConvertDonationAmountBlockToFieldsApi.php
@@ -28,6 +28,8 @@
{
/**
+ * @since 4.16.8 Exempt admin-defined amounts from the custom amount minimum and maximum, and fall back
+ * to the lowest admin-defined amount when no custom amount minimum applies.
* @since 4.16.5 Set default value for the levelId hidden field.
* @since 4.10.0 Replaced generic 'currency' rule with custom CurrencyRule that uses GiveWP's currency list
* @since 3.0.0
@@ -39,22 +41,23 @@
{
$amountField = DonationAmount::make('donationAmount')->tap(function (Group $group) use ($block, $currency) {
$amountRules = ['required', 'numeric'];
+ $exemptAmounts = $block->getAdminDefinedAmounts();
if (!$block->isCustomAmountEnabled() &&
$block->getPriceOption() === 'set') {
$size = $block->getSetPrice();
$amountRules[] = new Size($size);
- }
+ } else {
+ $minimum = $block->getMinimumAmount();
- if ($block->isCustomAmountEnabled()) {
- if ($block->hasAttribute('customAmountMin')) {
- $amountRules[] = new Min($block->getAttribute('customAmountMin'));
+ if ($minimum !== null) {
+ $amountRules[] = (new Min($minimum))->exemptAmounts(...$exemptAmounts);
}
+ }
- if ($block->hasAttribute('customAmountMax') && $block->getAttribute('customAmountMax') > 0) {
- $amountRules[] = new Max($block->getAttribute('customAmountMax'));
- }
+ if ($block->isCustomAmountEnabled() && $block->getCustomAmountMax() > 0) {
+ $amountRules[] = (new Max($block->getCustomAmountMax()))->exemptAmounts(...$exemptAmounts);
}
/** @var Amount $amountNode */
--- a/give/src/DonationForms/Rules/Concerns/HasExemptAmounts.php
+++ b/give/src/DonationForms/Rules/Concerns/HasExemptAmounts.php
@@ -0,0 +1,53 @@
+<?php
+
+namespace GiveDonationFormsRulesConcerns;
+
+use function in_array;
+use function is_numeric;
+
+/**
+ * Amounts an admin configured on the donation amount block, such as the donation levels or the fixed set
+ * price. The custom amount minimum and maximum only constrain what a donor types into the custom amount
+ * input, so those amounts are always accepted.
+ *
+ * @since 4.16.8
+ */
+trait HasExemptAmounts
+{
+ /**
+ * @since 4.16.8
+ *
+ * @var float[]
+ */
+ protected $exemptAmounts = [];
+
+ /**
+ * @since 4.16.8
+ */
+ public function exemptAmounts(float ...$amounts): self
+ {
+ $this->exemptAmounts = $amounts;
+
+ return $this;
+ }
+
+ /**
+ * @since 4.16.8
+ *
+ * @return float[]
+ */
+ public function getExemptAmounts(): array
+ {
+ return $this->exemptAmounts;
+ }
+
+ /**
+ * @since 4.16.8
+ *
+ * @param mixed $value
+ */
+ protected function isExemptAmount($value): bool
+ {
+ return is_numeric($value) && in_array((float)$value, $this->exemptAmounts, true);
+ }
+}
--- a/give/src/DonationForms/Rules/Max.php
+++ b/give/src/DonationForms/Rules/Max.php
@@ -3,19 +3,67 @@
use Closure;
+use GiveDonationFormsRulesConcernsHasExemptAmounts;
use GiveVendorsStellarWPValidationConfig;
+use GiveVendorsStellarWPValidationContractsValidatesOnFrontEnd;
+use GiveVendorsStellarWPValidationContractsValidationRule;
use function is_numeric;
-class Max extends GiveVendorsStellarWPValidationRulesMax
+/**
+ * @since 4.16.8 Implement the rule directly instead of extending the vendor rule, whose size is an integer.
+ * @since 3.0.0
+ */
+class Max implements ValidationRule, ValidatesOnFrontEnd
{
+ use HasExemptAmounts;
+
+ /**
+ * @var numeric
+ */
+ protected $size;
+
+ /**
+ * @since 4.16.8
+ *
+ * @param numeric $size
+ */
+ public function __construct($size)
+ {
+ if ($size <= 0) {
+ Config::throwInvalidArgumentException('Max validation rule requires a non-negative value');
+ }
+
+ $this->size = $this->sanitize($size);
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public static function id(): string
+ {
+ return 'max';
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public static function fromString(?string $options = null): ValidationRule
+ {
+ if (!is_numeric($options)) {
+ Config::throwInvalidArgumentException('Max validation rule requires a numeric value');
+ }
+
+ return new self($options);
+ }
+
/**
* @since 3.0.0
*/
public function sanitize($value)
{
if (is_numeric($value)) {
- if (strpos($value, '.') !== false) {
+ if (strpos((string)$value, '.') !== false) {
return (float)$value;
}
@@ -28,22 +76,64 @@
/**
* @inheritDoc
*
+ * @since 4.16.8 Skip amounts the admin configured on the form, and report exceeding the maximum instead of
+ * repeating the minimum wording.
* @since 3.0.0
**/
public function __invoke($value, Closure $fail, string $key, array $values)
{
$value = $this->sanitize($value);
+ if ($this->isExemptAmount($value)) {
+ return;
+ }
+
if (is_numeric($value)) {
if ($value > $this->getSize()) {
- $fail(sprintf(__('%s must be greater than or equal to %s', 'give'), '{field}', $this->getSize()));
+ $fail(sprintf(__('%s must be less than or equal to %s', 'give'), '{field}', $this->getSize()));
}
} elseif (is_string($value)) {
if (mb_strlen($value) > $this->getSize()) {
- $fail(sprintf(__('%s must be more than or equal to %d characters', 'give'), '{field}', $this->getSize()));
+ $fail(sprintf(__('%s must be less than or equal to %d characters', 'give'), '{field}', $this->getSize()));
}
} else {
Config::throwValidationException("Field value must be a number or string");
}
}
-}
No newline at end of file
+
+ /**
+ * @since 3.0.0
+ *
+ * @return numeric
+ */
+ public function serializeOption()
+ {
+ return $this->size;
+ }
+
+ /**
+ * @since 3.0.0
+ *
+ * @return numeric
+ */
+ public function getSize()
+ {
+ return $this->size;
+ }
+
+ /**
+ * @since 3.0.0
+ *
+ * @param numeric $size
+ *
+ * @return void
+ */
+ public function size($size)
+ {
+ if ($size <= 0) {
+ Config::throwInvalidArgumentException('Max validation rule requires a non-negative value');
+ }
+
+ $this->size = $this->sanitize($size);
+ }
+}
--- a/give/src/DonationForms/Rules/Min.php
+++ b/give/src/DonationForms/Rules/Min.php
@@ -3,19 +3,67 @@
use Closure;
+use GiveDonationFormsRulesConcernsHasExemptAmounts;
use GiveVendorsStellarWPValidationConfig;
+use GiveVendorsStellarWPValidationContractsValidatesOnFrontEnd;
+use GiveVendorsStellarWPValidationContractsValidationRule;
use function is_numeric;
-class Min extends GiveVendorsStellarWPValidationRulesMin
+/**
+ * @since 4.16.8 Implement the rule directly instead of extending the vendor rule, whose size is an integer.
+ * @since 3.0.0
+ */
+class Min implements ValidationRule, ValidatesOnFrontEnd
{
+ use HasExemptAmounts;
+
+ /**
+ * @var numeric
+ */
+ protected $size;
+
+ /**
+ * @since 4.16.8
+ *
+ * @param numeric $size
+ */
+ public function __construct($size)
+ {
+ if ($size <= 0) {
+ Config::throwInvalidArgumentException('Min validation rule requires a non-negative value');
+ }
+
+ $this->size = $this->sanitize($size);
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public static function id(): string
+ {
+ return 'min';
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public static function fromString(?string $options = null): ValidationRule
+ {
+ if (!is_numeric($options)) {
+ Config::throwInvalidArgumentException('Min validation rule requires a numeric value');
+ }
+
+ return new self($options);
+ }
+
/**
* @since 3.0.0
*/
public function sanitize($value)
{
if (is_numeric($value)) {
- if (strpos($value, '.') !== false) {
+ if (strpos((string)$value, '.') !== false) {
return (float)$value;
}
@@ -28,12 +76,17 @@
/**
* @inheritDoc
*
+ * @since 4.16.8 Skip amounts the admin configured on the form.
* @since 3.0.0
**/
public function __invoke($value, Closure $fail, string $key, array $values)
{
$value = $this->sanitize($value);
+ if ($this->isExemptAmount($value)) {
+ return;
+ }
+
if (is_numeric($value)) {
if ($value < $this->getSize()) {
$fail(sprintf(__('%s must be greater than or equal to %s', 'give'), '{field}', $this->getSize()));
@@ -46,4 +99,40 @@
Config::throwValidationException("Field value must be a number or string");
}
}
-}
No newline at end of file
+
+ /**
+ * @since 3.0.0
+ *
+ * @return numeric
+ */
+ public function serializeOption()
+ {
+ return $this->size;
+ }
+
+ /**
+ * @since 3.0.0
+ *
+ * @return numeric
+ */
+ public function getSize()
+ {
+ return $this->size;
+ }
+
+ /**
+ * @since 3.0.0
+ *
+ * @param numeric $size
+ *
+ * @return void
+ */
+ public function size($size)
+ {
+ if ($size <= 0) {
+ Config::throwInvalidArgumentException('Min validation rule requires a non-negative value');
+ }
+
+ $this->size = $this->sanitize($size);
+ }
+}
--- a/give/src/FormBuilder/BlockModels/DonationAmountBlockModel.php
+++ b/give/src/FormBuilder/BlockModels/DonationAmountBlockModel.php
@@ -224,4 +224,72 @@
{
return $this->block->getAttribute('setPrice');
}
+
+ /**
+ * The lowest amount a donor may type into the custom amount input, or zero when the block does not
+ * define one.
+ *
+ * @since 4.16.8
+ */
+ public function getCustomAmountMin(): float
+ {
+ return $this->hasAttribute('customAmountMin') ? (float)$this->getAttribute('customAmountMin') : 0.0;
+ }
+
+ /**
+ * The highest amount a donor may type into the custom amount input, or zero when the block does not
+ * define one.
+ *
+ * @since 4.16.8
+ */
+ public function getCustomAmountMax(): float
+ {
+ return $this->hasAttribute('customAmountMax') ? (float)$this->getAttribute('customAmountMax') : 0.0;
+ }
+
+ /**
+ * The amounts the admin configured on the block: the donation levels, or the fixed set price. The
+ * custom amount minimum and maximum never apply to these.
+ *
+ * @since 4.16.8
+ *
+ * @return float[]
+ */
+ public function getAdminDefinedAmounts(): array
+ {
+ $amounts = $this->getPriceOption() === 'multi'
+ ? array_column($this->getLevels(), 'value')
+ : [$this->getSetPrice()];
+
+ // An unset level or set price sanitizes to 0, which must never be exempt from the minimum.
+ return array_values(
+ array_filter(
+ array_map('floatval', $amounts),
+ static function (float $amount): bool {
+ return $amount > 0;
+ }
+ )
+ );
+ }
+
+ /**
+ * The custom amount minimum, falling back to the lowest amount the admin configured. Without that
+ * fallback a form that leaves the minimum empty accepts any amount, which is a donation spam and card
+ * testing vector.
+ *
+ * @since 4.16.8
+ *
+ * @return float|null Null when the block defines neither a minimum nor an amount to derive one from.
+ */
+ public function getMinimumAmount(): ?float
+ {
+ if ($this->isCustomAmountEnabled() && $this->getCustomAmountMin() > 0) {
+ return $this->getCustomAmountMin();
+ }
+
+ $adminDefinedAmounts = $this->getAdminDefinedAmounts();
+ $lowestAmount = $adminDefinedAmounts ? min($adminDefinedAmounts) : 0.0;
+
+ return $lowestAmount > 0 ? $lowestAmount : null;
+ }
}
--- a/give/src/FormBuilder/Routes/RegisterFormBuilderPageRoute.php
+++ b/give/src/FormBuilder/Routes/RegisterFormBuilderPageRoute.php
@@ -63,6 +63,7 @@
/**
* Render page with scripts
*
+ * @since 4.16.8 Read the query args without assuming they are set.
* @since 3.22.0 Add locale support
* @since 3.1.0 set translations for scripts
* @since 3.0.0
@@ -73,7 +74,13 @@
{
$formBuilderViewModel = new FormBuilderViewModel();
- $donationFormId = abs($_GET['donationFormID']);
+ /*
+ * `abs()` raises a TypeError on an array or a non-numeric string, so the id cannot be read
+ * without checking its shape first. `absint()` is what the redirect guarding this route
+ * already uses, and anything it cannot make a number of falls to the check below.
+ */
+ $donationFormIdParam = $_GET['donationFormID'] ?? null;
+ $donationFormId = is_scalar($donationFormIdParam) ? absint($donationFormIdParam) : 0;
// validate form exists before proceeding
// TODO: improve on this validation
@@ -81,7 +88,7 @@
wp_die(__('Donation form does not exist.', 'give'));
}
- $locale = give_clean($_GET['locale']) ?? '';
+ $locale = give_clean($_GET['locale'] ?? '');
Language::switchToLocale($locale);
wp_enqueue_style(
--- a/give/src/Framework/PaymentGateways/DataTransferObjects/GatewayRouteData.php
+++ b/give/src/Framework/PaymentGateways/DataTransferObjects/GatewayRouteData.php
@@ -33,10 +33,35 @@
* @var string|null
*/
public $routeSignatureExpiration;
+ /**
+ * Keys of the query args the signature covers.
+ *
+ * @since 4.16.8
+ * @var string[]
+ */
+ public $routeSignatureArgKeys = [];
+
+ /**
+ * Query args the route framework itself sets. A gateway arg with one of these names would be
+ * overwritten on the URL and excluded from queryParams on the way back, so a signature covering
+ * it could never validate.
+ *
+ * @since 4.16.8
+ */
+ const ROUTE_PARAMS = [
+ 'give-listener',
+ 'give-gateway-id',
+ 'give-gateway-method',
+ 'give-route-signature',
+ 'give-route-signature-id',
+ 'give-route-signature-expiration',
+ 'give-route-signature-args',
+ ];
/**
* Convert data from request into DTO
*
+ * @since 4.16.8 add routeSignatureArgKeys
* @since 2.19.5 add routeSignatureExpiration
* @since 2.19.4 add give-route-signature-id
* @since 2.18.0
@@ -52,20 +77,11 @@
$self->routeSignature = isset($request['give-route-signature']) ? $request['give-route-signature'] : null;
$self->routeSignatureId = isset($request['give-route-signature-id']) ? $request['give-route-signature-id'] : null;
$self->routeSignatureExpiration = isset($request['give-route-signature-expiration']) ? $request['give-route-signature-expiration'] : null;
+ $self->routeSignatureArgKeys = empty($request['give-route-signature-args'])
+ ? []
+ : explode(',', $request['give-route-signature-args']);
- $self->queryParams = array_filter($request, static function ($param) {
- return ! in_array(
- $param,
- [
- 'give-listener',
- 'give-gateway-id',
- 'give-gateway-method',
- 'give-route-signature',
- 'give-route-signature-id',
- 'give-route-signature-expiration',
- ]
- );
- }, ARRAY_FILTER_USE_KEY);
+ $self->queryParams = array_diff_key($request, array_flip(self::ROUTE_PARAMS));
return $self;
}
--- a/give/src/Framework/PaymentGateways/PaymentGateway.php
+++ b/give/src/Framework/PaymentGateways/PaymentGateway.php
@@ -13,6 +13,7 @@
use GiveFrameworkPaymentGatewaysContractsSubscriptionSubscriptionPaymentMethodEditable;
use GiveFrameworkPaymentGatewaysContractsSubscriptionSubscriptionTransactionsSynchronizable;
use GiveFrameworkPaymentGatewaysContractsWebhookNotificationsListener;
+use GiveFrameworkPaymentGatewaysDataTransferObjectsGatewayRouteData;
use GiveFrameworkPaymentGatewaysRoutesRouteSignature;
use GiveFrameworkPaymentGatewaysTraitsHandleHttpResponses;
use GiveFrameworkPaymentGatewaysTraitsHasRouteMethods;
@@ -354,21 +355,28 @@
/**
* Generate secure gateway route url
*
+ * @since 4.16.8 put the signed values on the URL encoded, so a raw value with an ampersand round-trips
+ * @since 4.16.8 cover $args with the signature
* @since 2.19.5 replace nonce with hash and expiration
* @since 2.19.4 replace RouteSignature args with unique donationId
* @since 2.19.0
*/
public function generateSecureGatewayRouteUrl(string $gatewayMethod, int $donationId, array $args = []): string
{
- $signature = new RouteSignature(static::id(), $gatewayMethod, $donationId);
+ $args = RouteSignature::normalizeArgs(array_diff_key($args, array_flip(GatewayRouteData::ROUTE_PARAMS)));
+
+ $signature = new RouteSignature(static::id(), $gatewayMethod, $donationId, null, $args);
return (new GenerateGatewayRouteUrl())(
static::id(),
$gatewayMethod,
- array_merge($args, [
+ array_merge(RouteSignature::encodeArgs($args), [
'give-route-signature' => $signature->toHash(),
'give-route-signature-id' => $donationId,
'give-route-signature-expiration' => $signature->expiration,
+ // Named here so the route knows which args to rebuild the signature from, and so a gateway
+ // appending its own on the way back does not break it. The list is itself signed.
+ 'give-route-signature-args' => implode(',', $signature->argKeys),
])
);
}
--- a/give/src/Framework/PaymentGateways/Routes/GatewayRoute.php
+++ b/give/src/Framework/PaymentGateways/Routes/GatewayRoute.php
@@ -108,6 +108,7 @@
/**
* Validate signature using nonces
*
+ * @since 4.16.8 verify the route's own query args against the signature
* @since 2.19.5 replace nonce with hash
* @since 2.19.4 replace RouteSignature args with unique donationId
* @since 2.19.0
@@ -119,12 +120,7 @@
*/
private function validateSignature($routeSignature, GatewayRouteData $data)
{
- $signature = new RouteSignature(
- $data->gatewayId,
- $data->gatewayMethod,
- $data->routeSignatureId,
- $data->routeSignatureExpiration
- );
+ $signature = RouteSignature::fromRouteData($data);
if (!$signature->isValid($routeSignature)) {
PaymentGatewayLog::error(
--- a/give/src/Framework/PaymentGateways/Routes/RouteSignature.php
+++ b/give/src/Framework/PaymentGateways/Routes/RouteSignature.php
@@ -2,6 +2,7 @@
namespace GiveFrameworkPaymentGatewaysRoutes;
+use GiveFrameworkPaymentGatewaysDataTransferObjectsGatewayRouteData;
use GiveFrameworkShimsShim;
/**
@@ -19,23 +20,131 @@
* @var string
*/
public $expiration;
+ /**
+ * Keys of the query args covered by this signature, sorted.
+ *
+ * @since 4.16.8
+ * @var string[]
+ */
+ public $argKeys;
/**
* @since 2.19.5 replace wp_create_nonce with wp_hash and timestamp expiration
* @since 2.19.4 replace RouteSignature args with unique donationId
* @since 2.19.0
*
+ * @since 4.16.8 add $args so the route's own query args are covered
+ *
* @param int $gatewayId
* @param string $gatewayMethod
* @param int $donationId
* @param string $expiration
+ * @param array $args Query args the route carries, which the signature then covers. Values the
+ * URL cannot carry — false, and null or empty arrays at any depth — are dropped.
*/
- public function __construct($gatewayId, $gatewayMethod, $donationId, $expiration = null)
+ public function __construct($gatewayId, $gatewayMethod, $donationId, $expiration = null, array $args = [])
{
+ // add_query_arg leaves a false arg off the URL entirely, but only at the top level; a nested
+ // false is serialized as '0' by both query builders and round-trips.
+ $args = array_filter($args, static function ($value) {
+ return $value !== false;
+ });
+
+ // Null and empty array values produce no query parameter at any depth, so signing them would
+ // produce a signature the request coming back could never rebuild.
+ $args = self::pruneArgs($args);
+
+ ksort($args);
+
+ $this->argKeys = array_keys($args);
$this->expiration = $expiration ?: $this->createExpirationTimestamp();
- $this->signature = $this->generateSignatureString($gatewayId, $gatewayMethod, $donationId, $this->expiration);
+ $this->signature = $this->generateSignatureString(
+ $gatewayId,
+ $gatewayMethod,
+ $donationId,
+ $this->expiration,
+ $args
+ );
+ }
+
+
+ /**
+ * Rebuilds the signature a request claims to carry, from the args that request was signed with.
+ *
+ * Args the gateway appended on the way back are not among them, so they are ignored; one that was
+ * signed and has since been edited or dropped changes the hash.
+ *
+ * @since 4.16.8
+ */
+ public static function fromRouteData(GatewayRouteData $data): self
+ {
+ return new self(
+ $data->gatewayId,
+ $data->gatewayMethod,
+ $data->routeSignatureId,
+ $data->routeSignatureExpiration,
+ array_intersect_key($data->queryParams, array_flip($data->routeSignatureArgKeys))
+ );
+ }
+
+ /**
+ * Drops null and empty array values at any depth, children first, so a parent left holding
+ * nothing goes with them.
+ *
+ * @since 4.16.8
+ */
+ private static function pruneArgs(array $args): array
+ {
+ $args = array_map(static function ($value) {
+ return is_array($value) ? self::pruneArgs($value) : $value;
+ }, $args);
+
+ return array_filter($args, static function ($value) {
+ return $value !== null && $value !== [];
+ });
+ }
+
+ /**
+ * Normalizes args to what the request coming back will carry: PHP urldecodes each query value
+ * once (%XX to its character, + to a space), and GatewayRoute then runs the request through
+ * give_clean(). Signing the raw values instead rejects a genuine return whenever a value
+ * changes shape in transit — a rawurlencoded return URL being the everyday case.
+ *
+ * Only URL generation runs this; values arriving on a request have been through the real thing.
+ *
+ * @since 4.16.8 normalize nested values too, as PHP decodes and give_clean() cleans at every depth
+ * @since 4.16.8
+ */
+ public static function normalizeArgs(array $args): array
+ {
+ return array_map(static function ($value) {
+ if (is_array($value)) {
+ return self::normalizeArgs($value);
+ }
+
+ return is_string($value) ? give_clean(urldecode($value)) : $value;
+ }, $args);
}
+ /**
+ * Encodes normalized args for the URL. add_query_arg() writes values as given, so a raw value
+ * holding an ampersand — a legacy form's success URL under plain permalinks — is split into
+ * separate parameters on the way back and the signed value never round-trips. Encoding what was
+ * signed means PHP's single decode hands the route exactly that value, however the gateway
+ * shaped it.
+ *
+ * @since 4.16.8
+ */
+ public static function encodeArgs(array $args): array
+ {
+ return array_map(static function ($value) {
+ if (is_array($value)) {
+ return self::encodeArgs($value);
+ }
+
+ return is_string($value) ? rawurlencode($value) : $value;
+ }, $args);
+ }
/**
* @since 2.19.5
@@ -43,12 +152,17 @@
* @param string $gatewayId
* @param string $gatewayMethod
* @param int $donationId
+ * @since 4.16.8 append the route's query args
+ *
* @param string $expiration
* @return string
*/
- private function generateSignatureString($gatewayId, $gatewayMethod, $donationId, $expiration)
+ private function generateSignatureString($gatewayId, $gatewayMethod, $donationId, $expiration, array $args = [])
{
- return "$gatewayId@$gatewayMethod:$donationId|$expiration";
+ $signature = "$gatewayId@$gatewayMethod:$donationId|$expiration";
+
+ // A signature made before args were covered has none, and has to keep hashing to what it did then.
+ return $args ? $signature . '|' . http_build_query($args) : $signature;
}
/**
--- a/give/src/Framework/Receipts/Actions/GenerateConfirmationPageReceipt.php
+++ b/give/src/Framework/Receipts/Actions/GenerateConfirmationPageReceipt.php
@@ -334,6 +334,7 @@
}
/**
+ * @since 4.16.8 Apply legacy tags before donor-supplied V3 tag values.
* @since 3.0.0
*/
protected function getHeading(DonationReceipt $receipt, DonationForm $donationForm = null): string
@@ -344,13 +345,14 @@
$content = $donationForm->settings->receiptHeading;
}
- return $this->transformV2FormTags(
- (new DonationTemplateTags($receipt->donation, $content))->getContent(),
- $receipt->donation
- );
+ return (new DonationTemplateTags(
+ $receipt->donation,
+ $this->transformV2FormTags($content, $receipt->donation)
+ ))->getContent();
}
/**
+ * @since 4.16.8 Apply legacy tags before donor-supplied V3 tag values.
* @since 3.0.0
*/
protected function getDescription(DonationReceipt $receipt, DonationForm $donationForm = null): string
@@ -364,10 +366,10 @@
$content = $donationForm->settings->receiptDescription;
}
- return $this->transformV2FormTags(
- (new DonationTemplateTags($receipt->donation, $content))->getContent(),
- $receipt->donation
- );
+ return (new DonationTemplateTags(
+ $receipt->donation,
+ $this->transformV2FormTags($content, $receipt->donation)
+ ))->getContent();
}
/**
--- a/give/src/PaymentGateways/Gateways/ServiceProvider.php
+++ b/give/src/PaymentGateways/Gateways/ServiceProvider.php
@@ -58,6 +58,7 @@
}
/**
+ * @since 4.16.8 register TestOffsiteGateway when GIVEWP_ENABLE_TEST_OFFSITE_GATEWAY is set
* @since 3.0.0
*
* @throws Exception
@@ -66,8 +67,11 @@
private function registerGateways()
{
add_action('givewp_register_payment_gateway', static function (PaymentGatewayRegister $registrar) {
- // Enable as needed for testing but do not push to production
- // $registrar->registerGateway(TestOffsiteGateway::class);
+ // Not for production: it completes donations without charging anyone. The e2e suite turns it
+ // on through .wp-env.json to walk an offsite redirect end to end.
+ if (defined('GIVEWP_ENABLE_TEST_OFFSITE_GATEWAY') && GIVEWP_ENABLE_TEST_OFFSITE_GATEWAY) {
+ $registrar->registerGateway(TestOffsiteGateway::class);
+ }
$registrar->registerGateway(StripePaymentElementGateway::class);
--- a/give/vendor/composer/autoload_aliases.php
+++ b/give/vendor/composer/autoload_aliases.php
@@ -0,0 +1,5033 @@
+<?php
+
+// Functions and constants
+
+namespace {
+
+}
+
+
+namespace GiveVendors {
+
+ use BrianHenryIEStraussTypesAutoloadAliasInterface;
+
+ /**
+ * @see AutoloadAliasInterface
+ *
+ * @phpstan-type ClassAliasArray array{'type':'class',isabstract:bool,classname:string,namespace?:string,extends:string,implements:array<string>}
+ * @phpstan-type InterfaceAliasArray array{'type':'interface',interfacename:string,namespace?:string,extends:array<string>}
+ * @phpstan-type TraitAliasArray array{'type':'trait',traitname:string,namespace?:string,use:array<string>}
+ * @phpstan-type EnumAliasArray array{'type':'enum',enumname:string,namespace?:string,concrete:string}
+ * @phpstan-type AutoloadAliasArray array<string,ClassAliasArray|InterfaceAliasArray|TraitAliasArray|EnumAliasArray>
+ */
+ class AliasAutoloader
+ {
+ private string $includeFilePath;
+
+ /**
+ * @var AutoloadAliasArray
+ */
+ private array $autoloadAliases = array (
+ 'Nyholm\Psr7\Factory\HttplugFactory' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'HttplugFactory',
+ 'isabstract' => false,
+ 'namespace' => 'Nyholm\Psr7\Factory',
+ 'extends' => 'Give\Vendors\Nyholm\Psr7\Factory\HttplugFactory',
+ 'implements' =>
+ array (
+ 0 => 'Http\Message\MessageFactory',
+ 1 => 'Http\Message\StreamFactory',
+ 2 => 'Http\Message\UriFactory',
+ ),
+ ),
+ 'Nyholm\Psr7\Factory\Psr17Factory' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'Psr17Factory',
+ 'isabstract' => false,
+ 'namespace' => 'Nyholm\Psr7\Factory',
+ 'extends' => 'Give\Vendors\Nyholm\Psr7\Factory\Psr17Factory',
+ 'implements' =>
+ array (
+ 0 => 'Psr\Http\Message\RequestFactoryInterface',
+ 1 => 'Psr\Http\Message\ResponseFactoryInterface',
+ 2 => 'Psr\Http\Message\ServerRequestFactoryInterface',
+ 3 => 'Psr\Http\Message\StreamFactoryInterface',
+ 4 => 'Psr\Http\Message\UploadedFileFactoryInterface',
+ 5 => 'Psr\Http\Message\UriFactoryInterface',
+ ),
+ ),
+ 'Nyholm\Psr7\Request' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'Request',
+ 'isabstract' => false,
+ 'namespace' => 'Nyholm\Psr7',
+ 'extends' => 'Give\Vendors\Nyholm\Psr7\Request',
+ 'implements' =>
+ array (
+ 0 => 'Psr\Http\Message\RequestInterface',
+ ),
+ ),
+ 'Nyholm\Psr7\Response' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'Response',
+ 'isabstract' => false,
+ 'namespace' => 'Nyholm\Psr7',
+ 'extends' => 'Give\Vendors\Nyholm\Psr7\Response',
+ 'implements' =>
+ array (
+ 0 => 'Psr\Http\Message\ResponseInterface',
+ ),
+ ),
+ 'Nyholm\Psr7\ServerRequest' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'ServerRequest',
+ 'isabstract' => false,
+ 'namespace' => 'Nyholm\Psr7',
+ 'extends' => 'Give\Vendors\Nyholm\Psr7\ServerRequest',
+ 'implements' =>
+ array (
+ 0 => 'Psr\Http\Message\ServerRequestInterface',
+ ),
+ ),
+ 'Nyholm\Psr7\Stream' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'Stream',
+ 'isabstract' => false,
+ 'namespace' => 'Nyholm\Psr7',
+ 'extends' => 'Give\Vendors\Nyholm\Psr7\Stream',
+ 'implements' =>
+ array (
+ 0 => 'Psr\Http\Message\StreamInterface',
+ ),
+ ),
+ 'Nyholm\Psr7\1605bd1b8444a728807825e54b6044cd' =>
+ array (
+ 'type' => 'class',
+ 'classname' => '1605bd1b8444a728807825e54b6044cd',
+ 'isabstract' => false,
+ 'namespace' => 'Nyholm\Psr7',
+ 'extends' => 'Give\Vendors\Nyholm\Psr7\1605bd1b8444a728807825e54b6044cd',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'Nyholm\Psr7\UploadedFile' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'UploadedFile',
+ 'isabstract' => false,
+ 'namespace' => 'Nyholm\Psr7',
+ 'extends' => 'Give\Vendors\Nyholm\Psr7\UploadedFile',
+ 'implements' =>
+ array (
+ 0 => 'Psr\Http\Message\UploadedFileInterface',
+ ),
+ ),
+ 'Nyholm\Psr7\Uri' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'Uri',
+ 'isabstract' => false,
+ 'namespace' => 'Nyholm\Psr7',
+ 'extends' => 'Give\Vendors\Nyholm\Psr7\Uri',
+ 'implements' =>
+ array (
+ 0 => 'Psr\Http\Message\UriInterface',
+ ),
+ ),
+ 'StellarWP\AdminNotices\Actions\DisplayNoticesInAdmin' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'DisplayNoticesInAdmin',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\AdminNotices\Actions',
+ 'extends' => 'Give\Vendors\StellarWP\AdminNotices\Actions\DisplayNoticesInAdmin',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'StellarWP\AdminNotices\Actions\EnqueueNoticesScriptsAndStyles' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'EnqueueNoticesScriptsAndStyles',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\AdminNotices\Actions',
+ 'extends' => 'Give\Vendors\StellarWP\AdminNotices\Actions\EnqueueNoticesScriptsAndStyles',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'StellarWP\AdminNotices\Actions\NoticeShouldRender' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'NoticeShouldRender',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\AdminNotices\Actions',
+ 'extends' => 'Give\Vendors\StellarWP\AdminNotices\Actions\NoticeShouldRender',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'StellarWP\AdminNotices\Actions\RenderAdminNotice' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'RenderAdminNotice',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\AdminNotices\Actions',
+ 'extends' => 'Give\Vendors\StellarWP\AdminNotices\Actions\RenderAdminNotice',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'StellarWP\AdminNotices\AdminNotice' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'AdminNotice',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\AdminNotices',
+ 'extends' => 'Give\Vendors\StellarWP\AdminNotices\AdminNotice',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'StellarWP\AdminNotices\AdminNotices' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'AdminNotices',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\AdminNotices',
+ 'extends' => 'Give\Vendors\StellarWP\AdminNotices\AdminNotices',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'StellarWP\AdminNotices\DataTransferObjects\NoticeElementProperties' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'NoticeElementProperties',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\AdminNotices\DataTransferObjects',
+ 'extends' => 'Give\Vendors\StellarWP\AdminNotices\DataTransferObjects\NoticeElementProperties',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'StellarWP\AdminNotices\Exceptions\NotificationCollisionException' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'NotificationCollisionException',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\AdminNotices\Exceptions',
+ 'extends' => 'Give\Vendors\StellarWP\AdminNotices\Exceptions\NotificationCollisionException',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'StellarWP\AdminNotices\NotificationsRegistrar' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'NotificationsRegistrar',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\AdminNotices',
+ 'extends' => 'Give\Vendors\StellarWP\AdminNotices\NotificationsRegistrar',
+ 'implements' =>
+ array (
+ 0 => 'StellarWP\AdminNotices\Contracts\NotificationsRegistrarInterface',
+ ),
+ ),
+ 'StellarWP\AdminNotices\ValueObjects\NoticeLocation' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'NoticeLocation',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\AdminNotices\ValueObjects',
+ 'extends' => 'Give\Vendors\StellarWP\AdminNotices\ValueObjects\NoticeLocation',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'StellarWP\AdminNotices\ValueObjects\NoticeUrgency' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'NoticeUrgency',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\AdminNotices\ValueObjects',
+ 'extends' => 'Give\Vendors\StellarWP\AdminNotices\ValueObjects\NoticeUrgency',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'StellarWP\AdminNotices\ValueObjects\ScreenCondition' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'ScreenCondition',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\AdminNotices\ValueObjects',
+ 'extends' => 'Give\Vendors\StellarWP\AdminNotices\ValueObjects\ScreenCondition',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'StellarWP\AdminNotices\ValueObjects\Script' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'Script',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\AdminNotices\ValueObjects',
+ 'extends' => 'Give\Vendors\StellarWP\AdminNotices\ValueObjects\Script',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'StellarWP\AdminNotices\ValueObjects\Style' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'Style',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\AdminNotices\ValueObjects',
+ 'extends' => 'Give\Vendors\StellarWP\AdminNotices\ValueObjects\Style',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'StellarWP\AdminNotices\ValueObjects\UserCapability' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'UserCapability',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\AdminNotices\ValueObjects',
+ 'extends' => 'Give\Vendors\StellarWP\AdminNotices\ValueObjects\UserCapability',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'StellarWP\Arrays\Arr' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'Arr',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\Arrays',
+ 'extends' => 'Give\Vendors\StellarWP\Arrays\Arr',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'StellarWP\FieldConditions\ComplexConditionSet' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'ComplexConditionSet',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\FieldConditions',
+ 'extends' => 'Give\Vendors\StellarWP\FieldConditions\ComplexConditionSet',
+ 'implements' =>
+ array (
+ 0 => 'StellarWP\FieldConditions\Contracts\ConditionSet',
+ ),
+ ),
+ 'StellarWP\FieldConditions\Config' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'Config',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\FieldConditions',
+ 'extends' => 'Give\Vendors\StellarWP\FieldConditions\Config',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'StellarWP\FieldConditions\FieldCondition' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'FieldCondition',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\FieldConditions',
+ 'extends' => 'Give\Vendors\StellarWP\FieldConditions\FieldCondition',
+ 'implements' =>
+ array (
+ 0 => 'StellarWP\FieldConditions\Contracts\Condition',
+ ),
+ ),
+ 'StellarWP\FieldConditions\NestedCondition' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'NestedCondition',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\FieldConditions',
+ 'extends' => 'Give\Vendors\StellarWP\FieldConditions\NestedCondition',
+ 'implements' =>
+ array (
+ 0 => 'StellarWP\FieldConditions\Contracts\Condition',
+ 1 => 'StellarWP\FieldConditions\Contracts\ConditionSet',
+ ),
+ ),
+ 'StellarWP\FieldConditions\SimpleConditionSet' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'SimpleConditionSet',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\FieldConditions',
+ 'extends' => 'Give\Vendors\StellarWP\FieldConditions\SimpleConditionSet',
+ 'implements' =>
+ array (
+ 0 => 'StellarWP\FieldConditions\Contracts\ConditionSet',
+ ),
+ ),
+ 'StellarWP\FieldConditions\Tests\TestCase' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'TestCase',
+ 'isabstract' => false,
+ 'namespace' => 'StellarWP\FieldConditions\Tests',
+ 'extends' => 'Give\Vendors\StellarWP\FieldConditions\Tests\TestCase',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'LiquidWeb\Harbor\API\Functions\Actions\Display_Legacy_License_Page_Notice' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'Display_Legacy_License_Page_Notice',
+ 'isabstract' => false,
+ 'namespace' => 'LiquidWeb\Harbor\API\Functions\Actions',
+ 'extends' => 'Give\Vendors\LiquidWeb\Harbor\API\Functions\Actions\Display_Legacy_License_Page_Notice',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'LiquidWeb\Harbor\API\Functions\Actions\Register_Submenu' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'Register_Submenu',
+ 'isabstract' => false,
+ 'namespace' => 'LiquidWeb\Harbor\API\Functions\Actions',
+ 'extends' => 'Give\Vendors\LiquidWeb\Harbor\API\Functions\Actions\Register_Submenu',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'LiquidWeb\Harbor\API\Functions\Global_Function_Registry' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'Global_Function_Registry',
+ 'isabstract' => false,
+ 'namespace' => 'LiquidWeb\Harbor\API\Functions',
+ 'extends' => 'Give\Vendors\LiquidWeb\Harbor\API\Functions\Global_Function_Registry',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'LiquidWeb\Harbor\API\Functions\Provider' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'Provider',
+ 'isabstract' => false,
+ 'namespace' => 'LiquidWeb\Harbor\API\Functions',
+ 'extends' => 'Give\Vendors\LiquidWeb\Harbor\API\Functions\Provider',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'LiquidWeb\Harbor\API\REST\V1\Catalog_Controller' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'Catalog_Controller',
+ 'isabstract' => false,
+ 'namespace' => 'LiquidWeb\Harbor\API\REST\V1',
+ 'extends' => 'Give\Vendors\LiquidWeb\Harbor\API\REST\V1\Catalog_Controller',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'LiquidWeb\Harbor\API\REST\V1\Feature_Controller' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'Feature_Controller',
+ 'isabstract' => false,
+ 'namespace' => 'LiquidWeb\Harbor\API\REST\V1',
+ 'extends' => 'Give\Vendors\LiquidWeb\Harbor\API\REST\V1\Feature_Controller',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'LiquidWeb\Harbor\API\REST\V1\Harbor_Hosts_Controller' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'Harbor_Hosts_Controller',
+ 'isabstract' => false,
+ 'namespace' => 'LiquidWeb\Harbor\API\REST\V1',
+ 'extends' => 'Give\Vendors\LiquidWeb\Harbor\API\REST\V1\Harbor_Hosts_Controller',
+ 'implements' =>
+ array (
+ ),
+ ),
+ 'LiquidWeb\Harbor\API\REST\V1\Legacy_License_Controller' =>
+ array (
+ 'type' => 'class',
+ 'classname' => 'Legacy_License_