';
- $message = str_replace( "'", "\'", $message );
-
- // Add notice to notices array
- $this->notices[ $r['id'] ] = $message;
- }
-
- /**
- * Add all admin area notices
- *
- * @since 3.0
- */
- public function add_notices() {
-
- // User can view shop reports
- if ( current_user_can( 'view_shop_reports' ) ) {
- $this->add_reports_notices();
- }
-
- // User can manage the entire shop
- if ( current_user_can( 'manage_shop_settings' ) ) {
- $this->add_data_notices();
- $this->add_settings_notices();
- $this->add_order_upgrade_notice();
- }
-
- // Generic notices
- if ( ! empty( $_REQUEST['edd-message'] ) ) {
- $this->add_user_action_notices( $_REQUEST['edd-message'] );
- }
-
- $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'edd-message' ), $_SERVER['REQUEST_URI'] );
- }
-
- /**
- * Dismiss admin notices when dismiss links are clicked
- *
- * @since 2.3
- */
- public function dismiss_notices() {
-
- // Bail if no notices to dismiss
- if ( empty( $_GET['edd_notice'] ) || empty( $_GET['_wpnonce'] ) ) {
- return;
- }
-
- // Construct key we are dismissing
- $key = sanitize_key( $_GET['edd_notice'] );
-
- // Bail if sanitized notice is empty
- if ( empty( $key ) ) {
- return;
- }
-
- // Bail if nonce does not verify
- if ( ! wp_verify_nonce( $_GET['_wpnonce'], 'edd_notice_nonce' ) ) {
- return;
- }
-
- // Dismiss notice
- update_user_meta( get_current_user_id(), "_edd_{$key}_dismissed", 1 );
- edd_redirect( remove_query_arg( array( 'edd_action', 'edd_notice', '_wpnonce' ) ) );
- }
-
- /**
- * Output all admin area notices
- *
- * @since 2.6.0 bbPress (r6771)
- */
- public function display_notices() {
- $screen = get_current_screen();
- if ( 'site-health' === $screen->id ) {
- return;
- }
-
- $this->show_debugging_notice();
-
- // Bail if no notices
- if ( empty( $this->notices ) || ! is_array( $this->notices ) ) {
- return;
- }
-
- // Start an output buffer
- ob_start();
-
- // Loop through notices, and add them to buffer
- foreach ( $this->notices as $notice ) {
- echo $notice;
- }
-
- // Output the current buffer
- $notices = ob_get_clean();
-
- // Only echo if not empty
- if ( ! empty( $notices ) ) {
- echo $notices;
- }
- }
-
- /**
- * Remove unneed admin notices from EDD admin screens.
- *
- * @since 3.1.1
- * @return void
- */
- public function remove_notices() {
- if ( ! edd_is_admin_page() ) {
- return;
- }
-
- global $wp_filter;
- $all_hooks = $wp_filter['admin_notices']->callbacks;
-
- foreach ( $all_hooks as $priority => $priority_actions ) {
-
- $priority_functions = wp_list_pluck( $priority_actions, 'function' );
-
- foreach ( $priority_functions as $key => $function ) {
- if ( is_array( $function ) ) {
-
- if ( ! empty( $function[0] ) && is_object( $function[0] ) ) {
- $class_name = strtolower( get_class( $function[0] ) );
-
- if ( false === strpos( $class_name, 'edd' ) ) {
- unset( $all_hooks[ $priority ][ $key ] );
- }
- }
- } elseif ( is_string( $function ) ) {
-
- $function = strtolower( $function );
- if ( false === strpos( $function, 'edd' ) ) {
-
- unset( $all_hooks[ $priority ][ $key ] );
- }
- }
- }
- }
- $wp_filter['admin_notices']->callbacks = $all_hooks;
- }
-
- /** Private Methods *******************************************************/
-
- /**
- * Notices about missing pages
- *
- * @since 3.0
- * @deprecated 3.1.2
- */
- private function add_page_notices() {
-
- // Checkout page is missing
- $purchase_page = edd_get_option( 'purchase_page', '' );
- if ( empty( $purchase_page ) || ( 'trash' === get_post_status( $purchase_page ) ) ) {
- $this->add_notice( array(
- 'id' => 'edd-no-purchase-page',
- /* translators: %s: URL to the settings page */
- 'message' => sprintf( __( 'No checkout page is configured. Set one in Settings.', 'easy-digital-downloads' ), esc_url( edd_get_admin_url( array( 'page' => 'edd-settings', 'tab' => 'general', 'section' => 'pages' ) ) ) ),
- 'class' => 'error',
- 'is_dismissible' => false,
- ) );
- }
- }
-
- /**
- * Notices about reports
- *
- * @since 3.0
- */
- private function add_reports_notices() {
-
- }
-
- /**
- * Notices for the entire shop
- *
- * @since 3.0
- * @deprecated 3.1.2
- */
- private function add_system_notices() {
-
- // Bail if not an EDD admin page
- if ( ! edd_is_admin_page() || edd_is_dev_environment() || edd_is_admin_page( 'index.php' ) ) {
- return;
- }
-
- // Bail if user cannot manage options
- if ( ! current_user_can( 'manage_shop_settings' ) ) {
- return;
- }
-
- // Bail if uploads directory is protected
- if ( edd_is_uploads_url_protected() ) {
- return;
- }
-
- // Get the upload directory
- $upload_directory = edd_get_upload_dir();
-
- // Running NGINX
- $show_nginx_notice = apply_filters( 'edd_show_nginx_redirect_notice', true );
- if ( $show_nginx_notice && ! empty( $GLOBALS['is_nginx'] ) && ! get_user_meta( get_current_user_id(), '_edd_nginx_redirect_dismissed', true ) ) {
- $dismiss_notice_url = wp_nonce_url( add_query_arg( array(
- 'edd_action' => 'dismiss_notices',
- 'edd_notice' => 'nginx_redirect'
- ) ), 'edd_notice_nonce' );
-
- $this->add_notice( array(
- 'id' => 'edd-nginx',
- 'class' => 'error',
- 'is_dismissible' => false,
- 'message' => array(
- /* translators: %s: Uploads directory */
- sprintf( __( 'The files in %s are not currently protected.', 'easy-digital-downloads' ), '' . $upload_directory . '' ),
- __( 'To protect them, you must add this NGINX redirect rule.', 'easy-digital-downloads' ),
- /* translators: %s: Dismiss notice URL */
- sprintf( __( 'If you have already done this, or it does not apply to your site, you may permenently %s.', 'easy-digital-downloads' ), '' . __( 'dismiss this notice', 'easy-digital-downloads' ) . '' )
- )
- ) );
- }
-
- // Running Apache
- if ( ! empty( $GLOBALS['is_apache'] ) && ! edd_htaccess_exists() && ! get_user_meta( get_current_user_id(), '_edd_htaccess_missing_dismissed', true ) ) {
- $dismiss_notice_url = wp_nonce_url( add_query_arg( array(
- 'edd_action' => 'dismiss_notices',
- 'edd_notice' => 'htaccess_missing'
- ) ), 'edd_notice_nonce' );
-
- $this->add_notice( array(
- 'id' => 'edd-apache',
- 'class' => 'error',
- 'is_dismissible' => false,
- 'message' => array(
- sprintf( __( 'The .htaccess file is missing from: %s', 'easy-digital-downloads' ), '' . $upload_directory . '' ),
- sprintf( __( 'First, please resave the Misc settings tab a few times. If this warning continues to appear, create a file called ".htaccess" in the %s directory, and copy the following into it:', 'easy-digital-downloads' ), '' . $upload_directory . '' ),
- sprintf( __( 'If you have already done this, or it does not apply to your site, you may permenently %s.', 'easy-digital-downloads' ), '' . __( 'dismiss this notice', 'easy-digital-downloads' ) . '' ),
- '
' . edd_get_htaccess_rules() . '
'
- )
- ) );
- }
- }
-
- /**
- * Notices about data (migrations, etc...)
- *
- * @since 3.0
- */
- private function add_data_notices() {
-
- // Recount earnings
- if ( class_exists( 'EDD_Recount_Earnings' ) ) {
- $this->add_notice( array(
- 'id' => 'edd-recount-earnings',
- 'class' => 'error',
- 'is_dismissible' => false,
- 'message' => sprintf(
- /* translators: 1. link to the recount tool; 2. link to the plugins screen. */
- __( 'Easy Digital Downloads 2.5 contains a built in recount tool. Please deactivate the Easy Digital Downloads - Recount Earnings plugin', 'easy-digital-downloads' ),
- esc_url( edd_get_admin_url( array( 'page' => 'edd-tools', 'tab' => 'general' ) ) ),
- esc_url( admin_url( 'plugins.php' ) )
- )
- ) );
- }
- }
-
- /**
- * Adds a notice about the deprecated Default Rate for Taxes.
- *
- * @since 3.0
- * @since 3.0.2 - We've found a way to add default tax rates. Leaving the method in case anyone (for some reason) is calling it.
- */
- private function add_tax_rate_notice() {
-
- // Default tax rate not detected.
- if ( false === edd_get_option( 'tax_rate' ) ) {
- return;
- }
-
- // On Rates page, settings notice is shown.
- if ( ! empty( $_GET['page'] ) && 'edd-settings' === $_GET['page'] && ! empty( $_GET['section'] ) && 'rates' === $_GET['section'] ) {
- return;
- }
-
- // URL to fix this
- $url = edd_get_admin_url( array(
- 'page' => 'edd-settings',
- 'tab' => 'taxes',
- 'section' => 'rates'
- ) );
-
- // Link
- $link = '' . __( 'Review Tax Rates', 'easy-digital-downloads' ) . '';
-
- // Add the notice
- $this->add_notice( array(
- 'id' => 'edd-default-tax-rate',
- 'class' => 'error',
- /* translators: Link to review existing tax rates. */
- 'message' => '' . __( 'A default tax rate was detected.', 'easy-digital-downloads' ) . '
' . __( 'This setting is no longer used in this version of Easy Digital Downloads. Please confirm your regional tax rates are properly configured and update tax settings to remove this notice.', 'easy-digital-downloads' ) . '
' . $link,
- 'is_dismissible' => false
- ) );
- }
-
- /**
- * Notices about settings (updating, etc...)
- *
- * @since 3.0
- */
- private function add_settings_notices() {
-
- // Settings area
- if ( empty( $_GET['page'] ) || ( 'edd-settings' !== $_GET['page'] ) ) {
- return;
- }
-
- // Settings updated
- if ( ! empty( $_GET['settings-updated'] ) ) {
- $this->add_notice(
- array(
- 'id' => 'edd-notices',
- 'message' => __( 'Settings updated.', 'easy-digital-downloads' )
- )
- );
- }
-
- if ( 'accounting' === filter_input( INPUT_GET, 'section', FILTER_SANITIZE_STRING ) ) {
- if ( ! empty( edd_get_option( 'sequential_start_update_failed', false ) ) ) {
- $order_number = new \EDD\Orders\Number();
- $this->add_notice(
- array(
- 'id' => 'edd-sequential-order-numbers-not-updated',
- 'message' => sprintf(
- /* translators: %s: Next order number */
- __( 'The sequential starting number could not be updated because it could conflict with existing orders. The next assigned order number is %s.', 'easy-digital-downloads' ),
- '' . $order_number->format( (int) get_option( 'edd_next_order_number' ) ) . ''
- ),
- 'class' => 'error',
- )
- );
- edd_delete_option( 'sequential_start_update_failed' );
- }
- }
- }
-
- /**
- * Adds a notice if an order migration is running.
- * This is only shown if the migration is running via UI by a different user or on another screen.
- *
- * @since 3.1.2
- * @return void
- */
- private function add_order_upgrade_notice() {
- if ( edd_has_upgrade_completed( 'migrate_orders' ) ) {
- return;
- }
- if ( ! get_option( '_edd_v30_doing_order_migration', false ) ) {
- return;
- }
- if ( get_option( 'edd_v30_cli_migration_running', false ) ) {
- return;
- }
- $this->add_notice(
- array(
- 'id' => 'edd-v30-order-migration-running',
- 'class' => 'updated',
- 'message' => __( 'Easy Digital Downloads is migrating orders. Sales and earnings data for your store will be updated when all orders have been migrated.', 'easy-digital-downloads' ),
- 'is_dismissible' => false,
- )
- );
- }
-
- /**
- * Notices about actions that the user has taken
- *
- * @since 3.0
- *
- * @param string $notice
- */
- private function add_user_action_notices( $notice = '' ) {
-
- // Sanitize notice key
- $notice = sanitize_key( $notice );
-
- // Bail if notice is empty
- if ( empty( $notice ) ) {
- return;
- }
-
- // Shop discounts errors
- if ( current_user_can( 'manage_shop_discounts' ) ) {
- switch ( $notice ) {
- case 'discount_added' :
- $this->add_notice( array(
- 'id' => 'edd-discount-added',
- 'message' => __( 'Discount code added.', 'easy-digital-downloads' )
- ) );
- break;
- case 'discount_add_failed' :
- $this->add_notice( array(
- 'id' => 'edd-discount-add-fail',
- 'message' => __( 'There was a problem adding that discount code, please try again.', 'easy-digital-downloads' ),
- 'class' => 'error'
- ) );
- break;
- case 'discount_exists' :
- $this->add_notice( array(
- 'id' => 'edd-discount-exists',
- 'message' => __( 'A discount with that code already exists, please use a different code.', 'easy-digital-downloads' ),
- 'class' => 'error'
- ) );
- break;
- case 'discount_updated' :
- $this->add_notice( array(
- 'id' => 'edd-discount-updated',
- 'message' => __( 'Discount code updated.', 'easy-digital-downloads' )
- ) );
- break;
- case 'discount_not_changed' :
- $this->add_notice( array(
- 'id' => 'edd-discount-not-changed',
- 'message' => __( 'No changes were made to that discount code.', 'easy-digital-downloads' )
- ) );
- break;
- case 'discount_update_failed' :
- $this->add_notice( array(
- 'id' => 'edd-discount-updated-fail',
- 'message' => __( 'There was a problem updating that discount code, please try again.', 'easy-digital-downloads' ),
- 'class' => 'error'
- ) );
- break;
- case 'discount_validation_failed' :
- $this->add_notice( array(
- 'id' => 'edd-discount-validation-fail',
- 'message' => __( 'The discount code could not be added because one or more of the required fields was empty, please try again.', 'easy-digital-downloads' ),
- 'class' => 'error'
- ) );
- break;
- case 'discount_invalid_code':
- $this->add_notice( array(
- 'id' => 'edd-discount-invalid-code',
- 'message' => __( 'The discount code entered is invalid; only alphanumeric characters are allowed, please try again.', 'easy-digital-downloads' ),
- 'class' => 'error'
- ) );
- break;
- case 'discount_invalid_amount' :
- $this->add_notice( array(
- 'id' => 'edd-discount-invalid-amount',
- 'message' => __( 'The discount amount must be a valid percentage or numeric flat amount. Please try again.', 'easy-digital-downloads' ),
- 'class' => 'error'
- ) );
- break;
- case 'discount_deleted':
- $this->add_notice( array(
- 'id' => 'edd-discount-deleted',
- 'message' => __( 'Discount code deleted.', 'easy-digital-downloads' )
- ) );
- break;
- case 'discount_delete_failed':
- $this->add_notice( array(
- 'id' => 'edd-discount-delete-fail',
- 'message' => __( 'There was a problem deleting that discount code, please try again.', 'easy-digital-downloads' ),
- 'class' => 'error'
- ) );
- break;
- case 'discount_activated':
- $this->add_notice( array(
- 'id' => 'edd-discount-activated',
- 'message' => __( 'Discount code activated.', 'easy-digital-downloads' )
- ) );
- break;
- case 'discount_activation_failed':
- $this->add_notice( array(
- 'id' => 'edd-discount-activation-fail',
- 'message' => __( 'There was a problem activating that discount code, please try again.', 'easy-digital-downloads' ),
- 'class' => 'error'
- ) );
- break;
- case 'discount_deactivated':
- $this->add_notice( array(
- 'id' => 'edd-discount-deactivated',
- 'message' => __( 'Discount code deactivated.', 'easy-digital-downloads' )
- ) );
- break;
- case 'discount_deactivation_failed':
- $this->add_notice( array(
- 'id' => 'edd-discount-deactivation-fail',
- 'message' => __( 'There was a problem deactivating that discount code, please try again.', 'easy-digital-downloads' ),
- 'class' => 'error'
- ) );
- break;
- }
- }
-
- // Shop reports errors
- if ( current_user_can( 'view_shop_reports' ) ) {
- switch( $notice ) {
- case 'refreshed-reports' :
- $this->add_notice( array(
- 'id' => 'edd-refreshed-reports',
- 'message' => __( 'The reports have been refreshed.', 'easy-digital-downloads' )
- ) );
- break;
- }
- }
-
- // Shop settings errors
- if ( current_user_can( 'manage_shop_settings' ) ) {
- switch( $notice ) {
- case 'settings-imported' :
- $this->add_notice( array(
- 'id' => 'edd-settings-imported',
- 'message' => __( 'The settings have been imported.', 'easy-digital-downloads' )
- ) );
- break;
- case 'api-key-generated' :
- $this->add_notice( array(
- 'id' => 'edd-api-key-generated',
- 'message' => __( 'API keys successfully generated.', 'easy-digital-downloads' )
- ) );
- break;
- case 'api-key-exists' :
- $this->add_notice( array(
- 'id' => 'edd-api-key-exists',
- 'message' => __( 'The specified user already has API keys.', 'easy-digital-downloads' ),
- 'class' => 'error'
- ) );
- break;
- case 'api-key-regenerated' :
- $this->add_notice( array(
- 'id' => 'edd-api-key-regenerated',
- 'message' => __( 'API keys successfully regenerated.', 'easy-digital-downloads' )
- ) );
- break;
- case 'api-key-revoked' :
- $this->add_notice( array(
- 'id' => 'edd-api-key-revoked',
- 'message' => __( 'API keys successfully revoked.', 'easy-digital-downloads' )
- ) );
- break;
- case 'test-purchase-email-sent':
- $this->add_notice(
- array(
- 'id' => 'edd-test-purchase-receipt-sent',
- 'message' => __( 'The test email was sent successfully.', 'easy-digital-downloads' )
- )
- );
- break;
- case 'test-summary-email-sent':
- $this->add_notice(
- array(
- 'id' => 'edd-test-summary-email-sent',
- 'message' => __( 'The test email summary was sent successfully.', 'easy-digital-downloads' )
- )
- );
- break;
-
- case 'missing-pass-key':
- $this->add_notice(
- array(
- 'id' => 'edd-missing-pass-key',
- 'message' => __( 'Your extensions could not be refreshed because you have not verified your license key.', 'easy-digital-downloads' ),
- 'class' => 'error',
- )
- );
- break;
- }
- }
-
- // Shop payments errors
- if ( current_user_can( 'edit_shop_payments' ) ) {
- switch( $notice ) {
- case 'note-added' :
- $this->add_notice( array(
- 'id' => 'edd-note-added',
- 'message' => __( 'The note has been added successfully.', 'easy-digital-downloads' )
- ) );
- break;
- case 'payment-updated' :
- $this->add_notice( array(
- 'id' => 'edd-payment-updated',
- 'message' => __( 'The order has been updated successfully.', 'easy-digital-downloads' )
- ) );
- break;
- case 'order_added' :
- $this->add_notice( array(
- 'id' => 'edd-order-added',
- 'message' => __( 'Order successfully created.', 'easy-digital-downloads' )
- ) );
- break;
- case 'order_trashed' :
- $this->add_notice( array(
- 'id' => 'edd-order-trashed',
- 'message' => __( 'The order has been moved to the trash.', 'easy-digital-downloads' )
- ) );
- break;
- case 'order_restored' :
- $this->add_notice( array(
- 'id' => 'edd-order-restored',
- 'message' => __( 'The order has been restored.', 'easy-digital-downloads' )
- ) );
- break;
- case 'payment_deleted' :
- $this->add_notice( array(
- 'id' => 'edd-payment-deleted',
- 'message' => __( 'The order has been deleted.', 'easy-digital-downloads' )
- ) );
- break;
- case 'email_sent' :
- $this->add_notice( array(
- 'id' => 'edd-payment-sent',
- 'message' => __( 'The purchase receipt has been resent.', 'easy-digital-downloads' )
- ) );
- break;
- case 'email_send_failed':
- $this->add_notice( array(
- 'id' => 'edd-payment-sent',
- 'message' => __( 'Failed to send purchase receipt.', 'easy-digital-downloads' )
- ) );
- break;
- case 'payment-note-deleted' :
- $this->add_notice( array(
- 'id' => 'edd-note-deleted',
- 'message' => __( 'The order note has been deleted.', 'easy-digital-downloads' )
- ) );
- break;
- }
- }
-
- // Customer Notices
- if ( current_user_can( 'edit_shop_payments' ) ) {
- switch( $notice ) {
- case 'customer-deleted' :
- $this->add_notice( array(
- 'id' => 'edd-customer-deleted',
- 'message' => __( 'Customer successfully deleted.', 'easy-digital-downloads' ),
- ) );
- break;
- case 'user-verified' :
- $this->add_notice( array(
- 'id' => 'edd-user-verified',
- 'message' => __( 'User successfully verified.', 'easy-digital-downloads' ),
- ) );
- break;
- case 'email-added' :
- $this->add_notice( array(
- 'id' => 'edd-customer-email-added',
- 'message' => __( 'Customer email added.', 'easy-digital-downloads' ),
- ) );
- break;
- case 'email-removed' :
- $this->add_notice( array(
- 'id' => 'edd-customer-email-removed',
- 'message' => __( 'Customer email deleted.', 'easy-digital-downloads' ),
- ) );
- break;
- case 'email-remove-failed' :
- $this->add_notice( array(
- 'id' => 'edd-customer-email-remove-failed',
- 'message' => __( 'Failed to delete customer email.', 'easy-digital-downloads' ),
- 'class' => 'error',
- ) );
- break;
- case 'primary-email-updated' :
- $this->add_notice( array(
- 'id' => 'eddedd-customer-primary-email-updated',
- 'message' => __( 'Primary email updated for customer.', 'easy-digital-downloads' )
- ) );
- break;
- case 'primary-email-failed' :
- $this->add_notice( array(
- 'id' => 'edd-customer-primary-email-failed',
- 'message' => __( 'Failed to set primary email.', 'easy-digital-downloads' ),
- 'class' => 'error',
- ) );
- break;
- case 'address-removed' :
- $this->add_notice( array(
- 'id' => 'edd-customer-address-removed',
- 'message' => __( 'Customer address deleted.', 'easy-digital-downloads' )
- ) );
- break;
- case 'address-remove-failed' :
- $this->add_notice( array(
- 'id' => 'edd-customer-address-remove-failed',
- 'message' => __( 'Failed to delete customer address.', 'easy-digital-downloads' ),
- 'class' => 'error',
- ) );
- break;
- }
- }
-
- if ( 'one-click-upgrade' === $notice && edd_is_pro() && current_user_can( 'install_plugins' ) && edd_is_admin_page( 'settings' ) ) {
- $this->add_notice(
- array(
- 'id' => 'edd-upgraded',
- 'message' => sprintf(
- /* Translators: 1. opening strong tag, do not translate; 2. closing strong tag, do not translate */
- __( 'Congratulations! You are now running %1$sEasy Digital Downloads (Pro)%2$s.', 'easy-digital-downloads' ),
- '',
- ''
- ),
- )
- );
- }
- }
-
- /**
- * Show a notice if debugging is enabled in the EDD settings.
- * Does not show if only the `EDD_DEBUG_MODE` constant is defined.
- *
- * @since 2.11.5
- * @return void
- */
- private function show_debugging_notice() {
- if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
- return;
- }
- if ( ! current_user_can( 'manage_shop_settings' ) ) {
- return;
- }
- if ( ! edd_get_option( 'debug_mode', false ) ) {
- return;
- }
-
- /**
- * The notices JS needs to be output wherever the notice is displayed, not just EDD screens.
- * If more notices add to the script then this enqueue will need to be moved.
- *
- * @since 3.0
- */
- wp_enqueue_script( 'edd-admin-notices', EDD_PLUGIN_URL . 'assets/js/edd-admin-notices.js', array( 'jquery' ), EDD_VERSION, true );
- $view_url = add_query_arg(
- array(
- 'post_type' => 'download',
- 'page' => 'edd-tools',
- 'tab' => 'debug_log',
- ),
- admin_url( 'edit.php' )
- );
- ?>
-
-
-
-
-
-
-
-
-
-
- clear_log_file();
- wp_send_json_success( wpautop( __( 'The debug log has been cleared and logging has been disabled.', 'easy-digital-downloads' ) ) );
- }
-
- /**
- * Escape message string output
- *
- * @since 2.6.0 bbPress (r6775)
- *
- * @param string $message
- *
- * @return string
- */
- private function esc_notice( $message = '' ) {
- $tags = wp_kses_allowed_html( 'post' );
- $text = wp_kses( $message, $tags );
-
- return $text;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/admin/class-list-table.php b/wp-content/plugins/easy-digital-downloads/includes/admin/class-list-table.php
deleted file mode 100644
index efb5e4b5..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/admin/class-list-table.php
+++ /dev/null
@@ -1,244 +0,0 @@
- 0
- );
-
- /**
- * Get a request var, or return the default if not set.
- *
- * @since 3.0
- *
- * @param string $var
- * @param mixed $default
- * @return mixed Un-sanitized request var
- */
- public function get_request_var( $var = '', $default = false ) {
- return isset( $_REQUEST[ $var ] )
- ? $_REQUEST[ $var ]
- : $default;
- }
-
- /**
- * Get a status request var, if set.
- *
- * @since 3.0
- *
- * @param mixed $default
- * @return string
- */
- protected function get_status( $default = '' ) {
- return sanitize_key( $this->get_request_var( 'status', $default ) );
- }
-
- /**
- * Retrieve the current page number.
- *
- * @since 3.0
- *
- * @return int Current page number.
- */
- protected function get_paged() {
- return absint( $this->get_request_var( 'paged', 1 ) );
- }
-
- /**
- * Retrieve the current page number.
- *
- * @since 3.0
- *
- * @return int Current page number.
- */
- protected function get_search() {
- return urldecode( trim( $this->get_request_var( 's', '' ) ) );
- }
-
- /**
- * Retrieves the data to be populated into the list table.
- *
- * @since 3.0
- *
- * @return array Array of list table data.
- */
- abstract public function get_data();
-
- /**
- * Retrieve the view types
- *
- * @since 1.4
- *
- * @return array $views All the views available
- */
- public function get_views() {
-
- // Get the current status
- $current = $this->get_status();
-
- // Args to remove
- $remove = array( 'edd-message', 'status', 'paged', '_wpnonce' );
-
- // Base URL
- $url = remove_query_arg( $remove, $this->get_base_url() );
-
- // Is all selected?
- $class = in_array( $current, array( '', 'all' ), true )
- ? ' class="current"'
- : '';
-
- // All
- $count = ' (' . esc_attr( $this->counts['total'] ) . ')';
- $label = __( 'All', 'easy-digital-downloads' ) . $count;
- $views = array(
- 'all' => sprintf( '%s', esc_url( $url ), $class, $label ),
- );
-
- // Remove total from counts array
- $counts = $this->counts;
- unset( $counts['total'] );
-
- // Loop through statuses.
- if ( ! empty( $counts ) ) {
- foreach ( $counts as $status => $count ) {
- $count_url = add_query_arg( array(
- 'status' => sanitize_key( $status ),
- 'paged' => false,
- ), $url );
-
- $class = ( $current === $status )
- ? ' class="current"'
- : '';
-
- $count = ' (' . absint( $this->counts[ $status ] ) . ')';
-
- $label = edd_get_status_label( $status ) . $count;
- $views[ $status ] = sprintf( '%s', esc_url( $count_url ), $class, $label );
- }
- }
-
- return $views;
- }
-
- /**
- * Parse pagination query arguments into keys & values that the Query class
- * can understand and use to retrieve the correct results from the database.
- *
- * @since 3.0
- *
- * @param array $args
- *
- * @return array
- */
- public function parse_pagination_args( $args = array() ) {
-
- // Get pagination values
- $order = isset( $_GET['order'] ) ? sanitize_text_field( $_GET['order'] ) : 'DESC'; // WPCS: CSRF ok.
- $orderby = isset( $_GET['orderby'] ) ? sanitize_text_field( $_GET['orderby'] ) : 'id'; // WPCS: CSRF ok.
- $paged = $this->get_paged();
-
- // Only perform paged math if numeric and greater than 1
- if ( ! empty( $paged ) && is_numeric( $paged ) && ( $paged > 1 ) ) {
- $offset = ceil( $this->per_page * ( $paged - 1 ) );
-
- // Otherwise, default to the first page of results
- } else {
- $offset = 0;
- }
-
- // Parse pagination args into passed args
- $r = wp_parse_args( $args, array(
- 'number' => $this->per_page,
- 'offset' => $offset,
- 'order' => $order,
- 'orderby' => $orderby
- ) );
-
- // Return args
- return array_filter( $r );
- }
-
- /**
- * Show the search field.
- *
- * @since 3.0
- *
- * @param string $text Label for the search box
- * @param string $input_id ID of the search box
- */
- public function search_box( $text, $input_id ) {
-
- // Bail if no customers and no search
- if ( ! $this->get_search() && ! $this->has_items() ) {
- return;
- }
-
- $orderby = $this->get_request_var( 'orderby' );
- $order = $this->get_request_var( 'order' );
- $input_id = $input_id . '-search-input';
-
- if ( ! empty( $orderby ) ) {
- echo '';
- }
-
- if ( ! empty( $order ) ) {
- echo '';
- }
-
- ?>
-
-
' . __( 'Discount codes allow you to offer buyers special discounts by having them enter predefined codes during checkout.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Discount codes that are set to "inactive" cannot be redeemed.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Discount codes can be setup to only be used only one time by each customer. If a customer attempts to use a code a second time, they will be given an error.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Discount codes that have already been used cannot be deleted for data integrity and reporting purposes.', 'easy-digital-downloads' ) . '
' . __( 'You can create any number of discount codes easily from this page.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Discount codes have several options:', 'easy-digital-downloads' ) . '
' .
- '
'.
- '
' . __( 'Name - this is the name given to the discount. Used primarily for administrative purposes.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Code - this is the unique code that customers will enter during checkout to redeem the code.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Type - this is the type of discount this code awards.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Amount - this is the discount amount provided by this code. For percentage based discounts, enter a number such as 70 for 70%. Do not enter a percent sign.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Requirements - this allows you to select the product(s) that are required to be purchased in order for a discount to be applied.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Condition - this lets you set whether all selected products must be in the cart, or just a minimum of one.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Apply discount only to selected Downloads? - If this box is checked, only the prices of the required products will be discounted. If left unchecked, the discount will apply to all products in the cart.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Start Date - this is the date that this code becomes available. If a customer attempts to redeem the code prior to this date, they will be given an error. This is optional.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Expiration Date - this is the end date for the discount. After this date, the code will no longer be able to be used. This is optional.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Minimum Amount - this is the minimum purchase amount required to use this code. If a customer has less than this amount in their cart, they will be given an error. This is optional.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Max Uses - this is the maximum number of times this discount can be redeemed. Once this number is reached, no more customers will be allowed to use it.', 'easy-digital-downloads' ) . '
' . __( 'File Download Limit - Define how many times customers are allowed to download their purchased files. Leave at 0 for unlimited. Resending the purchase receipt will permit the customer one additional download if their limit has already been reached.', 'easy-digital-downloads' ) . '
' .
-
- '
' . __( 'Accounting Options - If enabled, define an individual SKU or product number for this download.', 'easy-digital-downloads' ) . '
' .
-
- '
' . __( 'Button Options - Disable the automatic output of the purchase button. If disabled, no button will be added to the download page unless the [purchase_link] shortcode is used.', 'easy-digital-downloads' ) . '
' . __( 'Product Type Options - Choose a default product type or a bundle. Bundled products automatically include access to other download's files when purchased.', 'easy-digital-downloads' ) . '
' .
-
- '
' . __( 'File Downloads - Define download file names and their respective file URL. Multiple files can be assigned to a single price, or variable prices.', 'easy-digital-downloads' ) . '
' . sprintf( __( 'Special instructions for this %s. These will be added to the sales receipt, and may be used by some extensions or themes.', 'easy-digital-downloads' ), strtolower( edd_get_label_singular() ) ) . '
' . __( 'Purchase Shortcode - If the automatic output of the purchase button has been disabled via the Download Configuration box, a shortcode can be used to output the button or link.', 'easy-digital-downloads' ) . '
' .
- '
[purchase_link id="#" price="1" text="Add to Cart" color="blue"]
' .
- '
-
id - ' . __( 'The ID of a specific download to purchase.', 'easy-digital-downloads' ) . '
-
price - ' . __( 'Whether to show the price on the purchase button. 1 to show the price, 0 to disable it.', 'easy-digital-downloads' ) . '
-
text - ' . __( 'The text to be displayed on the button or link.', 'easy-digital-downloads' ) . '
-
style - ' . __( 'button | text - The style of the purchase link.', 'easy-digital-downloads' ) . '
-
color - ' . implode( ' | ', $colors ) . '
-
class - ' . __( 'One or more custom CSS classes you want applied to the button.', 'easy-digital-downloads' ) . '
-
' .
- '
' . sprintf(
- __( 'For more information, see using Shortcodes on the WordPress.org Codex or Easy Digital Downloads Documentation', 'easy-digital-downloads' ),
- 'https://codex.wordpress.org/Shortcode',
- 'https://easydigitaldownloads.com/docs/purchase_link-shortcode/'
- ) . '
'
- ) );
-
- /**
- * Fires off in the EDD Downloads Contextual Help Screen
- *
- * @since 1.2.3
- * @param object $screen The current admin screen
- */
- do_action( 'edd_downloads_contextual_help', $screen );
-}
-add_action( 'load-post.php', 'edd_downloads_contextual_help' );
-add_action( 'load-post-new.php', 'edd_downloads_contextual_help' );
diff --git a/wp-content/plugins/easy-digital-downloads/includes/admin/downloads/dashboard-columns.php b/wp-content/plugins/easy-digital-downloads/includes/admin/downloads/dashboard-columns.php
deleted file mode 100644
index 21d8fd87..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/admin/downloads/dashboard-columns.php
+++ /dev/null
@@ -1,367 +0,0 @@
- '',
- 'title' => __( 'Name', 'easy-digital-downloads' ),
- 'download_category' => $category_labels['menu_name'],
- 'download_tag' => $tag_labels['menu_name'],
- 'price' => __( 'Price', 'easy-digital-downloads' ),
- 'sales' => __( 'Net Sales', 'easy-digital-downloads' ),
- 'earnings' => __( 'Net Revenue', 'easy-digital-downloads' ),
- 'date' => __( 'Date', 'easy-digital-downloads' )
- ) );
-}
-add_filter( 'manage_edit-download_columns', 'edd_download_columns' );
-
-/**
- * Render Download Columns
- *
- * @since 1.0
- * @param string $column_name Column name
- * @param int $post_id Download (Post) ID
- * @return void
- */
-function edd_render_download_columns( $column_name, $post_id ) {
-
- // Bail if not a download
- if ( get_post_type( $post_id ) !== 'download' ) {
- return;
- }
-
- switch ( $column_name ) {
- case 'download_category':
- $terms = get_the_term_list( $post_id, 'download_category', '', ', ', '');
- echo ! empty( $terms )
- ? $terms
- : '—';
- break;
- case 'download_tag':
- $terms = get_the_term_list( $post_id, 'download_tag', '', ', ', '');
- echo ! empty( $terms )
- ? $terms
- : '—';
- break;
- case 'price':
- if ( edd_has_variable_prices( $post_id ) ) {
- echo edd_price_range( $post_id );
- } else {
- echo edd_price( $post_id, false );
- echo '';
- }
- break;
- case 'sales':
- if ( current_user_can( 'view_product_stats', $post_id ) ) {
- $sales_url = add_query_arg( array(
- 'page' => 'edd-payment-history',
- 'product-id' => urlencode( $post_id )
- ), edd_get_admin_base_url() );
-
- echo '';
- echo edd_get_download_sales_stats( $post_id );
- echo '';
- } else {
- echo '-';
- }
- break;
- case 'earnings':
- if ( current_user_can( 'view_product_stats', $post_id ) ) {
- $report_url = edd_get_admin_url( array(
- 'page' => 'edd-reports',
- 'view' => 'downloads',
- 'products' => absint( $post_id ),
- ) );
-
- echo '';
- echo edd_currency_filter( edd_format_amount( edd_get_download_earnings_stats( $post_id ) ) );
- echo '';
- } else {
- echo '-';
- }
- break;
- }
-}
-add_action( 'manage_posts_custom_column', 'edd_render_download_columns', 10, 2 );
-
-/**
- * Registers the sortable columns in the list table
- *
- * @since 1.0
- * @param array $columns Array of the columns
- * @return array $columns Array of sortable columns
- */
-function edd_sortable_download_columns( $columns ) {
- $columns['price'] = 'price';
- $columns['sales'] = 'sales';
- $columns['earnings'] = 'earnings';
-
- return $columns;
-}
-add_filter( 'manage_edit-download_sortable_columns', 'edd_sortable_download_columns' );
-
-/**
- * Sorts Columns in the Downloads List Table
- *
- * @since 1.0
- * @param array $vars Array of all the sort variables
- * @return array $vars Array of all the sort variables
- */
-function edd_sort_downloads( $vars ) {
- // Check if we're viewing the "download" post type
- if ( isset( $vars['post_type'] ) && 'download' == $vars['post_type'] ) {
- // Check if 'orderby' is set to "sales"
- if ( isset( $vars['orderby'] ) && 'sales' == $vars['orderby'] ) {
- $vars = array_merge(
- $vars,
- array(
- 'meta_key' => '_edd_download_sales',
- 'orderby' => 'meta_value_num'
- )
- );
- }
-
- // Check if "orderby" is set to "earnings"
- if ( isset( $vars['orderby'] ) && 'earnings' == $vars['orderby'] ) {
- $vars = array_merge(
- $vars,
- array(
- 'meta_key' => '_edd_download_earnings',
- 'orderby' => 'meta_value_num'
- )
- );
- }
-
- // Check if "orderby" is set to "earnings"
- if ( isset( $vars['orderby'] ) && 'price' == $vars['orderby'] ) {
- $vars = array_merge(
- $vars,
- array(
- 'meta_key' => 'edd_price',
- 'orderby' => 'meta_value_num'
- )
- );
- }
- }
-
- return $vars;
-}
-
-/**
- * Sets restrictions on author of Downloads List Table
- *
- * @since 2.2
- * @param array $vars Array of all sort variables
- * @return array Array of all sort variables
- */
-function edd_filter_downloads( $vars ) {
- if ( isset( $vars['post_type'] ) && 'download' == $vars['post_type'] ) {
-
- // If an author ID was passed, use it
- if ( isset( $_REQUEST['author'] ) && ! current_user_can( 'view_shop_reports' ) ) {
-
- $author_id = $_REQUEST['author'];
- if ( (int) $author_id !== get_current_user_id() ) {
- // Tried to view the products of another person, sorry
- wp_die( __( 'You do not have permission to view this data.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) );
- }
- $vars = array_merge(
- $vars,
- array(
- 'author' => get_current_user_id()
- )
- );
- }
- }
-
- return $vars;
-}
-
-/**
- * Download Load
- *
- * Sorts the downloads.
- *
- * @since 1.0
- * @return void
- */
-function edd_download_load() {
- add_filter( 'request', 'edd_sort_downloads' );
- add_filter( 'request', 'edd_filter_downloads' );
-}
-add_action( 'load-edit.php', 'edd_download_load', 9999 );
-
-/**
- * Add Download Filters
- *
- * Adds taxonomy drop down filters for downloads.
- *
- * @since 1.0
- * @return void
- */
-function edd_add_download_filters() {
- global $typenow;
-
- // Checks if the current post type is 'download'.
- if ( 'download' !== $typenow ) {
- return;
- }
-
- $category_args = array(
- 'taxonomy' => 'download_category',
- 'number' => 30,
- );
-
- $categories = get_terms( $category_args );
- if ( ! empty( $categories ) ) {
- $category_labels = edd_get_taxonomy_labels( 'download_category' );
-
- $options = array();
- $options[''] = sprintf( _x( 'All %s', 'plural: Example: "All Categories"', 'easy-digital-downloads' ), $category_labels['name'] );
-
- // Ensure we include the selected value in the pre-populated list.
- $selected = ! empty( $_GET['download_category'] ) ? $_GET['download_category'] : '';
- if ( ! empty( $selected ) ) {
- $selected_term = get_term_by( 'slug', $selected, 'download_category' );
-
- $options[ $selected_term->slug ] = $selected_term->name . ' (' . $selected_term->count . ')';
- }
-
- foreach ( $categories as $category ) {
- $options[ $category->slug ] = $category->name . ' (' . $category->count . ')';
- }
-
- echo EDD()->html->select(
- array(
- 'name' => 'download_category',
- 'id' => 'download_category',
- 'class' => 'postform',
- 'chosen' => true,
- 'show_option_all' => false,
- 'show_option_none' => false,
- 'options' => $options,
- 'selected' => $selected,
- 'data' => array(
- 'placeholder' => sprintf( _x( 'Search %s', 'plural: Example: "Search Download Categories"', 'easy-digital-downloads' ), $category_labels['name'] ),
- 'search-type' => 'download_category',
- 'search-placeholder' => sprintf( _x( 'Search %s', 'plural: Example: "Search Download Categories"', 'easy-digital-downloads' ), $category_labels['name'] ),
- ),
- )
- );
- }
-
- if ( isset( $_REQUEST['all_posts'] ) && '1' === $_REQUEST['all_posts'] ) {
- echo '';
- } else if ( ! current_user_can( 'view_shop_reports' ) ) {
- $author_id = get_current_user_id();
- echo '';
- }
-}
-add_action( 'restrict_manage_posts', 'edd_add_download_filters', 100 );
-
-/**
- * Remove Download Month Filter
- *
- * Removes the drop down filter for downloads by date.
- *
- * @author Daniel J Griffiths
- * @since 2.1
- * @param array $dates The preset array of dates
- * @global $typenow The post type we are viewing
- * @return array Empty array disables the dropdown
- */
-function edd_remove_month_filter( $dates ) {
- global $typenow;
-
- if ( 'download' === $typenow ) {
- $dates = array();
- }
-
- return $dates;
-}
-add_filter( 'months_dropdown_results', 'edd_remove_month_filter', 99 );
-
-/**
- * Adds price field to Quick Edit options
- *
- * @since 1.1.3.4
- * @param string $column_name Name of the column
- * @param string $post_type Current Post Type (i.e. download)
- * @return void
- */
-function edd_price_field_quick_edit( $column_name, $post_type ) {
-
- // Bail if not price or download
- if ( $column_name !== 'price' || $post_type !== 'download' ) {
- return;
- } ?>
-
-
-
- post_type ) && 'revision' == $post->post_type ) {
- return;
- }
-
- if ( ! current_user_can( 'edit_product', $post_id ) ) {
- return;
- }
-
- edd_download_meta_box_fields_save( $post_id, $post );
-}
-
-add_action( 'save_post', 'edd_download_meta_box_save', 10, 2 );
-
-
-/**
- * Save post meta when the save_post action is called
- *
- * @since 3.2
- * @param int $post_id Download (Post) ID.
- * @global array $post All the data of the the current post.
- * @return void
- */
-function edd_download_meta_box_fields_save( $post_id, $post ) {
- if ( ! current_user_can( 'edit_product', $post_id ) ) {
- return;
- }
-
- // The default fields that get saved
- $fields = edd_download_metabox_fields();
- foreach ( $fields as $field ) {
- if ( '_edd_default_price_id' == $field && edd_has_variable_prices( $post_id ) ) {
-
- if ( isset( $_POST[ $field ] ) ) {
- $new_default_price_id = ( ! empty( $_POST[ $field ] ) && is_numeric( $_POST[ $field ] ) ) || ( 0 === (int) $_POST[ $field ] ) ? (int) $_POST[ $field ] : 1;
- } else {
- $new_default_price_id = 1;
- }
-
- update_post_meta( $post_id, $field, $new_default_price_id );
- } elseif ( '_edd_product_type' === $field && '0' === $_POST[ $field ] ) {
- // No value stored when product type is "default" ("0") for backwards compatibility.
- delete_post_meta( $post_id, '_edd_product_type' );
- } else {
-
- $new = false;
- if ( ! empty( $_POST[ $field ] ) ) {
- $new = apply_filters( 'edd_metabox_save_' . $field, $_POST[ $field ] );
- }
- if ( ! empty( $new ) ) {
- update_post_meta( $post_id, $field, $new );
- } else {
- delete_post_meta( $post_id, $field );
- }
- }
- }
-
- if ( edd_has_variable_prices( $post_id ) ) {
- $lowest = edd_get_lowest_price_option( $post_id );
- update_post_meta( $post_id, 'edd_price', $lowest );
- }
-
- do_action( 'edd_save_download', $post_id, $post );
-}
-
-
-/**
- * Sanitize bundled products on save
- *
- * Ensures a user doesn't try and include a product's ID in the products bundled with that product
- *
- * @since 1.6
- *
- * @param array $products
- * @return array
- */
-function edd_sanitize_bundled_products_save( $products = array() ) {
-
- $products = array_map( function( $value ) {
- return preg_replace( '/[^0-9_]/', '', $value );
- }, (array) $products );
-
- foreach ( $products as $key => $value ) {
- $underscore_pos = strpos( $value, '_' );
- if ( is_numeric( $underscore_pos ) ) {
- $product_id = substr( $value, 0, $underscore_pos );
- } else {
- $product_id = $value;
- }
-
- if ( in_array( $product_id, array( 0, get_the_ID() ) ) ) {
- unset( $products[ $key ] );
- }
- }
-
- $products = array_unique( $products );
-
- return ! empty( $products ) ? array_combine(
- range( 1, count( $products ) ),
- array_values( $products )
- ) : false;
-}
-add_filter( 'edd_metabox_save__edd_bundled_products', 'edd_sanitize_bundled_products_save' );
-
-/**
- * Sanitize bundled products conditions on save
- *
- * @since 3.1
- *
- * @param array $bundled_products_conditions
- * @return array
- */
-function edd_sanitize_bundled_products_conditions_save( $bundled_products_conditions = array() ) {
- return ! empty( $bundled_products_conditions ) ? array_combine(
- range( 1, count( $bundled_products_conditions ) ),
- array_values( $bundled_products_conditions )
- ) : false;
-}
-add_filter( 'edd_metabox_save__edd_bundled_products_conditions', 'edd_sanitize_bundled_products_conditions_save' );
-
-/**
- * Don't save blank rows.
- *
- * When saving, check the price and file table for blank rows.
- * If the name of the price or file is empty, that row should not
- * be saved.
- *
- * @since 1.2.2
- * @param array $new Array of all the meta values
- * @return array $new New meta value with empty keys removed
- */
-function edd_metabox_save_check_blank_rows( $new ) {
- foreach ( $new as $key => $value ) {
- if ( empty( $value['name'] ) && empty( $value['amount'] ) && empty( $value['file'] ) )
- unset( $new[ $key ] );
- }
-
- return $new;
-}
-
-/** Download Configuration ****************************************************/
-
-/**
- * Download Metabox
- *
- * Extensions (as well as the core plugin) can add items to the main download
- * configuration metabox via the `edd_meta_box_fields` action.
- *
- * @since 1.0
- * @return void
- */
-function edd_render_download_meta_box() {
- $post_id = get_the_ID();
-
- /*
- * Output the price fields
- * @since 1.9
- */
- do_action( 'edd_meta_box_price_fields', $post_id );
-
- /*
- * Output the price fields
- *
- * Left for backwards compatibility
- *
- */
- do_action( 'edd_meta_box_fields', $post_id );
-
- wp_nonce_field( basename( __FILE__ ), 'edd_download_meta_box_nonce' );
-}
-
-/**
- * Download Files Metabox
- *
- * @since 1.9
- * @return void
- */
-function edd_render_files_meta_box() {
- /*
- * Output the files fields
- * @since 1.9
- */
- do_action( 'edd_meta_box_files_fields', get_the_ID() );
-}
-
-/**
- * Download Settings Metabox
- *
- * @since 1.9
- * @return void
- */
-function edd_render_settings_meta_box() {
- /*
- * Output the files fields
- * @since 1.9
- */
- do_action( 'edd_meta_box_settings_fields', get_the_ID() );
-}
-
-/**
- * Price Section
- *
- * If variable pricing is not enabled, simply output a single input box.
- *
- * If variable pricing is enabled, outputs a table of all current prices.
- * Extensions can add column heads to the table via the `edd_download_file_table_head`
- * hook, and actual columns via `edd_download_file_table_row`
- *
- * @since 1.0
- *
- * @see edd_render_price_row()
- *
- * @param $post_id
- */
-function edd_render_price_field( $post_id ) {
- $price = edd_get_download_price( $post_id );
- $variable_pricing = edd_has_variable_prices( $post_id );
- $prices = edd_get_variable_prices( $post_id );
- $single_option_mode = edd_single_price_option_mode( $post_id );
-
- $price_display = $variable_pricing ? ' style="display:none;"' : '';
- $variable_display = $variable_pricing ? '' : ' style="display:none;"';
- $currency_position = edd_get_option( 'currency_position', 'before' );
- ?>
-
-Purchase button behavior: Add to Cart buttons follow a traditional eCommerce flow. A Buy Now button bypasses most of the process, taking the customer directly from button click to payment, greatly speeding up the process of buying the product.', 'easy-digital-downloads' );
- $no_buy_now_support_tooltip = __( 'Purchase button behavior: Add to Cart buttons follow a traditional eCommerce flow. Buy Now buttons are only available for stores that have a single supported gateway active and that do not use taxes.', 'easy-digital-downloads' );
- ?>
-
-
' . __( 'This screen provides access to all of the orders and refunds in your store.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Orders can be searched by email address, user name, or filtered by status, mode, date range, gateway, and more!', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'To maintain accurate reporting and accounting, we strongly advise against deleting any completed order data.', 'easy-digital-downloads' ) . '
' . __( 'Orders are placed by customers when they buy things from your store.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Every order contains a snapshot of your store at the time the order was placed, and is made up of many different pieces of information.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Things like products, discounts, taxes, fees, and customer email address, are all examples of information that is saved with each order.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Both full and partial refunds are supported.', 'easy-digital-downloads' ) . '
' . __( 'Refunds are created when a customer would like money back from a completed order.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Every refund refers back to the original order, and only contains the items and adjustments that were refunded.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Refunds could be entire orders, or single products.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Once an item is refunded, it cannot be undone; it can only be repurchased.', 'easy-digital-downloads' ) . '
' . __( 'Each order can be further inspected by clicking the corresponding View Order Details link. This will provide more information including:', 'easy-digital-downloads' ) . '
' .
-
- '
-
Purchased File - ' . __( 'The file associated with the purchase.', 'easy-digital-downloads' ) . '
-
Purchase Date - ' . __( 'The exact date and time the order was completed.', 'easy-digital-downloads' ) . '
-
Discount Used - ' . __( 'If a coupon or discount was used during the checkout process.', 'easy-digital-downloads' ) . '
-
Name - ' . __( "The buyer's name.", 'easy-digital-downloads' ) . '
-
-type ) {
- $refund_link = edd_get_admin_url(
- array(
- 'page' => 'edd-payment-history',
- 'view' => 'view-refund-details',
- 'id' => urlencode( $order->id ),
- )
- );
- wp_die( sprintf( __( 'The specified ID is for a refund, not an order. Please access the refund directly.', 'easy-digital-downloads' ), esc_url( $refund_link ) ), __( 'Error', 'easy-digital-downloads' ) );
-}
-
-wp_enqueue_script( 'edd-admin-orders' );
-// Enqueued for backwards compatibility. Empty file.
-wp_enqueue_script( 'edd-admin-payments' );
-?>
-
-
-
-
-
-
-
-
diff --git a/wp-content/plugins/easy-digital-downloads/includes/admin/payments/view-refund.php b/wp-content/plugins/easy-digital-downloads/includes/admin/payments/view-refund.php
deleted file mode 100644
index b3220e25..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/admin/payments/view-refund.php
+++ /dev/null
@@ -1,128 +0,0 @@
-type ) {
- wp_die( __( 'The specified ID does not belong to an refund. Please try again.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ) );
- }
-
- wp_enqueue_script( 'edd-admin-orders' );
- // Enqueued for backwards compatibility. Empty file.
- wp_enqueue_script( 'edd-admin-payments' );
-?>
-
-
-
-
-
-
order_number ); ?>
-
- id );
- ?>
-
-
-
-
-
-
-
- id );
-
- // Refund Items.
- edd_refund_details_items( $refund );
-
- // Notes.
- edd_refund_details_notes( $refund );
-
- /**
- * Allows further output after the Refund details.
- *
- * @since 3.0
- *
- * @param int $refund_id ID of the current Refund.
- */
- do_action( 'edd_view_refund_details_main_after', $refund->id );
- ?>
-
-
-
-
-
- id );
-
- // Attributes.
- edd_refund_details_attributes( $refund );
-
- // Related Refunds.
- edd_refund_details_related_refunds( $refund );
-
- /**
- * Allows further output after Refund sidebar content.
- *
- * @since 3.0
- *
- * @param int $refund_id ID of the current Refund.
- */
- do_action( 'edd_view_refund_details_sidebar_after', $refund->id );
- ?>
-
-
-
-
-
-
-
-
-
- 'all-plugins',
- 'utm_content' => 'upgrade-to-pro',
- )
- );
-
- $edd_links['edd-pro-upgrade'] = sprintf( '' . __( 'Upgrade to Pro', 'easy-digital-downloads' ) . '', $url );
- }
-
- $settings_url = edd_get_admin_url(
- array(
- 'page' => 'edd-settings',
- )
- );
-
- $edd_links['settings'] = '' . esc_html__( 'Settings', 'easy-digital-downloads' ) . '';
-
- // Return array of links.
- return array_merge( $edd_links, $links );
-}
-add_filter( 'plugin_action_links_easy-digital-downloads/easy-digital-downloads.php', 'edd_plugin_action_links', 10, 2 );
-
-/**
- * Load any CSS we need for the plugins list table.
- */
-function edd_plugin_list_styles() {
- echo '';
-}
-add_action( 'admin_print_styles-plugins.php', 'edd_plugin_list_styles' );
diff --git a/wp-content/plugins/easy-digital-downloads/includes/admin/promos/email-summary/blurbs.json b/wp-content/plugins/easy-digital-downloads/includes/admin/promos/email-summary/blurbs.json
deleted file mode 100644
index 19c5204d..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/admin/promos/email-summary/blurbs.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- "blurbs":[
- {
- "headline":"Are new features and products getting ignored?",
- "content":"Smart marketers know that emails with high click-through rates that promote new products and features will lead to more sales. Connect your Easy Digital Downloads powered store to your favorite email marketing service to boost revenue.",
- "button_text":"Read More",
- "button_link":"https://easydigitaldownloads.com/downloads/category/extensions/email/?utm_source=plugin&utm_medium=email&utm_campaign=summaries",
- "conditions":{
- "current_pass":"free"
- }
- },
- {
- "headline":"Are you missing out on future revenue?",
- "content":"On average, up to 60% of customers do not manually renew their license keys. That's lost revenue for your business. Enable subscriptions on your licensed products and keep the revenue flowing!",
- "button_text":"Read More",
- "button_link":"https://easydigitaldownloads.com/downloads/recurring-payments/?utm_source=plugin&utm_medium=email&utm_campaign=summaries",
- "conditions":{
- "active_plugins":[
- "EDD-Software-Licensing/edd-software-licenses.php"
- ],
- "inactive_plugins":[
- "edd-recurring/edd-recurring.php"
- ],
- "current_pass":"pass-any"
- }
- },
- {
- "headline":"Are you giving things away for free?",
- "content":"Lead magnets are the easiest way to capture potential customers. Use our Free Downloads add-on, and start capturing those leads today.",
- "button_text":"Read More",
- "button_link":"https://easydigitaldownloads.com/blog/how-to-add-lead-magnets-in-wordpress-to-grow-your-email-list/?utm_source=plugin&utm_medium=email&utm_campaign=summaries",
- "conditions":{
- "has_downloads":[
- "free"
- ],
- "inactive_plugins":[
- "edd-free-downloads/edd-free-downloads.php"
- ]
- }
- },
- {
- "headline":"Who are your biggest fans?",
- "content":"Did you know that 72% of customers say that a product review is the key to making their purchasing decision? Learn how to add reviews to your store, and let your happy customers be your brand ambassadors!",
- "button_text":"Read More",
- "button_link":"https://easydigitaldownloads.com/blog/how-to-add-product-reviews-to-your-website/?utm_source=plugin&utm_medium=email&utm_campaign=summaries",
- "conditions":{
- "inactive_plugins":[
- "edd-reviews/edd-reviews.php"
- ],
- "current_pass":"pass-any"
- }
- }
- ]
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/admin/promos/notices/class-five-star-review-dashboard.php b/wp-content/plugins/easy-digital-downloads/includes/admin/promos/notices/class-five-star-review-dashboard.php
deleted file mode 100644
index 9a5c33c2..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/admin/promos/notices/class-five-star-review-dashboard.php
+++ /dev/null
@@ -1,191 +0,0 @@
-
-
- _display();
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
President of Easy Digital Downloads', 'easy-digital-downloads' ), array( 'br' => array() ) ); ?>
' . __( 'This screen allows you to export your reports into a CSV format.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Sales and Earnings - This report exports all of the sales and earnings that you have made in the current year. It includes your sales and earnings for each product as well a graphs of sales and earnings so you can compare them for each month.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Payment History - This report exports all of the payments you have received on your EDD store in a CSV format. It includes the contact details of the customer, the products they have purchased as well as any discount codes they have used and the final price they have paid.', 'easy-digital-downloads' ) . '
' .
- '
' . __( "Customers - This report exports all of your customers in a CSV format. It exports the customer's name and email address and the amount of products they have purchased as well as the final price of their total purchases.", 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Download History - This report exports all of the downloads you have received in the current month into a CSV. It exports the date the file was downloaded, the customer it was downloaded by, their IP address, the name of the product and the file they downloaded.', 'easy-digital-downloads' ) . '
' . __( 'This screen provides the most basic settings for configuring your store. You can set the currency, page templates, and general store settings.', 'easy-digital-downloads' ) . '
' . __( 'This screen provides ways to enable Test Mode, toggle payment gateways on or off, manage accounting settings, and configure gateway-specific settings. Any extra payment gateway extensions you have installed will appear on this page, and can be configured to suit your needs.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Test Payment - This included gateway is great for testing your store, as it requires no payment, and leads straight to product downloads. However, please remember to turn it off once your site is live!', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'PayPal - A PayPal payment gateway is included as standard with Easy Digital Downloads. To test the PayPal gateway, you need a Sandbox account for PayPal and the site must be placed in Test Mode from the Payments > Gateways tab. Please remember to enter your PayPal account email address in order for payments to get processed.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Stripe - The Stripe payment gateway is also included with Easy Digital Downloads. To test the Stripe gateway, you must "Connect with Stripe" and the site must be placed in Test Mode from the Payments > Gateways tab.', 'easy-digital-downloads' ) . '
' . __( "This screen allows you to customize how emails act throughout your store. You can choose a premade template, set the sender's name, email address, and subject.", 'easy-digital-downloads' ) . '
' .
- '
' . __( 'A set of email tag markers has also been provided to allow the creation of personalized emails. A tag consists of a keyword surrounded by curly braces: {tag}.', 'easy-digital-downloads' ) . '
' . __( "This screen allows customization of your store's styles. For complete control, you can completely disable all styles generated by the plugin.", 'easy-digital-downloads' ) . '
' . __( 'This screen allows you to configure the tax rules for your store.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'If you do not wish to charge any tax on purchase, simply leave the Enable Taxes option unchecked.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Default Tax Rate: The default tax rate is the tax rate charged to customers located in your base country / state or province.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Base Country: This determines the country that is loaded by default on the checkout screen for customers that do not have an address stored in their account.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Base State / Province: This determines the region that is loaded by default on the checkout screen for customers that do not have an address stored in their account.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Prices Entered with Tax: if enabled, this means that the price entered on the product edit screens is the total amount the customer will pay after taxes. For example, if enabled and the price of a product is $20, the customer will pay 20$ at checkout. The exact amount charged in tax will be calculated automatically.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Display Tax Rate on Prices: when enabled, the amount the customer is expected to pay in tax will be displayed below purchase buttons.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Display During Checkout: This determines whether prices are shown with taxes or without taxes on checkout. If set to Including Tax, a $10 product with a 10% tax will be shown as $11.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Calculate Tax After Discounts: If enabled, this option will make it so that tax is calculated on the after-discount amount. If a purchase of $20 is made and a 20% discount is applied, tax will be calculated off of $16 instead of $20.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'Additional Tax Rates: This section lets you add tax rates for specific countries and/or states/provinces in those countries.', 'easy-digital-downloads' ) . '
' . __( 'This screen provides access to customer privacy policies, terms & agreements, and how to display them on the front of your site.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'You may also override what happens to order records when a customer exercises their right to be forgotten from your site.', 'easy-digital-downloads' ) . '
' . __( 'This screen provides other miscellaneous options such as configuring your store buttons, file download functionality, and terms of service.', 'easy-digital-downloads' ) . '
- db_version();
-
- // The database version is the problem.
- if ( version_compare( $database_version, '5.6', '<' ) ) {
- $message .= ' ' . sprintf(
- /* translators: 1. opening anchor tag, do not translate; 2. closing anchor tag, do not translate; 3. MySQL database version, do not translate */
- __( 'Please contact your host and ask them to upgrade your environment to meet our %1$sminimum technical requirements%2$s. Your MySQL version is %3$s and needs to be updated.', 'easy-digital-downloads' ),
- '',
- '',
- $database_version
- );
- } else {
- $message .= ' ' . sprintf(
- /* translators: 1. opening anchor tag, do not translate; 2. closing anchor tag, do not translate */
- __( '%1$sContact our support team%2$s for help with next steps.', 'easy-digital-downloads' ),
- '',
- ''
- );
- }
- ?>
-
-
-
- $status ) {
- if ( edd_has_upgrade_completed( $upgrade_key ) ) {
- $upgrade_statuses[ $upgrade_key ] = true;
- $number_complete++;
-
- continue;
- }
-
- // Let's see if we have a step in progress.
- $current_step = get_option( 'edd_v3_migration_step_' . $upgrade_key );
- if ( ! empty( $current_step ) ) {
- $upgrade_statuses[ $upgrade_key ] = absint( $current_step );
- }
- }
-
- $migration_complete = $number_complete === count( $upgrades );
-
- /*
- * Determine if legacy data can be removed.
- * It can be if all upgrades except legacy data have been completed.
- */
- $can_remove_legacy_data = array_key_exists( 'v30_legacy_data_removed', $upgrade_statuses ) && $upgrade_statuses[ 'v30_legacy_data_removed' ] !== true;
- if ( $can_remove_legacy_data ) {
- foreach( $upgrade_statuses as $upgrade_key => $status ) {
- if ( 'v30_legacy_data_removed' === $upgrade_key ) {
- continue;
- }
-
- // If there's at least one upgrade still unfinished, we can't remove legacy data.
- if ( true !== $status ) {
- $can_remove_legacy_data = false;
- break;
- }
- }
- }
-
- if ( $migration_complete ) {
- ?>
-
-
- Database Upgrade Complete: All database upgrades have been completed.', 'easy-digital-downloads' ), array( 'strong' => array() ) ); ?>
-
-
-
-
-
-
-
-
-
-
-
Important: Do not navigate away from this page until all upgrades have completed.', 'easy-digital-downloads' ), array( 'strong' => array() ) ); ?>
-
-
-
-
-
-
-
-
-
- wp edd v30_migration' );
- ?>
-
-
-
-
-
-
>
-
- $upgrade_details ) :
- // We skip the one to remove legacy data. We'll handle that separately later.
- if ( 'v30_legacy_data_removed' === $upgrade_key ) {
- continue;
- }
- ?>
-
- Important: This removes all legacy data from where it was previously stored in custom post types and post meta. This is an optional step that is not reversible. Please back up your database and ensure your store is operational before completing this step.', 'easy-digital-downloads' ), array( 'strong' => array() ) ); ?>
-
- ' . esc_html( __( 'To view a sample confirmation screen, you need to have at least one order in your store.', 'easy-digital-downloads' ) ) . '';
- }
-
- return '
' . esc_html( __( 'Your purchase session could not be retrieved.', 'easy-digital-downloads' ) ) . '
- %s',
- esc_html__( 'Sorry, you do not have permission to view this receipt.', 'easy-digital-downloads' )
- );
- return;
- }
-
- // User is not logged in and can view a guest order.
- if ( empty( $order->user_id ) ) {
- printf(
- '
%s
',
- esc_html__( 'Please confirm your email address to access your downloads.', 'easy-digital-downloads' )
- );
- include EDD_BLOCKS_DIR . 'views/orders/guest.php';
-
- return;
- }
-
- // Otherwise, the order was made by a customer with a user account.
- printf(
- '
%s
',
- esc_html__( 'Please log in to view your order.', 'easy-digital-downloads' )
- );
- echo \EDD\Blocks\Forms\login( array( 'redirect' => edd_get_receipt_page_uri( $order->id ) ) );
-}
-
-/**
- * Shows the full receipt details if criteria are met; otherwise show a verification or login form.
- *
- * @since 2.0
- * @param EDD\Orders\Order $order
- * @return void
- */
-function maybe_show_receipt( $order ) {
- $session = edd_get_purchase_session();
- if ( is_user_logged_in() || ( ! empty( $session['purchase_key'] ) && $session['purchase_key'] === $order->payment_key ) ) {
- global $edd_receipt_args;
- include EDD_BLOCKS_DIR . 'views/orders/receipt-items.php';
-
- /**
- * Fires after the order receipt table.
- *
- * @since 3.0
- * @param \EDD\Orders\Order $order Current order.
- * @param array $edd_receipt_args [edd_receipt] shortcode arguments.
- */
- do_action( 'edd_order_receipt_after_table', $order, $edd_receipt_args );
- return;
- }
-
- // The order belongs to a registered WordPress user.
- ?>
-
- product_id The product ID.
- * @param array $bundle_item The array of information about the bundled item.
- * @param int $order->id The order ID.
- */
- do_action( 'edd_order_receipt_bundle_files', $filekey, $file, $item->product_id, $bundle_item, $order->id );
- endforeach;
- else :
- echo '
' . esc_html__( 'No downloadable files found for this bundled item.', 'easy-digital-downloads' ) . '
';
-}
-add_action( 'edd_payment_mode_top', 'edd_show_payment_icons' );
-add_action( 'edd_checkout_form_top', 'edd_show_payment_icons' );
-
-/**
- * Renders the Discount Code field which allows users to enter a discount code.
- * This field is only displayed if there are any active discounts on the site else
- * it's not displayed.
- *
- * @since 1.2.2
- * @return void
-*/
-function edd_discount_field() {
- if ( isset( $_GET['payment-mode'] ) && edd_is_ajax_disabled() ) {
- return; // Only show before a payment method has been selected if ajax is disabled
- }
-
- if ( ! edd_is_checkout() ) {
- return;
- }
-
- if ( edd_has_active_discounts() && edd_get_cart_total() ) :
- $color = edd_get_button_color_class();
- $style = edd_get_option( 'button_style', 'button' ); ?>
-
- database caching to work with Easy Digital Downloads you must add _wp_session_ to the "Ignored query stems" option in W3 Total Cache settings here.', 'easy-digital-downloads' ),
- esc_url( admin_url( 'admin.php?page=w3tc_dbcache' ) )
- );
- ?>
-
-
- api = new EDD_API();
- edd_do_automatic_upgrades();
- }
-
-
- /**
- * Get EDD details
- *
- * ## OPTIONS
- *
- * None. Returns basic info regarding your EDD instance.
- *
- * ## EXAMPLES
- *
- * wp edd details
- *
- * @param array $args
- * @param array $assoc_args
- */
- public function details( $args, $assoc_args ) {
- $symlink_file_downloads = edd_get_option( 'symlink_file_downloads', false );
- $purchase_page = edd_get_option( 'purchase_page', '' );
- $success_page = edd_get_option( 'success_page', '' );
- $failure_page = edd_get_option( 'failure_page', '' );
-
- WP_CLI::line( sprintf( __( 'You are running EDD version: %s', 'easy-digital-downloads' ), EDD_VERSION ) );
- WP_CLI::line( "\n" . sprintf( __( 'Test mode is: %s', 'easy-digital-downloads' ), ( edd_is_test_mode() ? __( 'Enabled', 'easy-digital-downloads' ) : __( 'Disabled', 'easy-digital-downloads' ) ) ) );
- WP_CLI::line( sprintf( __( 'AJAX is: %s', 'easy-digital-downloads' ), ( edd_is_ajax_enabled() ? __( 'Enabled', 'easy-digital-downloads' ) : __( 'Disabled', 'easy-digital-downloads' ) ) ) );
- WP_CLI::line( sprintf( __( 'Guest checkouts are: %s', 'easy-digital-downloads' ), ( edd_no_guest_checkout() ? __( 'Disabled', 'easy-digital-downloads' ) : __( 'Enabled', 'easy-digital-downloads' ) ) ) );
- WP_CLI::line( sprintf( __( 'Symlinks are: %s', 'easy-digital-downloads' ), ( apply_filters( 'edd_symlink_file_downloads', isset( $symlink_file_downloads ) ) && function_exists( 'symlink' ) ? __( 'Enabled', 'easy-digital-downloads' ) : __( 'Disabled', 'easy-digital-downloads' ) ) ) );
- WP_CLI::line( "\n" . sprintf( __( 'Checkout page is: %s', 'easy-digital-downloads' ), ( ! edd_get_option( 'purchase_page', false ) ) ? __( 'Valid', 'easy-digital-downloads' ) : __( 'Invalid', 'easy-digital-downloads' ) ) );
- WP_CLI::line( sprintf( __( 'Checkout URL is: %s', 'easy-digital-downloads' ), ( ! empty( $purchase_page ) ? get_permalink( $purchase_page ) : __( 'Undefined', 'easy-digital-downloads' ) ) ) );
- WP_CLI::line( sprintf( __( 'Success URL is: %s', 'easy-digital-downloads' ), ( ! empty( $success_page ) ? get_permalink( $success_page ) : __( 'Undefined', 'easy-digital-downloads' ) ) ) );
- WP_CLI::line( sprintf( __( 'Failure URL is: %s', 'easy-digital-downloads' ), ( ! empty( $failure_page ) ? get_permalink( $failure_page ) : __( 'Undefined', 'easy-digital-downloads' ) ) ) );
- WP_CLI::line( sprintf( __( 'Downloads slug is: %s', 'easy-digital-downloads' ), ( defined( 'EDD_SLUG' ) ? '/' . EDD_SLUG : '/downloads' ) ) );
- WP_CLI::line( "\n" . sprintf( __( 'Taxes are: %s', 'easy-digital-downloads' ), ( edd_use_taxes() ? __( 'Enabled', 'easy-digital-downloads' ) : __( 'Disabled', 'easy-digital-downloads' ) ) ) );
- WP_CLI::line( sprintf( __( 'Tax rate is: %s', 'easy-digital-downloads' ), edd_get_formatted_tax_rate() ) );
-
- $rates = edd_get_tax_rates();
- if ( ! empty( $rates ) ) {
- foreach ( $rates as $rate ) {
- WP_CLI::line( sprintf( __( 'Country: %s, State: %s, Rate: %s', 'easy-digital-downloads' ), $rate['country'], $rate['state'], $rate['rate'] ) );
- }
- }
- }
-
-
- /**
- * Get stats for your EDD site
- *
- * ## OPTIONS
- *
- * --product=: The ID of a specific product to retrieve stats for, or all
- * --date=[range|this_month|last_month|today|yesterday|this_quarter|last_quarter|this_year|last_year]: A specific
- * date range to retrieve stats for
- * --startdate=: The start date of a date range to retrieve stats for
- * --enddate=: The end date of a date range to retrieve stats for
- *
- * ## EXAMPLES
- *
- * wp edd stats --date=this_month
- * wp edd stats --start-date=01/02/2014 --end-date=02/23/2014
- * wp edd stats --date=last_year
- * wp edd stats --date=last_year --product=15
- */
- public function stats( $args, $assoc_args ) {
-
- $stats = new EDD_Payment_Stats();
- $date = isset( $assoc_args ) && array_key_exists( 'date', $assoc_args ) ? $assoc_args['date'] : false;
- $start_date = isset( $assoc_args ) && array_key_exists( 'startdate', $assoc_args ) ? $assoc_args['startdate'] : false;
- $end_date = isset( $assoc_args ) && array_key_exists( 'enddate', $assoc_args ) ? $assoc_args['enddate'] : false;
- $download = isset( $assoc_args ) && array_key_exists( 'product', $assoc_args ) ? $assoc_args['product'] : 0;
-
- if ( ! empty( $date ) ) {
- $start_date = $date;
- $end_date = false;
- } elseif ( empty( $date ) && empty( $start_date ) ) {
- $start_date = 'this_month';
- $end_date = false;
- }
-
- $earnings = $stats->get_earnings( $download, $start_date, $end_date );
- $sales = $stats->get_sales( $download, $start_date, $end_date );
-
- WP_CLI::line( sprintf( __( 'Earnings: %s', 'easy-digital-downloads' ), $earnings ) );
- WP_CLI::line( sprintf( __( 'Sales: %s', 'easy-digital-downloads' ), $sales ) );
-
- }
-
-
- /**
- * Get the products currently posted on your EDD site
- *
- * ## OPTIONS
- *
- * --id=: A specific product ID to retrieve
- *
- *
- * ## EXAMPLES
- *
- * wp edd products --id=103
- */
- public function products( $args, $assoc_args ) {
- $product_id = isset( $assoc_args ) && array_key_exists( 'id', $assoc_args ) ? absint( $assoc_args['id'] ) : false;
- $products = $this->api->get_products( $product_id );
-
- if ( isset( $products['error'] ) ) {
- WP_CLI::error( $products['error'] );
- }
-
- if ( empty( $products ) ) {
- WP_CLI::error( __( 'No Downloads found', 'easy-digital-downloads' ) );
-
- return;
- }
-
- foreach ( $products['products'] as $product ) {
- $categories = '';
- $tags = '';
- $pricing = array();
-
- if ( is_array( $product['info']['category'] ) ) {
- $categories = array();
- foreach ( $product['info']['category'] as $category ) {
- $categories[] = $category->name;
- }
-
- $categories = implode( ', ', $categories );
- }
-
- if ( is_array( $product['info']['tags'] ) ) {
- $tags = array();
- foreach ( $product['info']['tags'] as $tag ) {
- $tags[] = $tag->name;
- }
-
- $tags = implode( ', ', $tags );
- }
-
- foreach ( $product['pricing'] as $price => $value ) {
- if ( 'amount' !== $price ) {
- $price = $price . ' - ';
- }
-
- $pricing[] = $price . ': ' . edd_format_amount( $value ) . ' ' . edd_get_currency();
- }
-
- $pricing = implode( ', ', $pricing );
-
- WP_CLI::line( WP_CLI::colorize( '%G' . $product['info']['title'] . '%N' ) );
- WP_CLI::line( sprintf( __( 'ID: %d', 'easy-digital-downloads' ), $product['info']['id'] ) );
- WP_CLI::line( sprintf( __( 'Status: %s', 'easy-digital-downloads' ), $product['info']['status'] ) );
- WP_CLI::line( sprintf( __( 'Posted: %s', 'easy-digital-downloads' ), $product['info']['create_date'] ) );
- WP_CLI::line( sprintf( __( 'Categories: %s', 'easy-digital-downloads' ), $categories ) );
- WP_CLI::line( sprintf( __( 'Tags: %s', 'easy-digital-downloads' ), ( is_array( $tags ) ? '' : $tags ) ) );
- WP_CLI::line( sprintf( __( 'Pricing: %s', 'easy-digital-downloads' ), $pricing ) );
- WP_CLI::line( sprintf( __( 'Sales: %s', 'easy-digital-downloads' ), $product['stats']['total']['sales'] ) );
- WP_CLI::line( sprintf( __( 'Earnings: %s', 'easy-digital-downloads' ), edd_format_amount( $product['stats']['total']['earnings'] ) ) ) . ' ' . edd_get_currency();
- WP_CLI::line( '' );
- WP_CLI::line( sprintf( __( 'Slug: %s', 'easy-digital-downloads' ), $product['info']['slug'] ) );
- WP_CLI::line( sprintf( __( 'Permalink: %s', 'easy-digital-downloads' ), $product['info']['link'] ) );
-
- if ( array_key_exists( 'files', $product ) ) {
- WP_CLI::line( '' );
- WP_CLI::line( __( 'Download Files:', 'easy-digital-downloads' ) );
-
- foreach ( $product['files'] as $file ) {
- WP_CLI::line( ' ' . sprintf( __( 'File: %s (%s)', 'easy-digital-downloads' ), $file['name'], $file['file'] ) );
-
- if ( isset( $file['condition'] ) && 'all' !== $file['condition'] ) {
- WP_CLI::line( ' ' . sprintf( __( 'Price Assignment: %s', 'easy-digital-downloads' ), $file['condition'] ) );
- }
- }
- }
-
- WP_CLI::line( '' );
- }
-
- }
-
-
- /**
- * Get the customers currently on your EDD site. Can also be used to create customers records
- *
- * ## OPTIONS
- *
- * --id=: A specific customer ID to retrieve
- * --email=: The email address of the customer to retrieve
- * --create=: The number of arbitrary customers to create. Leave as 1 or blank to create a customer with a
- * speciific email
- *
- * ## EXAMPLES
- *
- * wp edd customers --id=103
- * wp edd customers --email=john@test.com
- * wp edd customers --create=1 --email=john@test.com
- * wp edd customers --create=1 --email=john@test.com --name="John Doe"
- * wp edd customers --create=1 --email=john@test.com --name="John Doe" user_id=1
- * wp edd customers --create=1000
- */
- public function customers( $args, $assoc_args ) {
- $customer_id = isset( $assoc_args ) && array_key_exists( 'id', $assoc_args ) ? absint( $assoc_args['id'] ) : false;
- $email = isset( $assoc_args ) && array_key_exists( 'email', $assoc_args ) ? $assoc_args['email'] : false;
- $name = isset( $assoc_args ) && array_key_exists( 'name', $assoc_args ) ? $assoc_args['name'] : null;
- $user_id = isset( $assoc_args ) && array_key_exists( 'user_id', $assoc_args ) ? $assoc_args['user_id'] : null;
- $create = isset( $assoc_args ) && array_key_exists( 'create', $assoc_args ) ? $assoc_args['create'] : false;
- $start = time();
-
- if ( $create ) {
- $number = 1;
-
- // Create one or more customers
- if ( ! $email ) {
-
- // If no email is specified, look to see if we are generating arbitrary customer accounts
- $number = is_numeric( $create ) ? absint( $create ) : 1;
- }
-
- for ( $i = 0; $i < $number; $i ++ ) {
- if ( ! $email ) {
-
- // Generate fake email
- $email = 'customer-' . uniqid() . '@test.com';
- }
-
- $args = array(
- 'email' => $email,
- 'name' => $name,
- 'user_id' => $user_id,
- );
-
- $customer_id = edd_add_customer( $args );
-
- if ( $customer_id ) {
- WP_CLI::line( sprintf( __( 'Customer %d created successfully', 'easy-digital-downloads' ), $customer_id ) );
- } else {
- WP_CLI::error( __( 'Failed to create customer', 'easy-digital-downloads' ) );
- }
-
- // Reset email to false so it is generated on the next loop (if creating customers)
- $email = false;
-
- }
-
- WP_CLI::line( WP_CLI::colorize( '%G' . sprintf( __( '%d customers created in %d seconds', 'easy-digital-downloads' ), $create, time() - $start ) . '%N' ) );
- } else {
- // Search for customers
- $search = false;
-
- // Checking if search is being done by id, email or user_id fields.
- if ( $customer_id || $email || ( 'null' !== $user_id ) ) {
- $search = array();
- $customer_details = array();
-
- if ( $customer_id ) {
- $customer_details['id'] = $customer_id;
- } elseif ( $email ) {
- $customer_details['email'] = $email;
- } elseif ( null !== $user_id ) {
- $customer_details['user_id'] = $user_id;
- }
-
- $search['customer'] = $customer_details;
- }
-
- $customers = $this->api->get_customers( $search );
-
- if ( isset( $customers['error'] ) ) {
- WP_CLI::error( $customers['error'] );
- }
-
- if ( empty( $customers ) ) {
- WP_CLI::error( __( 'No customers found', 'easy-digital-downloads' ) );
-
- return;
- }
-
- foreach ( $customers['customers'] as $customer ) {
- WP_CLI::line( WP_CLI::colorize( '%G' . $customer['info']['email'] . '%N' ) );
- WP_CLI::line( sprintf( __( 'Customer User ID: %s', 'easy-digital-downloads' ), $customer['info']['id'] ) );
- WP_CLI::line( sprintf( __( 'Username: %s', 'easy-digital-downloads' ), $customer['info']['username'] ) );
- WP_CLI::line( sprintf( __( 'Display Name: %s', 'easy-digital-downloads' ), $customer['info']['display_name'] ) );
-
- if ( array_key_exists( 'first_name', $customer ) ) {
- WP_CLI::line( sprintf( __( 'First Name: %s', 'easy-digital-downloads' ), $customer['info']['first_name'] ) );
- }
-
- if ( array_key_exists( 'last_name', $customer ) ) {
- WP_CLI::line( sprintf( __( 'Last Name: %s', 'easy-digital-downloads' ), $customer['info']['last_name'] ) );
- }
-
- WP_CLI::line( sprintf( __( 'Email: %s', 'easy-digital-downloads' ), $customer['info']['email'] ) );
-
- WP_CLI::line( '' );
- WP_CLI::line( sprintf( __( 'Purchases: %s', 'easy-digital-downloads' ), $customer['stats']['total_purchases'] ) );
- WP_CLI::line( sprintf( __( 'Total Spent: %s', 'easy-digital-downloads' ), edd_format_amount( $customer['stats']['total_spent'] ) . ' ' . edd_get_currency() ) );
- WP_CLI::line( sprintf( __( 'Total Downloads: %s', 'easy-digital-downloads' ), $customer['stats']['total_downloads'] ) );
-
- WP_CLI::line( '' );
- }
-
- }
-
- }
-
-
- /**
- * Get the recent sales for your EDD site
- *
- * ## OPTIONS
- *
- * --email=: The email address of the customer to retrieve
- *
- * ## EXAMPLES
- *
- * wp edd sales
- * wp edd sales --email=john@test.com
- */
- public function sales( $args, $assoc_args ) {
- $email = isset( $assoc_args ) && array_key_exists( 'email', $assoc_args ) ? $assoc_args['email'] : '';
-
- global $wp_query;
-
- $wp_query->query_vars['email'] = $email;
-
- $sales = $this->api->get_recent_sales();
-
- if ( empty( $sales ) ) {
- WP_CLI::error( __( 'No sales found', 'easy-digital-downloads' ) );
-
- return;
- }
-
- foreach ( $sales['sales'] as $sale ) {
- WP_CLI::line( WP_CLI::colorize( '%G' . $sale['ID'] . '%N' ) );
- WP_CLI::line( sprintf( __( 'Purchase Key: %s', 'easy-digital-downloads' ), $sale['key'] ) );
- WP_CLI::line( sprintf( __( 'Email: %s', 'easy-digital-downloads' ), $sale['email'] ) );
- WP_CLI::line( sprintf( __( 'Date: %s', 'easy-digital-downloads' ), $sale['date'] ) );
- WP_CLI::line( sprintf( __( 'Subtotal: %s', 'easy-digital-downloads' ), edd_format_amount( $sale['subtotal'] ) . ' ' . edd_get_currency() ) );
- WP_CLI::line( sprintf( __( 'Tax: %s', 'easy-digital-downloads' ), edd_format_amount( $sale['tax'] ) . ' ' . edd_get_currency() ) );
-
- if ( array_key_exists( 0, $sale['fees'] ) ) {
- WP_CLI::line( __( 'Fees:', 'easy-digital-downloads' ) );
-
- foreach ( $sale['fees'] as $fee ) {
- WP_CLI::line( sprintf( __( ' Fee: %s - %s', 'easy-digital-downloads' ), edd_format_amount( $fee['amount'] ), edd_get_currency() ) );
- }
- }
-
- WP_CLI::line( sprintf( __( 'Total: %s', 'easy-digital-downloads' ), edd_format_amount( $sale['total'] ) . ' ' . edd_get_currency() ) );
- WP_CLI::line( '' );
- WP_CLI::line( sprintf( __( 'Gateway: %s', 'easy-digital-downloads' ), $sale['gateway'] ) );
-
- if ( array_key_exists( 0, $sale['products'] ) ) {
- WP_CLI::line( __( 'Products:', 'easy-digital-downloads' ) );
-
- foreach ( $sale['products'] as $product ) {
- $price_name = ! empty( $product['price_name'] ) ? ' (' . $product['price_name'] . ')' : '';
- WP_CLI::line( sprintf( __( ' Product: %s - %s', 'easy-digital-downloads' ), $product['name'], edd_format_amount( $product['price'] ) . ' ' . edd_get_currency() . $price_name ) );
- }
- }
-
- WP_CLI::line( '' );
- }
- }
-
-
- /**
- * Get discount details for on your EDD site
- *
- * ## OPTIONS
- *
- * --id=: A specific discount ID to retrieve
- *
- * ## EXAMPLES
- *
- * wp edd discounts --id=103
- */
- public function discounts( $args, $assoc_args ) {
-
- $discount_id = isset( $assoc_args ) && array_key_exists( 'id', $assoc_args ) ? absint( $assoc_args['id'] ) : false;
-
- $discounts = $this->api->get_discounts( $discount_id );
-
- if ( isset( $discounts['error'] ) ) {
- WP_CLI::error( $discounts['error'] );
- }
-
- if ( empty( $discounts ) ) {
- WP_CLI::error( __( 'No discounts found', 'easy-digital-downloads' ) );
-
- return;
- }
-
- foreach ( $discounts['discounts'] as $discount ) {
- WP_CLI::line( WP_CLI::colorize( '%G' . $discount['ID'] . '%N' ) );
- WP_CLI::line( sprintf( __( 'Name: %s', 'easy-digital-downloads' ), $discount['name'] ) );
- WP_CLI::line( sprintf( __( 'Code: %s', 'easy-digital-downloads' ), $discount['code'] ) );
-
- if ( $discount['type'] == 'percent' ) {
- $amount = $discount['amount'] . '%';
- } else {
- $amount = edd_format_amount( $discount['amount'] ) . ' ' . edd_get_currency();
- }
-
- WP_CLI::line( sprintf( __( 'Amount: %s', 'easy-digital-downloads' ), $amount ) );
- WP_CLI::line( sprintf( __( 'Uses: %s', 'easy-digital-downloads' ), $discount['uses'] ) );
- WP_CLI::line( sprintf( __( 'Max Uses: %s', 'easy-digital-downloads' ), ( $discount['max_uses'] == '0' ? __( 'Unlimited', 'easy-digital-downloads' ) : $discount['max_uses'] ) ) );
- WP_CLI::line( sprintf( __( 'Start Date: %s', 'easy-digital-downloads' ), ( empty( $discount['start_date'] ) ? __( 'No Start Date', 'easy-digital-downloads' ) : $discount['start_date'] ) ) );
- WP_CLI::line( sprintf( __( 'Expiration Date: %s', 'easy-digital-downloads' ), ( empty( $discount['exp_date'] ) ? __( 'No Expiration', 'easy-digital-downloads' ) : $discount['exp_date'] ) ) );
- WP_CLI::line( sprintf( __( 'Status: %s', 'easy-digital-downloads' ), ucwords( $discount['status'] ) ) );
-
- WP_CLI::line( '' );
-
- if ( array_key_exists( 0, $discount['product_requirements'] ) ) {
- WP_CLI::line( __( 'Product Requirements:', 'easy-digital-downloads' ) );
-
- foreach ( $discount['product_requirements'] as $req => $req_id ) {
- WP_CLI::line( sprintf( __( ' Product: %s', 'easy-digital-downloads' ), $req_id ) );
- }
- }
-
- WP_CLI::line( '' );
-
- WP_CLI::line( sprintf( __( 'Global Discount: %s', 'easy-digital-downloads' ), ( empty( $discount['global_discount'] ) ? 'False' : 'True' ) ) );
- WP_CLI::line( sprintf( __( 'Single Use: %s', 'easy-digital-downloads' ), ( empty( $discount['single_use'] ) ? 'False' : 'True' ) ) );
-
- WP_CLI::line( '' );
- }
- }
-
- /**
- * Create sample purchase data for your EDD site
- *
- * ## OPTIONS
- *
- * --number: The number of purchases to create
- * --status=: The status to create purchases as
- * --id=: A specific product to create purchase data for
- * --price_id=: A price ID of the specified product
- *
- * ## EXAMPLES
- *
- * wp edd payments create --number=10 --status=complete
- * wp edd payments create --number=10 --id=103
- */
- public function payments( $args, $assoc_args ) {
-
- $error = false;
-
- // At some point we'll likely add another action for payments
- if ( ! isset( $args ) || 0 === count( $args ) ) {
- $error = __( 'No action specified, did you mean', 'easy-digital-downloads' );
- } elseif ( isset( $args ) && ! in_array( 'create', $args, true ) ) {
- $error = __( 'Invalid action specified, did you mean', 'easy-digital-downloads' );
- }
-
- if ( $error ) {
- $query = '';
- foreach ( $assoc_args as $key => $value ) {
- $query .= ' --' . $key . '=' . $value;
- }
-
- WP_CLI::error(
- sprintf( $error . ' %s?', 'wp edd payments create' . $query )
- );
-
- return;
- }
-
-
- // Setup some defaults
- $number = 1;
- $status = 'complete';
- $id = false;
- $price_id = null;
- $tax = 0;
- $email = 'guest@edd.local';
- $fname = 'Pippin';
- $lname = 'Williamson';
- $date = false;
- $range = 30;
- $currency = edd_get_currency();
- $gateway = 'manual';
-
- $generate_users = false;
-
- if ( count( $assoc_args ) > 0 ) {
- $number = ( array_key_exists( 'number', $assoc_args ) ) ? absint( $assoc_args['number'] ) : $number;
- $id = ( array_key_exists( 'id', $assoc_args ) ) ? absint( $assoc_args['id'] ) : $id;
- $price_id = ( array_key_exists( 'price_id', $assoc_args ) ) ? absint( $assoc_args['price_id'] ) : $price_id;
- $tax = ( array_key_exists( 'tax', $assoc_args ) ) ? floatval( $assoc_args['tax'] ) : $tax;
- $email = ( array_key_exists( 'email', $assoc_args ) ) ? sanitize_email( $assoc_args['email'] ) : $email;
- $fname = ( array_key_exists( 'fname', $assoc_args ) ) ? sanitize_text_field( $assoc_args['fname'] ) : $fname;
- $lname = ( array_key_exists( 'lname', $assoc_args ) ) ? sanitize_text_field( $assoc_args['lname'] ) : $lname;
- $date = ( array_key_exists( 'date', $assoc_args ) ) ? sanitize_text_field( $assoc_args['date'] ) : $date;
- $range = ( array_key_exists( 'range', $assoc_args ) ) ? absint( $assoc_args['range'] ) : $range;
-
- $generate_users = ( array_key_exists( 'generate_users', $assoc_args ) ) ? (bool) absint( $assoc_args['generate_users'] ) : $generate_users;
-
- // Status requires a bit more validation.
- if ( array_key_exists( 'status', $assoc_args ) ) {
- $statuses = array_keys( edd_get_payment_statuses() );
-
- if ( in_array( $assoc_args['status'], $statuses, true ) ) {
- $status = ( 'publish' === $assoc_args['status'] )
- ? 'complete'
- : $assoc_args['status'];
- } else {
- WP_CLI::warning( sprintf(
- __( "Invalid status '%s', defaulting to 'complete'", 'easy-digital-downloads' ),
- $assoc_args['status']
- ) );
- }
- }
- }
-
- // Build the user info array.
- $user_info = array(
- 'id' => 0,
- 'email' => $email,
- 'first_name' => $fname,
- 'last_name' => $lname,
- 'discount' => 'none',
- );
-
- $progress = \WP_CLI\Utils\make_progress_bar( 'Creating Orders', $number );
-
- for ( $i = 0; $i < $number; $i ++ ) {
- $products = array();
- $total = 0;
-
- // No specified product
- if ( ! $id ) {
- $products = get_posts( array(
- 'post_type' => 'download',
- 'orderby' => 'rand',
- 'order' => 'ASC',
- 'posts_per_page' => rand( 1, 3 ),
- ) );
- } else {
- $product = get_post( $id );
-
- if ( 'download' !== $product->post_type ) {
- WP_CLI::error( __( 'Specified ID is not a product', 'easy-digital-downloads' ) );
-
- return;
- }
-
- $products[] = $product;
- }
-
- $cart_details = array();
-
- // Add each download to the order.
- foreach ( $products as $key => $download ) {
- if ( ! $download instanceof WP_Post ) {
- continue;
- }
-
- $options = array();
- $final_downloads = array();
-
- // Variable price.
- if ( edd_has_variable_prices( $download->ID ) ) {
- $prices = edd_get_variable_prices( $download->ID );
-
- if ( false === $price_id || ! array_key_exists( $price_id, (array) $prices ) ) {
- $item_price_id = array_rand( $prices );
- } else {
- $item_price_id = $price_id;
- }
-
- $item_price = $prices[ $item_price_id ]['amount'];
- $options['price_id'] = $item_price_id;
-
- // Flat price.
- } else {
- $item_price = edd_get_download_price( $download->ID );
- }
-
- $item_number = array(
- 'id' => $download->ID,
- 'quantity' => 1,
- 'options' => $options,
- );
-
- $cart_details[ $key ] = array(
- 'name' => edd_get_download_name( $download->ID, $price_id ),
- 'id' => $download->ID,
- 'item_number' => $item_number,
- 'item_price' => edd_sanitize_amount( $item_price ),
- 'subtotal' => edd_sanitize_amount( $item_price ),
- 'price' => edd_sanitize_amount( $item_price ),
- 'quantity' => 1,
- 'discount' => 0,
- 'tax' => edd_calculate_tax( $item_price ),
- );
-
- $final_downloads[ $key ] = $item_number;
-
- $total += $item_price;
- }
-
- // Generate random date.
- if ( 'random' === $date ) {
- // Randomly grab a date from the current past 30 days
- $oldest_time = strtotime( '-' . $range . ' days', current_time( 'timestamp' ) );
- $newest_time = current_time( 'timestamp' );
-
- $timestamp = rand( $oldest_time, $newest_time );
- $timestring = date( "Y-m-d H:i:s", $timestamp );
- } elseif ( empty( $date ) ) {
- $timestring = false;
- } else {
- if ( is_numeric( $date ) ) {
- $timestring = date( "Y-m-d H:i:s", $date );
- } else {
- $parsed_time = strtotime( $date );
- $timestring = date( "Y-m-d H:i:s", $parsed_time );
- }
- }
-
- // Maybe generate users.
- if ( $generate_users ) {
- $fname = $this->get_fname();
- $lname = $this->get_lname();
- $domain = $this->get_domain();
- $tld = $this->get_tld();
-
- $email = $fname . '.' . $lname . '@' . $domain . '.' . $tld;
-
- $user_info = array(
- 'id' => 0,
- 'email' => $email,
- 'first_name' => $fname,
- 'last_name' => $lname,
- 'discount' => 'none',
- );
- }
-
- // Allow random currencies.
- if ( ! empty( $assoc_args['currency'] ) && 'random' === $assoc_args['currency'] ) {
- $currencies = array( 'USD', 'EUR', 'GBP' );
- $currency = $currencies[ array_rand( $currencies ) ];
- }
-
- // Allow random gateways.
- if ( ! empty( $assoc_args['gateway'] ) && 'random' === $assoc_args['gateway'] ) {
- $gateways = array_keys( edd_get_payment_gateways() );
- $gateway = $gateways[ array_rand( $gateways ) ];
- }
-
- // Build purchase data.
- $purchase_data = array(
- 'price' => edd_sanitize_amount( $total ),
- 'tax' => edd_calculate_tax( $total ),
- 'purchase_key' => strtolower( md5( uniqid() ) ),
- 'user_email' => $email,
- 'user_info' => $user_info,
- 'currency' => $currency,
- 'downloads' => $final_downloads,
- 'cart_details' => $cart_details,
- 'status' => 'pending',
- );
-
- if ( ! empty( $timestring ) ) {
- $purchase_data['date_created'] = $timestring;
- }
-
- $order_id = edd_build_order( $purchase_data );
-
- // Ensure purchase receipts do not get sent.
- remove_action( 'edd_complete_purchase', 'edd_trigger_purchase_receipt', 999 );
-
- // Trigger payment status actions.
- if ( 'pending' !== $status ) {
- edd_update_order_status( $order_id, $status );
- }
-
- if ( ! empty( $timestring ) ) {
- $payment = new EDD_Payment( $order_id );
- $payment->completed_date = $timestring;
- $payment->gateway = $gateway;
- $payment->save();
- }
-
- $progress->tick();
- }
-
- $progress->finish();
-
- WP_CLI::success( sprintf( __( 'Created %s orders', 'easy-digital-downloads' ), $number ) );
-
- return;
- }
-
- /**
- * Create discount codes for your EDD site
- *
- * ## OPTIONS
- *
- * --legacy: Create legacy discount codes using pre-3.0 schema
- * --number: The number of discounts to create
- *
- * ## EXAMPLES
- *
- * wp edd create_discounts --number=100
- * wp edd create_discounts --number=50 --legacy
- */
- public function create_discounts( $args, $assoc_args ) {
- $number = array_key_exists( 'number', $assoc_args ) ? absint( $assoc_args['number'] ) : 1;
- $legacy = array_key_exists( 'legacy', $assoc_args ) ? true : false;
-
- $progress = \WP_CLI\Utils\make_progress_bar( 'Creating Discount Codes', $number );
-
- for ( $i = 0; $i < $number; $i ++ ) {
- if ( $legacy ) {
- $discount_id = wp_insert_post( array(
- 'post_type' => 'edd_discount',
- 'post_title' => 'Auto-Generated Legacy Discount #' . $i,
- 'post_status' => 'active',
- ) );
-
- $download_ids = get_posts( array(
- 'post_type' => 'download',
- 'posts_per_page' => 2,
- 'fields' => 'ids',
- 'orderby' => 'rand',
- ) );
-
- $meta = array(
- 'code' => 'LEGACY' . $i,
- 'status' => 'active',
- 'uses' => 10,
- 'max_uses' => 20,
- 'name' => 'Auto-Generated Legacy Discount #' . $i,
- 'amount' => 20,
- 'start' => '01/01/2000 00:00:00',
- 'expiration' => '12/31/2050 23:59:59',
- 'type' => 'percent',
- 'min_price' => '10.50',
- 'product_reqs' => array( $download_ids[0] ),
- 'product_condition' => 'all',
- 'excluded_products' => array( $download_ids[1] ),
- 'is_not_global' => true,
- 'is_single_use' => true,
- );
-
- remove_action( 'pre_get_posts', '_edd_discount_get_post_doing_it_wrong', 99, 1 );
- remove_filter( 'add_post_metadata', '_edd_discount_update_meta_backcompat', 99 );
-
- foreach ( $meta as $key => $value ) {
- add_post_meta( $discount_id, '_edd_discount_' . $key, $value );
- }
-
- add_filter( 'add_post_metadata', '_edd_discount_update_meta_backcompat', 99, 5 );
- add_action( 'pre_get_posts', '_edd_discount_get_post_doing_it_wrong', 99, 1 );
- } else {
- $type = array( 'flat', 'percent' );
- $status = array( 'active', 'inactive' );
- $product_condition = array( 'any', 'all' );
-
- $type_index = array_rand( $type, 1 );
- $status_index = array_rand( $status, 1 );
- $product_condition_index = array_rand( $product_condition, 1 );
-
- $post = array(
- 'code' => md5( time() ),
- 'uses' => mt_rand( 0, 100 ),
- 'max' => mt_rand( 0, 100 ),
- 'name' => 'Auto-Generated Discount #' . $i,
- 'type' => $type[ $type_index ],
- 'amount' => mt_rand( 10, 95 ),
- 'start' => '12/12/2010 00:00:00',
- 'expiration' => '12/31/2050 23:59:59',
- 'min_price' => mt_rand( 30, 255 ),
- 'status' => $status[ $status_index ],
- 'product_condition' => $product_condition[ $product_condition_index ],
- );
-
- edd_store_discount( $post );
-
- $progress->tick();
- }
- }
-
- $progress->finish();
-
- WP_CLI::success( sprintf( __( 'Created %s discounts', 'easy-digital-downloads' ), $number ) );
-
- return;
- }
-
- /**
- * Run the EDD 3.0 Migration via WP-CLI
- *
- * ## OPTIONS
- *
- * --force=: If the routine should be run even if the upgrade routine has been run already
- *
- * @param $args
- * @param $assoc_args
- */
- public function v30_migration( $args, $assoc_args ) {
-
- // Suspend the cache addition while we're migrating.
- wp_suspend_cache_addition( true );
-
- $this->maybe_install_v3_tables();
- update_option( 'edd_v30_cli_migration_running', true );
- $this->migrate_tax_rates( $args, $assoc_args );
- $this->migrate_discounts( $args, $assoc_args );
- $this->migrate_payments( $args, $assoc_args );
- $this->migrate_customer_data( $args, $assoc_args );
- $this->migrate_logs( $args, $assoc_args );
- $this->migrate_order_notes( $args, $assoc_args );
- $this->migrate_customer_notes( $args, $assoc_args );
- edd_v30_is_migration_complete();
- $this->remove_legacy_data( $args, $assoc_args );
- }
-
- /**
- * Installs any new 3.0 database tables that haven't yet been installed
- *
- * @access private
- * @since 3.0
- */
- private function maybe_install_v3_tables() {
- static $installed = false;
-
- if ( $installed ) {
- return;
- }
-
- foreach ( EDD()->components as $component ) {
- // Install the main component table.
- $table = $component->get_interface( 'table' );
- if ( $table instanceof EDD\Database\Table && ! $table->exists() ) {
- $table->install();
- }
-
- // Install the associated meta table, if there is one.
- $meta = $component->get_interface( 'meta' );
- if ( $meta instanceof EDD\Database\Table && ! $meta->exists() ) {
- $meta->install();
- }
- }
-
- // Only need to do this once.
- $installed = true;
- }
-
- /**
- * Migrate Discounts to the custom tables
- *
- * ## OPTIONS
- *
- * --force=: If the routine should be run even if the upgrade routine has been run already
- *
- * ## EXAMPLES
- *
- * wp edd migrate_discounts
- * wp edd migrate_discounts --force
- */
- public function migrate_discounts( $args, $assoc_args ) {
- global $wpdb;
-
- $this->maybe_install_v3_tables();
-
- require_once EDD_PLUGIN_DIR . 'includes/admin/upgrades/v3/class-data-migrator.php';
-
- $force = isset( $assoc_args['force'] )
- ? true
- : false;
-
- $destroy = (bool) ( $force && isset( $assoc_args['destroy'] ) );
-
- if ( $destroy ) {
- WP_CLI::confirm( __( 'This process will remove and recreate discounts in your database. Please make sure you\'ve backed up your EDD database tables. Are you sure you want to delete discounts that have already been migrated and run the migration again?', 'easy-digital-downloads' ) );
- }
-
- $upgrade_completed = edd_has_upgrade_completed( 'migrate_discounts' );
-
- if ( ! $force && $upgrade_completed ) {
- WP_CLI::error( __( 'The discounts custom database migration has already been run. To do this anyway, use the --force argument.', 'easy-digital-downloads' ) );
- }
-
- $sql = "SELECT * FROM {$wpdb->posts} WHERE post_type = 'edd_discount'";
- $results = $wpdb->get_results( $sql );
- $total = count( $results );
-
- if ( ! empty( $total ) ) {
-
- $progress = new \cli\progress\Bar( 'Migrating Discounts', $total );
-
- foreach ( $results as $result ) {
- if ( $destroy ) {
- edd_delete_discount( $result->ID );
- }
- \EDD\Admin\Upgrades\v3\Data_Migrator::discounts( $result );
-
- $progress->tick();
- }
-
- $progress->finish();
-
- WP_CLI::line( __( 'Migration complete: Discounts', 'easy-digital-downloads' ) );
- $new_count = edd_get_discount_count();
- $old_count = $wpdb->get_col( "SELECT count(ID) FROM $wpdb->posts WHERE post_type ='edd_discount'", 0 );
- WP_CLI::line( __( 'Old Records: ', 'easy-digital-downloads' ) . $old_count[0] );
- WP_CLI::line( __( 'New Records: ', 'easy-digital-downloads' ) . $new_count );
-
- edd_set_upgrade_complete( 'migrate_discounts' );
-
- } else {
-
- WP_CLI::line( __( 'No discount records found.', 'easy-digital-downloads' ) );
- edd_set_upgrade_complete( 'migrate_discounts' );
-
- }
- }
-
- /**
- * Migrate logs to the custom tables.
- *
- * ## OPTIONS
- *
- * --force=: If the routine should be run even if the upgrade routine has been run already
- *
- * ## EXAMPLES
- *
- * wp edd migrate_logs
- * wp edd migrate_logs --force
- */
- public function migrate_logs( $args, $assoc_args ) {
- global $wpdb;
-
- $this->maybe_install_v3_tables();
-
- require_once EDD_PLUGIN_DIR . 'includes/admin/upgrades/v3/class-data-migrator.php';
-
- $force = isset( $assoc_args['force'] )
- ? true
- : false;
-
- $upgrade_completed = edd_has_upgrade_completed( 'migrate_logs' );
-
- if ( ! $force && $upgrade_completed ) {
- WP_CLI::error( __( 'The logs custom table migration has already been run. To do this anyway, use the --force argument.', 'easy-digital-downloads' ) );
- }
-
- WP_CLI::line( __( 'Preparing to migrate logs (this can take several minutes).', 'easy-digital-downloads' ) );
-
- // New Progress indicator.
- $progress = new \cli\notify\Spinner( __( 'Migrating Logs', 'easy-digital-downloads' ) );
- $progress->tick();
-
- // Base SQL to get legacy logs (LIMIT added below)
- $sql_base = "
- SELECT p.*, t.slug
- FROM {$wpdb->posts} AS p
- LEFT JOIN {$wpdb->term_relationships} AS tr ON (p.ID = tr.object_id)
- LEFT JOIN {$wpdb->term_taxonomy} AS tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id)
- LEFT JOIN {$wpdb->terms} AS t ON (tt.term_id = t.term_id)
- WHERE
- p.post_type = 'edd_log'
- AND
- t.slug != 'sale'
- ORDER BY p.ID ASC
- ";
-
- // Query & count.
- $sql = $sql_base . " LIMIT 1";
- $check_result = $wpdb->get_results( $sql );
- $check_total = count( $check_result );
- $has_results = ! empty( $check_total );
-
- // Setup base iteration variables.
- $step = 0;
- $offset = 0;
- $number = isset( $assoc_args['number'] ) && is_numeric( $assoc_args['number'] )
- ? (int) $assoc_args['number']
- : 1000;
-
- // Maximum 10,000 - this ain't no VTEC.
- if ( $number > 10000 ) {
- $number = 10000;
- }
-
- // Starting total.
- $total = 0;
-
- while ( $has_results ) {
- $progress->tick();
-
- // Query & count.
- $sql = $sql_base . " LIMIT {$offset}, {$number}";
- $results = $wpdb->get_results( $sql );
-
- // Not empty, so lets chug through them!
- if ( ! empty( $results ) ) {
- foreach ( $results as $result ) {
- \EDD\Admin\Upgrades\v3\Data_Migrator::logs( $result );
-
- // Tick the spinner...
- $progress->tick();
-
- // Bump the total...
- $total++;
- }
-
- // Increment step for the next offset...
- $step++;
-
- // EG: 1 * 1000 = 1000, 2 * 1000 = 2000.
- $offset = ( $step * $number );
-
- // Done!
- } else {
- $has_results = false;
- }
- }
-
- $progress->finish();
-
- if ( 0 === $step ) {
- WP_CLI::line( __( 'No log records found.', 'easy-digital-downloads' ) );
- } else {
- // This migration is completed on a data set.
- WP_CLI::line( __( 'Migration complete: Logs', 'easy-digital-downloads' ) );
- $new_count = edd_count_logs() + edd_count_file_download_logs() + edd_count_api_request_logs();
- WP_CLI::line( __( 'Old Records: ', 'easy-digital-downloads' ) . $total );
- WP_CLI::line( __( 'New Records: ', 'easy-digital-downloads' ) . $new_count );
- }
-
- edd_set_upgrade_complete( 'migrate_logs' );
-
- }
-
- /**
- * Migrate order notes to the custom tables.
- *
- * ## OPTIONS
- *
- * --force=: If the routine should be run even if the upgrade routine has been run already
- *
- * ## EXAMPLES
- *
- * wp edd migrate_notes
- * wp edd migrate_notes --force
- */
- public function migrate_order_notes( $args, $assoc_args ) {
- global $wpdb;
-
- $this->maybe_install_v3_tables();
-
- require_once EDD_PLUGIN_DIR . 'includes/admin/upgrades/v3/class-data-migrator.php';
-
- $force = isset( $assoc_args['force'] )
- ? true
- : false;
-
- $upgrade_completed = edd_has_upgrade_completed( 'migrate_order_notes' );
-
- if ( ! $force && $upgrade_completed ) {
- WP_CLI::error( __( 'The order notes custom table migration has already been run. To do this anyway, use the --force argument.', 'easy-digital-downloads' ) );
- }
-
- WP_CLI::line( __( 'Preparing to migrate order notes.', 'easy-digital-downloads' ) );
-
- $progress = new \cli\notify\Spinner( __( 'Migrating Order Notes', 'easy-digital-downloads' ) );
- $progress->tick();
-
- $sql_base = "
- SELECT * FROM {$wpdb->comments}
- WHERE comment_type = 'edd_payment_note'
- ORDER BY comment_ID ASC
- ";
-
- // Query & count.
- $sql = $sql_base . " LIMIT 1";
- $check_result = $wpdb->get_results( $sql );
- $check_total = count( $check_result );
- $has_results = ! empty( $check_total );
-
- // Setup base iteration variables.
- $step = 0;
- $offset = 0;
- $number = isset( $assoc_args['number'] ) && is_numeric( $assoc_args['number'] )
- ? (int) $assoc_args['number']
- : 1000;
-
- // Maximum 10,000 - this ain't no VTEC.
- if ( $number > 10000 ) {
- $number = 10000;
- }
-
- $total = 0;
-
- while ( $has_results ) {
- $progress->tick();
-
- // Query & count.
- $sql = $sql_base . " LIMIT {$offset}, {$number}";
- $results = $wpdb->get_results( $sql );
-
- // Not empty, so lets process the order notes.
- if ( ! empty( $results ) ) {
- foreach ( $results as $result ) {
- $result->object_id = $result->comment_post_ID;
- \EDD\Admin\Upgrades\v3\Data_Migrator::order_notes( $result );
-
- // Tick the spinner...
- $progress->tick();
-
- // Bump the total...
- $total++;
- }
-
- // Increment step for the next offset...
- $step++;
-
- // EG: 1 * 1000 = 1000, 2 * 1000 = 2000.
- $offset = ( $step * $number );
-
- // Done!
- } else {
- $has_results = false;
- }
- }
-
- $progress->finish();
-
- if ( 0 === $step ) {
- WP_CLI::line( __( 'No order notes found.', 'easy-digital-downloads' ) );
- } else {
- WP_CLI::line( __( 'Migration complete: Order Notes', 'easy-digital-downloads' ) );
- $new_count = edd_count_notes( array( 'object_type' => 'order' ) );
- WP_CLI::line( __( 'Old order notes: ', 'easy-digital-downloads' ) . $total );
- WP_CLI::line( __( 'New order notes: ', 'easy-digital-downloads' ) . $new_count );
- }
-
- edd_set_upgrade_complete( 'migrate_order_notes' );
- }
-
- /**
- * Migrate customer notes to the custom tables.
- *
- * ## OPTIONS
- *
- * --force=: If the routine should be run even if the upgrade routine has been run already
- *
- * ## EXAMPLES
- *
- * wp edd migrate_notes
- * wp edd migrate_notes --force
- */
- public function migrate_customer_notes( $args, $assoc_args ) {
- global $wpdb;
-
- $this->maybe_install_v3_tables();
-
- require_once EDD_PLUGIN_DIR . 'includes/admin/upgrades/v3/class-data-migrator.php';
-
- $force = isset( $assoc_args['force'] )
- ? true
- : false;
-
- $upgrade_completed = edd_has_upgrade_completed( 'migrate_customer_notes' );
-
- if ( ! $force && $upgrade_completed ) {
- WP_CLI::error( __( 'The customer notes custom table migration has already been run. To do this anyway, use the --force argument.', 'easy-digital-downloads' ) );
- } else {
- WP_CLI::line( __( 'Preparing to migrate customer notes.', 'easy-digital-downloads' ) );
-
- $progress = new \cli\notify\Spinner( __( 'Migrating Customer Notes', 'easy-digital-downloads' ) );
- $progress->tick();
-
- $sql_base = "SELECT * FROM {$wpdb->edd_customers}";
-
- // Query & count.
- $sql = $sql_base . " LIMIT 1";
- $check_result = $wpdb->get_results( $sql );
- $check_total = count( $check_result );
- $has_results = ! empty( $check_total );
-
- // Setup base iteration variables.
- $step = 0;
- $offset = 0;
- $number = isset( $assoc_args['number'] ) && is_numeric( $assoc_args['number'] )
- ? (int) $assoc_args['number']
- : 1000;
-
- // Maximum 10,000 - this ain't no VTEC.
- if ( $number > 10000 ) {
- $number = 10000;
- }
-
- $total = 0;
-
- while ( $has_results ) {
- $progress->tick();
-
- // Query & count.
- $sql = $sql_base . " LIMIT {$offset}, {$number}";
- $results = $wpdb->get_results( $sql );
-
- // Not empty, so lets process the customer notes.
- if ( ! empty( $results ) ) {
- foreach ( $results as $result ) {
- \EDD\Admin\Upgrades\v3\Data_Migrator::customer_notes( $result );
-
-
- // Tick the spinner...
- $progress->tick();
-
- // Bump the total...
- $total++;
- }
-
- // Increment step for the next offset...
- $step++;
-
- // EG: 1 * 1000 = 1000, 2 * 1000 = 2000.
- $offset = ( $step * $number );
-
- // Done!
- } else {
- $has_results = false;
- }
- }
-
- $progress->finish();
-
- if ( 0 === $step ) {
- WP_CLI::line( __( 'No customer notes found.', 'easy-digital-downloads' ) );
- } else {
- WP_CLI::line( __( 'Migration complete: Customer Notes', 'easy-digital-downloads' ) );
- $new_count = edd_count_notes( array( 'object_type' => 'customer' ) );
- WP_CLI::line( __( 'Old customer notes: ', 'easy-digital-downloads' ) . $total );
- WP_CLI::line( __( 'New customer notes: ', 'easy-digital-downloads' ) . $new_count );
- }
-
- edd_set_upgrade_complete( 'migrate_customer_notes' );
- }
- }
-
- /**
- * Migrate customer data to the custom tables.
- *
- * ## OPTIONS
- *
- * --force=: If the routine should be run even if the upgrade routine has been run already
- *
- * ## EXAMPLES
- *
- * wp edd migrate_customer_data
- * wp edd migrate_customer_data --force
- */
- public function migrate_customer_data( $args, $assoc_args ) {
- global $wpdb;
-
- $this->maybe_install_v3_tables();
-
- $customers = new EDD\Database\Tables\Customers();
- $customers->maybe_upgrade();
-
- $meta = new EDD\Database\Tables\Customer_Meta();
- $meta->maybe_upgrade();
-
- require_once EDD_PLUGIN_DIR . 'includes/admin/upgrades/v3/class-data-migrator.php';
-
- $force = isset( $assoc_args['force'] )
- ? true
- : false;
-
- WP_CLI::line( __( 'Preparing to migrate additional customer data.', 'easy-digital-downloads' ) );
-
- // Create the tables if they do not exist.
- $components = array(
- array( 'order', 'table' ),
- array( 'order', 'meta' ),
- array( 'customer', 'table' ),
- array( 'customer', 'meta' ),
- array( 'customer_address', 'table' ),
- array( 'customer_email_address', 'table' ),
- );
-
- foreach ( $components as $component ) {
- /** @var EDD\Database\Tables\Base $table */
- $table = edd_get_component_interface( $component[0], $component[1] );
-
- if ( $table instanceof EDD\Database\Tables\Base && ! $table->exists() ) {
- @$table->create();
- }
- }
-
- // Migrate Customer Addresses.
- $customer_addresses_complete = edd_has_upgrade_completed( 'migrate_customer_addresses' );
-
- if ( ! $force && $customer_addresses_complete ) {
- WP_CLI::warning( __( 'The user addresses custom table migration has already been run. To do this anyway, use the --force argument.', 'easy-digital-downloads' ) );
- } else {
- WP_CLI::line( __( 'Preparing to migrate customer address data.', 'easy-digital-downloads' ) );
- $progress = new \cli\notify\Spinner( __( 'Migrating Customer Addresses', 'easy-digital-downloads' ) );
- $progress->tick();
-
- // Migrate user addresses first.
- $sql_base = "
- SELECT *
- FROM {$wpdb->usermeta}
- WHERE meta_key = '_edd_user_address'
- ";
-
- // Query & count.
- $sql = $sql_base . " LIMIT 1";
- $check_result = $wpdb->get_results( $sql );
- $check_total = count( $check_result );
- $has_results = ! empty( $check_total );
-
- // Setup base iteration variables.
- $step = 0;
- $offset = 0;
- $number = isset( $assoc_args['number'] ) && is_numeric( $assoc_args['number'] )
- ? (int) $assoc_args['number']
- : 1000;
-
- // Maximum 10,000 - this ain't no VTEC.
- if ( $number > 10000 ) {
- $number = 10000;
- }
-
- $total = 0;
-
- while ( $has_results ) {
- $progress->tick();
-
- // Query & count.
- $sql = $sql_base . " LIMIT {$offset}, {$number}";
- $results = $wpdb->get_results( $sql );
-
- // Not empty, so lets process the customer address.
- if ( ! empty( $results ) ) {
- foreach ( $results as $result ) {
- \EDD\Admin\Upgrades\v3\Data_Migrator::customer_addresses( $result, 'billing' );
-
- // Tick the spinner...
- $progress->tick();
-
- // Bump the total...
- $total++;
- }
-
- // Increment step for the next offset...
- $step++;
-
- // EG: 1 * 1000 = 1000, 2 * 1000 = 2000.
- $offset = ( $step * $number );
-
- // Done!
- } else {
- $has_results = false;
- }
- }
-
- $progress->tick();
- $progress->finish();
-
- edd_set_upgrade_complete( 'migrate_customer_addresses' );
- }
-
- // Migrate Customer Email Addresses.
- $customer_email_addresses_complete = edd_has_upgrade_completed( 'migrate_customer_email_addresses' );
-
- if ( ! $force && $customer_email_addresses_complete ) {
- WP_CLI::warning( __( 'The user email addresses custom table migration has already been run. To do this anyway, use the --force argument.', 'easy-digital-downloads' ) );
- } else {
- WP_CLI::line( __( 'Preparing to migrate customer email addresses (this can take several minutes).', 'easy-digital-downloads' ) );
- $progress = new \cli\notify\Spinner( __( 'Migrating Customer Email Addresses', 'easy-digital-downloads' ) );
- $progress->tick();
-
- // Migrate email addresses next.
- $sql = "
- SELECT *
- FROM {$wpdb->edd_customermeta}
- WHERE meta_key = 'additional_email'
- ";
-
- // Query & count.
- $sql = $sql_base . " LIMIT 1";
- $check_result = $wpdb->get_results( $sql );
- $check_total = count( $check_result );
- $has_results = ! empty( $check_total );
-
- // Setup base iteration variables.
- $step = 0;
- $offset = 0;
- $number = isset( $assoc_args['number'] ) && is_numeric( $assoc_args['number'] )
- ? (int) $assoc_args['number']
- : 1000;
-
- // Maximum 10,000 - this ain't no VTEC.
- if ( $number > 10000 ) {
- $number = 10000;
- }
-
- $total = 0;
-
- while ( $has_results ) {
- $progress->tick();
-
- // Query & count.
- $sql = $sql_base . " LIMIT {$offset}, {$number}";
- $results = $wpdb->get_results( $sql );
-
- // Not empty, so lets process the customer email addresses.
- if ( ! empty( $results ) ) {
- foreach ( $results as $result ) {
- \EDD\Admin\Upgrades\v3\Data_Migrator::customer_email_addresses( $result );
-
- // Tick the spinner...
- $progress->tick();
-
- // Bump the total...
- $total++;
- }
-
- // Increment step for the next offset...
- $step++;
-
- // EG: 1 * 1000 = 1000, 2 * 1000 = 2000.
- $offset = ( $step * $number );
-
- // Done!
- } else {
- $has_results = false;
- }
- }
-
- $progress->finish();
- edd_set_upgrade_complete( 'migrate_customer_email_addresses' );
- WP_CLI::line( __( 'Migration complete: Customer Email Addresses', 'easy-digital-downloads' ) );
- }
-
- }
-
- /**
- * Migrate tax rates.
- *
- * ## OPTIONS
- *
- * --force=: If the routine should be run even if the upgrade routine has been run already
- *
- * ## EXAMPLES
- *
- * wp edd migrate_tax_rates
- * wp edd migrate_tax_rates --force
- */
- public function migrate_tax_rates( $args, $assoc_args ) {
- global $wpdb;
-
- $this->maybe_install_v3_tables();
-
- require_once EDD_PLUGIN_DIR . 'includes/admin/upgrades/v3/class-data-migrator.php';
-
- $force = isset( $assoc_args['force'] )
- ? true
- : false;
-
- $upgrade_completed = edd_has_upgrade_completed( 'migrate_tax_rates' );
-
- if ( ! $force && $upgrade_completed ) {
- WP_CLI::error( __( 'The tax rates custom table migration has already been run. To do this anyway, use the --force argument.', 'easy-digital-downloads' ) );
- }
-
- WP_CLI::line( __( 'Checking for default tax rate', 'easy-digital-downloads' ) );
- $default_tax_rate = edd_get_option( 'tax_rate', false );
- if ( ! empty( $default_tax_rate ) ) {
- WP_CLI::line( __( 'Migrating default tax rate', 'easy-digital-downloads' ) );
- edd_add_tax_rate(
- array(
- 'scope' => 'global',
- 'amount' => floatval( $default_tax_rate ),
- )
- );
- }
-
- // Migrate user addresses first.
- $tax_rates = get_option( 'edd_tax_rates', array() );
-
- if ( ! empty( $tax_rates ) ) {
- $progress = new \cli\progress\Bar( 'Migrating Tax Rates', count( $tax_rates ) );
-
- foreach ( $tax_rates as $result ) {
- \EDD\Admin\Upgrades\v3\Data_Migrator::tax_rates( $result );
-
- $progress->tick();
- }
-
- $progress->finish();
- }
-
- WP_CLI::line( __( 'Migration complete: Tax Rates', 'easy-digital-downloads' ) );
- $new_count = edd_count_adjustments( array( 'type' => 'tax_rate' ) );
- WP_CLI::line( __( 'Old Records: ', 'easy-digital-downloads' ) . count( $tax_rates ) );
- WP_CLI::line( __( 'New Records: ', 'easy-digital-downloads' ) . $new_count );
-
- edd_set_upgrade_complete( 'migrate_tax_rates' );
- }
-
- /**
- * Migrate payments to the custom tables.
- *
- * ## OPTIONS
- *
- * --force=: If the routine should be run even if the upgrade routine has been run already
- * --id=: Run the migration for a specific order.
- * --start=: Run the migration beginning with a specific order ID.
- * --end=: Run the migration ending with a specific order ID.
- * --destroy=: Destroy existing orders that have already been migrated.
- *
- * ## EXAMPLES
- *
- * wp edd migrate_payments
- * wp edd migrate_payments --force
- * wp edd migrate_payments --force --id=3 Migrate payment ID 3.
- * wp edd migrate_payments --force --start=3 Migrate payments beginning with and including ID 3.
- * wp edd migrate_payments --force --end=3 Migrate payments up to and including ID 3, but not higher.
- * wp edd migrate_payments --force --destroy Destroy existing orders and migrate them again.
- */
- public function migrate_payments( $args, $assoc_args ) {
- global $wpdb;
-
- $this->maybe_install_v3_tables();
-
- require_once EDD_PLUGIN_DIR . 'includes/admin/upgrades/v3/class-data-migrator.php';
-
- $force = isset( $assoc_args['force'] )
- ? true
- : false;
-
- $destroy = (bool) ( $force && isset( $assoc_args['destroy'] ) );
-
- if ( $destroy ) {
- WP_CLI::confirm( __( 'This process will remove and recreate orders in your database. Please make sure you\'ve backed up your EDD database tables. Are you sure you want to delete orders that have already been migrated and run the migration again?', 'easy-digital-downloads' ) );
- }
-
- $upgrade_completed = edd_has_upgrade_completed( 'migrate_orders' );
-
- if ( ! $force && $upgrade_completed ) {
- WP_CLI::error( __( 'The payments custom table migration has already been run. To do this anyway, use the --force argument.', 'easy-digital-downloads' ) );
- }
-
- WP_CLI::line( __( 'Preparing to migrate payments.', 'easy-digital-downloads' ) );
-
- // New Progress indicator.
- $progress = new \cli\notify\Spinner( __( 'Migrating Payments', 'easy-digital-downloads' ) );
- $progress->tick();
-
- $sql_base = "
- SELECT *
- FROM {$wpdb->posts}
- WHERE post_type = 'edd_payment'
- ";
-
- // Query & count.
- $sql = $sql_base . " LIMIT 1";
- $check_result = $wpdb->get_results( $sql );
- $check_total = count( $check_result );
- $has_results = ! empty( $check_total );
-
- // Setup base iteration variables.
- $step = 0;
- $offset = 0;
- $full_migration = true;
-
- // Migrate one specific order.
- if ( ! empty( $assoc_args['id'] ) ) {
- if ( is_numeric( $assoc_args['id'] ) ) {
- $id = absint( $assoc_args['id'] );
- $sql_base .= " AND ID = {$id}";
- $full_migration = false;
- if ( ! $wpdb->get_results( $sql_base ) ) {
- WP_CLI::error( __( 'An EDD Payment could not be found for that ID.', 'easy-digital-downloads' ) );
- }
- } else {
- WP_CLI::error( __( 'The payment ID must be an integer from the post_id column.', 'easy-digital-downloads' ) );
- }
- } elseif ( ! empty( $assoc_args['start'] ) || ! empty( $assoc_args['end'] ) ) {
-
- // Begin the order migration at a specific payment ID.
- if ( ! empty( $assoc_args['start'] ) ) {
- if ( is_numeric( $assoc_args['start'] ) ) {
- $start = absint( $assoc_args['start'] );
- $sql_base .= " AND ID >= {$start}";
- $full_migration = false;
- } else {
- WP_CLI::error( __( 'The starting ID must be an integer from the post_id column.', 'easy-digital-downloads' ) );
- }
- }
- // Stop the order migration at a specific payment ID.
- if ( ! empty( $assoc_args['end'] ) ) {
- if ( is_numeric( $assoc_args['end'] ) ) {
- $end = absint( $assoc_args['end'] );
- $sql_base .= " AND ID <= {$end}";
- $full_migration = false;
- } else {
- WP_CLI::error( __( 'The ending ID must be an integer from the post_id column.', 'easy-digital-downloads' ) );
- }
- }
- }
-
- // Confirm any partial migrations if the upgrade hasn't been completed.
- if ( ! $full_migration && ! $upgrade_completed ) {
- WP_CLI::confirm( __( 'Are you sure you want to run a partial order migration?', 'easy-digital-downloads' ) );
- }
-
- $sql_base .= ' ORDER BY ID ASC';
-
- $number = isset( $assoc_args['number'] ) && is_numeric( $assoc_args['number'] )
- ? (int) $assoc_args['number']
- : 1000;
-
- // Maximum 10,000 - this ain't no VTEC.
- if ( $number > 10000 ) {
- $number = 10000;
- }
-
- // Starting total.
- $total = 0;
-
- while ( $has_results ) {
- $orders = new \EDD\Database\Queries\Order();
- $progress->tick();
-
- // Query & count.
- $sql = $sql_base . " LIMIT {$offset}, {$number}";
- $results = $wpdb->get_results( $sql );
-
- // Not empty, so lets chug through them!
- if ( ! empty( $results ) ) {
- foreach ( $results as $result ) {
-
- // Check if order has already been migrated.
- $migrated = $orders->get_item( $result->ID );
- $parent_id = false;
-
- // Delete the existing order to re-run the migration fresh.
- if ( $destroy ) {
- $parent_id = 'refund' === $migrated->type && ! empty( $migrated->parent ) ? $migrated->parent : false;
-
- // EDD has detected a collision between a refund ID and a payment ID.
- if ( ! empty( $parent_id ) ) {
- WP_CLI::line(
- sprintf(
- /* translators: 1. the refund order ID; 2. the original payment ID. */
- __( '%1$d is a refund order. EDD will delete the refund and migrate payment %1$d, then re-migrate payment %2$d.', 'easy-digital-downloads' ),
- $result->ID,
- $parent_id
- )
- );
- } elseif ( $result->post_date_gmt !== $migrated->date_created ) {
- // The migrated order does not appear to be the same as the original order, so let's confirm.
- WP_CLI::confirm(
- sprintf(
- /* translators: 1. the order/payment ID. */
- __( 'Order ID %1$d appears to be a different record from Payment ID %1$d. Are you sure you want to destroy this order and overwrite it?', 'easy-digital-downloads' ),
- $result->ID
- )
- );
- }
- edd_destroy_order( $result->ID );
- $migrated = false;
- }
-
- if ( $migrated ) {
- $progress->tick();
- continue;
- }
-
- $success = \EDD\Admin\Upgrades\v3\Data_Migrator::orders( $result );
-
- /**
- * We detected that a refund order ID collided with an edd_payment post ID.
- * We deleted the refund already; now delete the original order and re-migrate it to regenerate the refund.
- */
- if ( $parent_id ) {
- edd_destroy_order( $parent_id );
- $result = $wpdb->get_row(
- $wpdb->prepare(
- "SELECT *
- FROM {$wpdb->posts}
- WHERE post_type = 'edd_payment'
- AND ID = %d",
- $parent_id
- )
- );
- \EDD\Admin\Upgrades\v3\Data_Migrator::orders( $result );
- }
- if ( ! $full_migration && empty( $success ) ) {
- /* translators: payment ID. */
- WP_CLI::line( sprintf( __( 'Migration failed for payment %d.', 'easy-digital-downloads' ), $result->ID ) );
- }
-
- // Tick the spinner...
- $progress->tick();
-
- // Bump the total...
- $total++;
- }
-
- // Increment step for the next offset...
- $step++;
-
- // EG: 1 * 1000 = 1000, 2 * 1000 = 2000.
- $offset = ( $step * $number );
-
- // Done!
- } else {
- $has_results = false;
- }
- }
-
- if ( 0 === $step ) {
- WP_CLI::line( __( 'No payment records found.', 'easy-digital-downloads' ) );
- if ( $full_migration ) {
- edd_set_upgrade_complete( 'migrate_orders' );
- edd_set_upgrade_complete( 'remove_legacy_payments' );
- }
- } else {
- if ( ! $full_migration ) {
- WP_CLI::line( __( 'Partial order migration complete. Orders Processed: ', 'easy-digital-downloads' ) . $total );
- WP_CLI::line( __( 'To recalculate all download sales and earnings, run `wp edd recalculate_download_sales_earnings`.', 'easy-digital-downloads' ) );
- WP_CLI::line( __( 'To recalculate all customer sales and earnings, run `wp edd recalculate_customer_values`.', 'easy-digital-downloads' ) );
- } else {
- WP_CLI::line( __( 'Migration complete: Orders', 'easy-digital-downloads' ) );
- $new_count = edd_count_orders( array( 'type' => 'sale' ) );
- $old_count = $wpdb->get_col( "SELECT count(ID) FROM {$wpdb->posts} WHERE post_type = 'edd_payment'", 0 );
- WP_CLI::line( __( 'Old Records: ', 'easy-digital-downloads' ) . $old_count[0] );
- WP_CLI::line( __( 'New Records: ', 'easy-digital-downloads' ) . $new_count );
-
- $refund_count = edd_count_orders( array( 'type' => 'refund' ) );
- WP_CLI::line( __( 'Refund Records Created: ', 'easy-digital-downloads' ) . $refund_count );
-
- edd_set_upgrade_complete( 'migrate_orders' );
-
- $progress->tick();
- $this->recalculate_download_sales_earnings();
- $this->recalculate_customer_values();
- }
- }
-
- $progress->finish();
- }
-
- /**
- * Display the legacy data for an EDD_Payment.
- *
- * @param array $args
- * @return void
- */
- public function display_legacy_payment_data( $args ) {
- $id = ! empty( $args[0] ) ? (int) $args[0] : false;
- if ( ! $id ) {
- WP_CLI::error( __( 'You must enter a payment ID to display legacy data.', 'easy-digital-downloads' ) );
- }
-
- global $wpdb;
-
- $results = $wpdb->get_results(
- $wpdb->prepare(
- "SELECT *
- FROM {$wpdb->postmeta}
- WHERE post_id = %d",
- $id
- )
- );
-
- if ( empty( $results ) ) {
- WP_CLI::error( __( 'The legacy payment data could not be found.', 'easy-digital-downloads' ) );
- }
-
- foreach ( $results as $result ) {
- $meta_value = maybe_unserialize( $result->meta_value );
- if ( is_array( $meta_value ) ) {
- WP_CLI::line( $result->meta_key . ' =>' );
- foreach ( $meta_value as $key => $value ) {
- WP_CLI::line( $key . ' => ' . print_r( maybe_unserialize( $value ), true ) );
- }
- WP_CLI::line( '/' . $result->meta_key );
- } else {
- WP_CLI::line( $result->meta_key . ' => ' . print_r( $meta_value, true ) );
- }
- }
- }
-
- /**
- * Recalculates the sales and earnings for all downloads.
- *
- * @since 3.0
- * @return void
- *
- * wp edd recalculate_download_sales_earnings
- */
- public function recalculate_download_sales_earnings() {
- global $wpdb;
-
- $downloads = $wpdb->get_results(
- "SELECT ID
- FROM {$wpdb->posts}
- WHERE post_type = 'download'
- ORDER BY ID ASC"
- );
- $total = count( $downloads );
- if ( ! empty( $total ) ) {
- $progress = new \cli\progress\Bar( 'Recalculating Download Sales and Earnings', $total );
- foreach ( $downloads as $download ) {
- edd_recalculate_download_sales_earnings( $download->ID );
- $progress->tick();
- }
- $progress->finish();
- }
- WP_CLI::line( __( 'Sales and Earnings successfully recalculated for all downloads.', 'easy-digital-downloads' ) );
- WP_CLI::line( __( 'Downloads Updated: ', 'easy-digital-downloads' ) . $total );
- }
-
- /**
- * Recalculates all customer values.
- *
- * @since 3.1.2
- * @return void
- */
- public function recalculate_customer_values() {
- $customers = edd_get_customers(
- array(
- 'number' => 9999999,
- )
- );
- $total = count( $customers );
-
- if ( ! empty( $total ) ) {
- $progress = new \cli\progress\Bar( 'Recalculating Customer Values', $total );
- foreach ( $customers as $customer ) {
- $customer->recalculate_stats();
- $progress->tick();
- }
- $progress->finish();
- }
-
- WP_CLI::line( __( 'Sales and Earnings successfully recalculated for all customers.', 'easy-digital-downloads' ) );
- WP_CLI::line( __( 'Customers Updated: ', 'easy-digital-downloads' ) . $total );
- }
-
- /**
- * Removes legacy data from 2.9 and earlier that has been migrated to 3.0.
- *
- * ## OPTIONS
- *
- * --force=: If the routine should be run even if the upgrade routine has been run already
- *
- * ## EXAMPLES
- *
- * wp edd remove_legacy_data
- * wp edd remove_legacy_data --force
- */
- public function remove_legacy_data( $args, $assoc_args ) {
- global $wpdb;
-
- WP_CLI::confirm( __( 'Do you want to remove legacy data? This will permanently remove legacy discounts, logs, and order notes.', 'easy-digital-downloads' ) );
-
- $force = isset( $assoc_args['force'] ) ? true : false;
-
- /**
- * Discounts
- */
- if ( ! $force && edd_has_upgrade_completed( 'remove_legacy_discounts' ) ) {
- WP_CLI::warning( __( 'Legacy discounts have already been removed. To run this anyway, use the --force argument.', 'easy-digital-downloads' ) );
- } else {
- WP_CLI::line( __( 'Removing old discount data.', 'easy-digital-downloads' ) );
-
- $discount_ids = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_type = 'edd_discount'" );
- $discount_ids = wp_list_pluck( $discount_ids, 'ID' );
- $discount_ids = implode( ', ', $discount_ids );
-
- if ( ! empty( $discount_ids ) ) {
- $delete_posts_query = "DELETE FROM $wpdb->posts WHERE ID IN ({$discount_ids})";
- $wpdb->query( $delete_posts_query );
-
- $delete_postmeta_query = "DELETE FROM $wpdb->postmeta WHERE post_id IN ({$discount_ids})";
- $wpdb->query( $delete_postmeta_query );
- }
-
- edd_set_upgrade_complete( 'remove_legacy_discounts' );
- }
-
- /**
- * Logs
- */
- if ( ! $force && edd_has_upgrade_completed( 'remove_legacy_logs' ) ) {
- WP_CLI::warning( __( 'Legacy logs have already been removed. To run this anyway, use the --force argument.', 'easy-digital-downloads' ) );
- } else {
- WP_CLI::line( __( 'Removing old logs.', 'easy-digital-downloads' ) );
-
- $log_ids = $wpdb->get_results( "SELECT ID FROM {$wpdb->posts} WHERE post_type = 'edd_log'" );
- $log_ids = wp_list_pluck( $log_ids, 'ID' );
- $log_ids = implode( ', ', $log_ids );
-
- if ( ! empty( $log_ids ) ) {
- $delete_query = "DELETE FROM {$wpdb->posts} WHERE post_type = 'edd_log'";
- $wpdb->query( $delete_query );
-
- $delete_postmeta_query = "DELETE FROM {$wpdb->posts} WHERE ID IN ({$log_ids})";
- $wpdb->query( $delete_postmeta_query );
- }
-
- edd_set_upgrade_complete( 'remove_legacy_logs' );
- }
-
- /**
- * Order notes
- */
- if ( ! $force && edd_has_upgrade_completed( 'remove_legacy_order_notes' ) ) {
- WP_CLI::warning( __( 'Legacy order notes have already been removed. To run this anyway, use the --force argument.', 'easy-digital-downloads' ) );
- } else {
- WP_CLI::line( __( 'Removing old order notes.', 'easy-digital-downloads' ) );
-
- $note_ids = $wpdb->get_results( "SELECT comment_ID FROM {$wpdb->comments} WHERE comment_type = 'edd_payment_note'" );
- $note_ids = wp_list_pluck( $note_ids, 'comment_ID' );
- $note_ids = implode( ', ', $note_ids );
-
- if ( ! empty( $note_ids ) ) {
- $delete_query = "DELETE FROM {$wpdb->comments} WHERE comment_type = 'edd_payment_note'";
- $wpdb->query( $delete_query );
-
- $delete_postmeta_query = "DELETE FROM {$wpdb->commentmeta} WHERE comment_id IN ({$note_ids})";
- $wpdb->query( $delete_postmeta_query );
- }
-
- edd_set_upgrade_complete( 'remove_legacy_order_notes' );
- }
-
- /**
- * Customers
- *
- * @var \EDD\Database\Tables\Customers|false $customer_table
- */
- $customer_table = edd_get_component_interface( 'customer', 'table' );
- if ( $customer_table instanceof \EDD\Database\Tables\Customers ) {
- WP_CLI::line( __( 'Updating customers database table.', 'easy-digital-downloads' ) );
-
- if ( $customer_table->column_exists( 'payment_ids' ) ) {
- WP_CLI::line( __( 'Removing Payment IDs column.', 'easy-digital-downloads' ) );
-
- $wpdb->query( "ALTER TABLE {$wpdb->edd_customers} DROP `payment_ids`" );
- }
-
- if ( $customer_table->column_exists( 'notes' ) ) {
- WP_CLI::line( __( 'Removing notes column.', 'easy-digital-downloads' ) );
-
- $wpdb->query( "ALTER TABLE {$wpdb->edd_customers} DROP `notes`" );
- }
- }
-
- /**
- * Customer emails
- */
- if ( ! $force && edd_has_upgrade_completed( 'remove_legacy_customer_emails' ) ) {
- WP_CLI::warning( __( 'Legacy customer emails have already been removed. To run this anyway, use the --force argument.', 'easy-digital-downloads' ) );
- } else {
- WP_CLI::line( __( 'Removing old customer emails.', 'easy-digital-downloads' ) );
-
- $wpdb->query( "DELETE FROM {$wpdb->edd_customermeta} WHERE meta_key = 'additional_email'" );
-
- edd_set_upgrade_complete( 'remove_legacy_customer_emails' );
- }
-
- /**
- * Customer addresses
- */
- if ( ! $force && edd_has_upgrade_completed( 'remove_legacy_customer_addresses' ) ) {
- WP_CLI::warning( __( 'Legacy customer addresses have already been removed. To run this anyway, use the --force argument.', 'easy-digital-downloads' ) );
- } else {
- WP_CLI::line( __( 'Removing old customer addresses.', 'easy-digital-downloads' ) );
-
- $wpdb->query( "DELETE FROM {$wpdb->usermeta} WHERE meta_key = '_edd_user_address'" );
-
- edd_set_upgrade_complete( 'remove_legacy_customer_addresses' );
- }
-
- /**
- * Orders
- */
- if ( ! $force && edd_has_upgrade_completed( 'remove_legacy_orders' ) ) {
- WP_CLI::warning( __( 'Legacy orders have already been removed. To run this anyway, use the --force argument.', 'easy-digital-downloads' ) );
- } else {
- WP_CLI::line( __( 'Removing old orders.', 'easy-digital-downloads' ) );
-
- $wpdb->query(
- "DELETE orders, order_meta FROM {$wpdb->posts} orders
- LEFT JOIN {$wpdb->postmeta} order_meta ON( orders.ID = order_meta.post_id )
- WHERE orders.post_type = 'edd_payment'"
- );
-
- edd_set_upgrade_complete( 'remove_legacy_orders' );
- }
- }
-
- /*
- * Create sample file download log data for your EDD site
- *
- * ## OPTIONS
- *
- * --number: The number of download logs to create
- *
- * ## EXAMPLES
- *
- * wp edd download_logs create --number=10
- */
- public function download_logs( $args, $assoc_args ) {
- global $wpdb, $edd_logs;
-
- $error = false;
-
- // At some point we'll likely add another action for payments
- if ( ! isset( $args ) || count( $args ) == 0 ) {
- $error = __( 'No action specified, did you mean', 'easy-digital-downloads' );
- } elseif ( isset( $args ) && ! in_array( 'create', $args ) ) {
- $error = __( 'Invalid action specified, did you mean', 'easy-digital-downloads' );
- }
-
- if ( $error ) {
- $query = '';
- foreach ( $assoc_args as $key => $value ) {
- $query .= ' --' . $key . '=' . $value;
- }
-
- WP_CLI::error(
- sprintf( $error . ' %s?', 'wp edd download_logs create' . $query )
- );
-
- return;
- }
-
- // Setup some defaults
- $number = 1;
-
- if ( count( $assoc_args ) > 0 ) {
- $number = ( array_key_exists( 'number', $assoc_args ) ) ? absint( $assoc_args['number'] ) : $number;
- }
-
-
- // First we need to find all downloads that have files associated.
- $download_ids_with_file_meta = $wpdb->get_results( "SELECT post_id, meta_value FROM {$wpdb->postmeta} WHERE meta_key = 'edd_download_files'" );
- $download_ids_with_files = array();
- foreach ( $download_ids_with_file_meta as $meta_item ) {
- if ( empty( $meta_item->meta_value ) ) {
- continue;
- }
- $files = maybe_unserialize( $meta_item->meta_value );
-
- // We have an empty array;
- if ( empty( $files ) ) {
- continue;
- }
-
- $download_ids_with_files[ $meta_item->post_id ] = array_keys( $files );
- }
-
- global $wpdb;
- $product_ids = implode('","', array_keys( $download_ids_with_files ) );
- $table = $wpdb->prefix . 'edd_order_items';
- $sql = 'SELECT order_id, product_id, price_id, uuid FROM ' . $table . ' WHERE product_id IN ( "' . $product_ids . '")';
- $results = $wpdb->get_results( $sql );
-
- // Now generate some download logs for the files.
- $progress = \WP_CLI\Utils\make_progress_bar( 'Creating File Download Logs', $number );
- $i = 1;
- while ( $i <= $number ) {
- $found_item = array_rand( $results, 1 );
- $item = $results[ $found_item ];
-
- $order_id = (int) $item->order_id;
- $order = edd_get_order( $order_id );
- $product_id = (int) $item->product_id;
-
- if ( edd_has_variable_prices( $product_id ) ) {
- $price_id = (int) $item->price_id;
- } else {
- $price_id = false;
- }
-
- $customer = new EDD_Customer( $order->customer_id );
-
- $user_info = array(
- 'email' => $order->email,
- 'id' => $order->user_id,
- 'name' => $order->name,
- );
-
- if ( empty( $download_ids_with_files[ $product_id ] ) ) {
- continue;
- }
-
- $file_id_key = array_rand( $download_ids_with_files[ $product_id ], 1 );
- $file_key = $download_ids_with_files[ $product_id ][ $file_id_key ];
- edd_record_download_in_log(
- absint( $product_id ),
- absint( $file_key ),
- array(),
- edd_get_ip(),
- absint( $order_id ),
- absint( $price_id ),
- 'EDD; WPCLI; download_logs;'
- );
-
- $progress->tick();
- $i ++;
- }
- $progress->finish();
- }
-
- protected function get_fname() {
- $names = array(
- 'Ilse',
- 'Emelda',
- 'Aurelio',
- 'Chiquita',
- 'Cheryl',
- 'Norbert',
- 'Neville',
- 'Wendie',
- 'Clint',
- 'Synthia',
- 'Tobi',
- 'Nakita',
- 'Marisa',
- 'Maybelle',
- 'Onie',
- 'Donnette',
- 'Henry',
- 'Sheryll',
- 'Leighann',
- 'Wilson',
- );
-
- return $names[ rand( 0, ( count( $names ) - 1 ) ) ];
- }
-
- protected function get_lname() {
- $names = array(
- 'Warner',
- 'Roush',
- 'Lenahan',
- 'Theiss',
- 'Sack',
- 'Troutt',
- 'Vanderburg',
- 'Lisi',
- 'Lemons',
- 'Christon',
- 'Kogut',
- 'Broad',
- 'Wernick',
- 'Horstmann',
- 'Schoenfeld',
- 'Dolloff',
- 'Murph',
- 'Shipp',
- 'Hursey',
- 'Jacobi',
- );
-
- return $names[ rand( 0, ( count( $names ) - 1 ) ) ];
- }
-
- protected function get_domain() {
- $domains = array(
- 'example',
- 'edd',
- 'rcp',
- 'affwp',
- );
-
- return $domains[ rand( 0, ( count( $domains ) - 1 ) ) ];
- }
-
- protected function get_tld() {
- $tlds = array(
- 'local',
- 'test',
- 'example',
- 'localhost',
- 'invalid',
- );
-
- return $tlds[ rand( 0, ( count( $tlds ) - 1 ) ) ];
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/class-edd-cron.php b/wp-content/plugins/easy-digital-downloads/includes/class-edd-cron.php
deleted file mode 100644
index e6957bc0..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/class-edd-cron.php
+++ /dev/null
@@ -1,90 +0,0 @@
- 604800,
- 'display' => __( 'Once Weekly', 'easy-digital-downloads' )
- );
-
- return $schedules;
- }
-
- /**
- * Schedules our events
- *
- * @since 1.6
- * @return void
- */
- public function schedule_events() {
- $this->weekly_events();
- $this->daily_events();
- }
-
- /**
- * Schedule weekly events
- *
- * @access private
- * @since 1.6
- * @return void
- */
- private function weekly_events() {
- if ( ! wp_next_scheduled( 'edd_weekly_scheduled_events' ) ) {
- wp_schedule_event( current_time( 'timestamp', true ), 'weekly', 'edd_weekly_scheduled_events' );
- }
- }
-
- /**
- * Schedule daily events
- *
- * @access private
- * @since 1.6
- * @return void
- */
- private function daily_events() {
- if ( ! wp_next_scheduled( 'edd_daily_scheduled_events' ) ) {
- wp_schedule_event( current_time( 'timestamp', true ), 'daily', 'edd_daily_scheduled_events' );
- }
- }
-
-}
-$edd_cron = new EDD_Cron;
diff --git a/wp-content/plugins/easy-digital-downloads/includes/class-edd-customer-query.php b/wp-content/plugins/easy-digital-downloads/includes/class-edd-customer-query.php
deleted file mode 100644
index f2516d26..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/class-edd-customer-query.php
+++ /dev/null
@@ -1,103 +0,0 @@
-setup_customer( $customer );
- }
-
- /**
- * Given the customer data, let's set the variables
- *
- * @since 2.3
- *
- * @param object $customer Customer object.
- * @return bool True if the object was setup correctly, false otherwise.
- */
- private function setup_customer( $customer ) {
- if ( ! is_object( $customer ) ) {
- return false;
- }
-
- foreach ( $customer as $key => $value ) {
- switch ( $key ) {
- case 'purchase_value':
- $this->$key = floatval( $value );
- break;
- case 'purchase_count':
- $this->$key = absint( $value );
- break;
- default:
- $this->$key = $value;
- break;
- }
- }
-
- // Customer ID and email are the only things that are necessary, make sure they exist
- if ( ! empty( $this->id ) && ! empty( $this->email ) ) {
- return true;
- }
-
- return false;
- }
-
- /**
- * Magic __get method to dispatch a call to retrieve a protected property.
- *
- * @since 3.0
- *
- * @param string $key
- * @return mixed
- */
- public function __get( $key = '' ) {
- switch ( $key ) {
- case 'emails':
- return $this->get_emails();
- case 'payment_ids':
- $payment_ids = $this->get_payment_ids();
- $payment_ids = implode( ',', $payment_ids );
- return $payment_ids;
- default:
- return isset( $this->{$key} )
- ? $this->{$key}
- : edd_get_customer_meta( $this->id, $key );
- }
- }
-
- /**
- * Magic __set method to dispatch a call to update a protected property.
- *
- * @since 3.0
- *
- * @param string $key Property name.
- * @param mixed $value Property value.
- *
- * @return mixed Return value of setter being dispatched to.
- */
- public function __set( $key, $value ) {
- $key = sanitize_key( $key );
-
- // Only real properties can be saved.
- $keys = array_keys( get_class_vars( get_called_class() ) );
-
- if ( ! in_array( $key, $keys, true ) ) {
- return false;
- }
-
- // Dispatch to setter method if value needs to be sanitized.
- if ( method_exists( $this, 'set_' . $key ) ) {
- return call_user_func( array( $this, 'set_' . $key ), $key, $value );
- } else {
- $this->{$key} = $value;
- }
- }
-
- /**
- * Creates a customer based on class vars.
- *
- * @since 2.3
- *
- * @param array $data Array of attributes for a customer
- * @return mixed False if not a valid creation, Customer ID if user is found or valid creation
- */
- public function create( $data = array() ) {
- if ( 0 !== $this->id || empty( $data ) ) {
- return false;
- }
-
- $defaults = array(
- 'payment_ids' => '',
- );
-
- $args = wp_parse_args( $data, $defaults );
- $args = $this->sanitize_columns( $args );
-
- if ( empty( $args['email'] ) || ! is_email( $args['email'] ) ) {
- return false;
- }
-
- /**
- * Fires before a customer is created
- *
- * @param array $args Contains customer information such as payment ID, name, and email.
- */
- do_action( 'edd_customer_pre_create', $args );
-
- $created = false;
-
- // Add the customer
- $customer_id = edd_add_customer( $args );
-
- if ( ! empty( $customer_id ) ) {
-
- // Add the primary email address for this customer
- edd_add_customer_email_address( array(
- 'customer_id' => $customer_id,
- 'email' => $args['email'],
- 'type' => 'primary'
- ) );
-
- // Maybe add payments
- if ( ! empty( $args['payment_ids'] ) && is_array( $args['payment_ids'] ) ) {
- $payment_ids = array_unique( array_values( $args['payment_ids'] ) );
-
- foreach ( $payment_ids as $payment_id ) {
- edd_update_order( $payment_id, array(
- 'customer_id' => $customer_id
- ) );
- }
- }
-
- // We've successfully added/updated the customer, reset the class vars with the new data
- $customer = edd_get_customer( $customer_id );
-
- // Setup the customer data with the values from DB
- $this->setup_customer( $customer );
-
- $created = $this->id;
- }
-
- /**
- * Fires after a customer is created
- *
- * @param int $created If created successfully, the customer ID. Defaults to false.
- * @param array $args Contains customer information such as payment ID, name, and email.
- */
- do_action( 'edd_customer_post_create', $created, $args );
-
- return $created;
- }
-
- /**
- * Update a customer record.
- *
- * @since 2.3
- *
- * @param array $data Array of data attributes for a customer (checked via whitelist)
- * @return bool True if update was successful, false otherwise.
- */
- public function update( $data = array() ) {
- if ( empty( $data ) ) {
- return false;
- }
-
- $data = $this->sanitize_columns( $data );
-
- do_action( 'edd_customer_pre_update', $this->id, $data );
-
- $updated = false;
-
- if ( edd_update_customer( $this->id, $data ) ) {
- $customer = edd_get_customer( $this->id );
- $this->setup_customer( $customer );
-
- $updated = true;
- }
-
- do_action( 'edd_customer_post_update', $updated, $this->id, $data );
-
- return $updated;
- }
-
- /**
- * Attach an email address to the customer.
- *
- * @since 2.6
- * @since 3.0.1 This method will return customer email ID or false, instead of bool
- *
- * @param string $email The email address to remove from the customer.
- * @param bool $primary Allows setting the email added as the primary.
- *
- * @return int|false ID of newly created customer email address, false on error.
- */
- public function add_email( $email = '', $primary = false ) {
- if ( ! is_email( $email ) ) {
- return false;
- }
-
- // Bail if email exists in the universe.
- if ( $this->email_exists( $email ) ) {
- return false;
- }
-
- do_action( 'edd_customer_pre_add_email', $email, $this->id, $this );
-
- // Primary or secondary
- $type = ( true === $primary )
- ? 'primary'
- : 'secondary';
-
- // Update is used to ensure duplicate emails are not added.
- $ret = edd_add_customer_email_address(
- array(
- 'customer_id' => $this->id,
- 'email' => $email,
- 'type' => $type,
- )
- );
-
- do_action( 'edd_customer_post_add_email', $email, $this->id, $this );
-
- if ( $ret && true === $primary ) {
- $this->set_primary_email( $email );
- }
-
- return $ret;
- }
-
- /**
- * Remove an email address from the customer.
- *
- * @since 2.6
- * @since 3.0 Updated to use custom table.
- *
- * @param string $email The email address to remove from the customer.
- * @return bool True if the email was removed successfully, false otherwise.
- */
- public function remove_email( $email = '' ) {
- if ( ! is_email( $email ) ) {
- return false;
- }
-
- do_action( 'edd_customer_pre_remove_email', $email, $this->id, $this );
-
- $email_address = edd_get_customer_email_address_by( 'email', $email );
-
- $ret = $email_address
- ? (bool) edd_delete_customer_email_address( $email_address->id )
- : false;
-
- do_action( 'edd_customer_post_remove_email', $email, $this->id, $this );
-
- return $ret;
- }
-
- /**
- * Check if an email address already exists somewhere in the known universe
- * of WordPress Users, or EDD customer email addresses.
- *
- * We intentionally skip the edd_customers table, to avoid race conditions
- * when adding new customers and their email addresses at the same time.
- *
- * @since 3.0
- *
- * @param string $email Email address to check.
- * @return boolean True if assigned to existing customer, false otherwise.
- */
- public function email_exists( $email = '' ) {
-
- // Bail if not an email address
- if ( ! is_email( $email ) ) {
- return false;
- }
-
- // Return true if found in users table
- if ( email_exists( $email ) ) {
- return true;
- }
-
- // Query email addresses table for this address
- $exists = edd_get_customer_email_address_by( 'email' , $email );
-
- // Return true if found in email addresses table
- if ( ! empty( $exists ) ) {
- return true;
- }
-
- // Not found
- return false;
- }
-
- /**
- * Set an email address as the customer's primary email.
- *
- * This will move the customer's previous primary email to an additional email.
- *
- * @since 2.6
- * @param string $new_primary_email The email address to remove from the customer.
- * @return bool True if the email was set as primary successfully, false otherwise.
- */
- public function set_primary_email( $new_primary_email = '' ) {
-
- // Default return value
- $retval = false;
-
- // Bail if not an email
- if ( ! is_email( $new_primary_email ) ) {
- return $retval;
- }
-
- do_action( 'edd_customer_pre_set_primary_email', $new_primary_email, $this->id, $this );
-
- // Bail if already primary
- if ( $new_primary_email === $this->email ) {
- return true;
- }
-
- // Get customer emails
- $emails = edd_get_customer_email_addresses( array(
- 'customer_id' => $this->id
- ) );
-
- // Pluck addresses, to help with in_array() calls
- $plucked = wp_list_pluck( $emails, 'email' );
-
- // Maybe fix a missing primary email address in the new table
- if ( ! in_array( $this->email, $plucked, true ) ) {
-
- // Attempt to add the current primary if it's missing
- $added = edd_add_customer_email_address( array(
- 'customer_id' => $this->id,
- 'email' => $this->email,
- 'type' => 'primary'
- ) );
-
- // Maybe re-get all customer emails and re-pluck them
- if ( ! empty( $added ) ) {
-
- // Get customer emails
- $emails = edd_get_customer_email_addresses( array(
- 'customer_id' => $this->id
- ) );
-
- // Pluck addresses, and look for the new one
- $plucked = wp_list_pluck( $emails, 'email' );
- }
- }
-
- // Bail if not an address for this customer
- if ( ! in_array( $new_primary_email, $plucked, true ) ) {
- return $retval;
- }
-
- // Loop through addresses and juggle them
- foreach ( $emails as $email ) {
-
- // Make old primary a secondary
- if ( ( 'primary' === $email->type ) && ( $new_primary_email !== $email->email ) ) {
- edd_update_customer_email_address( $email->id, array(
- 'type' => 'secondary'
- ) );
- }
-
- // Make new address primary
- if ( ( 'secondary' === $email->type ) && ( $new_primary_email === $email->email ) ) {
- edd_update_customer_email_address( $email->id, array(
- 'type' => 'primary'
- ) );
- }
- }
-
- // Mismatch, so update the customer column
- if ( $this->email !== $new_primary_email ) {
-
- // Update the email column on the customer row
- $this->update( array( 'email' => $new_primary_email ) );
-
- // Reload the customer emails for this object
- $this->email = $new_primary_email;
- $this->emails = $this->get_emails();
- $retval = true;
- }
-
- do_action( 'edd_customer_post_set_primary_email', $new_primary_email, $this->id, $this );
-
- return (bool) $retval;
- }
-
- /**
- * Before 3.0, when the primary email address was changed, it would cascade
- * through all previous purchases and update the email address associated
- * with it. Since 3.0, that is no longer the case.
- *
- * This method contains code that is no longer used, and is provided here as
- * a convenience function if needed.
- *
- * @since 3.0
- */
- public function update_order_email_addresses( $email = '' ) {
-
- // Get the payments
- $payment_ids = $this->get_payment_ids();
-
- // Bail if no payments
- if ( empty( $payment_ids ) ) {
- return;
- }
-
- // Update payment emails to primary email
- foreach ( $payment_ids as $payment_id ) {
- edd_update_payment_meta( $payment_id, 'email', $email );
- }
- }
-
- /**
- * Get the payment ids of the customer in an array.
- *
- * @since 2.6
- *
- * @return array An array of payment IDs for the customer, or an empty array if none exist.
- */
- public function get_payment_ids() {
-
- // Bail if no customer
- if ( empty( $this->id ) ) {
- return array();
- }
-
- // Get total orders
- $count = edd_count_orders( array(
- 'customer_id' => $this->id
- ) );
-
- // Get order IDs
- $ids = edd_get_orders( array(
- 'customer_id' => $this->id,
- 'number' => $count,
- 'fields' => 'ids',
- 'no_found_rows' => true
- ) );
-
- // Cast IDs to ints
- return array_map( 'absint', $ids );
- }
-
- /**
- * Get an array of EDD_Payment objects from the payment_ids attached to the customer.
- *
- * @since 2.6
- *
- * @param array|string $status A single status as a string or an array of statuses.
- * @return array An array of EDD_Payment objects or an empty array.
- */
- public function get_payments( $status = array() ) {
-
- // Get payment IDs
- $payment_ids = $this->get_payment_ids();
- $payments = array();
-
- // Bail if no IDs
- if ( empty( $payment_ids ) ) {
- return $payments;
- }
-
- // Get payments one at a time (ugh...)
- foreach ( $payment_ids as $payment_id ) {
- $payment = new EDD_Payment( $payment_id );
-
- if ( empty( $status ) || ( is_array( $status ) && in_array( $payment->status, $status, true ) ) || $status === $payment->status ) {
- $payments[] = $payment;
- }
- }
-
- return $payments;
- }
-
- /**
- * Attach payment to the customer then triggers increasing statistics.
- *
- * @since 2.3
- *
- * @param int $order_id The Order ID to attach to the customer.
- * @param bool $update_stats For backwards compatibility, if we should increase the stats or not.
- *
- * @return bool True if the attachment was successfully, false otherwise.
- */
- public function attach_payment( $order_id = 0, $update_stats = true ) {
-
- // Bail if no payment ID.
- if ( empty( $order_id ) ) {
- return false;
- }
-
- // Get order.
- $order = edd_get_order( $order_id );
-
- // Bail if payment does not exist.
- if ( empty( $order ) ) {
- return false;
- }
-
- do_action( 'edd_customer_pre_attach_payment', $order->id, $this->id, $this );
-
- $success = (int) $order->customer_id === (int) $this->id;
-
- // Update the order if it isn't already attached.
- if ( ! $success ) {
- // Update the order.
- $success = (bool) edd_update_order(
- $order_id,
- array(
- 'customer_id' => $this->id,
- 'email' => $this->email,
- )
- );
- }
-
- // Maybe update stats.
- if ( ! empty( $success ) && ! empty( $update_stats ) ) {
- $this->recalculate_stats();
- }
-
- do_action( 'edd_customer_post_attach_payment', $success, $order->id, $this->id, $this );
-
- return $success;
- }
-
- /**
- * Remove a payment from this customer, then triggers reducing stats
- *
- * @since 2.3
- *
- * @param integer $payment_id The Payment ID to remove.
- * @param bool $update_stats For backwards compatibility, if we should increase the stats or not.
- *
- * @return bool $detached True if removed successfully, false otherwise.
- */
- public function remove_payment( $payment_id = 0, $update_stats = true ) {
-
- // Bail if no payment ID
- if ( empty( $payment_id ) ) {
- return false;
- }
-
- // Get payment
- $payment = edd_get_payment( $payment_id );
-
- // Bail if payment does not exist
- if ( empty( $payment ) ) {
- return false;
- }
-
- // Get all previous payment IDs
- $payments = $this->get_payment_ids();
-
- // Bail if already attached
- if ( ! in_array( $payment_id, $payments, true ) ) {
- return true;
- }
-
- // Only update stats when published or revoked
- if ( ! in_array( $payment->status, array( 'complete', 'revoked' ), true ) ) {
- $update_stats = false;
- }
-
- do_action( 'edd_customer_pre_remove_payment', $payment->ID, $this->id, $this );
-
- // Update the order
- $success = (bool) edd_update_order( $payment_id, array(
- 'customer_id' => 0,
- 'email' => ''
- ) );
-
- // Maybe update stats
- if ( ! empty( $success ) && ! empty( $update_stats ) ) {
- $this->recalculate_stats();
- }
-
- do_action( 'edd_customer_post_remove_payment', $success, $payment->ID, $this->id, $this );
-
- return $success;
- }
-
- /**
- * Recalculate stats for this customer.
- *
- * This replaces the older, less accurate increase/decrease methods.
- *
- * @since 3.0
- */
- public function recalculate_stats() {
- $this->purchase_count = edd_count_orders(
- array(
- 'customer_id' => $this->id,
- 'status' => edd_get_net_order_statuses(),
- 'type' => 'sale',
- )
- );
-
- global $wpdb;
- $statuses = edd_get_gross_order_statuses();
- $status_string = implode(', ', array_fill( 0, count( $statuses ), '%s' ) );
-
- $this->purchase_value = (float) $wpdb->get_var( $wpdb->prepare(
- "SELECT SUM(total / rate)
- FROM {$wpdb->edd_orders}
- WHERE customer_id = %d
- AND status IN({$status_string})",
- $this->id,
- ...$statuses
- ) );
-
- // Update the customer purchase count & value
- return $this->update(
- array(
- 'purchase_count' => $this->purchase_count,
- 'purchase_value' => $this->purchase_value,
- )
- );
- }
-
- /** Notes *****************************************************************/
-
- /**
- * Get the parsed notes for a customer as an array.
- *
- * @since 2.3
- * @since 3.0 Use the new Notes component & API.
- *
- * @param integer $length The number of notes to get.
- * @param integer $paged What note to start at.
- *
- * @return array The notes requested.
- */
- public function get_notes( $length = 20, $paged = 1 ) {
-
- // Number
- $length = is_numeric( $length )
- ? absint( $length )
- : 20;
-
- // Offset
- $offset = is_numeric( $paged ) && ( 1 !== $paged )
- ? ( ( absint( $paged ) - 1 ) * $length )
- : 0;
-
- // Return the paginated notes for back-compat
- return edd_get_notes( array(
- 'object_id' => $this->id,
- 'object_type' => 'customer',
- 'number' => $length,
- 'offset' => $offset,
- 'order' => 'desc',
- ) );
- }
-
- /**
- * Get the total number of notes we have after parsing.
- *
- * @since 2.3
- * @since 3.0 Use the new Notes component & API.
- *
- * @return int The number of notes for the customer.
- */
- public function get_notes_count() {
- return edd_count_notes( array(
- 'object_id' => $this->id,
- 'object_type' => 'customer',
- ) );
- }
-
- /**
- * Add a customer note.
- *
- * @since 2.3
- * @since 3.0 Use the new Notes component & API
- *
- * @param string $note The note to add
- * @return string|boolean The new note if added successfully, false otherwise
- */
- public function add_note( $note = '' ) {
-
- // Bail if note content is empty
- $note = trim( $note );
- if ( empty( $note ) ) {
- return false;
- }
-
- /**
- * Filter the note of a customer before it's added
- *
- * @since 2.3
- * @since 3.0 No longer includes the datetime stamp
- *
- * @param string $note The content of the note to add
- * @return string
- */
- $note = apply_filters( 'edd_customer_add_note_string', $note );
-
- /**
- * Allow actions before a note is added
- *
- * @since 2.3
- */
- do_action( 'edd_customer_pre_add_note', $note, $this->id, $this );
-
- // Sanitize note
- $note = trim( wp_kses( stripslashes( $note ), edd_get_allowed_tags() ) );
-
- // Try to add the note
- edd_add_note( array(
- 'user_id' => 0, // Authored by System/Bot
- 'object_id' => $this->id,
- 'object_type' => 'customer',
- 'content' => $note,
- ) );
-
- /**
- * Allow actions after a note is added
- *
- * @since 3.0 Changed to an empty string since notes were moved out
- */
- do_action( 'edd_customer_post_add_note', '', $note, $this->id, $this );
-
- // Return the formatted note, so we can test, as well as update any displays
- return $note;
- }
-
- /** Meta ******************************************************************/
-
- /**
- * Retrieve customer meta field for a customer.
- *
- * @since 2.6
- *
- * @param string $key Optional. The meta key to retrieve. By default, returns data for all keys. Default empty.
- * @param bool $single Optional, default is false. If true, return only the first value of the specified meta_key.
- * This parameter has no effect if meta_key is not specified.
- *
- * @return mixed Will be an array if $single is false. Will be value of meta data field if $single is true.
- */
- public function get_meta( $key = '', $single = true ) {
- return edd_get_customer_meta( $this->id, $key, $single );
- }
-
- /**
- * Add meta data field to a customer.
- *
- * @since 2.6
- *
- * @param string $meta_key Meta data name.
- * @param mixed $meta_value Meta data value. Must be serializable if non-scalar.
- * @param bool $unique Optional. Whether the same key should not be added. Default false.
- *
- * @return int|false Meta ID on success, false on failure.
- */
- public function add_meta( $meta_key = '', $meta_value = '', $unique = false ) {
- return edd_add_customer_meta( $this->id, $meta_key, $meta_value, $unique );
- }
-
- /**
- * Update customer meta field based on customer ID.
- *
- * Use the $prev_value parameter to differentiate between meta fields with the
- * same key and order ID.
- *
- * If the meta field for the order does not exist, it will be added.
- *
- * @since 2.6
- *
- * @param string $meta_key Meta data key.
- * @param mixed $meta_value Meta data value. Must be serializable if non-scalar.
- * @param mixed $prev_value Optional. Previous value to check before removing. Default empty.
- *
- * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure.
- */
- public function update_meta( $meta_key = '', $meta_value = '', $prev_value = '' ) {
- return edd_update_customer_meta( $this->id, $meta_key, $meta_value, $prev_value );
- }
-
- /**
- * Remove meta data matching criteria from a customer.
- *
- * You can match based on the key, or key and value. Removing based on key and value, will keep from removing duplicate
- * meta data with the same key. It also allows removing all meta data matching key, if needed.
- *
- * @since 2.6
- *
- * @param string $meta_key Meta data name.
- * @param mixed $meta_value Optional. Meta data value. Must be serializable if non-scalar. Default empty.
- *
- * @return bool True on success, false on failure.
- */
- public function delete_meta( $meta_key = '', $meta_value = '' ) {
- return edd_delete_customer_meta( $this->id, $meta_key, $meta_value );
- }
-
- /** Private ***************************************************************/
-
- /**
- * Sanitize the data for update/create.
- *
- * @since 2.3
- *
- * @param array $data The data to sanitize.
- * @return array The sanitized data, based off column defaults.
- */
- private function sanitize_columns( $data = array() ) {
- $default_values = array();
-
- foreach ( $data as $key => $type ) {
-
- // Only sanitize data that we were provided
- if ( ! array_key_exists( $key, $data ) ) {
- continue;
- }
-
- switch ( $type ) {
- case '%s':
- if ( 'email' === $key ) {
- $data[ $key ] = sanitize_email( $data[ $key ] );
- } else {
- $data[ $key ] = sanitize_text_field( $data[ $key ] );
- }
- break;
-
- case '%d':
- if ( ! is_numeric( $data[ $key ] ) || absint( $data[ $key ] ) !== (int) $data[ $key ] ) {
- $data[ $key ] = $default_values[ $key ];
- } else {
- $data[ $key ] = absint( $data[ $key ] );
- }
- break;
-
- case '%f':
- // Convert what was given to a float
- $value = floatval( $data[ $key ] );
-
- if ( ! is_float( $value ) ) {
- $data[ $key ] = $default_values[ $key ];
- } else {
- $data[ $key ] = $value;
- }
- break;
-
- default:
- $data[ $key ] = sanitize_text_field( $data[ $key ] );
- break;
- }
- }
-
- return $data;
- }
-
- /** Helpers ***************************************************************/
-
- /**
- * Retrieve all of the IP addresses used by the customer.
- *
- * @since 3.0
- *
- * @return array Array of objects containing IP address.
- */
- public function get_ips() {
- return edd_get_orders( array(
- 'customer_id' => $this->id,
- 'fields' => 'ip',
- 'groupby' => 'ip',
- ) );
- }
-
- /**
- * Retrieve all the email addresses associated with this customer.
- *
- * @since 3.0
- *
- * @return array
- */
- public function get_emails() {
-
- // Add primary email.
- $retval = array( $this->email );
-
- // Fetch email addresses from the database.
- $emails = edd_get_customer_email_addresses( array(
- 'customer_id' => $this->id
- ) );
-
- // Pluck addresses and merg them
- if ( ! empty( $emails ) ) {
-
- // We only want the email addresses
- $emails = wp_list_pluck( $emails, 'email' );
-
- // Merge with primary email
- $retval = array_merge( $retval, $emails );
- }
-
- // Return unique results (to avoid duplicates)
- return array_unique( $retval );
- }
-
- /**
- * Retrieve an address.
- *
- * @since 3.0
- *
- * @param boolean $is_primary Whether the address is the primary address. Default true.
- *
- * @return array|\EDD\Customers\Customer_Address|null Object if primary address requested, array otherwise. Null if no result for primary address.
- */
- public function get_address( $is_primary = true ) {
- $args = array(
- 'customer_id' => $this->id,
- 'is_primary' => $is_primary,
- );
- if ( $is_primary ) {
- $args['number'] = 1;
- $args['orderby'] = 'date_created';
- $args['order'] = 'desc';
- }
- $address = edd_get_customer_addresses( $args );
- if ( ! $is_primary ) {
- return $address;
- }
- if ( is_array( $address ) && ! empty( $address[0] ) ) {
- return $address[0];
- }
-
- return null;
- }
-
- /**
- * Retrieve all addresses.
- *
- * @since 3.0
- *
- * @param string $type Address type. Default empty.
- *
- * @return \EDD\Customers\Customer_Address[] Array of addresses.
- */
- public function get_addresses( $type = '' ) {
- $addresses = edd_get_customer_addresses( array(
- 'customer_id' => $this->id,
- ) );
-
- if ( ! empty( $type ) ) {
- $addresses = wp_filter_object_list( $addresses, array( 'type' => $type ) );
- }
-
- return $addresses;
- }
-
- /** Deprecated ************************************************************/
-
- /**
- * Increase the purchase count of a customer.
- *
- * @since 2.3
- * @deprecated 3.0 Use recalculate_stats()
- *
- * @param int $count The number to increment purchase count by. Default 1.
- * @return int New purchase count.
- */
- public function increase_purchase_count( $count = 1 ) {
-
- _edd_deprecated_function( __METHOD__, '3.0', 'EDD_Customer::recalculate_stats()' );
-
- // Make sure it's numeric and not negative
- if ( ! is_numeric( $count ) || absint( $count ) !== $count ) {
- return false;
- }
-
- $new_total = (int) $this->purchase_count + (int) $count;
-
- do_action( 'edd_customer_pre_increase_purchase_count', $count, $this->id, $this );
-
- if ( $this->update( array( 'purchase_count' => $new_total ) ) ) {
- $this->purchase_count = $new_total;
- }
-
- do_action( 'edd_customer_post_increase_purchase_count', $this->purchase_count, $count, $this->id, $this );
-
- return $this->purchase_count;
- }
-
- /**
- * Decrease the customer's purchase count.
- *
- * @since 2.3
- * @deprecated 3.0 Use recalculate_stats()
- *
- * @param int $count The number to decrement purchase count by. Default 1.
- * @return mixed New purchase count if successful, false otherwise.
- */
- public function decrease_purchase_count( $count = 1 ) {
-
- _edd_deprecated_function( __METHOD__, '3.0', 'EDD_Customer::recalculate_stats()' );
-
- // Make sure it's numeric and not negative
- if ( ! is_numeric( $count ) || absint( $count ) !== $count ) {
- return false;
- }
-
- $new_total = (int) $this->purchase_count - (int) $count;
-
- if ( $new_total < 0 ) {
- $new_total = 0;
- }
-
- do_action( 'edd_customer_pre_decrease_purchase_count', $count, $this->id, $this );
-
- if ( $this->update( array( 'purchase_count' => $new_total ) ) ) {
- $this->purchase_count = $new_total;
- }
-
- do_action( 'edd_customer_post_decrease_purchase_count', $this->purchase_count, $count, $this->id, $this );
-
- return $this->purchase_count;
- }
-
- /**
- * Increase the customer's lifetime value.
- *
- * @since 2.3
- * @deprecated 3.0 Use recalculate_stats()
- *
- * @param float $value The value to increase by.
- * @return mixed New lifetime value if successful, false otherwise.
- */
- public function increase_value( $value = 0.00 ) {
-
- _edd_deprecated_function( __METHOD__, '3.0', 'EDD_Customer::recalculate_stats()' );
-
- $value = floatval( apply_filters( 'edd_customer_increase_value', $value, $this ) );
- $new_value = floatval( $this->purchase_value ) + $value;
-
- do_action( 'edd_customer_pre_increase_value', $value, $this->id, $this );
-
- if ( $this->update( array( 'purchase_value' => $new_value ) ) ) {
- $this->purchase_value = $new_value;
- }
-
- do_action( 'edd_customer_post_increase_value', $this->purchase_value, $value, $this->id, $this );
-
- return $this->purchase_value;
- }
-
- /**
- * Decrease a customer's lifetime value.
- *
- * @since 2.3
- * @deprecated 3.0 Use recalculate_stats()
- *
- * @param float $value The value to decrease by.
- * @return mixed New lifetime value if successful, false otherwise.
- */
- public function decrease_value( $value = 0.00 ) {
-
- _edd_deprecated_function( __METHOD__, '3.0', 'EDD_Customer::recalculate_stats()' );
-
- $value = floatval( apply_filters( 'edd_customer_decrease_value', $value, $this ) );
- $new_value = floatval( $this->purchase_value ) - $value;
-
- if ( $new_value < 0 ) {
- $new_value = 0.00;
- }
-
- do_action( 'edd_customer_pre_decrease_value', $value, $this->id, $this );
-
- if ( $this->update( array( 'purchase_value' => $new_value ) ) ) {
- $this->purchase_value = $new_value;
- }
-
- do_action( 'edd_customer_post_decrease_value', $this->purchase_value, $value, $this->id, $this );
-
- return $this->purchase_value;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/class-edd-db-customer-meta.php b/wp-content/plugins/easy-digital-downloads/includes/class-edd-db-customer-meta.php
deleted file mode 100644
index 8855ff00..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/class-edd-db-customer-meta.php
+++ /dev/null
@@ -1,21 +0,0 @@
-get_row( $wpdb->prepare( "SELECT * FROM $this->table_name WHERE $this->primary_key = %s LIMIT 1;", $row_id ) );
- }
-
- /**
- * Retrieve a row by a specific column / value
- *
- * @since 2.1
- * @return object
- */
- public function get_by( $column, $row_id ) {
- global $wpdb;
- $column = esc_sql( $column );
- return $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $this->table_name WHERE $column = %s LIMIT 1;", $row_id ) );
- }
-
- /**
- * Retrieve a specific column's value by the primary key
- *
- * @since 2.1
- * @return string
- */
- public function get_column( $column, $row_id ) {
- global $wpdb;
- $column = esc_sql( $column );
- return $wpdb->get_var( $wpdb->prepare( "SELECT $column FROM $this->table_name WHERE $this->primary_key = %s LIMIT 1;", $row_id ) );
- }
-
- /**
- * Retrieve a specific column's value by the the specified column / value
- *
- * @since 2.1
- * @return string
- */
- public function get_column_by( $column, $column_where, $column_value ) {
- global $wpdb;
- $column_where = esc_sql( $column_where );
- $column = esc_sql( $column );
- return $wpdb->get_var( $wpdb->prepare( "SELECT $column FROM $this->table_name WHERE $column_where = %s LIMIT 1;", $column_value ) );
- }
-
- /**
- * Insert a new row
- *
- * @since 2.1
- * @return int
- */
- public function insert( $data, $type = '' ) {
- global $wpdb;
-
- // Set default values
- $data = wp_parse_args( $data, $this->get_column_defaults() );
-
- do_action( 'edd_pre_insert_' . $type, $data );
-
- // Initialise column format array
- $column_formats = $this->get_columns();
-
- // Force fields to lower case
- $data = array_change_key_case( $data );
-
- // White list columns
- $data = array_intersect_key( $data, $column_formats );
-
- // Reorder $column_formats to match the order of columns given in $data
- $data_keys = array_keys( $data );
- $column_formats = array_merge( array_flip( $data_keys ), $column_formats );
-
- $wpdb->insert( $this->table_name, $data, $column_formats );
- $wpdb_insert_id = $wpdb->insert_id;
-
- do_action( 'edd_post_insert_' . $type, $wpdb_insert_id, $data );
-
- return $wpdb_insert_id;
- }
-
- /**
- * Update a row
- *
- * @since 2.1
- * @return bool
- */
- public function update( $row_id, $data = array(), $where = '' ) {
-
- global $wpdb;
-
- // Row ID must be positive integer
- $row_id = absint( $row_id );
-
- if( empty( $row_id ) ) {
- return false;
- }
-
- if( empty( $where ) ) {
- $where = $this->primary_key;
- }
-
- // Initialise column format array
- $column_formats = $this->get_columns();
-
- // Force fields to lower case
- $data = array_change_key_case( $data );
-
- // White list columns
- $data = array_intersect_key( $data, $column_formats );
-
- // Reorder $column_formats to match the order of columns given in $data
- $data_keys = array_keys( $data );
- $column_formats = array_merge( array_flip( $data_keys ), $column_formats );
-
- if ( false === $wpdb->update( $this->table_name, $data, array( $where => $row_id ), $column_formats ) ) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Delete a row identified by the primary key
- *
- * @since 2.1
- * @return bool
- */
- public function delete( $row_id = 0 ) {
-
- global $wpdb;
-
- // Row ID must be positive integer
- $row_id = absint( $row_id );
-
- if( empty( $row_id ) ) {
- return false;
- }
-
- if ( false === $wpdb->query( $wpdb->prepare( "DELETE FROM $this->table_name WHERE $this->primary_key = %d", $row_id ) ) ) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Check if the given table exists
- *
- * @since 2.4
- * @param string $table The table name
- * @return bool If the table name exists
- */
- public function table_exists( $table ) {
- global $wpdb;
- $table = sanitize_text_field( $table );
-
- return $wpdb->get_var( $wpdb->prepare( "SHOW TABLES LIKE '%s'", $table ) ) === $table;
- }
-
- /**
- * Check if the table was ever installed
- *
- * @since 2.4
- * @return bool Returns if the customers table was installed and upgrade routine run
- */
- public function installed() {
- return $this->table_exists( $this->table_name );
- }
-
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/class-edd-discount.php b/wp-content/plugins/easy-digital-downloads/includes/class-edd-discount.php
deleted file mode 100644
index d2b17684..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/class-edd-discount.php
+++ /dev/null
@@ -1,1910 +0,0 @@
-find_by_code( $_id_or_code_or_name );
-
- // Name
- } elseif ( $by_name ) {
- $discount = $this->find_by_name( $_id_or_code_or_name );
-
- // Default to ID
- } else {
- $discount = edd_get_discount( absint( $_id_or_code_or_name ) );
- }
-
- // Setup or bail
- if ( ! empty( $discount ) ) {
- $this->setup_discount( $discount );
- } else {
- return false;
- }
- }
-
- /**
- * Magic __get method to dispatch a call to retrieve a protected property.
- *
- * @since 2.7
- *
- * @param mixed $key
- * @return mixed
- */
- public function __get( $key = '' ) {
- $key = sanitize_key( $key );
-
- // Back compat for ID
- if ( 'discount_id' === $key || 'ID' === $key ) {
- return (int) $this->id;
-
- // Method
- } elseif ( method_exists( $this, "get_{$key}" ) ) {
- return call_user_func( array( $this, "get_{$key}" ) );
-
- // Property
- } elseif ( property_exists( $this, $key ) ) {
- return $this->{$key};
-
- // Other...
- } else {
-
- // Account for old property keys from pre 3.0
- switch ( $key ) {
- case 'post_author':
- break;
-
- case 'post_date':
- case 'post_date_gmt':
- return $this->date_created;
-
- case 'post_modified':
- case 'post_modified_gmt':
- return $this->date_modified;
-
- case 'post_content':
- case 'post_title':
- return $this->name;
-
- case 'post_excerpt':
- case 'post_status':
- return $this->status;
-
- case 'comment_status':
- case 'ping_status':
- case 'post_password':
- case 'post_name':
- case 'to_ping':
- case 'pinged':
- case 'post_modified':
- case 'post_modified_gmt':
- case 'post_content_filtered':
- case 'post_parent':
- case 'guid':
- case 'menu_order':
- case 'post_mime_type':
- case 'comment_count':
- case 'filter':
- return '';
-
- case 'post_type':
- return 'edd_discount';
-
- case 'expiration':
- return $this->get_expiration();
-
- case 'start':
- return $this->start_date;
-
- case 'min_price':
- return $this->min_charge_amount;
-
- case 'use_once':
- case 'is_single_use':
- case 'once_per_customer':
- return $this->get_is_single_use();
-
- case 'uses':
- return $this->use_count;
-
- case 'not_global':
- case 'is_not_global':
- return 'global' === $this->scope ? false : true;
- }
-
- return new WP_Error( 'edd-discount-invalid-property', sprintf( __( 'Can\'t get property %s', 'easy-digital-downloads' ), $key ) );
- }
- }
-
- /**
- * Magic __set method to dispatch a call to update a protected property.
- *
- * @since 2.7
- *
- * @see set()
- *
- * @param string $key Property name.
- * @param mixed $value Property value.
- *
- * @return mixed Value of setter being dispatched to.
- */
- public function __set( $key, $value ) {
- $key = sanitize_key( $key );
-
- // Only real properties can be saved.
- $keys = array_keys( get_class_vars( get_called_class() ) );
- $old_keys = array(
- 'is_single_use',
- 'uses',
- 'expiration',
- 'start',
- 'min_price',
- 'use_once',
- 'is_not_global',
- );
-
- if ( ! in_array( $key, $keys, true ) && ! in_array( $key, $old_keys, true ) ) {
- return false;
- }
-
- // Dispatch to setter method if value needs to be sanitized
- if ( method_exists( $this, 'set_' . $key ) ) {
- return call_user_func( array( $this, 'set_' . $key ), $key, $value );
- } elseif ( in_array( $key, $old_keys, true ) ) {
- switch ( $key ) {
- case 'expiration':
- $this->end_date = $value;
- break;
- case 'start':
- $this->start_date = $value;
- break;
- case 'min_price':
- $this->min_charge_amount = $value;
- break;
- case 'use_once':
- case 'is_single_use':
- $this->once_per_customer = $value;
- break;
- case 'uses':
- $this->use_count = $value;
- break;
- case 'not_global':
- case 'is_not_global':
- $this->scope = $value ? 'not_global' : 'global';
- break;
- }
- } else {
- $this->{$key} = $value;
- }
- }
-
- /**
- * Handle method dispatch dynamically.
- *
- * @param string $method Method name.
- * @param array $args Arguments to be passed to method.
- *
- * @return mixed
- */
- public function __call( $method, $args ) {
- $property = strtolower( str_replace( array( 'setup_', 'get_' ), '', $method ) );
- if ( ! method_exists( $this, $method ) && property_exists( $this, $property ) ) {
- return $this->{$property};
- }
- }
-
- /**
- * Magic __toString method.
- *
- * @since 3.0
- */
- public function __toString() {
- return $this->code;
- }
-
- /**
- * Converts the instance of the EDD_Discount object into an array for special cases.
- *
- * @since 2.7
- *
- * @return array EDD_Discount object as an array.
- */
- public function array_convert() {
- return get_object_vars( $this );
- }
-
- /**
- * Find a discount in the database with the code supplied.
- *
- * @since 2.7
- * @access private
- *
- * @param string $code Discount code.
- * @return object WP_Post instance of the discount.
- */
- private function find_by_code( $code = '' ) {
- return edd_get_discount_by( 'code', $code );
- }
-
- /**
- * Find a discount in the database with the name supplied.
- *
- * @since 2.7
- * @access private
- *
- * @param string $name Discount name.
- * @return object WP_Post instance of the discount.
- */
- private function find_by_name( $name = '' ) {
- return edd_get_discount_by( 'name', $name );
- }
-
- /**
- * Setup object vars with discount WP_Post object.
- *
- * @since 2.7
- * @access private
- *
- * @param object $discount WP_Post instance of the discount.
- * @return bool Object initialization successful or not.
- */
- private function setup_discount( $discount = null ) {
- if ( is_null( $discount ) ) {
- return false;
- }
-
- if ( ! is_object( $discount ) ) {
- return false;
- }
-
- if ( is_wp_error( $discount ) ) {
- return false;
- }
-
- /**
- * Fires before the instance of the EDD_Discount object is set up.
- *
- * @since 2.7
- *
- * @param object EDD_Discount EDD_Discount instance of the discount object.
- * @param object WP_Post $discount WP_Post instance of the discount object.
- */
- do_action( 'edd_pre_setup_discount', $this, $discount );
-
- $vars = get_object_vars( $discount );
-
- foreach ( $vars as $key => $value ) {
- switch ( $key ) {
- case 'start_date':
- case 'end_date':
- if ( '0000-00-00 00:00:00' === $value || is_null( $value ) ) {
- $this->{$key} = false;
- break;
- }
- case 'notes':
- if ( ! empty( $value ) ) {
- $this->{$key} = $value;
- }
- break;
- case 'id':
- $this->{$key} = (int) $value;
- break;
- case 'min_charge_amount':
- $this->min_charge_amount = $value;
- break;
- default:
- if ( is_string( $value ) ) {
- @json_decode( $value );
- if ( json_last_error() !== JSON_ERROR_NONE ) {
- $this->{$key} = json_decode( $value );
- }
- }
-
- $this->{$key} = $value;
- break;
- }
- }
-
- /**
- * Some object vars need to be setup manually as the values need to be
- * pulled in from the `edd_adjustmentmeta` table.
- */
- $this->excluded_products = (array) edd_get_adjustment_meta( $this->id, 'excluded_product', false );
- $this->product_reqs = (array) edd_get_adjustment_meta( $this->id, 'product_requirement', false );
- $this->product_condition = (string) edd_get_adjustment_meta( $this->id, 'product_condition', true );
-
- /**
- * Fires after the instance of the EDD_Discount object is set up. Allows extensions to add items to this object via hook.
- *
- * @since 2.7
- *
- * @param object EDD_Discount EDD_Discount instance of the discount object.
- * @param object WP_Post $discount WP_Post instance of the discount object.
- */
- do_action( 'edd_setup_discount', $this, $discount );
-
- if ( ! empty( $this->id ) ) {
- return true;
- }
-
- return false;
- }
-
- /**
- * Helper method to retrieve meta data associated with the discount.
- *
- * @since 2.7
- *
- * @param string $key Meta key.
- * @param bool $single Return single item or array.
- *
- * @return mixed
- */
- public function get_meta( $key = '', $single = true ) {
- return edd_get_adjustment_meta( $this->id, $key, $single );
- }
-
- /**
- * Helper method to update meta data associated with the discount.
- *
- * @since 2.7
- *
- * @param string $key Meta key to update.
- * @param string $value New meta value to set.
- * @param string $prev_value Optional. Previous meta value.
- *
- * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure.
- */
- public function update_meta( $key, $value = '', $prev_value = '' ) {
- $filter_key = '_edd_discount_' . $key;
-
- /**
- * Filters the meta value being updated.
- * The key is prefixed with `_edd_discount_` for 2.9 backwards compatibility.
- *
- * @param mixed $value Value being set.
- * @param int $id Discount ID.
- */
- $value = apply_filters( 'edd_update_discount_meta_' . $filter_key, $value, $this->id );
-
- return edd_update_adjustment_meta( $this->id, $key, $value, $prev_value );
- }
-
- /**
- * Retrieve the code used to apply the discount.
- *
- * @since 2.7
- *
- * @return string Discount code.
- */
- public function get_code() {
- /**
- * Filters the discount code.
- *
- * @since 2.7
- *
- * @param string $code Discount code.
- * @param int $ID Discount ID.
- */
- return apply_filters( 'edd_get_discount_code', $this->code, $this->id );
- }
-
- /**
- * Retrieve the status of the discount
- *
- * @since 2.7
- *
- * @return string Discount code status (active/inactive).
- */
- public function get_status() {
- /**
- * Filters the discount status.
- *
- * @since 2.7
- *
- * @param string $code Discount status (active or inactive).
- * @param int $ID Discount ID.
- */
- return apply_filters( 'edd_get_discount_status', $this->status, $this->id );
- }
-
- /**
- * Retrieves the status label of the discount.
- *
- * This method exists as a helper, until legitimate Status classes can be
- * registered that will contain an array of status-specific labels.
- *
- * @since 2.9
- *
- * @return string Status label for the current discount.
- */
- public function get_status_label() {
-
- // Default label
- $label = ucwords( $this->status );
-
- // Specific labels
- switch ( $this->status ) {
- case '':
- $label = __( 'None', 'easy-digital-downloads' );
- break;
- case 'draft':
- $label = __( 'Draft', 'easy-digital-downloads' );
- break;
- case 'expired':
- $label = __( 'Expired', 'easy-digital-downloads' );
- break;
- case 'inactive':
- $label = __( 'Inactive', 'easy-digital-downloads' );
- break;
- case 'active':
- $label = __( 'Active', 'easy-digital-downloads' );
- break;
- case 'inherit':
- if ( ! empty( $this->parent ) ) {
- $parent = edd_get_discount( $this->parent );
- $label = $parent->get_status_label();
- break;
- }
- }
-
- /**
- * Filters the discount status.
- *
- * @since 2.9
- *
- * @param string $label Discount status label.
- * @param string $status Discount status (active or inactive).
- * @param int $id Discount ID.
- */
- return apply_filters( 'edd_get_discount_status_label', $label, $this->status, $this->id );
- }
-
- /**
- * Retrieve the type of discount.
- *
- * @since 2.7
- *
- * @return string Discount type (percent or flat amount).
- */
- public function get_type() {
- /**
- * Filters the discount type.
- *
- * @since 2.7
- *
- * @param string $code Discount type (percent or flat amount).
- * @param int $ID Discount ID.
- */
- return apply_filters( 'edd_get_discount_type', $this->amount_type, $this->id );
- }
-
- /**
- * Retrieve the discount amount.
- *
- * @since 2.7
- *
- * @return mixed float Discount amount.
- */
- public function get_amount() {
- /**
- * Filters the discount amount.
- *
- * @since 2.7
- *
- * @param float $amount Discount amount.
- * @param int $ID Discount ID.
- */
- return (float) apply_filters( 'edd_get_discount_amount', $this->amount, $this->id );
- }
-
- /**
- * Retrieve the discount requirements for the discount to be satisfied.
- *
- * @since 2.7
- *
- * @return array IDs of required downloads.
- */
- public function get_product_reqs() {
-
- /**
- * Filters the download requirements.
- *
- * @since 2.7
- *
- * @param array $product_reqs IDs of required products.
- * @param int $ID Discount ID.
- */
- return (array) apply_filters( 'edd_get_discount_product_reqs', $this->product_reqs, $this->id );
- }
-
- /**
- * Retrieve the discount scope.
- *
- * This used to be called "is_not_global". That filter is still here for backwards compatibility.
- *
- * @since 3.0
- *
- * @return string The scope, i.e. "global".
- */
- public function get_scope() {
- $legacy_value = apply_filters( 'edd_discount_is_not_global', null, $this->id );
-
- if ( ! is_null( $legacy_value ) ) {
- $this->scope = $legacy_value ? 'global' : 'not_global';
- }
-
- return apply_filters( 'edd_get_discount_scope', $this->scope, $this->id );
- }
-
- /**
- * Retrieve the product condition.
- *
- * @since 2.7
- *
- * @return string Product condition
- */
- public function get_product_condition() {
- /**
- * Filters the product condition.
- *
- * @since 2.7
- *
- * @param string $product_condition Product condition.
- * @param int $ID Discount ID.
- */
- return apply_filters( 'edd_discount_product_condition', $this->product_condition, $this->id );
- }
-
- /**
- * Retrieve the downloads that are excluded from having this discount code applied.
- *
- * @since 2.7
- *
- * @return array IDs of excluded downloads.
- */
- public function get_excluded_products() {
- /**
- * Filters the excluded downloads.
- *
- * @since 2.7
- *
- * @param array $excluded_products IDs of excluded products.
- * @param int $ID Discount ID.
- */
- return (array) apply_filters( 'edd_get_discount_excluded_products', $this->excluded_products, $this->id );
- }
-
- /**
- * Retrieve the start date.
- *
- * @since 2.7
- *
- * @return string Start date.
- */
- public function get_start_date() {
- /**
- * Filters the start date.
- *
- * @since 2.7
- *
- * @param string $start Discount start date.
- * @param int $ID Discount ID.
- */
- return apply_filters( 'edd_get_discount_start', $this->start_date, $this->id );
- }
-
- /**
- * Retrieve the end date.
- *
- * @since 2.7
- *
- * @return string End date.
- */
- public function get_expiration() {
- /**
- * Filters the end date.
- *
- * @since 2.7
- *
- * @param string $expiration Discount expiration date.
- * @param int $ID Discount ID.
- */
- return apply_filters( 'edd_get_discount_expiration', $this->end_date, $this->id );
- }
-
- /**
- * Retrieve the uses for the discount code.
- *
- * @since 2.7
- *
- * @return int Uses.
- */
- public function get_uses() {
- /**
- * Filters the maximum uses.
- *
- * @since 2.7
- *
- * @param int $max_uses Maximum uses.
- * @param int $ID Discount ID.
- */
- return (int) apply_filters( 'edd_get_discount_uses', $this->use_count, $this->id );
- }
-
- /**
- * Retrieve the maximum uses for the discount code.
- *
- * @since 2.7
- *
- * @return int Maximum uses.
- */
- public function get_max_uses() {
- /**
- * Filters the maximum uses.
- *
- * @since 2.7
- *
- * @param int $max_uses Maximum uses.
- * @param int $ID Discount ID.
- */
- return (int) apply_filters( 'edd_get_discount_max_uses', $this->max_uses, $this->id );
- }
-
- /**
- * Retrieve the minimum spend required for the discount to be satisfied.
- *
- * @since 2.7
- *
- * @return mixed float Minimum spend.
- */
- public function get_min_price() {
- /**
- * Filters the minimum price.
- *
- * @since 2.7
- *
- * @param float $min_price Minimum price.
- * @param int $ID Discount ID.
- */
- return (float) apply_filters( 'edd_get_discount_min_price', $this->min_charge_amount, $this->id );
- }
-
- /**
- * Retrieve the usage limit per limit (if the discount can only be used once per customer).
- *
- * @since 2.7
- *
- * @return bool Once use per customer?
- */
- public function get_is_single_use() {
- return $this->get_once_per_customer();
- }
-
- /**
- * Retrieve the usage limit per limit (if the discount can only be used once per customer).
- *
- * @since 3.0
- *
- * @return bool Once use per customer?
- */
- public function get_once_per_customer() {
- /**
- * Filters the single use meta value.
- *
- * @since 2.7
- *
- * @param bool $is_single_use Is the discount only allowed to be used once per customer.
- * @param int $ID Discount ID.
- */
- return (bool) apply_filters( 'edd_is_discount_single_use', $this->once_per_customer, $this->id );
- }
-
- /**
- * Check if a discount exists.
- *
- * @since 2.7
- *
- * @return bool Discount exists.
- */
- public function exists() {
- if ( ! $this->id > 0 ) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Once object variables has been set, an update is needed to persist them to the database.
- *
- * This is now simply a wrapper to the add() method which handles creating new discounts and updating existing ones.
- *
- * @since 2.7
- *
- * @return bool True if the save was successful, false if it failed or wasn't needed.
- */
- public function save() {
- $args = get_object_vars( $this );
- $saved = $this->add( $args );
-
- return $saved;
- }
-
- /**
- * Create a new discount. If the discount already exists in the database, update it.
- *
- * @since 2.7
- *
- * @param array $args Discount details.
- * @return mixed bool|int false if data isn't passed and class not instantiated for creation, or post ID for the new discount.
- */
- public function add( $args = array() ) {
-
- // If no code is provided, return early with false
- if ( empty( $args['code'] ) ) {
- return false;
- }
-
- if ( ! empty( $this->id ) && $this->exists() ) {
- return $this->update( $args );
-
- } else {
- $args = self::convert_legacy_args( $args );
-
- if ( ! empty( $args['start_date'] ) ) {
- $args['start_date'] = date( 'Y-m-d H:i:s', strtotime( $args['start_date'], current_time( 'timestamp' ) ) );
- }
-
- if ( ! empty( $args['end_date'] ) ) {
- $args['end_date'] = date( 'Y-m-d H:i:s', strtotime( $args['end_date'], current_time( 'timestamp' ) ) );
-
- if ( strtotime( $args['end_date'], current_time( 'timestamp' ) ) < current_time( 'timestamp' ) ) {
- $args['status'] = 'expired';
- }
- }
-
- if ( ! empty( $args['start_date'] ) && ! empty( $args['end_date'] ) ) {
- $start_timestamp = strtotime( $args['start_date'], current_time( 'timestamp' ) );
- $end_timestamp = strtotime( $args['end_date'], current_time( 'timestamp' ) );
-
- if ( $start_timestamp > $end_timestamp ) {
- // Set the expiration date to the start date if start is later than expiration
- $args['end_date'] = $args['start_date'];
- }
- }
-
- // Assume discount status is "active" if it has not been set
- if ( ! isset( $args['status'] ) ) {
- $args['status'] = 'active';
- }
-
- /**
- * Add a new discount to the database.
- */
-
- /**
- * Filters the args before being inserted into the database.
- *
- * @since 2.7
- *
- * @param array $args Discount args.
- */
- $args = apply_filters( 'edd_insert_discount', $args );
-
- /**
- * Filters the args before being inserted into the database (kept for backwards compatibility purposes)
- *
- * @since 2.7
- * @since 3.0 Updated parameters to pass $args twice for backwards compatibility.
- *
- * @param array $args Discount args.
- */
- $args = apply_filters( 'edd_insert_discount_args', $args, $args );
-
- $args = $this->sanitize_columns( $args );
-
- /**
- * Fires before the discount has been added to the database.
- *
- * @since 2.7
- *
- * @param array $args Discount args.
- */
- do_action( 'edd_pre_insert_discount', $args );
-
- foreach ( $args as $key => $value ) {
- $this->{$key} = $value;
- }
-
- // We have to ensure an ID is not passed to edd_add_discount()
- unset( $args['id'] );
-
- $id = edd_add_discount( $args );
-
- // The DB class 'add' implies an update if the discount being asked to be created already exists
- if ( ! empty( $id ) ) {
-
- // We need to update the ID of the instance of the object in order to add meta
- $this->id = $id;
-
- if ( isset( $args['excluded_products'] ) ) {
- if ( is_array( $args['excluded_products'] ) ) {
- foreach ( $args['excluded_products'] as $product ) {
- edd_add_adjustment_meta( $this->id, 'excluded_product', absint( $product ) );
- }
- }
- }
-
- if ( isset( $args['product_reqs'] ) ) {
- if ( is_array( $args['product_reqs'] ) ) {
- foreach ( $args['product_reqs'] as $product ) {
- edd_add_adjustment_meta( $this->id, 'product_requirement', absint( $product ) );
- }
- }
- }
- }
-
- /**
- * Fires after the discount code is inserted.
- *
- * @since 2.7
- *
- * @param array $meta {
- * The discount details.
- *
- * @type string $code The discount code.
- * @type string $name The name of the discount.
- * @type string $status The discount status. Defaults to active.
- * @type int $uses The current number of uses.
- * @type int $max_uses The max number of uses.
- * @type string $start The start date.
- * @type int $min_price The minimum price required to use the discount code.
- * @type array $product_reqs The product IDs required to use the discount code.
- * @type string $product_condition The conditions in which a product(s) must meet to use the discount code.
- * @type array $excluded_products Product IDs excluded from this discount code.
- * @type bool $is_not_global If the discount code is not globally applied to all products. Defaults to false.
- * @type bool $is_single_use If the code cannot be used more than once per customer. Defaults to false.
- * }
- * @param int $ID The ID of the discount that was inserted.
- */
- do_action( 'edd_post_insert_discount', $args, $this->id );
-
- // Discount code created
- return $id;
- }
- }
-
- /**
- * Update an existing discount in the database.
- *
- * @since 2.7
- *
- * @param array $args Discount details.
- * @return bool True if update is successful, false otherwise.
- */
- public function update( $args = array() ) {
- $args = self::convert_legacy_args( $args );
- $ret = false;
-
- /**
- * Filter the data being updated
- *
- * @since 2.7
- *
- * @param array $args Discount args.
- * @param int $ID Discount ID.
- */
- $args = apply_filters( 'edd_update_discount', $args, $this->id );
- $args = $this->sanitize_columns( $args );
-
- // Get current time once to avoid inconsistencies
- $current_time = current_time( 'timestamp' );
-
- if ( ! empty( $args['start_date'] ) && ! empty( $args['end_date'] ) ) {
- $start_timestamp = strtotime( $args['start_date'], $current_time );
- $end_timestamp = strtotime( $args['end_date'], $current_time );
-
- // Set the expiration date to the start date if start is later than expiration
- if ( $start_timestamp > $end_timestamp ) {
- $args['end_date'] = $args['start_date'];
- }
- }
-
- // Start date
- if ( ! empty( $args['start_date'] ) ) {
- $args['start_date'] = date( 'Y-m-d H:i:s', strtotime( $args['start_date'], $current_time ) );
- }
-
- // End date
- if ( ! empty( $args['end_date'] ) ) {
- $args['end_date'] = date( 'Y-m-d H:i:s', strtotime( $args['end_date'], $current_time ) );
- }
-
- if ( isset( $args['excluded_products'] ) ) {
- // Reset meta
- edd_delete_adjustment_meta( $this->id, 'excluded_product' );
-
- if ( is_array( $args['excluded_products'] ) ) {
- // Now add each newly excluded product
- foreach ( $args['excluded_products'] as $product ) {
- edd_add_adjustment_meta( $this->id, 'excluded_product', absint( $product ) );
- }
- }
- }
-
- if ( isset( $args['product_reqs'] ) ) {
- // Reset meta
- edd_delete_adjustment_meta( $this->id, 'product_requirement' );
-
- if ( is_array( $args['product_reqs'] ) ) {
- // Now add each newly required product
- foreach ( $args['product_reqs'] as $product ) {
- edd_add_adjustment_meta( $this->id, 'product_requirement', absint( $product ) );
- }
- }
- }
-
- // Switch `type` to `amount_type`
- if ( ! isset( $args['amount_type'] ) && ! empty( $args['type'] ) && 'discount' !== $args['type'] ) {
- $args['amount_type'] = $args['type'];
- }
-
- // Force `type` to `discount`
- $args['type'] = 'discount';
-
- /**
- * Fires before the discount has been updated in the database.
- *
- * @since 2.7
- *
- * @param array $args Discount args.
- * @param int $ID Discount ID.
- */
- do_action( 'edd_pre_update_discount', $args, $this->id );
-
- // If we are using the discounts DB
- if ( edd_update_discount( $this->id, $args ) ) {
- $discount = edd_get_discount( $this->id );
- $this->setup_discount( $discount );
- $ret = true;
- }
-
- /**
- * Fires after the discount has been updated in the database.
- *
- * @since 2.7
- *
- * @param array $args Discount args.
- * @param int $ID Discount ID.
- */
- do_action( 'edd_post_update_discount', $args, $this->id );
-
- return $ret;
- }
-
- /**
- * Update the status of the discount.
- *
- * @since 2.7
- *
- * @param string $new_status New status (default: active)
- * @return bool If the status been updated or not.
- */
- public function update_status( $new_status = 'active' ) {
-
- /**
- * Fires before the status of the discount is updated.
- *
- * @since 2.7
- *
- * @param int $ID Discount ID.
- * @param string $new_status New status.
- * @param string $post_status Post status.
- */
- do_action( 'edd_pre_update_discount_status', $this->id, $new_status, $this->status );
-
- $ret = $this->update( array( 'status' => $new_status ) );
-
- /**
- * Fires after the status of the discount is updated.
- *
- * @since 2.7
- *
- * @param int $ID Discount ID.
- * @param string $new_status New status.
- * @param string $status Post status.
- */
- do_action( 'edd_post_update_discount_status', $this->id, $new_status, $this->status );
-
- return (bool) $ret;
- }
-
- /**
- * Check if the discount has started.
- *
- * @since 2.7
- *
- * @param bool $set_error Whether an error message be set in session.
- * @return bool Is discount started?
- */
- public function is_started( $set_error = true ) {
- $return = false;
-
- if ( $this->start_date ) {
- $start_date = strtotime( $this->start_date );
-
- if ( $start_date < time() ) {
- // Discount has pased the start date
- $return = true;
- } elseif ( $set_error ) {
- edd_set_error( 'edd-discount-error', _x( 'This discount is invalid.', 'error shown when attempting to use a discount before its start date', 'easy-digital-downloads' ) );
- }
- } else {
- // No start date for this discount, so has to be true
- $return = true;
- }
-
- /**
- * Filters if the discount has started or not.
- *
- * @since 2.7
- *
- * @param bool $return Has the discount started or not.
- * @param int $ID Discount ID.
- * @param bool $set_error Whether an error message be set in session.
- */
- return apply_filters( 'edd_is_discount_started', $return, $this->id, $set_error );
- }
-
- /**
- * Check if the discount has expired.
- *
- * @since 2.7
- *
- * @param bool $update Update the discount to expired if an one is found but has an active status
- * @return bool Has the discount expired?
- */
- public function is_expired( $update = true ) {
- $return = false;
-
- if ( empty( $this->end_date ) || '0000-00-00 00:00:00' === $this->end_date ) {
- return $return;
- }
-
- $end_date = strtotime( $this->end_date );
-
- if ( $end_date < time() ) {
- if ( $update ) {
- $this->update_status( 'expired' );
- }
- $return = true;
- }
-
- /**
- * Filters if the discount has expired or not.
- *
- * @since 2.7
- *
- * @param bool $return Has the discount expired or not.
- * @param int $ID Discount ID.
- */
- return apply_filters( 'edd_is_discount_expired', $return, $this->id );
- }
-
- /**
- * Check if the discount has maxed out.
- *
- * @since 2.7
- *
- * @param bool $set_error Whether an error message be set in session.
- * @return bool Is discount maxed out?
- */
- public function is_maxed_out( $set_error = true ) {
- $return = false;
-
- if ( $this->uses >= $this->max_uses && ! empty( $this->max_uses ) ) {
- if ( $set_error ) {
- edd_set_error( 'edd-discount-error', __( 'This discount has reached its maximum usage.', 'easy-digital-downloads' ) );
- }
-
- $return = true;
- }
-
- /**
- * Filters if the discount is maxed out or not.
- *
- * @since 2.7
- *
- * @param bool $return Is the discount maxed out or not.
- * @param int $ID Discount ID.
- * @param bool $set_error Whether an error message be set in session.
- */
- return apply_filters( 'edd_is_discount_maxed_out', $return, $this->id, $set_error );
- }
-
- /**
- * Check if the minimum cart amount is satisfied for the discount to hold.
- *
- * @since 2.7
- *
- * @param bool $set_error Whether an error message be set in session.
- * @return bool Is the minimum cart amount met?
- */
- public function is_min_price_met( $set_error = true ) {
- $return = false;
-
- $cart_amount = edd_get_cart_discountable_subtotal( $this->id );
-
- if ( (float) $cart_amount >= (float) $this->min_charge_amount ) {
- $return = true;
- } elseif ( $set_error ) {
- edd_set_error( 'edd-discount-error', sprintf( __( 'Minimum order of %s not met.', 'easy-digital-downloads' ), edd_currency_filter( edd_format_amount( $this->min_charge_amount ) ) ) );
- }
-
- /**
- * Filters if the minimum cart amount has been met to satisfy the discount.
- *
- * @since 2.7
- *
- * @param bool $return Is the minimum cart amount met or not.
- * @param int $ID Discount ID.
- * @param bool $set_error Whether an error message be set in session.
- */
- return apply_filters( 'edd_is_discount_min_met', $return, $this->id, $set_error );
- }
-
- /**
- * Is the discount single use or not?
- *
- * @since 2.7
- *
- * @return bool Is the discount single use or not?
- */
- public function is_single_use() {
- /**
- * Filters if the discount is single use or not.
- *
- * @since 2.7
- *
- * @param bool $single_use Is the discount is single use or not.
- * @param int $ID Discount ID.
- */
- return (bool) apply_filters( 'edd_is_discount_single_use', $this->once_per_customer, $this->id );
- }
-
- /**
- * Are the product requirements met for the discount to hold.
- *
- * @since 2.7
- *
- * @param bool $set_error Whether an error message be set in session.
- * @return bool Are required products in the cart?
- */
- public function is_product_requirements_met( $set_error = true ) {
- $product_reqs = $this->get_product_reqs();
- $excluded_ps = $this->get_excluded_products();
- $cart_items = edd_get_cart_contents();
- $cart_ids = $cart_items ? wp_list_pluck( $cart_items, 'id' ) : null;
- $is_met = true;
-
- /**
- * Normalize our data for product requirements, exclusions and cart data.
- */
-
- // First absint the items, then sort, and reset the array keys
- $product_reqs = array_map( 'absint', $product_reqs );
- asort( $product_reqs );
- $product_reqs = array_filter( array_values( $product_reqs ) );
-
- $cart_ids = array_map( 'absint', $cart_ids );
- asort( $cart_ids );
- $cart_ids = array_values( $cart_ids );
-
- // Ensure we have requirements before proceeding
- if ( ! empty( $product_reqs ) ) {
- $matches = array_intersect( $product_reqs, $cart_ids );
-
- switch ( $this->get_product_condition() ) {
- case 'all':
- $is_met = count( $matches ) === count( $product_reqs );
- break;
- default:
- $is_met = 0 < count( $matches );
- }
-
- if ( ! $is_met && $set_error ) {
- edd_set_error( 'edd-discount-error', __( 'The product requirements for this discount are not met.', 'easy-digital-downloads' ) );
- }
- }
-
- $excluded_ps = array_map( 'absint', $excluded_ps );
- asort( $excluded_ps );
- $excluded_ps = array_filter( array_values( $excluded_ps ) );
-
- if ( ! empty( $excluded_ps ) ) {
- if ( count( array_intersect( $cart_ids, $excluded_ps ) ) === count( $cart_ids ) ) {
- $is_met = false;
-
- if ( $set_error ) {
- edd_set_error( 'edd-discount-error', __( 'This discount is not valid for the cart contents.', 'easy-digital-downloads' ) );
- }
- }
- }
-
- /**
- * Filters whether the product requirements are met for the discount to hold.
- *
- * @since 2.7
- *
- * @param bool $is_met Are the product requirements met or not.
- * @param int $ID Discount ID.
- * @param string $product_condition Product condition.
- * @param bool $set_error Whether an error message be set in session.
- */
- return (bool) apply_filters( 'edd_is_discount_products_req_met', $is_met, $this->id, $this->product_condition, $set_error );
- }
-
- /**
- * Has the discount code been used.
- *
- * @since 2.7
- * @since 3.0 Refactored to use new query methods.
- *
- * @param string $user User info.
- * @param bool $set_error Whether an error message be set in session.
- *
- * @return bool Whether the discount has been used or not.
- */
- public function is_used( $user = '', $set_error = true ) {
- $return = false;
-
- if ( $this->is_single_use ) {
- $payments = array();
-
- if ( edd_get_component_interface( 'customer', 'table' )->exists() ) {
- $by_user_id = ! is_email( $user );
-
- $customer = new EDD_Customer( $user, $by_user_id );
-
- $payments = explode( ',', $customer->payment_ids );
- } else {
- $user_found = false;
-
- if ( is_email( $user ) ) {
- $user_found = true; // All we need is the email
- $key = '_edd_payment_user_email';
- $value = $user;
- } else {
- $user_data = get_user_by( 'login', $user );
-
- if ( $user_data ) {
- $user_found = true;
- $key = '_edd_payment_user_id';
- $value = $user_data->ID;
- }
- }
-
- if ( $user_found ) {
- $query_args = array(
- 'post_type' => 'edd_payment',
- 'meta_query' => array(
- array(
- 'key' => $key,
- 'value' => $value,
- 'compare' => '=',
- ),
- ),
- 'fields' => 'ids',
- );
-
- $payments = get_posts( $query_args ); // Get all payments with matching email
- }
- }
-
- if ( $payments ) {
- foreach ( $payments as $payment ) {
- $payment = new EDD_Payment( $payment );
-
- if ( empty( $payment->discounts ) ) {
- continue;
- }
-
- if ( in_array( $payment->status, edd_get_incomplete_order_statuses(), true ) ) {
- continue;
- }
-
- $discounts = explode( ',', $payment->discounts );
-
- if ( is_array( $discounts ) ) {
- $discounts = array_map( 'strtoupper', $discounts );
- $key = array_search( strtoupper( $this->code ), $discounts, true );
-
- if ( false !== $key ) {
- if ( $set_error ) {
- edd_set_error( 'edd-discount-error', __( 'This discount has already been redeemed.', 'easy-digital-downloads' ) );
- }
-
- $return = true;
- break;
- }
- }
- }
- }
- }
-
- /**
- * Filters if the discount is used or not.
- *
- * @since 2.7
- *
- * @param bool $return If the discount is used or not.
- * @param int $ID Discount ID.
- * @param string $user User info.
- * @param bool $set_error Whether an error message be set in session.
- */
- return apply_filters( 'edd_is_discount_used', $return, $this->id, $user, $set_error );
- }
-
- /**
- * Checks whether a discount holds at the time of purchase.
- *
- * @since 2.7
- *
- * @param string $user User info.
- * @param bool $set_error Whether an error message be set in session.
- * @return bool Is the discount valid or not?
- */
- public function is_valid( $user = '', $set_error = true ) {
- $return = false;
- $user = trim( $user );
-
- if ( edd_get_cart_contents() && $this->id ) {
- if (
- $this->is_active( true, $set_error ) &&
- $this->is_started( $set_error ) &&
- ! $this->is_maxed_out( $set_error ) &&
- ! $this->is_used( $user, $set_error ) &&
- $this->is_product_requirements_met( $set_error ) &&
- $this->is_min_price_met( $set_error )
- ) {
- $return = true;
- }
- } elseif ( $set_error ) {
- edd_set_error( 'edd-discount-error', _x( 'This discount is invalid.', 'error for when a discount is invalid based on its configuration', 'easy-digital-downloads' ) );
- }
-
- /**
- * Filters whether the discount is valid or not.
- *
- * @since 2.7
- *
- * @param bool $return If the discount is used or not.
- * @param int $ID Discount ID.
- * @param string $code Discount code.
- * @param string $user User info.
- * @param bool $set_error Whether an error message be set in session.
- */
- return apply_filters( 'edd_is_discount_valid', $return, $this->id, $this->code, $user, $set_error );
- }
-
- /**
- * Checks if a discount code is active.
- *
- * @since 2.7
- *
- * @param bool $update Update the discount to expired if an one is found but has an active status.
- * @param bool $set_error Whether an error message be set in session.
- * @return bool If the discount is active or not.
- */
- public function is_active( $update = true, $set_error = true ) {
- $return = false;
-
- if ( $this->exists() ) {
-
- if ( $this->is_expired( $update ) ) {
- if ( edd_doing_ajax() && $set_error ) {
- edd_set_error( 'edd-discount-error', __( 'This discount is expired.', 'easy-digital-downloads' ) );
- }
- } elseif ( 'active' === $this->status ) {
- $return = true;
- } elseif ( edd_doing_ajax() && $set_error ) {
- edd_set_error( 'edd-discount-error', __( 'This discount is not active.', 'easy-digital-downloads' ) );
- }
- }
-
- /**
- * Filters if the discount is active or not.
- *
- * @since 2.7
- *
- * @param bool $return Is the discount active or not.
- * @param int $ID Discount ID.
- * @param bool $set_error Whether an error message be set in session.
- */
- return apply_filters( 'edd_is_discount_active', $return, $this->id, $set_error );
- }
-
- /**
- * Get Discounted Amount.
- *
- * @since 2.7
- *
- * @param string|int $base_price Price before discount.
- * @return float $discounted_price Amount after discount.
- */
- public function get_discounted_amount( $base_price ) {
- $base_price = floatval( $base_price );
-
- if ( 'flat' === $this->amount_type ) {
- $amount = $base_price - floatval( $this->amount );
-
- if ( $amount < 0 ) {
- $amount = 0;
- }
- } else {
- // Percentage discount
- $amount = $base_price - ( $base_price * ( floatval( $this->amount ) / 100 ) );
- }
-
- /**
- * Filter the discounted amount calculated.
- *
- * @since 2.7
- * @access public
- *
- * @param float $amount Calculated discounted amount.
- * @param EDD_Discount $this Discount object.
- */
- return apply_filters( 'edd_discounted_amount', $amount, $this );
- }
-
- /**
- * Increment the usage of the discount.
- *
- * @since 2.7
- *
- * @return int New discount usage.
- */
- public function increase_usage() {
- if ( $this->get_uses() ) {
- $this->use_count++;
- } else {
- $this->use_count = 1;
- }
-
- $args = array( 'use_count' => $this->use_count );
-
- $this->max_uses = absint( $this->max_uses );
-
- if ( 0 !== $this->max_uses && $this->max_uses <= $this->use_count ) {
- $args['status'] = 'inactive';
- }
-
- $this->update( $args );
-
- /**
- * Fires after the usage count has been increased.
- *
- * @since 2.7
- *
- * @param int $use_count Discount usage.
- * @param int $ID Discount ID.
- * @param string $code Discount code.
- */
- do_action( 'edd_discount_increase_use_count', $this->use_count, $this->id, $this->code );
-
- return (int) $this->use_count;
- }
-
- /**
- * Decrement the usage of the discount.
- *
- * @since 2.7
- *
- * @return int New discount usage.
- */
- public function decrease_usage() {
- if ( $this->get_uses() ) {
- $this->use_count--;
- }
-
- if ( $this->use_count < 0 ) {
- $this->use_count = 0;
- }
-
- $args = array( 'use_count' => $this->use_count );
-
- if ( 0 !== $this->max_uses && $this->max_uses > $this->use_count ) {
- $args['status'] = 'active';
- }
-
- $this->update( $args );
-
- /**
- * Fires after the usage count has been decreased.
- *
- * @since 2.7
- *
- * @param int $use_count Discount usage.
- * @param int $ID Discount ID.
- * @param string $code Discount code.
- */
- do_action( 'edd_discount_decrease_use_count', $this->use_count, $this->id, $this->code );
-
- return (int) $this->use_count;
- }
-
- /**
- * Edit Discount Link.
- *
- * @since 2.7
- *
- * @return string Link to the `Edit Discount` page.
- */
- public function edit_url() {
- return esc_url(
- edd_get_admin_url(
- array(
- 'page' => 'edd-discounts',
- 'edd-action' => 'edit_discount',
- 'discount' => absint( $this->id ),
- )
- )
- );
- }
-
- /**
- * Sanitize the data for update/create
- *
- * @since 3.0
- * @param array $data The data to sanitize
- * @return array The sanitized data, based off column defaults
- */
- private function sanitize_columns( $data ) {
- $default_values = array();
-
- foreach ( $data as $key => $type ) {
-
- // Only sanitize data that we were provided
- if ( ! array_key_exists( $key, $data ) ) {
- continue;
- }
-
- switch ( $type ) {
-
- case '%s':
- if ( 'email' === $key ) {
- $data[ $key ] = sanitize_email( $data[ $key ] );
- } elseif ( 'notes' === $key ) {
- $data[ $key ] = strip_tags( $data[ $key ] );
- } else {
- if ( is_array( $data[ $key ] ) ) {
- $data[ $key ] = json_encode( $data[ $key ] );
- } else {
- $data[ $key ] = sanitize_text_field( $data[ $key ] );
- }
- }
- break;
-
- case '%d':
- if ( ! is_numeric( $data[ $key ] ) || absint( $data[ $key ] ) !== (int) $data[ $key ] ) {
- $data[ $key ] = $default_values[ $key ];
- } else {
- $data[ $key ] = absint( $data[ $key ] );
- }
- break;
-
- case '%f':
- // Convert what was given to a float
- $value = floatval( $data[ $key ] );
-
- if ( ! is_float( $value ) ) {
- $data[ $key ] = $default_values[ $key ];
- } else {
- $data[ $key ] = $value;
- }
- break;
-
- default:
- $data[ $key ] = ! is_array( $data[ $key ] )
- ? sanitize_text_field( $data[ $key ] )
- : maybe_serialize( array_map( 'sanitize_text_field', $data[ $key ] ) );
- break;
- }
- }
-
- return $data;
- }
-
- /**
- * Converts pre-3.0 arguments to the 3.0+ version.
- *
- * @since 3.0
- * @static
- *
- * @param $args array Arguments to be converted.
- * @return array The converted arguments.
- */
- public static function convert_legacy_args( $args = array() ) {
-
- // Loop through arguments provided and adjust old key names for the new schema introduced in 3.0
- $old = array(
- 'uses' => 'use_count',
- 'max' => 'max_uses',
- 'start' => 'start_date',
- 'expiration' => 'end_date',
- 'min_price' => 'min_charge_amount',
- 'products' => 'product_reqs',
- 'excluded-products' => 'excluded_products',
- 'not_global' => 'scope',
- 'is_not_global' => 'scope',
- 'use_once' => 'once_per_customer',
- 'is_single_use' => 'once_per_customer',
- );
-
- foreach ( $old as $old_key => $new_key ) {
- if ( isset( $args[ $old_key ] ) ) {
- if ( in_array( $old_key, array( 'not_global', 'is_not_global' ), true ) && ! array_key_exists( 'scope', $args ) ) {
- $args[ $new_key ] = ! empty( $args[ $old_key ] )
- ? 'not_global'
- : 'global';
- } else {
- $args[ $new_key ] = $args[ $old_key ];
- }
- }
- unset( $args[ $old_key ] );
- }
-
- // Default status needs to be active for regression purposes.
- // See https://github.com/easydigitaldownloads/easy-digital-downloads/issues/6806
- if ( ! isset( $args['status'] ) ) {
- $args['status'] = 'active';
- }
-
- return $args;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/class-edd-download.php b/wp-content/plugins/easy-digital-downloads/includes/class-edd-download.php
deleted file mode 100644
index 8b45eb15..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/class-edd-download.php
+++ /dev/null
@@ -1,923 +0,0 @@
-setup_download( $download );
- }
-
- /**
- * Given the download data, let's set the variables
- *
- * @since 2.3.6
- * @param WP_Post $download The WP_Post object for download.
- * @return bool If the setup was successful or not
- */
- private function setup_download( $download ) {
-
- if ( ! is_object( $download ) ) {
- return false;
- }
-
- if ( ! $download instanceof WP_Post ) {
- return false;
- }
-
- if ( 'download' !== $download->post_type ) {
- return false;
- }
-
- foreach ( $download as $key => $value ) {
- $this->{$key} = $value;
- }
-
- return true;
- }
-
- /**
- * Magic __get function to dispatch a call to retrieve a private property
- *
- * @since 2.2
- */
- public function __get( $key = '' ) {
- if ( method_exists( $this, "get_{$key}" ) ) {
- return call_user_func( array( $this, "get_{$key}" ) );
- } else {
- return new WP_Error( 'edd-download-invalid-property', sprintf( __( 'Can\'t get property %s', 'easy-digital-downloads' ), $key ) );
- }
- }
-
- /**
- * Creates a download
- *
- * @since 2.3.6
- * @param array $data Array of attributes for a download
- * @return mixed false if data isn't passed and class not instantiated for creation, or New Download ID
- */
- public function create( $data = array() ) {
-
- if ( $this->id != 0 ) {
- return false;
- }
-
- $defaults = array(
- 'post_type' => 'download',
- 'post_status' => 'draft',
- 'post_title' => __( 'New Download Product', 'easy-digital-downloads' )
- );
-
- $args = wp_parse_args( $data, $defaults );
-
- /**
- * Fired before a download is created
- *
- * @param array $args The post object arguments used for creation.
- */
- do_action( 'edd_download_pre_create', $args );
-
- $id = wp_insert_post( $args, true );
-
- $download = WP_Post::get_instance( $id );
-
- /**
- * Fired after a download is created
- *
- * @param int $id The post ID of the created item.
- * @param array $args The post object arguments used for creation.
- */
- do_action( 'edd_download_post_create', $id, $args );
-
- return $this->setup_download( $download );
- }
-
- /**
- * Retrieve the ID
- *
- * @since 2.2
- * @return int ID of the download
- */
- public function get_ID() {
- return $this->ID;
- }
-
- /**
- * Retrieve the download name
- *
- * @since 2.5.8
- * @return string Name of the download
- */
- public function get_name() {
- return get_the_title( $this->ID );
- }
-
- /**
- * Retrieve the price
- *
- * @since 2.2
- * @return float Price of the download
- */
- public function get_price() {
-
- if ( ! isset( $this->price ) ) {
- $this->price = get_post_meta( $this->ID, 'edd_price', true );
-
- if ( $this->price ) {
- $this->price = edd_sanitize_amount( $this->price );
- } else {
- $this->price = 0;
- }
- }
-
- /**
- * Override the download price.
- *
- * @since 2.2
- *
- * @param string $price The download price(s).
- * @param string|int $id The downloads ID.
- */
- return apply_filters( 'edd_get_download_price', $this->price, $this->ID );
- }
-
- /**
- * Retrieve the variable prices
- *
- * @since 2.2
- * @return array List of the variable prices
- */
- public function get_prices() {
-
- $this->prices = array();
-
- if ( true === $this->has_variable_prices() ) {
- if ( empty( $this->prices ) ) {
- $this->prices = get_post_meta( $this->ID, 'edd_variable_prices', true );
- }
- }
-
- /**
- * Override variable prices
- *
- * @since 2.2
- *
- * @param array $prices The array of variables prices.
- * @param int|string The ID of the download.
- */
- return array_filter( (array) apply_filters( 'edd_get_variable_prices', $this->prices, $this->ID ) );
- }
-
- /**
- * Get the default Price ID for variable priced products.
- *
- * Since it is possible for the value to not be set on older products, we'll set it to the first price in the array
- * if one is not set, as that has been the default behavior since default prices were introduced.
- *
- * Storing it as the first if found, is just more consistent and intentional.
- *
- * @since 3.1.2
- *
- * @return int|null The default price ID, or null if the product does not have variable prices.
- */
- public function get_default_price_id() {
- if ( ! $this->has_variable_prices() ) {
- return null;
- }
-
- $default_price_id = get_post_meta( $this->ID, '_edd_default_price_id', true );
-
- // If no default price ID is set, or the default price ID is not in the prices array, set the first price as the default.
- $prices = $this->get_prices();
- if ( is_array( $prices ) && ( ! is_numeric( $default_price_id ) || ! array_key_exists( (int) $default_price_id, $prices ) ) ) {
- $default_price_id = key( $prices );
-
- // Set the default price ID
- update_post_meta( $this->ID, '_edd_default_price_id', $default_price_id );
- }
-
- return absint( apply_filters( 'edd_variable_default_price_id', $default_price_id, $this->ID ) );
- }
-
- /**
- * Determine if single price mode is enabled or disabled
- *
- * @since 2.2
- * @return bool True if download is in single price mode, false otherwise
- */
- public function is_single_price_mode() {
- $ret = $this->has_variable_prices() && get_post_meta( $this->ID, '_edd_price_options_mode', true );
-
- /**
- * Override the price mode for a download when checking if is in single price mode.
- *
- * @since 2.3
- *
- * @param bool $ret Is download in single price mode?
- * @param int|string The ID of the download.
- */
- return (bool) apply_filters( 'edd_single_price_option_mode', $ret, $this->ID );
- }
-
- /**
- * Determine if the download has variable prices enabled
- *
- * @since 2.2
- * @return bool True when the download has variable pricing enabled, false otherwise
- */
- public function has_variable_prices() {
- $ret = get_post_meta( $this->ID, '_variable_pricing', true );
-
- /**
- * Override whether the download has variables prices.
- *
- * @since 2.3
- *
- * @param bool $ret Does download have variable prices?
- * @param int|string The ID of the download.
- */
- return (bool) apply_filters( 'edd_has_variable_prices', $ret, $this->ID );
- }
-
- /**
- * Retrieve the file downloads
- *
- * @since 2.2
- * @param integer $variable_price_id
- * @return array List of download files
- */
- public function get_files( $variable_price_id = null ) {
- if ( ! isset( $this->files ) ) {
-
- $this->files = array();
-
- // Bundled products are not allowed to have files
- if ( $this->is_bundled_download() ) {
- return $this->files;
- }
-
- $download_files = get_post_meta( $this->ID, 'edd_download_files', true );
-
- if ( ! empty( $download_files ) ) {
- if ( ! is_null( $variable_price_id ) && $this->has_variable_prices() ) {
- foreach ( $download_files as $key => $file_info ) {
- if ( isset( $file_info['condition'] ) ) {
- if ( $file_info['condition'] == $variable_price_id || 'all' === $file_info['condition'] ) {
- $this->files[ $key ] = $file_info;
- }
- }
- }
-
- } else {
- $this->files = $download_files;
- }
- }
- }
-
- return apply_filters( 'edd_download_files', $this->files, $this->ID, $variable_price_id );
- }
-
- /**
- * Retrieve the file download limit
- *
- * @since 2.2
- * @return int Number of download limit
- */
- public function get_file_download_limit() {
-
- if ( ! isset( $this->file_download_limit ) ) {
- $limit = get_post_meta( $this->ID, '_edd_download_limit', true );
- $global = edd_get_option( 'file_download_limit', 0 );
-
- // Download specific limit
- if ( is_numeric( $limit ) ) {
- $retval = absint( $limit );
-
- // Use global
- } elseif ( '' === $limit ) {
- $retval = '';
-
- // Global limit
- } elseif ( ! empty( $global ) ) {
- $retval = absint( $global );
-
- // Default
- } else {
- $retval = 0;
- }
-
- $this->file_download_limit = $retval;
- }
-
- return apply_filters( 'edd_file_download_limit', $this->file_download_limit, $this->ID );
- }
-
- /**
- * Retrieve the refund window
- *
- * @since 3.0
- * @return int Number of days
- */
- public function get_refund_window() {
-
- if ( ! isset( $this->refund_window ) ) {
- $window = get_post_meta( $this->ID, '_edd_refund_window', true );
- $global = edd_get_option( 'refund_window', 0 ); // needs to be 0 here
-
- // Download specific window
- if ( is_numeric( $window ) ) {
- $retval = absint( $window );
-
- // Use global
- } elseif ( '' === $window ) {
- $retval = '';
-
- // Global limit
- } elseif ( ! empty( $global ) ) {
- $retval = absint( $global );
-
- // Default
- } else {
- $retval = 0;
- }
-
- $this->refund_window = $retval;
- }
-
- return $this->refund_window; // No filter
- }
-
- /**
- * Retrieve whether the product is refundable.
- *
- * @since 3.0
- *
- * @return string `refundable` or `nonrefundable`
- */
- public function get_refundability() {
-
- if ( ! isset( $this->refundability ) ) {
- $default = 'refundable';
- $refundable = get_post_meta( $this->ID, '_edd_refundability', true );
- $global = edd_get_option( 'refundability', $default );
-
- // Download specific window
- if ( ! empty( $refundable ) ) {
- $retval = $refundable;
-
- // Use global
- } elseif ( ! empty( $global ) ) {
- $retval = $global;
-
- // Default
- } else {
- $retval = $default;
- }
-
- $this->refundability = $retval;
- }
-
- return $this->refundability; // No filter
- }
-
- /**
- * Retrieve the price option that has access to the specified file
- *
- * @since 2.2
- * @return int|string
- */
- public function get_file_price_condition( $file_key = 0 ) {
- $files = $this->get_files();
- $condition = isset( $files[ $file_key ]['condition'] )
- ? $files[ $file_key ]['condition']
- : 'all';
-
- return apply_filters( 'edd_get_file_price_condition', $condition, $this->ID, $files );
- }
-
- /**
- * Retrieve the download type, default or bundle
- *
- * @since 2.2
- * @return string Type of download, either 'default' or 'bundle'
- */
- public function get_type() {
- if ( ! isset( $this->type ) ) {
- $this->type = get_post_meta( $this->ID, '_edd_product_type', true );
-
- if ( empty( $this->type ) ) {
- $this->type = 'default';
- }
- }
-
- return apply_filters( 'edd_get_download_type', $this->type, $this->ID );
- }
-
- /**
- * Determine if this is a bundled download
- *
- * @since 2.2
- * @return bool True when download is a bundle, false otherwise
- */
- public function is_bundled_download() {
- return 'bundle' === $this->get_type();
- }
-
- /**
- * Retrieves the Download IDs that are bundled with this Download
- *
- * @since 2.2
- * @return array List of bundled downloads
- */
- public function get_bundled_downloads() {
-
- if ( ! isset( $this->bundled_downloads ) ) {
- $this->bundled_downloads = (array) get_post_meta( $this->ID, '_edd_bundled_products', true );
- }
-
- return (array) apply_filters( 'edd_get_bundled_products', array_filter( $this->bundled_downloads ), $this->ID );
- }
-
- /**
- * Retrieve the Download IDs that are bundled with this Download based on the variable pricing ID passed
- *
- * @since 2.7
- * @param int $price_id Variable pricing ID
- * @return array List of bundled downloads
- */
- public function get_variable_priced_bundled_downloads( $price_id = null ) {
- if ( null === $price_id ) {
- return $this->get_bundled_downloads();
- }
-
- $downloads = array();
- $bundled_downloads = $this->get_bundled_downloads();
- $price_assignments = $this->get_bundle_pricing_variations();
-
- if ( ! $price_assignments ) {
- return $bundled_downloads;
- }
-
- $price_assignments = $price_assignments[0];
-
- foreach ( $price_assignments as $key => $value ) {
- if ( isset( $bundled_downloads[ $key ] ) && ( $value == $price_id || $value == 'all' ) ) {
- $downloads[] = $bundled_downloads[ $key ];
- }
- }
-
- return $downloads;
- }
-
- /**
- * Retrieve the download notes
- *
- * @since 2.2
- * @return string Note related to the download
- */
- public function get_notes() {
-
- if ( ! isset( $this->notes ) ) {
- $this->notes = get_post_meta( $this->ID, 'edd_product_notes', true );
- }
-
- return (string) apply_filters( 'edd_product_notes', $this->notes, $this->ID );
- }
-
- /**
- * Retrieve the download sku
- *
- * @since 2.2
- * @return string SKU of the download
- */
- public function get_sku() {
-
- if ( ! isset( $this->sku ) ) {
-
- $this->sku = get_post_meta( $this->ID, 'edd_sku', true );
-
- if ( empty( $this->sku ) ) {
- $this->sku = '-';
- }
- }
-
- return apply_filters( 'edd_get_download_sku', $this->sku, $this->ID );
- }
-
- /**
- * Retrieve the purchase button behavior
- *
- * @since 2.2
- * @return string
- */
- public function get_button_behavior() {
-
- if ( ! isset( $this->button_behavior ) ) {
-
- $this->button_behavior = get_post_meta( $this->ID, '_edd_button_behavior', true );
-
- if ( empty( $this->button_behavior ) || ! edd_shop_supports_buy_now() ) {
- $this->button_behavior = 'add_to_cart';
- }
- }
-
- return apply_filters( 'edd_get_download_button_behavior', $this->button_behavior, $this->ID );
- }
-
- /**
- * Retrieve the sale count for the download
- *
- * @since 2.2
- * @return int Number of times this has been purchased
- */
- public function get_sales() {
-
- if ( ! isset( $this->sales ) ) {
-
- if ( '' == get_post_meta( $this->ID, '_edd_download_sales', true ) ) {
- add_post_meta( $this->ID, '_edd_download_sales', 0 );
- }
-
- $this->sales = get_post_meta( $this->ID, '_edd_download_sales', true );
-
- // Never let sales be less than zero
- $this->sales = max( $this->sales, 0 );
- }
-
- return $this->sales;
- }
-
- /**
- * Increment the sale count by one
- *
- * @since 2.2
- * @param int $quantity The quantity to increase the sales by
- * @return int New number of total sales
- */
- public function increase_sales( $quantity = 1 ) {
-
- _edd_deprecated_function( __METHOD__, '3.0', 'EDD_Download::recalculate_net_sales_earnings()' );
- edd_recalculate_download_sales_earnings( $this->ID );
-
- $this->get_sales();
- do_action( 'edd_download_increase_sales', $this->ID, $this->sales, $this );
-
- return $this->sales;
- }
-
- /**
- * Decrement the sale count by one
- *
- * @since 2.2
- * @param int $quantity The quantity to decrease by
- * @return int New number of total sales
- */
- public function decrease_sales( $quantity = 1 ) {
-
- _edd_deprecated_function( __METHOD__, '3.0', 'EDD_Download::recalculate_net_sales_earnings()' );
- $this->recalculate_net_sales_earnings();
-
- $this->get_sales();
- do_action( 'edd_download_decrease_sales', $this->ID, $this->sales, $this );
-
- return $this->sales;
- }
-
- /**
- * Retrieve the total earnings for the download
- *
- * @since 2.2
- * @return float Total download earnings
- */
- public function get_earnings() {
-
- if ( ! isset( $this->earnings ) ) {
- if ( '' == get_post_meta( $this->ID, '_edd_download_earnings', true ) ) {
- add_post_meta( $this->ID, '_edd_download_earnings', 0 );
- }
-
- $this->earnings = get_post_meta( $this->ID, '_edd_download_earnings', true );
-
- // Never let earnings be less than zero
- $this->earnings = max( $this->earnings, 0 );
- }
-
- return $this->earnings;
- }
-
- /**
- * Increase the earnings by the given amount
- *
- * @since 2.2
- * @param int|float $amount Amount to increase the earnings by
- * @return float New number of total earnings
- */
- public function increase_earnings( $amount = 0 ) {
-
- _edd_deprecated_function( __METHOD__, '3.0', 'edd_recalculate_download_sales_earnings()' );
- edd_recalculate_download_sales_earnings( $this->ID );
-
- $this->get_earnings();
- do_action( 'edd_download_increase_earnings', $this->ID, $this->earnings, $this );
-
- return $this->earnings;
- }
-
- /**
- * Decrease the earnings by the given amount
- *
- * @since 2.2
- * @param int|float $amount Number to decrease earning with
- * @return float New number of total earnings
- */
- public function decrease_earnings( $amount ) {
-
- _edd_deprecated_function( __METHOD__, '3.0', 'EDD_Download::recalculate_net_sales_earnings()' );
-
- $this->recalculate_net_sales_earnings();
- $this->get_earnings();
-
- do_action( 'edd_download_decrease_earnings', $this->ID, $this->earnings, $this );
-
- return $this->earnings;
- }
-
- /**
- * Updates the gross sales and earnings for a download.
- *
- * @since 3.0
- * @return void
- */
- public function recalculate_gross_sales_earnings() {
- $download_model = new Download( $this->ID );
-
- // This currently uses the post meta functions as we do not yet guarantee that the meta exists.
- update_post_meta( $this->ID, '_edd_download_gross_sales', $download_model->get_gross_sales() );
- update_post_meta( $this->ID, '_edd_download_gross_earnings', floatval( $download_model->get_gross_earnings() ) );
- }
-
- /**
- * Recalculates the net sales and earnings for a download.
- *
- * @since 3.0
- * @return void
- */
- public function recalculate_net_sales_earnings() {
- $download_model = new Download( $this->ID );
-
- $this->update_meta( '_edd_download_sales', intval( $download_model->get_net_sales() ) );
- $this->update_meta( '_edd_download_earnings', floatval( $download_model->get_net_earnings() ) );
- }
-
- /**
- * Determine if the download is free or if the given price ID is free
- *
- * @since 2.2
- * @param bool $price_id ID of variation if needed
- * @return bool True when the download is free, false otherwise
- */
- public function is_free( $price_id = false ) {
-
- $is_free = false;
- $variable_pricing = edd_has_variable_prices( $this->ID );
-
- if ( $variable_pricing && ! is_null( $price_id ) && $price_id !== false ) {
- $price = edd_get_price_option_amount( $this->ID, $price_id );
-
- } elseif ( $variable_pricing && $price_id === false ) {
- $lowest_price = (float) edd_get_lowest_price_option( $this->ID );
- $highest_price = (float) edd_get_highest_price_option( $this->ID );
-
- if ( $lowest_price === 0.00 && $highest_price === 0.00 ) {
- $price = 0;
- }
-
- } elseif ( ! $variable_pricing ) {
-
- $price = get_post_meta( $this->ID, 'edd_price', true );
- }
-
- if ( isset( $price ) && (float) $price == 0 ) {
- $is_free = true;
- }
-
- return (bool) apply_filters( 'edd_is_free_download', $is_free, $this->ID, $price_id );
- }
-
- /**
- * Is quantity input disabled on this product?
- *
- * @since 2.7
- * @return bool
- */
- public function quantities_disabled() {
- $ret = (bool) get_post_meta( $this->ID, '_edd_quantities_disabled', true );
- return apply_filters( 'edd_download_quantity_disabled', $ret, $this->ID );
- }
-
- /**
- * Updates a single meta entry for the download
- *
- * @since 2.3
- * @access private
- * @param string $meta_key The meta_key to update
- * @param string|array|object $meta_value The value to put into the meta
- * @return bool The result of the update query
- */
- private function update_meta( $meta_key = '', $meta_value = '' ) {
- global $wpdb;
-
- if ( empty( $meta_key ) || ( ! is_numeric( $meta_value ) && empty( $meta_value ) ) ) {
- return false;
- }
-
- // Make sure if it needs to be serialized, we do
- $meta_value = maybe_serialize( $meta_value );
-
- if ( is_numeric( $meta_value ) ) {
- $value_type = is_float( $meta_value ) ? '%f' : '%d';
- } else {
- $value_type = "'%s'";
- }
-
- $sql = $wpdb->prepare( "UPDATE $wpdb->postmeta SET meta_value = $value_type WHERE post_id = $this->ID AND meta_key = '%s'", $meta_value, $meta_key );
-
- if ( $wpdb->query( $sql ) ) {
-
- clean_post_cache( $this->ID );
- return true;
-
- }
-
- return false;
- }
-
- /**
- * Checks if the download can be purchased
- *
- * NOTE: Currently only checks on edd_get_cart_contents() and edd_add_to_cart()
- *
- * @since 2.6.4
- * @return bool If the current user can purchase the download ID
- */
- public function can_purchase() {
- $can_purchase = true;
-
- if ( 'publish' !== $this->post_status && ! current_user_can( 'edit_post', $this->ID ) ) {
- $can_purchase = false;
- }
-
- return (bool) apply_filters( 'edd_can_purchase_download', $can_purchase, $this );
- }
-
- /**
- * Get pricing variations for bundled items
- *
- * @since 2.7
- * @return array
- */
- public function get_bundle_pricing_variations() {
- return get_post_meta( $this->ID, '_edd_bundled_products_conditions' );
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/class-edd-fees.php b/wp-content/plugins/easy-digital-downloads/includes/class-edd-fees.php
deleted file mode 100644
index b89479f1..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/class-edd-fees.php
+++ /dev/null
@@ -1,362 +0,0 @@
- 1 ) {
-
- $args = func_get_args();
- $amount = $args[0];
- $label = isset( $args[1] ) ? $args[1] : '';
- $id = isset( $args[2] ) ? $args[2] : '';
- $type = 'fee';
-
- $args = array(
- 'amount' => $amount,
- 'label' => $label,
- 'id' => $id,
- 'type' => $type,
- 'no_tax' => false,
- 'download_id' => 0,
- 'price_id' => NULL
- );
-
- } else {
-
- $defaults = array(
- 'amount' => 0,
- 'label' => '',
- 'id' => '',
- 'no_tax' => false,
- 'type' => 'fee',
- 'download_id' => 0,
- 'price_id' => NULL
- );
-
- $args = wp_parse_args( $args, $defaults );
-
- if( $args['type'] != 'fee' && $args['type'] != 'item' ) {
- $args['type'] = 'fee';
- }
-
- }
-
- // If the fee is for an "item" but we passed in a download id
- if( 'item' === $args['type'] && ! empty( $args['download_id'] ) ) {
- unset( $args['download_id'] );
- unset( $args['price_id'] );
- }
-
- if ( ! empty( $args['download_id'] ) ) {
- $options = isset( $args['price_id'] ) ? array( 'price_id' => $args['price_id'] ) : array();
- if ( ! edd_item_in_cart( $args['download_id'], $options ) ) {
- return false;
- }
- }
-
- $fees = $this->get_fees( 'all' );
-
- // Determine the key
- $key = empty( $args['id'] ) ? sanitize_key( $args['label'] ) : sanitize_key( $args['id'] );
-
- // Remove the unneeded id key
- unset( $args['id'] );
-
- // Sanitize the amount
- $args['amount'] = edd_sanitize_amount( $args['amount'] );
-
- // Force the amount to have the proper number of decimal places.
- $args['amount'] = number_format( (float) $args['amount'], edd_currency_decimal_filter(), '.', '' );
-
- // Force no_tax to true if the amount is negative
- if( $args['amount'] < 0 ) {
- $args['no_tax'] = true;
- }
-
- // Set the fee
- $fees[ $key ] = apply_filters( 'edd_fees_add_fee', $args, $this );
-
- // Allow 3rd parties to process the fees before storing them in the session
- $fees = apply_filters( 'edd_fees_set_fees', $fees, $this );
-
- // Update fees
- EDD()->session->set( 'edd_cart_fees', $fees );
-
- do_action( 'edd_post_add_fee', $fees, $key, $args );
-
- return $fees;
- }
-
- /**
- * Remove an Existing Fee
- *
- * @since 1.5
- * @param string $id Fee ID
- * @uses EDD_Fees::get_fees()
- * @uses EDD_Session::set()
- * @return array Remaining fees
- */
- public function remove_fee( $id = '' ) {
-
- $fees = $this->get_fees( 'all' );
-
- if ( isset( $fees[ $id ] ) ) {
- unset( $fees[ $id ] );
- EDD()->session->set( 'edd_cart_fees', $fees );
-
- do_action( 'edd_post_remove_fee', $fees, $id );
- }
-
- return $fees;
- }
-
- /**
- * Check if any fees are present
- *
- * @since 1.5
- * @param string $type Fee type, "fee" or "item"
- * @uses EDD_Fees::get_fees()
- * @return bool True if there are fees, false otherwise
- */
- public function has_fees( $type = 'fee' ) {
-
- if( 'all' == $type || 'fee' == $type ) {
- if( ! edd_get_cart_contents() ) {
- $type = 'item';
- }
-
- }
-
- $fees = $this->get_fees( $type );
- return ! empty( $fees ) && is_array( $fees );
- }
-
- /**
- * Retrieve all active fees
- *
- * @since 1.5
- * @param string $type Fee type, "fee" or "item"
- * @param int $download_id The download ID whose fees to retrieve
- * @param null|int $price_id The variable price ID whose fees to retrieve
- * @uses EDD_Session::get()
- * @return array|bool List of fees when available, false when there are no fees
- */
- public function get_fees( $type = 'fee', $download_id = 0, $price_id = null ) {
- $fees = EDD()->session->get( 'edd_cart_fees' );
-
- if ( EDD()->cart->is_empty() ) {
- // We can only get item type fees when the cart is empty
- $type = 'item';
- }
-
- if ( ! empty( $fees ) && ! empty( $type ) && 'all' !== $type ) {
- foreach ( $fees as $key => $fee ) {
- if ( ! empty( $fee['type'] ) && $type != $fee['type'] ) {
- unset( $fees[ $key ] );
- }
- }
- }
-
- if ( ! empty( $fees ) && ! empty( $download_id ) ) {
- // Remove fees that don't belong to the specified Download
- $applied_fees = array();
- foreach ( $fees as $key => $fee ) {
-
- if ( empty( $fee['download_id'] ) || (int) $download_id !== (int) $fee['download_id'] ) {
- unset( $fees[ $key ] );
- }
-
- $string_to_hash = "{$key}_{$download_id}";
- if ( ! is_null( $price_id ) && isset( $fee['price_id'] ) ) {
- $string_to_hash .= "_{$fee['price_id']}";
- }
- $fee_hash = md5( $string_to_hash );
-
- if ( in_array( $fee_hash, $applied_fees, true ) ) {
- unset( $fees[ $key ] );
- }
-
- $applied_fees[] = $fee_hash;
- }
- }
-
- // Now that we've removed any fees that are for other Downloads, lets also remove any fees that don't match this price id
- if ( ! empty( $fees ) && ! empty( $download_id ) && ! is_null( $price_id ) ) {
- // Remove fees that don't belong to the specified Download AND Price ID
- foreach ( $fees as $key => $fee ) {
- if ( is_null( $fee['price_id'] ) ) {
- continue;
- }
-
- if ( (int) $price_id !== (int) $fee['price_id'] ){
- unset( $fees[ $key ] );
- }
- }
- }
-
- if ( ! empty( $fees ) ) {
- // Remove fees that belong to a specific download but are not in the cart
- foreach ( $fees as $key => $fee ) {
- if ( empty( $fee['download_id'] ) ) {
- continue;
- }
-
- if ( ! edd_item_in_cart( $fee['download_id'] ) ) {
- unset( $fees[ $key ] );
- }
- }
- }
-
- // Allow 3rd parties to process the fees before returning them
- return apply_filters( 'edd_fees_get_fees', ! empty( $fees ) ? $fees : array(), $this );
- }
-
- /**
- * Retrieve a specific fee
- *
- * @since 1.5
- *
- * @param string $id ID of the fee to get
- * @return array|bool The fee array when available, false otherwise
- */
- public function get_fee( $id = '' ) {
- $fees = $this->get_fees( 'all' );
-
- if ( ! isset( $fees[ $id ] ) )
- return false;
-
- return $fees[ $id ];
- }
-
- /**
- * Calculate the total fee amount for a specific fee type
- *
- * Can be negative
- *
- * @since 2.0
- * @param string $type Fee type, "fee" or "item"
- * @uses EDD_Fees::get_fees()
- * @uses EDD_Fees::has_fees()
- * @return float Total fee amount
- */
- public function type_total( $type = 'fee' ) {
- $fees = $this->get_fees( $type );
- $total = (float) 0.00;
-
- if ( $this->has_fees( $type ) ) {
- foreach ( $fees as $fee ) {
- $total += edd_sanitize_amount( $fee['amount'] );
- }
- }
-
- return edd_sanitize_amount( $total );
- }
-
- /**
- * Calculate the total fee amount
- *
- * Can be negative
- *
- * @since 1.5
- * @uses EDD_Fees::get_fees()
- * @uses EDD_Fees::has_fees()
- * @param int $download_id The download ID whose fees to retrieve
- * @return float Total fee amount
- */
- public function total( $download_id = 0 ) {
- $fees = $this->get_fees( 'all', $download_id );
- $total = (float) 0.00;
-
- if ( $this->has_fees( 'all' ) ) {
- foreach ( $fees as $fee ) {
- $total += edd_sanitize_amount( $fee['amount'] );
- }
- }
-
- return edd_sanitize_amount( $total );
- }
-
- /**
- * Stores the fees in the payment meta
- *
- * @since 1.5
- * @uses EDD_Session::set()
- * @param array $payment_meta The meta data to store with the payment
- * @param array $payment_data The info sent from process-purchase.php
- * @return array Return the payment meta with the fees added
- */
- public function record_fees( $payment_meta, $payment_data ) {
- if ( $this->has_fees( 'all' ) ) {
-
- $payment_meta['fees'] = $this->get_fees( 'all' );
-
- // Only clear fees from session when status is not pending
- if( ! empty( $payment_data['status'] ) && 'pending' !== strtolower( $payment_data['status'] ) ) {
-
- EDD()->session->set( 'edd_cart_fees', null );
-
- }
- }
-
- return $payment_meta;
- }
-
- /**
- * Gets the tax to be added to a fee.
- *
- * @since 3.0
- * @param array $fee
- * @param float $tax_rate
- * @return float
- */
- public function get_calculated_tax( $fee, $tax_rate ) {
- $tax = 0.00;
- if ( ! ( $tax_rate || empty( $fee['no_tax'] ) ) || $fee['amount'] < 0 ) {
- return $tax;
- }
-
- return ( floatval( $fee['amount'] ) * $tax_rate ) / 100;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/class-edd-html-elements.php b/wp-content/plugins/easy-digital-downloads/includes/class-edd-html-elements.php
deleted file mode 100644
index 1f5d9a45..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/class-edd-html-elements.php
+++ /dev/null
@@ -1,1023 +0,0 @@
- 'products',
- 'id' => 'products',
- 'class' => '',
- 'multiple' => false,
- 'selected' => 0,
- 'chosen' => false,
- 'number' => 30,
- 'bundles' => true,
- 'variations' => false,
- 'show_variations_only' => false,
- 'placeholder' => sprintf( __( 'Choose a %s', 'easy-digital-downloads' ), edd_get_label_singular() ),
- 'data' => array(
- 'search-type' => 'download',
- 'search-placeholder' => sprintf( __( 'Search %s', 'easy-digital-downloads' ), edd_get_label_plural() ),
- ),
- 'required' => false,
- 'products' => array(),
- );
-
- $args = wp_parse_args( $args, $defaults );
-
- $products = $args['products'];
- if ( empty( $args['products'] ) ) {
- $products = $this->get_products( $args );
- }
- $existing_ids = wp_list_pluck( $products, 'ID' );
- if ( ! empty( $args['selected'] ) ) {
-
- $selected_items = $args['selected'];
- if ( ! is_array( $selected_items ) ) {
- $selected_items = array( $selected_items );
- }
-
- foreach ( $selected_items as $selected_item ) {
- if ( ! in_array( $selected_item, $existing_ids, true ) ) {
-
- // If the selected item has a variation, we just need the product ID.
- $has_variation = strpos( $selected_item, '_' );
- if ( false !== $has_variation ) {
- $selected_item = substr( $selected_item, 0, $has_variation );
- }
-
- $post = get_post( $selected_item );
- if ( ! is_null( $post ) ) {
- $products[] = $post;
- }
- }
- }
- }
-
- $options = array(
- '' => '',
- );
- if ( $products ) {
- foreach ( $products as $product ) {
- $has_variations = edd_has_variable_prices( $product->ID );
-
- // If a product has no variations, just add it to the list and continue.
- if ( ! $has_variations ) {
- $title = esc_html( $product->post_title );
- $options[ absint( $product->ID ) ] = $title;
-
- continue;
- }
-
- // The product does have variations. Add the top level product to the list
- // if not showing variations, or not showing variations only.
- if ( false === $args['variations'] || ! $args['show_variations_only'] ) {
- $title = esc_html( $product->post_title );
- if ( ! $args['show_variations_only'] ) {
- $title .= ' (' . __( 'All Price Options', 'easy-digital-downloads' ) . ')';
- }
- $options[ absint( $product->ID ) ] = $title;
- }
-
- // If showing variations, add them to the list.
- if ( $args['variations'] ) {
- $prices = edd_get_variable_prices( $product->ID );
- if ( ! empty( $prices ) ) {
- foreach ( $prices as $key => $value ) {
- $name = ! empty( $value['name'] ) ? $value['name'] : '';
- if ( $name ) {
- $options[ absint( $product->ID ) . '_' . $key ] = esc_html( $product->post_title . ': ' . $name );
- }
- }
- }
- }
- }
- }
-
- // This ensures that any selected products are included in the drop down
- if ( is_array( $args['selected'] ) ) {
- foreach ( $args['selected'] as $item ) {
- if ( ! array_key_exists( $item, $options ) ) {
-
- $parsed_item = edd_parse_product_dropdown_value( $item );
-
- if ( $parsed_item['price_id'] !== false ) {
- $prices = edd_get_variable_prices( (int) $parsed_item['download_id'] );
- foreach ( $prices as $key => $value ) {
- $name = ( isset( $value['name'] ) && ! empty( $value['name'] ) ) ? $value['name'] : '';
-
- if ( $name && (int) $parsed_item['price_id'] === (int) $key ) {
- $options[ absint( $product->ID ) . '_' . $key ] = esc_html( get_the_title( (int) $parsed_item['download_id'] ) . ': ' . $name );
- }
- }
- } else {
- $options[ $parsed_item['download_id'] ] = get_the_title( $parsed_item['download_id'] );
- }
- }
- }
- } elseif ( false !== $args['selected'] && $args['selected'] !== 0 ) {
- if ( ! array_key_exists( $args['selected'], $options ) ) {
- $parsed_item = edd_parse_product_dropdown_value( $args['selected'] );
-
- if ( $parsed_item['price_id'] !== false ) {
- $prices = edd_get_variable_prices( (int) $parsed_item['download_id'] );
-
- foreach ( $prices as $key => $value ) {
- $name = ( isset( $value['name'] ) && ! empty( $value['name'] ) ) ? $value['name'] : '';
-
- if ( $name && (int) $parsed_item['price_id'] === (int) $key ) {
- $options[ absint( $product->ID ) . '_' . $key ] = esc_html( get_the_title( (int) $parsed_item['download_id'] ) . ': ' . $name );
- }
- }
- } else {
- $options[ $parsed_item['download_id'] ] = get_the_title( $parsed_item['download_id'] );
- }
- }
- }
-
- if ( ! $args['bundles'] ) {
- $args['class'] .= ' no-bundles';
- }
-
- if ( $args['variations'] ) {
- $args['class'] .= ' variations';
- }
-
- if ( $args['show_variations_only'] ) {
- $args['class'] .= ' variations-only';
- }
-
- // 'all' gets created as an option if passed via the `selected` argument.
- if ( isset( $options['all'] ) ) {
- unset( $options['all'] );
- }
-
- $output = $this->select( array(
- 'name' => $args['name'],
- 'selected' => $args['selected'],
- 'id' => $args['id'],
- 'class' => $args['class'],
- 'options' => $options,
- 'chosen' => $args['chosen'],
- 'multiple' => $args['multiple'],
- 'placeholder' => $args['placeholder'],
- 'show_option_all' => isset( $args['show_option_all'] ) ? $args['show_option_all'] : false,
- 'show_option_none' => false,
- 'data' => $args['data'],
- 'required' => $args['required'],
- ) );
-
- return $output;
- }
-
- /**
- * Get EDD products for the product dropdown.
- *
- * @param array $args Parameters for the get_posts function.
- * @return array WP_Post[] Array of download objects.
- */
- public function get_products( $args = array() ) {
- $defaults = array(
- 'number' => 30,
- 'bundles' => true,
- );
-
- $args = wp_parse_args( $args, $defaults );
-
- $product_args = array(
- 'post_type' => 'download',
- 'orderby' => 'title',
- 'order' => 'ASC',
- 'posts_per_page' => $args['number'],
- );
-
- if ( ! current_user_can( 'edit_products' ) ) {
- $product_args['post_status'] = apply_filters( 'edd_product_dropdown_status_nopriv', array( 'publish' ) );
- } else {
- $product_args['post_status'] = apply_filters(
- 'edd_product_dropdown_status',
- array(
- 'publish',
- 'draft',
- 'private',
- 'future',
- )
- );
- }
-
- if ( is_array( $product_args['post_status'] ) ) {
-
- // Given the array, sanitize them.
- $product_args['post_status'] = array_map( 'sanitize_text_field', $product_args['post_status'] );
- } else {
-
- // If we didn't get an array, fallback to 'publish'.
- $product_args['post_status'] = array( 'publish' );
- }
-
- // Maybe disable bundles.
- if ( ! $args['bundles'] ) {
- $product_args['meta_query'] = array(
- 'relation' => 'OR',
- array(
- 'key' => '_edd_product_type',
- 'value' => 'bundle',
- 'compare' => '!=',
- ),
- array(
- 'key' => '_edd_product_type',
- 'value' => 'bundle',
- 'compare' => 'NOT EXISTS',
- ),
- );
- }
-
- $product_args = apply_filters( 'edd_product_dropdown_args', $product_args );
-
- return get_posts( $product_args );
- }
-
- /**
- * Renders an HTML Dropdown of all customers
- *
- * @since 2.2
- *
- * @param array $args
- *
- * @return string $output Customer dropdown
- */
- public function customer_dropdown( $args = array() ) {
- $defaults = array(
- 'name' => 'customers',
- 'id' => 'customers',
- 'class' => '',
- 'multiple' => false,
- 'selected' => 0,
- 'chosen' => true,
- 'placeholder' => __( 'Choose a Customer', 'easy-digital-downloads' ),
- 'number' => 30,
- 'data' => array(
- 'search-type' => 'customer',
- 'search-placeholder' => __( 'Search Customers', 'easy-digital-downloads' ),
- ),
- 'none_selected' => __( 'No customer attached', 'easy-digital-downloads' ),
- 'required' => false,
- );
-
- $args = wp_parse_args( $args, $defaults );
-
- $customers = edd_get_customers( array(
- 'number' => $args['number'],
- ) );
-
- $options = array();
-
- if ( $customers ) {
- $options[0] = $args['none_selected'];
- foreach ( $customers as $customer ) {
- $options[ absint( $customer->id ) ] = esc_html( $customer->name . ' (' . $customer->email . ')' );
- }
- } else {
- $options[0] = __( 'No customers found', 'easy-digital-downloads' );
- }
-
- if ( ! empty( $args['selected'] ) ) {
-
- // If a selected customer has been specified, we need to ensure it's in the initial list of customers displayed
- if ( ! array_key_exists( $args['selected'], $options ) ) {
- $customer = new EDD_Customer( $args['selected'] );
-
- if ( $customer ) {
- $options[ absint( $args['selected'] ) ] = esc_html( $customer->name . ' (' . $customer->email . ')' );
- }
- }
- }
-
- $output = $this->select( array(
- 'name' => $args['name'],
- 'selected' => $args['selected'],
- 'id' => $args['id'],
- 'class' => $args['class'] . ' edd-customer-select',
- 'options' => $options,
- 'multiple' => $args['multiple'],
- 'placeholder' => $args['placeholder'],
- 'chosen' => $args['chosen'],
- 'show_option_all' => false,
- 'show_option_none' => false,
- 'data' => $args['data'],
- 'required' => $args['required'],
- ) );
-
- return $output;
- }
-
- /**
- * Renders an HTML Dropdown of all the Users
- *
- * @since 2.6.9
- *
- * @param array $args
- *
- * @return string $output User dropdown
- */
- public function user_dropdown( $args = array() ) {
- $defaults = array(
- 'name' => 'users',
- 'id' => 'users',
- 'class' => '',
- 'multiple' => false,
- 'selected' => 0,
- 'chosen' => true,
- 'placeholder' => __( 'Select a User', 'easy-digital-downloads' ),
- 'number' => 30,
- 'data' => array(
- 'search-type' => 'user',
- 'search-placeholder' => __( 'Search Users', 'easy-digital-downloads' ),
- ),
- 'required' => false,
- );
-
- $args = wp_parse_args( $args, $defaults );
-
- $user_args = array(
- 'number' => $args['number'],
- );
- $users = get_users( $user_args );
- $options = array();
-
- if ( $users ) {
- foreach ( $users as $user ) {
- $options[ $user->ID ] = esc_html( $user->display_name );
- }
- } else {
- $options[0] = __( 'No users found', 'easy-digital-downloads' );
- }
-
- $selected = $args['selected'];
- if ( ! is_array( $selected ) ) {
- $selected = array( $selected );
- }
- // If a selected user has been specified, we need to ensure it's in the initial list of user displayed
- if ( ! empty( $selected ) ) {
- foreach ( $selected as $selected_user ) {
- if ( ! array_key_exists( $selected_user, $options ) ) {
- $user = get_userdata( $selected_user );
-
- if ( $user ) {
- $options[ absint( $user->ID ) ] = esc_html( $user->display_name );
- }
- }
- }
- }
-
- $output = $this->select( array(
- 'name' => $args['name'],
- 'selected' => $args['selected'],
- 'id' => $args['id'],
- 'class' => $args['class'] . ' edd-user-select',
- 'options' => $options,
- 'multiple' => $args['multiple'],
- 'placeholder' => $args['placeholder'],
- 'chosen' => $args['chosen'],
- 'show_option_all' => false,
- 'show_option_none' => false,
- 'data' => $args['data'],
- 'required' => $args['required'],
- ) );
-
- return $output;
- }
-
- /**
- * Renders an HTML Dropdown of all the Discounts
- *
- * @since 1.5.2
- * @since 3.0 Allow $args to be passed.
- *
- * @param string $name Name attribute of the dropdown.
- * @param int $selected Discount to select automatically.
- * @param string $status Discount post_status to retrieve.
- *
- * @return string $output Discount dropdown
- */
- public function discount_dropdown( $name = 'edd_discounts', $selected = 0, $status = '' ) {
- $defaults = array(
- 'name' => 'discounts',
- 'id' => 'discounts',
- 'class' => '',
- 'multiple' => false,
- 'selected' => 0,
- 'chosen' => true,
- 'placeholder' => __( 'Choose a Discount', 'easy-digital-downloads' ),
- 'show_option_all' => __( 'All Discounts', 'easy-digital-downloads' ),
- 'number' => 30,
- 'data' => array(
- 'search-type' => 'discount',
- 'search-placeholder' => __( 'Search Discounts', 'easy-digital-downloads' ),
- ),
- 'required' => false,
- );
-
- $args = func_get_args();
-
- if ( 1 === func_num_args() && is_array( $args[0] ) ) {
- $args = wp_parse_args( $args[0], $defaults );
- } else {
- $args = wp_parse_args( array(
- 'name' => $name,
- 'selected' => $selected,
- 'nopaging' => true,
- ), $defaults );
- }
-
- $discount_args = array(
- 'number' => $args['number'],
- );
-
- if ( ! empty( $status ) ) {
- $discount_args['status'] = $status;
- }
-
- $discounts = edd_get_discounts( $discount_args );
- $options = array();
-
- if ( $discounts ) {
- foreach ( $discounts as $discount ) {
- $options[ absint( $discount->id ) ] = esc_html( $discount->name );
- }
- } else {
- $options[0] = __( 'No discounts found', 'easy-digital-downloads' );
- }
-
- $output = $this->select( array(
- 'name' => $args['name'],
- 'selected' => $args['selected'],
- 'id' => $args['id'],
- 'class' => $args['class'] . ' edd-user-select',
- 'options' => $options,
- 'multiple' => $args['multiple'],
- 'placeholder' => $args['placeholder'],
- 'chosen' => $args['chosen'],
- 'show_option_all' => $args['show_option_all'],
- 'show_option_none' => false,
- 'required' => $args['required'],
- ) );
-
- return $output;
- }
-
- /**
- * Renders an HTML Dropdown of all the Categories
- *
- * @since 1.5.2
- *
- * @param string $name Name attribute of the dropdown
- * @param int $selected Category to select automatically
- *
- * @return string $output Category dropdown
- */
- public function category_dropdown( $name = 'edd_categories', $selected = 0 ) {
- $categories = get_terms( 'download_category', apply_filters( 'edd_category_dropdown', array() ) );
- $options = array();
-
- foreach ( $categories as $category ) {
- $options[ absint( $category->term_id ) ] = esc_html( $category->name );
- }
-
- $category_labels = edd_get_taxonomy_labels( 'download_category' );
- $output = $this->select( array(
- 'name' => $name,
- 'selected' => $selected,
- 'options' => $options,
- 'show_option_all' => sprintf( _x( 'All %s', 'plural: Example: "All Categories"', 'easy-digital-downloads' ), $category_labels['name'] ),
- 'show_option_none' => false,
- ) );
-
- return $output;
- }
-
- /**
- * Renders an HTML Dropdown of years
- *
- * @since 1.5.2
- *
- * @param string $name Name attribute of the dropdown.
- * @param int $selected Year to select automatically.
- * @param int $years_before Number of years before the current year the dropdown should start with.
- * @param int $years_after Number of years after the current year the dropdown should finish at.
- * @param string $id A unique identifier for the field.
- * @return string $output Year dropdown
- */
- public function year_dropdown( $name = 'year', $selected = 0, $years_before = 5, $years_after = 0, $id = 'edd_year_select' ) {
- $current = date( 'Y' );
- $start_year = $current - absint( $years_before );
- $end_year = $current + absint( $years_after );
- $selected = empty( $selected ) ? date( 'Y' ) : $selected;
- $options = array();
-
- while ( $start_year <= $end_year ) {
- $options[ absint( $start_year ) ] = $start_year;
- $start_year ++;
- }
-
- $output = $this->select(
- array(
- 'name' => $name,
- 'id' => $id . '_' . $name,
- 'selected' => $selected,
- 'options' => $options,
- 'show_option_all' => false,
- 'show_option_none' => false,
- )
- );
-
- return $output;
- }
-
- /**
- * Renders an HTML Dropdown of months
- *
- * @since 1.5.2
- *
- * @param string $name Name attribute of the dropdown.
- * @param int $selected Month to select automatically.
- * @param string $id A unique identifier for the field.
- * @param boolean $return_long_name Whether to use the long name for the month.
- *
- * @return string $output Month dropdown
- */
- public function month_dropdown( $name = 'month', $selected = 0, $id = 'edd_month_select', $return_long_name = false ) {
- $month = 1;
- $options = array();
- $selected = empty( $selected ) ? date( 'n' ) : $selected;
-
- while ( $month <= 12 ) {
- $options[ absint( $month ) ] = edd_month_num_to_name( $month, $return_long_name );
- $month ++;
- }
-
- $output = $this->select(
- array(
- 'name' => $name,
- 'id' => $id . '_' . $name,
- 'selected' => $selected,
- 'options' => $options,
- 'show_option_all' => false,
- 'show_option_none' => false,
- )
- );
-
- return $output;
- }
-
- /**
- * Gets the countries dropdown.
- *
- * @since 3.0
- * @param array $args The array of parameters passed to the method
- * @param string $country The selected country
- * @return string
- */
- public function country_select( $args = array(), $country = '' ) {
- $args = wp_parse_args(
- $args,
- array(
- 'name' => 'edd_countries',
- 'class' => 'edd_countries_filter',
- 'options' => edd_get_country_list(),
- 'chosen' => true,
- 'selected' => $country,
- 'show_option_none' => false,
- 'placeholder' => __( 'Choose a Country', 'easy-digital-downloads' ),
- 'show_option_all' => __( 'All Countries', 'easy-digital-downloads' ),
- 'data' => array(
- 'nonce' => wp_create_nonce( 'edd-country-field-nonce' ),
- ),
- 'required' => false,
- )
- );
-
- if ( false === strpos( $args['class'], 'edd_countries_filter' ) ) {
- $args['class'] .= ' edd_countries_filter';
- }
-
- return $this->select( $args );
- }
-
- /**
- * Gets the regions dropdown.
- *
- * @since 3.0
- * @param array $args The array of parameters passed to the method
- * @param string $country The country from which to populate the regions
- * @param string $region The selected region
- * @return string
- */
- public function region_select( $args = array(), $country = '', $region = '' ) {
- if ( ! $country ) {
- $country = edd_get_shop_country();
- }
- $args = wp_parse_args(
- $args,
- array(
- 'name' => 'edd_regions',
- 'class' => 'edd_regions_filter',
- 'options' => edd_get_shop_states( $country ),
- 'chosen' => true,
- 'selected' => $region,
- 'show_option_none' => false,
- 'placeholder' => __( 'Choose a Region', 'easy-digital-downloads' ),
- 'show_option_all' => __( 'All Regions', 'easy-digital-downloads' ),
- 'required' => false,
- )
- );
-
- if ( false === strpos( $args['class'], 'edd_regions_filter' ) ) {
- $args['class'] .= ' edd_regions_filter';
- }
-
- return $this->select( $args );
- }
-
- /**
- * Renders an HTML Dropdown
- *
- * @since 1.6
- *
- * @param array $args
- *
- * @return string
- */
- public function select( $args = array() ) {
-
- $args = wp_parse_args( $args, array(
- 'options' => array(),
- 'name' => null,
- 'class' => '',
- 'id' => '',
- 'selected' => 0,
- 'chosen' => false,
- 'placeholder' => null,
- 'multiple' => false,
- 'show_option_all' => _x( 'All', 'all dropdown items', 'easy-digital-downloads' ),
- 'show_option_none' => _x( 'None', 'no dropdown items', 'easy-digital-downloads' ),
- 'data' => array(),
- 'readonly' => false,
- 'disabled' => false,
- 'required' => false,
- ) );
-
- $data_elements = '';
- foreach ( $args['data'] as $key => $value ) {
- $data_elements .= ' data-' . esc_attr( $key ) . '="' . esc_attr( $value ) . '"';
- }
-
- if ( $args['multiple'] ) {
- $multiple = ' MULTIPLE';
- } else {
- $multiple = '';
- }
-
- if ( $args['chosen'] ) {
- $args['class'] .= ' edd-select-chosen';
- if ( is_rtl() ) {
- $args['class'] .= ' chosen-rtl';
- }
- }
-
- if ( $args['placeholder'] ) {
- $placeholder = $args['placeholder'];
- } else {
- $placeholder = '';
- }
-
- if ( isset( $args['readonly'] ) && $args['readonly'] ) {
- $readonly = ' readonly="readonly"';
- } else {
- $readonly = '';
- }
-
- if ( isset( $args['disabled'] ) && $args['disabled'] ) {
- $disabled = ' disabled="disabled"';
- } else {
- $disabled = '';
- }
-
- $required = '';
- if ( ! empty( $args['required'] ) ) {
- $required = ' required';
- }
-
- $class = implode( ' ', array_map( 'esc_attr', explode( ' ', $args['class'] ) ) );
- $output = '';
-
- return $output;
- }
-
- /**
- * Renders an HTML Checkbox
- *
- * @since 1.9
- * @since 3.0 Added `label` argument.
- *
- * @param array $args
- *
- * @return string Checkbox HTML code
- */
- public function checkbox( $args = array() ) {
- $defaults = array(
- 'name' => null,
- 'current' => null,
- 'class' => 'edd-checkbox',
- 'options' => array(
- 'disabled' => false,
- 'readonly' => false,
- ),
- 'label' => '',
- 'value' => null,
- );
-
- $args = wp_parse_args( $args, $defaults );
-
- $classes = explode( ' ', $args['class'] );
- $classes[] = $args['name'];
- $class = implode( ' ', array_map( 'sanitize_html_class', array_unique( array_filter( $classes ) ) ) );
-
- $options = '';
- if ( ! empty( $args['options']['disabled'] ) ) {
- $options .= ' disabled="disabled"';
- } elseif ( ! empty( $args['options']['readonly'] ) ) {
- $options .= ' readonly';
- }
-
- $value = '';
- if ( ! empty( $args['value'] ) ) {
- $value .= ' value="' . esc_attr( $args['value'] ) . '"';
- }
-
- // Checked could mean 'on' or 1 or true, so sanitize it for checked()
- $to_check = ! empty( $args['current'] );
- $checked = checked( true, $to_check, false );
-
- // Get the HTML to output
- $output = '';
-
- if ( ! empty( $args['label'] ) ) {
- $output .= '';
- }
-
- return $output;
- }
-
- /**
- * Renders an HTML Text field
- *
- * @since 1.5.2
- *
- * @param array $args Arguments for the text field
- *
- * @return string Text field
- */
- public function text( $args = array() ) {
- // Backwards compatibility
- if ( func_num_args() > 1 ) {
- $args = func_get_args();
-
- $name = $args[0];
- $value = isset( $args[1] ) ? $args[1] : '';
- $label = isset( $args[2] ) ? $args[2] : '';
- $desc = isset( $args[3] ) ? $args[3] : '';
- }
-
- $defaults = array(
- 'id' => '',
- 'name' => isset( $name ) ? $name : 'text',
- 'value' => isset( $value ) ? $value : null,
- 'label' => isset( $label ) ? $label : null,
- 'desc' => isset( $desc ) ? $desc : null,
- 'placeholder' => '',
- 'class' => 'regular-text',
- 'disabled' => false,
- 'autocomplete' => '',
- 'data' => false,
- 'required' => false,
- );
-
- $args = wp_parse_args( $args, $defaults );
-
- $class = implode( ' ', array_map( 'sanitize_html_class', explode( ' ', $args['class'] ) ) );
- $disabled = '';
- if ( $args['disabled'] ) {
- $disabled = ' disabled="disabled"';
- }
-
- $required = '';
- if ( ! empty( $args['required'] ) ) {
- $required = ' required';
- }
-
- $data = '';
- if ( ! empty( $args['data'] ) ) {
- foreach ( $args['data'] as $key => $value ) {
- $data .= 'data-' . edd_sanitize_key( $key ) . '="' . esc_attr( $value ) . '" ';
- }
- }
-
- $output = '';
- if ( ! empty( $args['label'] ) ) {
- $output .= '';
- }
-
- if ( ! empty( $args['desc'] ) ) {
- $output .= '' . esc_html( $args['desc'] ) . '';
- }
-
- $output .= '';
-
- $output .= '';
-
- return $output;
- }
-
- /**
- * Renders a date picker
- *
- * @since 2.4
- *
- * @param array $args Arguments for the text field
- *
- * @return string Datepicker field
- */
- public function date_field( $args = array() ) {
-
- if ( empty( $args['class'] ) ) {
- $args['class'] = 'edd_datepicker';
- $args['data']['format'] = edd_get_date_picker_format();
-
- } elseif ( ! strpos( $args['class'], 'edd_datepicker' ) ) {
- $args['class'] .= ' edd_datepicker';
- $args['data']['format'] = edd_get_date_picker_format();
- }
-
- return $this->text( $args );
- }
-
- /**
- * Renders an HTML textarea
- *
- * @since 1.9
- *
- * @param array $args Arguments for the textarea
- *
- * @return string textarea
- */
- public function textarea( $args = array() ) {
- $defaults = array(
- 'name' => 'textarea',
- 'value' => null,
- 'label' => null,
- 'desc' => null,
- 'class' => 'large-text',
- 'disabled' => false,
- );
-
- $args = wp_parse_args( $args, $defaults );
-
- $class = implode( ' ', array_map( 'sanitize_html_class', explode( ' ', $args['class'] ) ) );
- $disabled = '';
- if ( $args['disabled'] ) {
- $disabled = ' disabled="disabled"';
- }
-
- $output = '';
-
- if ( ! empty( $args['label'] ) ) {
- $output .= '';
- }
-
- $output .= '';
-
- if ( ! empty( $args['desc'] ) ) {
- $output .= '' . esc_html( $args['desc'] ) . '';
- }
-
- $output .= '';
-
- return $output;
- }
-
- /**
- * Renders an ajax user search field
- *
- * @since 2.0
- *
- * @param array $args
- *
- * @return string text field with ajax search
- */
- public function ajax_user_search( $args = array() ) {
-
- // Parse args
- $args = wp_parse_args( $args, array(
- 'id' => 'user_id',
- 'name' => 'user_id',
- 'value' => null,
- 'placeholder' => __( 'Enter Username', 'easy-digital-downloads' ),
- 'label' => null,
- 'desc' => null,
- 'class' => 'edd-user-dropdown',
- 'disabled' => false,
- 'autocomplete' => 'off',
- 'data' => false,
- ) );
-
- // Setup the AJAX class
- $args['class'] = 'edd-ajax-user-search ' . sanitize_html_class( $args['class'] );
-
- // Concatenate output
- $output = '';
- $output .= $this->text( $args );
- $output .= '';
- $output .= '';
- $output .= '';
-
- return $output;
- }
-
- /**
- * Show a required indicator on a field.
- *
- * @return string
- */
- public function show_required() {
-
- $output = '*';
- $output .= sprintf( '%s', __( 'Required', 'easy-digital-downloads' ) );
-
- return $output;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/class-edd-license-handler.php b/wp-content/plugins/easy-digital-downloads/includes/class-edd-license-handler.php
deleted file mode 100644
index 450b8e40..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/class-edd-license-handler.php
+++ /dev/null
@@ -1,523 +0,0 @@
-file = $_file;
- $this->item_name = $_item_name;
-
- if ( is_numeric( $_item_id ) ) {
- $this->item_id = absint( $_item_id );
- }
-
- $this->item_shortname = 'edd_' . preg_replace( '/[^a-zA-Z0-9_\s]/', '', str_replace( ' ', '_', strtolower( $this->item_name ) ) );
- $this->version = $_version;
- $this->edd_license = new License( $this->item_name, $_optname );
- if ( empty( $_api_url ) && ( empty( $this->edd_license->key ) || empty( $this->edd_license->license ) ) ) {
- $pro_license = new License( 'pro' );
- if ( ! empty( $pro_license->key ) ) {
- $this->is_pro_license = true;
- $this->edd_license = $pro_license;
- }
- }
- $this->license = $this->edd_license->key;
- $this->author = $_author;
- $this->api_handler = new API( $_api_url );
- $this->api_url = $_api_url;
- $this->pass_manager = new \EDD\Admin\Pass_Manager();
-
- // Setup hooks
- $this->hooks();
-
- /**
- * Maintain an array of active, licensed plugins that have a license key entered.
- * This is to help us more easily determine if the site has a license key entered
- * at all. Initializing it this way helps us limit the data to activated plugins only.
- * If we relied on the options table (`edd_%_license_active`) then we could accidentally
- * be picking up plugins that have since been deactivated.
- *
- * @see \EDD\Admin\Promos\Notices\License_Upgrade_Notice::__construct()
- */
- if ( is_null( $this->api_url ) ) {
- global $edd_licensed_products;
- if ( ! is_array( $edd_licensed_products ) ) {
- $edd_licensed_products = array();
- }
- $edd_licensed_products[ $this->item_shortname ] = (int) (bool) ( $this->license && empty( $this->edd_license->error ) );
- }
- }
-
- /**
- * Include the updater class
- *
- * @access private
- * @return void
- */
- private function includes() {}
-
- /**
- * Setup hooks
- *
- * @access private
- * @return void
- */
- private function hooks() {
-
- // Register settings
- add_filter( 'edd_settings_licenses', array( $this, 'settings' ) );
-
- // Check that license is valid once per week
- add_action( 'edd_weekly_scheduled_events', array( $this, 'weekly_license_check' ) );
-
- // For testing license notices, uncomment this line to force checks on every page load
- //add_action( 'admin_init', array( $this, 'weekly_license_check' ) );
-
- // Updater
- add_action( 'init', array( $this, 'auto_updater' ) );
-
- // Display notices to admins
- add_action( 'admin_notices', array( $this, 'notices' ) );
-
- add_action( 'in_plugin_update_message-' . plugin_basename( $this->file ), array( $this, 'plugin_row_license_missing' ), 10, 2 );
-
- // Register plugins for beta support
- add_filter( 'edd_beta_enabled_extensions', array( $this, 'register_beta_support' ) );
-
- // Add the EDD version to the API parameters.
- add_filter( 'edd_sl_plugin_updater_api_params', array( $this, 'filter_sl_api_params' ), 10, 3 );
-
- // Fix missing Stripe keys due to option name change.
- add_action( 'admin_init', array( $this, 'fix_stripe_key' ) );
- }
-
- /**
- * Auto updater
- *
- * @access private
- * @return void
- */
- public function auto_updater() {
-
- $doing_cron = defined( 'DOING_CRON' ) && DOING_CRON;
- if ( ! current_user_can( 'manage_options' ) && ! $doing_cron ) {
- return;
- }
-
- $license = $this->license;
- // Fall back to the highest license key if one is not saved for this extension or there isn't a pro license.
- if ( empty( $license ) && empty( $this->api_url ) ) {
- if ( $this->pass_manager->highest_license_key ) {
- $license = $this->pass_manager->highest_license_key;
- }
- }
-
- // Don't check for updates if there isn't a license key.
- if ( empty( $license ) ) {
- return;
- }
-
- $args = array(
- 'version' => $this->version,
- 'license' => $license,
- 'author' => $this->author,
- 'beta' => function_exists( 'edd_extension_has_beta_support' ) && edd_extension_has_beta_support( $this->item_shortname ),
- );
-
- if ( ! empty( $this->item_id ) ) {
- $args['item_id'] = $this->item_id;
- } else {
- $args['item_name'] = $this->item_name;
- }
-
- if ( ! class_exists( 'EDD_SL_Plugin_Updater' ) ) {
- require_once 'EDD_SL_Plugin_Updater.php';
- }
-
- // Setup the updater
- new EDD_SL_Plugin_Updater(
- is_null( $this->api_url ) ? $this->api_handler->get_url() : $this->api_url,
- $this->file,
- $args
- );
- }
-
- /**
- * Add license field to settings
- *
- * @param array $settings
- * @return array
- */
- public function settings( $settings ) {
- return array_merge( $settings, array(
- array(
- 'id' => $this->item_shortname . '_license_key',
- 'name' => $this->item_name,
- 'desc' => '',
- 'type' => 'license_key',
- 'options' => array(
- 'is_valid_license_option' => $this->item_shortname . '_license_active',
- 'item_id' => $this->item_id,
- 'api_url' => $this->api_url,
- 'file' => $this->file,
- ),
- 'size' => 'regular',
- )
- ) );
- }
-
- /**
- * Check if license key is valid once per week
- *
- * @since 2.5
- * @return void
- */
- public function weekly_license_check() {
-
- // If a pro license is active, that license check is handled separately.
- if ( $this->is_pro_license && empty( $this->api_url ) ) {
- return;
- }
-
- // Don't fire when saving settings.
- if ( ! empty( $_POST['edd_settings'] ) ) {
- return;
- }
-
- if ( empty( $this->license ) ) {
- return;
- }
-
- // data to send in our API request
- $api_params = array(
- 'edd_action' => 'check_license',
- 'license' => $this->license,
- 'item_name' => urlencode( $this->item_name ),
- );
-
- if ( ! empty( $this->item_id ) ) {
- $api_params['item_id'] = $this->item_id;
- }
-
- $license_data = $this->api_handler->make_request( $api_params );
- if ( ! $license_data ) {
- return false;
- }
-
- if ( empty( $this->api_url ) ) {
- $this->pass_manager->maybe_set_pass_flag( $this->license, $license_data );
- }
- $this->edd_license->save( $license_data );
- }
-
- /**
- * Admin notices for errors
- *
- * @return void
- */
- public function notices() {
- if ( empty( $this->license ) ) {
- return;
- }
-
- if ( ! current_user_can( 'manage_shop_settings' ) ) {
- return;
- }
-
- if ( ! empty( $_GET['tab'] ) && 'licenses' === $_GET['tab'] ) {
- return;
- }
-
- if ( ( empty( $this->edd_license->license ) || 'valid' !== $this->edd_license->license ) ) {
-
- EDD()->notices->add_notice(
- array(
- 'id' => 'edd-missing-license',
- 'class' => "error {$this->item_shortname}-license-error",
- 'message' => sprintf(
- /* translators: 1. opening anchor tag; 2. closing anchor tag */
- __( 'You have invalid or expired license keys for Easy Digital Downloads. %1$sActivate License(s)%2$s', 'easy-digital-downloads' ),
- '',
- ''
- ),
- 'is_dismissible' => false,
- )
- );
- }
- }
-
- /**
- * Displays message inline on plugin row that the license key is missing
- *
- * @since 2.5
- * @return void
- */
- public function plugin_row_license_missing( $plugin_data, $version_info ) {
- static $showed_imissing_key_message = array();
-
- $license = $this->edd_license;
-
- if ( ( empty( $license->license ) || 'valid' !== $license->license ) && empty( $showed_imissing_key_message[ $this->item_shortname ] ) ) {
- echo ' ' . __( 'Enter valid license key for automatic updates.', 'easy-digital-downloads' ) . '';
- $showed_imissing_key_message[ $this->item_shortname ] = true;
- }
-
- }
-
- /**
- * Adds this plugin to the beta page
- *
- * @param array $products
- * @since 2.6.11
- * @return void
- */
- public function register_beta_support( $products ) {
- $products[ $this->item_shortname ] = $this->item_name;
-
- return $products;
- }
-
- /**
- * Adds the EDD version to the API parameters.
- *
- * @since 2.11
- * @param array $api_params The array of parameters sent in the API request.
- * @param array $api_data The array of API data defined when instantiating the class.
- * @param string $plugin_file The path to the plugin file.
- * @return array
- */
- public function filter_sl_api_params( $api_params, $api_data, $plugin_file ) {
-
- if ( $this->file === $plugin_file ) {
- $api_params['easy-digital-downloads_version'] = defined( 'EDD_VERSION' ) ? EDD_VERSION : '';
- }
-
- return $api_params;
- }
-
- /**
- * If the original Stripe gateway key is set and the new one is not,
- * update the license key to fix automatic updates.
- *
- * @since 3.0.4
- * @return void
- */
- public function fix_stripe_key() {
- $license_key = edd_get_option( 'edd_stripe_pro_payment_gateway_license_key' );
- if ( $license_key ) {
- return;
- }
- $old_key = edd_get_option( 'edd_stripe_payment_gateway_license_key' );
- if ( $old_key ) {
- edd_update_option( 'edd_stripe_pro_payment_gateway_license_key', sanitize_text_field( $old_key ) );
- edd_delete_option( 'edd_stripe_payment_gateway_license_key' );
- }
-
- $old_license_status = get_option( 'edd_stripe_payment_gateway_license_key_active' );
- if ( $old_license_status ) {
- update_option( 'edd_stripe_pro_payment_gateway_license_key_active', santize_text_field( $old_license_status ) );
- delete_option( 'edd_stripe_payment_gateway_license_key_active' );
- }
- }
-
- /**
- * Activate the license key.
- *
- * @deprecated 3.1.1
- * @return void
- */
- public function activate_license() {
-
- if ( ! isset( $_POST['edd_settings'] ) ) {
- return;
- }
-
- if ( ! isset( $_REQUEST[ $this->item_shortname . '_license_key-nonce'] ) || ! wp_verify_nonce( $_REQUEST[ $this->item_shortname . '_license_key-nonce'], $this->item_shortname . '_license_key-nonce' ) ) {
- return;
- }
-
- if ( ! current_user_can( 'manage_shop_settings' ) ) {
- return;
- }
-
- if ( empty( $_POST['edd_settings'][ $this->item_shortname . '_license_key'] ) ) {
- delete_option( $this->item_shortname . '_license_active' );
- return;
- }
-
- foreach ( $_POST as $key => $value ) {
- if ( false !== strpos( $key, 'license_key_deactivate' ) ) {
- // Don't activate a key when deactivating a different key
- return;
- }
- }
-
- if ( 'valid' === $this->edd_license->license ) {
- return;
- }
-
- $license = sanitize_text_field( $_POST['edd_settings'][ $this->item_shortname . '_license_key' ] );
-
- if ( empty( $license ) ) {
- return;
- }
-
- // Data to send to the API
- $api_params = array(
- 'edd_action' => 'activate_license',
- 'license' => $license,
- 'item_name' => urlencode( $this->item_name ),
- 'url' => home_url()
- );
-
- if ( ! empty( $this->item_id ) ) {
- $api_params['item_id'] = $this->item_id;
- }
-
- // Call the API
- $license_data = $this->api_handler->make_request( $api_params );
-
- // Make sure there are no errors
- if ( ! $license_data ) {
- return;
- }
-
- // Tell WordPress to look for updates
- set_site_transient( 'update_plugins', null );
-
- $this->pass_manager->maybe_set_pass_flag( $license, $license_data );
-
- // Clear the option for licensed extensions to force regeneration.
- if ( ! empty( $license_data->license ) && 'valid' === $license_data->license ) {
- delete_option( 'edd_licensed_extensions' );
- }
-
- $this->edd_license->save( $license_data );
- }
-
- /**
- * Deactivate the license key
- *
- * @deprecated 3.1.1
- * @return void
- */
- public function deactivate_license() {
-
- if ( ! isset( $_POST['edd_settings'] ) ) {
- return;
- }
-
- if ( ! isset( $_POST['edd_settings'][ $this->item_shortname . '_license_key'] ) ) {
- return;
- }
-
- if ( ! wp_verify_nonce( $_REQUEST[ $this->item_shortname . '_license_key-nonce'], $this->item_shortname . '_license_key-nonce' ) ) {
- wp_die( __( 'Nonce verification failed', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) );
- }
-
- if ( ! current_user_can( 'manage_shop_settings' ) ) {
- return;
- }
-
- // Run on deactivate button press
- if ( isset( $_POST[ $this->item_shortname . '_license_key_deactivate'] ) ) {
-
- // Data to send to the API
- $api_params = array(
- 'edd_action' => 'deactivate_license',
- 'license' => $this->license,
- 'item_name' => urlencode( $this->item_name ),
- 'url' => home_url()
- );
-
- if ( ! empty( $this->item_id ) ) {
- $api_params['item_id'] = $this->item_id;
- }
-
- // Call the API
- $response = $this->api_handler->make_request( $api_params );
-
- // Make sure there are no errors
- if ( ! $response ) {
- return;
- }
-
- $this->pass_manager->maybe_remove_pass_flag( $this->license );
-
- delete_option( $this->item_shortname . '_license_active' );
- }
- }
-
- /**
- * Display help text at the top of the Licenses tag
- *
- * @since 2.5
- * @deprecated 3.1.1.4
- * @param string $active_tab
- * @return void
- */
- public function license_help_text( $active_tab = '' ) {}
-}
-
-endif; // end class_exists check
diff --git a/wp-content/plugins/easy-digital-downloads/includes/class-edd-logging.php b/wp-content/plugins/easy-digital-downloads/includes/class-edd-logging.php
deleted file mode 100644
index 522a5009..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/class-edd-logging.php
+++ /dev/null
@@ -1,857 +0,0 @@
-log_types() );
- }
-
- /**
- * Create new log entry
- *
- * This is just a simple and fast way to log something. Use $this->insert_log()
- * if you need to store custom meta data
- *
- * @since 1.3.1
- *
- * @param string $title Log entry title.
- * @param string $message Log entry message.
- * @param int $parent Download ID.
- * @param string $type Log type (default: null).
- *
- * @return int ID of the newly created log item.
- */
- public function add( $title = '', $message = '', $parent = 0, $type = null ) {
- return $this->insert_log( array(
- 'post_title' => $title,
- 'post_content' => $message,
- 'post_parent' => $parent,
- 'log_type' => $type
- ) );
- }
-
- /**
- * Easily retrieves log items for a particular object ID.
- *
- * @since 1.3.1
- *
- * @param int $object_id Object ID (default: 0).
- * @param string $type Log type (default: null).
- * @param int $paged Page number (default: null).
- *
- * @return array Array of the connected logs.
- */
- public function get_logs( $object_id = 0, $type = null, $paged = null ) {
- return $this->get_connected_logs( array(
- 'post_parent' => $object_id,
- 'paged' => $paged,
- 'log_type' => $type
- ) );
- }
-
- /**
- * Stores a log entry.
- *
- * @since 1.3.1
- * @since 3.0 Updated to use the new database classes as part of the migration to custom tables.
- *
- * @param array $log_data Log entry data.
- * @param array $log_meta Log entry meta.
- * @return int The ID of the newly created log item.
- */
- public function insert_log( $log_data = array(), $log_meta = array() ) {
-
- // Parse args
- $args = wp_parse_args( $log_data, array(
- 'post_type' => 'edd_log',
- 'post_status' => 'publish',
- 'post_parent' => 0,
- 'post_content' => '',
- 'log_type' => false,
- ) );
-
- /**
- * Triggers just before a log is inserted.
- *
- * @param array $args Log entry data.
- * @param array $log_meta Log meta data.
- */
- do_action( 'edd_pre_insert_log', $args, $log_meta );
-
- // Used to dynamically dispatch the method call to insert() to the correct class.
- $insert_method = 'edd_add_log';
-
- // Set up variables to hold data to go into the logs table by default.
- $data = array(
- 'content' => $args['post_content'],
- 'object_id' => isset( $args['post_parent'] )
- ? $args['post_parent']
- : 0,
- 'object_type' => isset( $args['log_type'] )
- ? $args['log_type']
- : null,
- /*
- * Fallback user ID is the current user, due to it previously being set to that by WordPress
- * core when setting post_author on the CPT.
- */
- 'user_id' => ! empty( $log_meta['user'] ) ? $log_meta['user'] : get_current_user_id()
- );
-
- $type = $args['log_type'];
- if ( ! empty( $type ) ) {
- $data['type'] = $type;
- }
-
- if ( array_key_exists( 'post_title', $args ) ) {
- $data['title'] = $args['post_title'];
- }
-
- $meta_to_unset = array( 'user' );
-
- // Override $data and $insert_method based on the log type.
- if ( 'api_request' === $args['log_type'] ) {
- $insert_method = 'edd_add_api_request_log';
-
- $data = array(
- 'user_id' => ! empty( $log_meta['user'] ) ? $log_meta['user'] : 0,
- 'api_key' => ! empty( $log_meta['key'] ) ? $log_meta['key'] : 'public',
- 'token' => ! empty( $log_meta['token'] ) ? $log_meta['token'] : 'public',
- 'version' => ! empty( $log_meta['version'] ) ? $log_meta['version'] : '',
- 'request' => ! empty( $args['post_excerpt'] ) ? $args['post_excerpt'] : '',
- 'error' => ! empty( $args['post_content'] ) ? $args['post_content'] : '',
- 'ip' => ! empty( $log_meta['request_ip'] ) ? $log_meta['request_ip'] : '',
- 'time' => ! empty( $log_meta['time'] ) ? $log_meta['time'] : '',
- );
-
- $meta_to_unset = array( 'user', 'key', 'token', 'version', 'request_ip', 'time' );
- } elseif ( 'file_download' === $args['log_type'] ) {
- $insert_method = 'edd_add_file_download_log';
-
- if ( ! class_exists( 'Browser' ) ) {
- require_once EDD_PLUGIN_DIR . 'includes/libraries/browser.php';
- }
-
- $browser = new Browser();
-
- $user_agent = $browser->getBrowser() . ' ' . $browser->getVersion() . '/' . $browser->getPlatform();
-
- $data = array(
- 'product_id' => $args['post_parent'],
- 'file_id' => ! empty( $log_meta['file_id'] ) ? $log_meta['file_id'] : 0,
- 'order_id' => ! empty( $log_meta['payment_id'] ) ? $log_meta['payment_id'] : 0,
- 'price_id' => ! empty( $log_meta['price_id'] ) ? $log_meta['price_id'] : 0,
- 'customer_id' => ! empty( $log_meta['customer_id'] ) ? $log_meta['customer_id'] : 0,
- 'ip' => ! empty( $log_meta['ip'] ) ? $log_meta['ip'] : '',
- 'user_agent' => $user_agent,
- );
-
- $meta_to_unset = array( 'file_id', 'payment_id', 'price_id', 'customer_id', 'ip', 'user_id' );
- }
-
- // Now unset the meta we've used up in the main data array.
- foreach ( $meta_to_unset as $meta_key ) {
- unset( $log_meta[ $meta_key ] );
- }
-
- // Get the log ID if method is callable
- $log_id = is_callable( $insert_method )
- ? call_user_func( $insert_method, $data )
- : false;
-
- // Set log meta, if any
- if ( $log_id && ! empty( $log_meta ) ) {
-
- // Use the right log fetching function based on the type of log this is.
- if ( 'edd_add_api_request_log' === $insert_method ) {
- $add_meta_function = 'edd_add_api_request_log_meta';
- } elseif ( 'edd_add_file_download_log' === $insert_method ) {
- $add_meta_function = 'edd_add_file_download_log_meta';
- } else {
- $add_meta_function = 'edd_add_log_meta';
- }
-
- if ( is_callable( $add_meta_function ) ) {
- foreach ( (array) $log_meta as $key => $meta ) {
- $add_meta_function( $log_id, sanitize_key( $key ), $meta );
- }
- }
- }
-
- /**
- * Triggers after a log has been inserted.
- *
- * @param int $log_id ID of the new log.
- * @param array $args Log data.
- * @param array $log_meta Log meta data.
- */
- do_action( 'edd_post_insert_log', $log_id, $args, $log_meta );
-
- return $log_id;
- }
-
- /**
- * Update and existing log item
- *
- * @since 1.3.1
- * @since 3.0 - Added $log_id parameter and boolean return type.
- *
- * @param array $log_data Log entry data.
- * @param array $log_meta Log entry meta.
- * @param int $log_id Log ID.
- * @return bool True on success, false otherwise.
- */
- public function update_log( $log_data = array(), $log_meta = array(), $log_id = 0 ) {
- // $log_id is at the end because it was introduced in 3.0
- do_action( 'edd_pre_update_log', $log_data, $log_meta, $log_id );
-
- $defaults = array(
- 'post_content' => '',
- 'post_title' => '',
- 'object_id' => 0,
- 'object_type' => '',
- );
-
- $args = wp_parse_args( $log_data, $defaults );
-
- if ( isset( $args['ID'] ) && empty( $log_id ) ) {
- $log_id = $args['ID'];
- }
-
- // Bail if the log ID is still empty.
- if ( empty( $log_id ) ) {
- return false;
- }
-
- // Used to dynamically dispatch the method call to insert() to the correct class.
- $update_method = 'edd_update_log';
- $update_meta_function = 'edd_update_log_meta';
-
- $type = $args['log_type'];
- if ( ! empty( $type ) ) {
- $data['type'] = $args['log_type'];
- }
-
- $data = array(
- 'object_id' => $args['object_id'],
- 'object_type' => $args['object_type'],
- 'title' => $args['title'],
- 'message' => $args['message'],
- );
-
- if ( 'api_request' === $data['type'] ) {
- $update_meta_function = 'edd_update_api_request_log_meta';
- $legacy = array(
- 'user' => 'user_id',
- 'key' => 'api_key',
- 'token' => 'token',
- 'version' => 'version',
- 'post_excerpt' => 'request',
- 'post_content' => 'error',
- 'request_ip' => 'ip',
- 'time' => 'time',
- );
-
- foreach ( $legacy as $old_key => $new_key ) {
- if ( isset( $log_meta[ $old_key ] ) ) {
- $data[ $new_key ] = $log_meta[ $old_key ];
-
- unset( $log_meta[ $old_key ] );
- }
- }
- } elseif ( 'file_download' === $data['type'] ) {
- $update_meta_function = 'edd_update_file_download_log_meta';
- $legacy = array(
- 'file_id' => 'file_id',
- 'payment_id' => 'payment_id',
- 'price_id' => 'price_id',
- 'user_id' => 'user_id',
- 'ip' => 'ip',
- );
-
- foreach ( $legacy as $old_key => $new_key ) {
- if ( isset( $log_meta[ $old_key ] ) ) {
- $data[ $new_key ] = $log_meta[ $old_key ];
-
- unset( $log_meta[ $old_key ] );
- }
- }
-
- if ( isset( $args['post_parent'] ) ) {
- $data['download_id'] = $args['post_parent'];
- }
- }
-
- unset( $data['type'] );
-
- // Bail if not callable
- if ( ! is_callable( $update_method ) ) {
- return false;
- }
-
- call_user_func( $update_method, $data );
-
- // Set log meta, if any
- if ( is_callable( $update_meta_function ) ) {
- if ( 'edd_update_log' === $update_method && ! empty( $log_meta ) ) {
- foreach ( (array) $log_meta as $key => $meta ) {
- $update_meta_function( $log_id, sanitize_key( $key ), $meta );
- }
- }
- }
-
- do_action( 'edd_post_update_log', $log_id, $log_data, $log_meta );
- }
-
- /**
- * Retrieve all connected logs.
- *
- * Used for retrieving logs related to particular items, such as a specific purchase.
- *
- * @access public
- * @since 1.3.1
- *
- * @param array $args Query arguments.
- * @return mixed array Logs fetched, false otherwise.
- */
- public function get_connected_logs( $args = array() ) {
-
- $log_type = isset( $args['log_type'] )
- ? $args['log_type']
- : false;
-
- // Parse arguments
- $r = $this->parse_args( $args );
-
- // Used to dynamically dispatch the call to the correct class.
- $log_type = $this->get_log_table( $log_type );
- $func = "edd_get_{$log_type}";
- $logs = is_callable( $func )
- ? call_user_func( $func, $r )
- : false;
-
- // Return the logs (or false)
- return $logs;
- }
-
- /**
- * Retrieves number of log entries connected to particular object ID.
- *
- * @since 1.3.1
- * @since 1.9 - Added date query support.
- *
- * @param int $object_id Object ID (default: 0).
- * @param string $type Log type (default: null).
- * @param array $meta_query Log meta query (default: null).
- * @param array $date_query Log date query (default: null) [since 1.9].
- *
- * @return int Log count.
- */
- public function get_log_count( $object_id = 0, $type = null, $meta_query = null, $date_query = null ) {
- $r = array(
- $this->get_object_id_column_name_for_type( $type ) => $object_id,
- );
-
- if ( ! empty( $type ) && $this->valid_type( $type ) ) {
- $r['type'] = $type;
- }
-
- if ( ! empty( $meta_query ) ) {
- $r['meta_query'] = $meta_query;
- }
-
- if ( ! empty( $date_query ) ) {
- $r['date_query'] = $date_query;
- }
-
- // Used to dynamically dispatch the call to the correct class.
- $log_type = $this->get_log_table( $type );
-
- // Call the func, or not
- $func = "edd_count_{$log_type}";
- $count = is_callable( $func )
- ? call_user_func( $func, $r )
- : 0;
-
- return $count;
- }
-
- /**
- * Delete logs based on parameters passed.
- *
- * @since 1.3.1
- *
- * @param int $object_id Object ID (default: 0).
- * @param string $type Log type (default: null).
- * @param array $meta_query Log meta query (default: null).
- */
- public function delete_logs( $object_id = 0, $type = null, $meta_query = null ) {
- $r = array(
- $this->get_object_id_column_name_for_type( $type ) => $object_id,
- );
-
- if ( ! empty( $type ) && $this->valid_type( $type ) ) {
- $r['type'] = $type;
- }
-
- if ( ! empty( $meta_query ) ) {
- $r['meta_query'] = $meta_query;
- }
-
- // Used to dynamically dispatch the call to the correct class.
- $log_type = $this->get_log_table( $type );
-
- // Call the func, or not.
- $func = "edd_get_{$log_type}";
- $logs = is_callable( $func )
- ? call_user_func( $func, $r )
- : array();
-
- // Bail if no logs.
- if ( empty( $logs ) ) {
- return;
- }
-
- // Maybe bail if delete function does not exist.
- $func = rtrim( "edd_delete_{$log_type}", 's' );
- if ( ! is_callable( $func ) ) {
- return;
- }
-
- // Loop through and delete logs.
- foreach ( $logs as $log ) {
- call_user_func( $func, $log->id );
- }
- }
-
- /**
- * Get the new log type from the old type.
- *
- * @since 3.0
- *
- * @param string $type
- *
- * @return string
- */
- private function get_log_table( $type = '' ) {
- $retval = 'logs';
-
- if ( 'api_request' === $type ) {
- $retval = 'api_request_logs';
- } elseif ( 'file_download' === $type ) {
- $retval = 'file_download_logs';
- }
-
- return $retval;
- }
-
- /**
- * Parse arguments. Contains back-compat argument aliasing.
- *
- * @since 3.0
- *
- * @param array $args
- * @return array
- */
- private function parse_args( $args = array() ) {
-
- // Parse args
- $r = wp_parse_args( $args, array(
- 'log_type' => false,
- 'post_type' => 'edd_log',
- 'post_status' => 'publish',
- 'post_parent' => 0,
- 'posts_per_page' => 20,
- 'paged' => get_query_var( 'paged' ),
- 'orderby' => 'id',
- ) );
-
- // Back-compat for ID ordering
- if ( 'ID' === $r['orderby'] ) {
- $r['orderby'] = 'id';
- }
-
- // Back-compat for log_type
- if ( ! empty( $r['log_type'] ) ) {
- $r['type'] = $r['log_type'];
- }
-
- // Back-compat for post_parent.
- if ( ! empty( $r['post_parent'] ) ) {
- $type = ! empty( $r['log_type'] ) ? $r['log_type'] : '';
- $r[ $this->get_object_id_column_name_for_type( $type ) ] = $r['post_parent'];
- }
-
- // Back compat for posts_per_page
- $r['number'] = $r['posts_per_page'];
-
- // Unset old keys
- unset(
- $r['posts_per_page'],
- $r['post_parent'],
- $r['post_status'],
- $r['post_type'],
- $r['log_type']
- );
-
- if ( ! isset( $r['offset'] ) ) {
- $r['offset'] = $r['paged'] > 1
- ? ( ( $r['paged'] - 1 ) * $r['number'] )
- : 0;
- unset( $r['paged'] );
- }
-
- // Return parsed args
- return $r;
- }
-
- /**
- * Gets the object ID column name based on the log type.
- *
- * @since 3.1
- * @param string $type The log type.
- * @return string The column name to query for the object ID.
- */
- private function get_object_id_column_name_for_type( $type = '' ) {
-
- switch ( $type ) {
- case 'file_download':
- $object_id = 'product_id';
- break;
-
- case 'api_request':
- $object_id = 'user_id';
- break;
-
- default:
- $object_id = 'object_id';
- break;
- }
-
- return $object_id;
- }
-
- /** File System ***********************************************************/
-
- /**
- * Sets up the log file if it is writable
- *
- * @since 2.8.7
- * @return void
- */
- public function setup_log_file() {
- $this->init_fs();
-
- $upload_dir = wp_upload_dir();
- $this->filename = wp_hash( home_url( '/' ) ) . '-edd-debug.log';
- $this->file = trailingslashit( $upload_dir['basedir'] ) . $this->filename;
-
- if ( ! $this->get_fs()->is_writable( $upload_dir['basedir'] ) ) {
- $this->is_writable = false;
- }
- }
-
- /**
- * Initialize the WordPress file system
- *
- * @since 3.0
- *
- * @global WP_Filesystem_Base $wp_filesystem
- */
- private function init_fs() {
- global $wp_filesystem;
-
- if ( ! empty( $wp_filesystem ) ) {
- return;
- }
-
- // Include the file-system
- require_once ABSPATH . 'wp-admin/includes/file.php';
-
- // Initialize the file system
- WP_Filesystem();
- }
-
- /**
- * Get the WordPress file-system
- *
- * @since 3.0
- *
- * @return WP_Filesystem_Base
- */
- private function get_fs() {
- return ! empty( $GLOBALS['wp_filesystem'] )
- ? $GLOBALS['wp_filesystem']
- : false;
- }
-
- /**
- * Log message to file.
- *
- * @access public
- * @since 2.8.7
- *
- * @param string $message Message to insert in the log.
- */
- public function log_to_file( $message = '' ) {
- $message = date( 'Y-n-d H:i:s' ) . ' - ' . $message . "\r\n";
- $this->write_to_log( $message );
- }
-
- /**
- * Return the location of the log file that EDD_Logging will use.
- *
- * @since 2.9.1
- *
- * @return string
- */
- public function get_log_file_path() {
- return $this->file;
- }
-
- /**
- * Retrieve the log data.
- *
- * @access public
- * @since 2.8.7
- *
- * @return string Log data.
- */
- public function get_file_contents() {
- return $this->get_file();
- }
-
- /**
- * Retrieve the file data is written to
- *
- * @access protected
- * @since 2.8.7
- *
- * @return string File data.
- */
- protected function get_file() {
- $file = '';
-
- if ( $this->get_fs()->exists( $this->file ) ) {
- if ( ! $this->get_fs()->is_writable( $this->file ) ) {
- $this->is_writable = false;
- }
-
- $file = $this->get_fs()->get_contents( $this->file );
- } else {
- $this->get_fs()->put_contents( $this->file, '' );
- $this->get_fs()->chmod( $this->file, 0664 );
- }
-
- return $file;
- }
-
- /**
- * Write the log message.
- *
- * @access protected
- * @since 2.8.7
- */
- protected function write_to_log( $message = '' ) {
- file_put_contents( $this->file, $message, FILE_APPEND );
- }
-
- /**
- * Delete the log file or removes all contents in the log file if we cannot delete it.
- *
- * @access public
- * @since 2.8.7
- *
- * @return bool True if the log was cleared, false otherwise.
- */
- public function clear_log_file() {
- $this->get_fs()->delete( $this->file );
-
- if ( $this->get_fs()->exists( $this->file ) ) {
-
- // It's still there, so maybe server doesn't have delete rights
- $this->get_fs()->chmod( $this->file, 0664 );
- $this->get_fs()->delete( $this->file );
-
- // See if it's still there...
- if ( $this->get_fs()->exists( $this->file ) ) {
- $this->get_fs()->put_contents( $this->file, '' );
- }
- }
-
- $this->file = '';
- return true;
- }
-
- /** Deprecated ************************************************************/
-
- /**
- * Registers the edd_log post type.
- *
- * @since 1.3.1
- * @deprecated 3.0 Due to migration to custom tables.
- */
- public function register_post_type() {
- _edd_deprecated_function( __FUNCTION__, '3.0.0' );
- }
-
- /**
- * Register the log type taxonomy.
- *
- * @since 1.3.1
- * @deprecated 3.0 Due to migration to custom tables.
- */
- public function register_taxonomy() {
- _edd_deprecated_function( __FUNCTION__, '3.0.0' );
- }
-}
-
-/**
- * Helper method to insert a new log into the database.
- *
- * @since 1.3.3
- *
- * @see EDD_Logging::add()
- *
- * @param string $title Log title.
- * @param string $message Log message.
- * @param int $parent Download ID.
- * @param null $type Log type.
- *
- * @return int ID of the new log.
- */
-function edd_record_log( $title = '', $message = '', $parent = 0, $type = null ) {
- $edd_logs = EDD()->debug_log;
-
- return $edd_logs->add( $title, $message, $parent, $type );
-}
-
-/**
- * Logs a message to the debug log file.
- *
- * @since 2.8.7
- * @since 2.9.4 Added the 'force' option.
- *
- * @param string $message Log message.
- * @param bool $force Whether to force a log entry to be added. Default false.
- */
-function edd_debug_log( $message = '', $force = false ) {
- $edd_logs = EDD()->debug_log;
-
- if ( edd_is_debug_mode() || $force ) {
-
- if ( function_exists( 'mb_convert_encoding' ) ) {
-
- $message = mb_convert_encoding( $message, 'UTF-8' );
-
- }
-
- $edd_logs->log_to_file( $message );
- }
-}
-
-/**
- * Logs an exception to the debug log file.
- *
- * @since 3.0
- *
- * @param \Exception $exception Exception object.
- */
-function edd_debug_log_exception( $exception ) {
-
- $label = get_class( $exception );
-
- if ( $exception->getCode() ) {
-
- $message = sprintf( '%1$s: %2$s - %3$s',
- $label,
- $exception->getCode(),
- $exception->getMessage()
- );
-
- } else {
-
- $message = sprintf( '%1$s: %2$s',
- $label,
- $exception->getMessage()
- );
-
- }
-
- edd_debug_log( $message );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/class-edd-register-meta.php b/wp-content/plugins/easy-digital-downloads/includes/class-edd-register-meta.php
deleted file mode 100644
index 1e473357..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/class-edd-register-meta.php
+++ /dev/null
@@ -1,472 +0,0 @@
-hooks();
- }
-
- /**
- * Get the one true instance of EDD_Register_Meta.
- *
- * @since 2.5
- * @return $instance
- */
- static public function instance() {
-
- if ( !self::$instance ) {
- self::$instance = new EDD_Register_Meta();
- }
-
- return self::$instance;
-
- }
-
- /**
- * Register the hooks to kick off meta registration.
- *
- * @since 2.5
- * @return void
- */
- private function hooks() {
- add_action( 'init', array( $this, 'register_download_meta' ) );
- add_action( 'init', array( $this, 'register_payment_meta' ) );
- }
-
- /**
- * Register the meta for the download post type.
- *
- * @since 2.5
- * @return void
- */
- public function register_download_meta() {
- register_meta(
- 'post',
- '_edd_download_earnings',
- array(
- 'object_subtype' => 'download',
- 'sanitize_callback' => 'edd_sanitize_amount',
- 'type' => 'float',
- 'description' => __( 'The total earnings for the specified product', 'easy-digital-downloads' ),
- )
- );
-
- register_meta(
- 'post',
- '_edd_download_sales',
- array(
- 'object_subtype' => 'download',
- 'sanitize_callback' => array( $this, 'intval_wrapper' ),
- 'type' => 'float',
- 'description' => __( 'The number of sales for the specified product.', 'easy-digital-downloads' ),
- )
- );
-
- register_meta(
- 'post',
- 'edd_price',
- array(
- 'object_subtype' => 'download',
- 'sanitize_callback' => array( $this, 'sanitize_price' ),
- 'type' => 'float',
- 'description' => __( 'The price of the product.', 'easy-digital-downloads' ),
- 'show_in_rest' => true,
- )
- );
-
- /**
- * Even though this is an array, we're using 'object' as the type here. Since the variable pricing can be either
- * 1 or 0 based for the array keys, we use the additional properties to avoid WP Core resetting the variable price IDs
- */
- register_meta(
- 'post',
- 'edd_variable_prices',
- array(
- 'object_subtype' => 'download',
- 'sanitize_callback' => array( $this, 'sanitize_variable_prices' ),
- 'single' => true,
- 'type' => 'object',
- 'description' => __( 'An array of variable prices for the product.', 'easy-digital-downloads' ),
- 'show_in_rest' => array(
- 'schema' => array(
- 'type' => 'object',
- 'properties' => array(),
- 'additionalProperties' => array(
- 'type' => 'object',
- 'properties' => array(
- 'index' => array(
- 'type' => 'integer',
- ),
- 'name' => array(
- 'type' => 'string',
- ),
- 'amount' => array(
- 'type' => 'number',
- ),
- ),
- 'additionalProperties' => true,
- ),
- ),
- ),
- )
- );
-
- register_meta(
- 'post',
- 'edd_download_files',
- array(
- 'object_subtype' => 'download',
- 'sanitize_callback' => array( $this, 'sanitize_files' ),
- 'type' => 'array',
- 'description' => __( 'The files associated with the product, available for download.', 'easy-digital-downloads' ),
- )
- );
-
- register_meta(
- 'post',
- '_edd_bundled_products',
- array(
- 'object_subtype' => 'download',
- 'sanitize_callback' => array( $this, 'sanitize_array' ),
- 'single' => true,
- 'type' => 'array',
- 'description' => __( 'An array of product IDs to associate with a bundle.', 'easy-digital-downloads' ),
- 'show_in_rest' => array(
- 'schema' => array(
- 'type' => 'array',
- 'items' => array(
- 'type' => 'string',
- )
- )
- ),
- )
- );
-
- register_meta(
- 'post',
- '_edd_button_behavior',
- array(
- 'object_subtype' => 'download',
- 'sanitize_callback' => 'sanitize_text_field',
- 'type' => 'string',
- 'description' => __( "Defines how this product's 'Purchase' button should behave, either add to cart or buy now", 'easy-digital-downloads' ),
- 'show_in_rest' => true,
- )
- );
-
- register_meta(
- 'post',
- '_edd_default_price_id',
- array(
- 'object_subtype' => 'download',
- 'sanitize_callback' => array( $this, 'intval_wrapper' ),
- 'type' => 'int',
- 'description' => __( 'When variable pricing is enabled, this value defines which option should be chosen by default.', 'easy-digital-downloads' ),
- 'show_in_rest' => true,
- )
- );
- }
-
- /**
- * Register the meta for the edd_payment post type.
- *
- * @since 2.5
- * @return void
- */
- public function register_payment_meta() {
-
- register_meta(
- 'post',
- '_edd_payment_user_email',
- array(
- 'object_subtype' => 'edd_payment',
- 'sanitize_callback' => 'sanitize_email',
- 'type' => 'string',
- 'description' => __( 'The email address associated with the purchase.', 'easy-digital-downloads' ),
- )
- );
-
- register_meta(
- 'post',
- '_edd_payment_customer_id',
- array(
- 'object_subtype' => 'edd_payment',
- 'sanitize_callback' => array( $this, 'intval_wrapper' ),
- 'type' => 'int',
- 'description' => __( 'The Customer ID associated with the payment.', 'easy-digital-downloads' ),
- )
- );
-
- register_meta(
- 'post',
- '_edd_payment_user_id',
- array(
- 'object_subtype' => 'edd_payment',
- 'sanitize_callback' => array( $this, 'intval_wrapper' ),
- 'type' => 'int',
- 'description' => __( 'The User ID associated with the payment.', 'easy-digital-downloads' ),
- )
- );
-
- register_meta(
- 'post',
- '_edd_payment_user_ip',
- array(
- 'sanitize_callback' => 'sanitize_text_field',
- 'type' => 'string',
- 'description' => __( 'The IP address the payment was made from.', 'easy-digital-downloads' ),
- )
- );
-
- register_meta(
- 'post',
- '_edd_payment_purchase_key',
- array(
- 'sanitize_callback' => 'sanitize_text_field',
- 'type' => 'string',
- 'description' => __( 'The unique purchase key for this payment.', 'easy-digital-downloads' ),
- )
- );
-
- register_meta(
- 'post',
- '_edd_payment_total',
- array(
- 'sanitize_callback' => 'edd_sanitize_amount',
- 'type' => 'float',
- 'description' => __( 'The purchase total for this payment.', 'easy-digital-downloads' ),
- )
- );
-
- register_meta(
- 'post',
- '_edd_payment_mode',
- array(
- 'sanitize_callback' => 'sanitize_text_field',
- 'type' => 'string',
- 'description' => __( 'Identifies if the purchase was made in Test or Live mode.', 'easy-digital-downloads' ),
- )
- );
-
- register_meta(
- 'post',
- '_edd_payment_gateway',
- array(
- 'sanitize_callback' => 'sanitize_text_field',
- 'type' => 'string',
- 'description' => __( 'The registered gateway that was used to process this payment.', 'easy-digital-downloads' ),
- )
- );
-
- register_meta(
- 'post',
- '_edd_payment_meta',
- array(
- 'sanitize_callback' => array( $this, 'sanitize_array' ),
- 'type' => 'array',
- 'description' => __( 'Array of payment meta that contains cart details, downloads, amounts, taxes, discounts, and subtotals, etc.', 'easy-digital-downloads' ),
- )
- );
-
- register_meta(
- 'post',
- '_edd_payment_tax',
- array(
- 'sanitize_callback' => 'edd_sanitize_amount',
- 'type' => 'float',
- 'description' => __( 'The total amount of tax paid for this payment.', 'easy-digital-downloads' ),
- )
- );
-
- register_meta(
- 'post',
- '_edd_completed_date',
- array(
- 'sanitize_callback' => 'sanitize_text_field',
- 'type' => 'string',
- 'description' => __( 'The date this payment was changed to the `completed` status.', 'easy-digital-downloads' ),
- )
- );
- }
-
- /**
- * Wrapper for intval
- * Setting intval as the callback was stating an improper number of arguments, this avoids that.
- *
- * @since 2.5
- * @param int $value The value to sanitize.
- * @return int The value sanitiezed to be an int.
- */
- public function intval_wrapper( $value ) {
- return intval( $value );
- }
-
- /**
- * Sanitize values that come in as arrays
- *
- * @since 2.5
- * @param array $value The value passed into the meta.
- * @return array The sanitized value.
- */
- public function sanitize_array( $value = array() ) {
-
- if ( ! is_array( $value ) ) {
-
- if ( is_object( $value ) ) {
- $value = (array) $value;
- }
-
- if ( is_serialized( $value ) ) {
-
- preg_match( '/[oO]\s*:\s*\d+\s*:\s*"\s*(?!(?i)(stdClass))/', $value, $matches );
- if ( ! empty( $matches ) ) {
- return false;
- }
-
- $value = (array) maybe_unserialize( $value );
-
- }
-
- }
-
- return $value;
- }
-
- /**
- * Perform some sanitization on the amount field including not allowing negative values by default
- *
- * @since 2.6.5
- * @param float $price The price to sanitize
- * @return float A sanitized price
- */
- public function sanitize_price( $price ) {
-
- $allow_negative_prices = apply_filters( 'edd_allow_negative_prices', false );
-
- if ( ! $allow_negative_prices && $price < 0 ) {
- $price = 0;
- }
-
- return edd_sanitize_amount( $price );
- }
-
- /**
- * Sanitize the variable prices
- *
- * Ensures prices are correctly mapped to an array starting with an index of 0
- *
- * @since 2.5
- * @param array $prices Variable prices
- * @return array $prices Array of the remapped variable prices
- */
- public function sanitize_variable_prices( $prices = array() ) {
- $prices = $this->remove_blank_rows( $prices );
-
- if ( ! is_array( $prices ) ) {
- return array();
- }
-
- foreach ( $prices as $id => $price ) {
-
- if ( empty( $price['amount'] ) && empty( $price['name'] ) ) {
-
- unset( $prices[ $id ] );
- continue;
-
- } elseif ( empty( $price['amount'] ) ) {
-
- $price['amount'] = 0;
-
- }
-
- $prices[ $id ]['amount'] = $this->sanitize_price( $price['amount'] );
-
- }
-
- return $prices;
- }
-
- /**
- * Sanitize the file downloads
- *
- * Ensures files are correctly mapped to an array starting with an index of 0
- *
- * @since 2.5
- * @param array $files Array of all the file downloads
- * @return array $files Array of the remapped file downloads
- */
- function sanitize_files( $files = array() ) {
- $files = $this->remove_blank_rows( $files );
-
- // Files should always be in array format, even when there are none.
- if ( ! is_array( $files ) ) {
- $files = array();
- }
-
- // Clean up filenames to ensure whitespaces are stripped
- foreach( $files as $id => $file ) {
-
- if( ! empty( $files[ $id ]['file'] ) ) {
- $files[ $id ]['file'] = trim( $file['file'] );
- }
-
- if( ! empty( $files[ $id ]['name'] ) ) {
- $files[ $id ]['name'] = sanitize_text_field( $file['name'] );
- }
- }
-
- // Make sure all files are rekeyed starting at 0
- return $files;
- }
-
- /**
- * Don't save blank rows.
- *
- * When saving, check the price and file table for blank rows.
- * If the name of the price or file is empty, that row should not
- * be saved.
- *
- * @since 2.5
- * @param array $new Array of all the meta values
- * @return array $new New meta value with empty keys removed
- */
- private function remove_blank_rows( $new ) {
-
- if ( is_array( $new ) ) {
- foreach ( $new as $key => $value ) {
- if ( empty( $value['name'] ) && empty( $value['amount'] ) && empty( $value['file'] ) ) {
- unset( $new[ $key ] );
- }
- }
- }
-
- return $new;
- }
-
-}
-EDD_Register_Meta::instance();
diff --git a/wp-content/plugins/easy-digital-downloads/includes/class-edd-requirements-check.php b/wp-content/plugins/easy-digital-downloads/includes/class-edd-requirements-check.php
deleted file mode 100644
index f238b4a8..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/class-edd-requirements-check.php
+++ /dev/null
@@ -1,508 +0,0 @@
- array(
- 'minimum' => '7.1',
- 'name' => 'PHP',
- 'exists' => true,
- 'current' => false,
- 'checked' => false,
- 'met' => false,
- ),
-
- // WordPress
- 'wp' => array(
- 'minimum' => '5.4',
- 'name' => 'WordPress',
- 'exists' => true,
- 'current' => false,
- 'checked' => false,
- 'met' => false,
- ),
- );
-
- /**
- * Setup plugin requirements
- *
- * @since 3.0
- */
- public function __construct() {
-
- // Setup file & base
- $this->file = EDD_PLUGIN_FILE;
- $this->base = EDD_PLUGIN_BASE;
-
- // Load or quit
- $this->met()
- ? $this->load()
- : $this->quit();
- }
-
- /**
- * Quit without loading
- *
- * @since 3.0
- */
- private function quit() {
- add_action( 'admin_head', array( $this, 'admin_head' ) );
- add_filter( "plugin_action_links_{$this->base}", array( $this, 'plugin_row_links' ) );
- add_action( "after_plugin_row_{$this->base}", array( $this, 'plugin_row_notice' ) );
- }
-
- /** Specific Methods ******************************************************/
-
- /**
- * Load normally
- *
- * @since 3.0
- */
- private function load() {
-
- require_once dirname( $this->file ) . '/vendor/autoload.php';
-
- // Maybe include the bundled bootstrapper
- if ( ! class_exists( 'Easy_Digital_Downloads' ) ) {
- require_once dirname( $this->file ) . '/includes/class-easy-digital-downloads.php';
- }
-
- // Maybe hook-in the bootstrapper
- if ( class_exists( 'Easy_Digital_Downloads' ) ) {
-
- // Bootstrap to plugins_loaded before priority 10 to make sure
- // add-ons are loaded after us.
- add_action( 'plugins_loaded', array( $this, 'bootstrap' ), 4 );
-
- // Register the activation hook
- register_activation_hook( $this->file, array( $this, 'install' ) );
- }
- }
-
- /**
- * Install, usually on an activation hook.
- *
- * @since 3.0
- */
- public function install() {
-
- // Bootstrap to include all of the necessary files.
- $this->bootstrap();
-
- // Network wide?
- $network_wide = ! empty( $_GET['networkwide'] )
- ? (bool) $_GET['networkwide']
- : false;
-
- // Call the installer directly during the activation hook.
- edd_install( $network_wide );
- }
-
- /**
- * Bootstrap everything.
- *
- * @since 3.0
- */
- public function bootstrap() {
- \Easy_Digital_Downloads::instance( $this->file );
- }
-
- /**
- * Plugin specific URL for an external requirements page.
- *
- * @since 3.0
- * @return string
- */
- private function unmet_requirements_url() {
- return 'https://easydigitaldownloads.com/recommended-wordpress-hosting/';
- }
-
- /**
- * Plugin specific text to quickly explain what's wrong.
- *
- * @since 3.0
- * @return string
- */
- private function unmet_requirements_text() {
- esc_html_e( 'This plugin is not fully active.', 'easy-digital-downloads' );
- }
-
- /**
- * Plugin specific text to describe a single unmet requirement.
- *
- * @since 3.0
- * @return string
- */
- private function unmet_requirements_description_text() {
- return esc_html__( 'Requires %1$s (%2$s), but (%3$s) is installed.', 'easy-digital-downloads' );
- }
-
- /**
- * Plugin specific text to describe a single missing requirement.
- *
- * @since 3.0
- * @return string
- */
- private function unmet_requirements_missing_text() {
- return esc_html__( 'Requires %1$s (%2$s), but it appears to be missing.', 'easy-digital-downloads' );
- }
-
- /**
- * Plugin specific text used to link to an external requirements page.
- *
- * @since 3.0
- * @return string
- */
- private function unmet_requirements_link() {
- return esc_html__( 'Requirements', 'easy-digital-downloads' );
- }
-
- /**
- * Plugin specific aria label text to describe the requirements link.
- *
- * @since 3.0
- * @return string
- */
- private function unmet_requirements_label() {
- return esc_html__( 'Easy Digital Download Requirements', 'easy-digital-downloads' );
- }
-
- /**
- * Plugin specific text used in CSS to identify attribute IDs and classes.
- *
- * @since 3.0
- * @return string
- */
- private function unmet_requirements_name() {
- return 'edd-requirements';
- }
-
- /** Agnostic Methods ******************************************************/
-
- /**
- * Plugin agnostic method to output the additional plugin row
- *
- * @since 3.0
- */
- public function plugin_row_notice() {
- // wp_is_auto_update_enabled_for_type was introduced in WordPress 5.5.
- $colspan = function_exists( 'wp_is_auto_update_enabled_for_type' ) && wp_is_auto_update_enabled_for_type( 'plugin' ) ? 2 : 1;
- ?>
-
-
-
-
-
- unmet_requirements_text(); ?>
-
-
- unmet_requirements_description(); ?>
-
-
- requirements as $properties ) {
- if ( empty( $properties['met'] ) ) {
- $this->unmet_requirement_description( $properties );
- }
- }
- }
-
- /**
- * Plugin agnostic method to output specific unmet requirement information
- *
- * @since 3.0
- * @param array $requirement
- */
- private function unmet_requirement_description( $requirement = array() ) {
-
- // Requirement exists, but is out of date
- if ( ! empty( $requirement['exists'] ) ) {
- $text = sprintf(
- $this->unmet_requirements_description_text(),
- '' . esc_html( $requirement['name'] ) . '',
- '' . esc_html( $requirement['minimum'] ) . '',
- '' . esc_html( $requirement['current'] ) . ''
- );
-
- // Requirement could not be found
- } else {
- $text = sprintf(
- $this->unmet_requirements_missing_text(),
- '' . esc_html( $requirement['name'] ) . '',
- '' . esc_html( $requirement['minimum'] ) . ''
- );
- }
-
- // Output the description
- echo '
' . $text . '
';
- }
-
- /**
- * Plugin agnostic method to output unmet requirements styling
- *
- * @since 3.0
- */
- public function admin_head() {
-
- // Get the requirements row name
- $name = $this->unmet_requirements_name();
- ?>
-
-
- unmet_requirements_url() ) . '" aria-label="' . esc_attr( $this->unmet_requirements_label() ) . '">'
- . esc_html( $this->unmet_requirements_link() )
- . '';
-
- // Return links with Requirements link
- return $links;
- }
-
- /** Checkers **************************************************************/
-
- /**
- * Plugin specific requirements checker
- *
- * @since 3.0
- */
- private function check() {
-
- // Loop through requirements
- foreach ( $this->requirements as $dependency => $properties ) {
-
- // Which dependency are we checking?
- switch ( $dependency ) {
-
- // PHP
- case 'php':
- $version = phpversion();
- break;
-
- // WP
- case 'wp':
- $version = get_bloginfo( 'version' );
- break;
-
- // Unknown
- default:
- $version = false;
- break;
- }
-
- // Merge to original array
- if ( ! empty( $version ) ) {
- $this->requirements[ $dependency ] = array_merge(
- $this->requirements[ $dependency ],
- array(
- 'current' => $version,
- 'checked' => true,
- 'met' => version_compare( $version, $properties['minimum'], '>=' ),
- )
- );
- }
- }
- }
-
- /**
- * Have all requirements been met?
- *
- * @since 3.0
- *
- * @return boolean
- */
- public function met() {
-
- // Run the check
- $this->check();
-
- $to_meet = wp_list_pluck( $this->requirements, 'met' );
-
- // Look for unmet dependencies, and exit if so
- foreach ( $to_meet as $met ) {
- if ( empty( $met ) ) {
- return false;
- }
- }
-
- return true;
- }
-
- /** Translations **********************************************************/
-
- /**
- * Plugin specific text-domain loader.
- *
- * @deprecated 3.1.1.3. Since EDD no longer bundles any language files,
- * and WordPress Core automatically loads the custom wp-content/languages/easy-digital-downloads/.mo file if it's found,
- * this is no longer needed.
- * @since 1.4
- * @return void
- */
- public function load_textdomain() {
-
- /*
- * Due to the introduction of language packs through translate.wordpress.org,
- * loading our textdomain is complex.
- *
- * In v2.4.6, our textdomain changed from "edd" to "easy-digital-downloads".
- *
- * To support existing translation files from before the change, we must
- * look for translation files in several places and under several names.
- *
- * - wp-content/languages/plugins/easy-digital-downloads (introduced with language packs)
- * - wp-content/languages/edd/ (custom folder we have supported since 1.4)
- * - wp-content/plugins/easy-digital-downloads/languages/
- *
- * In wp-content/languages/edd/ we must look for:
- * - "easy-digital-downloads-{lang}_{country}.mo"
- *
- * In wp-content/languages/edd/ we must look for:
- * - "edd-{lang}_{country}.mo" as that was the old file naming convention
- *
- * In wp-content/languages/plugins/easy-digital-downloads/ we only need to look for:
- * - "easy-digital-downloads-{lang}_{country}.mo" as that is the new structure
- *
- * In wp-content/plugins/easy-digital-downloads/languages/, we must look for:
- * - both naming conventions. This is done by filtering "load_textdomain_mofile"
- */
- add_filter( 'load_textdomain_mofile', array( $this, 'load_old_textdomain' ), 10, 2 );
-
- // Set filter for plugin's languages directory.
- $edd_lang_dir = dirname( $this->base ) . '/languages/';
- $edd_lang_dir = apply_filters( 'edd_languages_directory', $edd_lang_dir );
-
- unload_textdomain( 'easy-digital-downloads' );
-
- /**
- * Defines the plugin language locale used in Easy Digital Downloads.
- *
- * @var $get_locale The locale to use.
- */
- $locale = apply_filters( 'plugin_locale', get_user_locale(), 'easy-digital-downloads' );
- $mofile = sprintf( '%1$s-%2$s.mo', 'easy-digital-downloads', $locale );
-
- // Look for wp-content/languages/edd/easy-digital-downloads-{lang}_{country}.mo
- $mofile_global1 = WP_LANG_DIR . "/edd/easy-digital-downloads-{$locale}.mo";
-
- // Look for wp-content/languages/edd/edd-{lang}_{country}.mo
- $mofile_global2 = WP_LANG_DIR . "/edd/edd-{$locale}.mo";
-
- // Look in wp-content/languages/plugins/easy-digital-downloads
- $mofile_global3 = WP_LANG_DIR . "/plugins/easy-digital-downloads/{$mofile}";
-
- // Try to load from first global location
- if ( file_exists( $mofile_global1 ) ) {
- load_textdomain( 'easy-digital-downloads', $mofile_global1 );
-
- // Try to load from next global location
- } elseif ( file_exists( $mofile_global2 ) ) {
- load_textdomain( 'easy-digital-downloads', $mofile_global2 );
-
- // Try to load from next global location
- } elseif ( file_exists( $mofile_global3 ) ) {
- load_textdomain( 'easy-digital-downloads', $mofile_global3 );
-
- // Load the default language files
- } else {
- load_plugin_textdomain( 'easy-digital-downloads', false, $edd_lang_dir );
- }
- }
-
- /**
- * Load a .mo file for the old textdomain if one exists.
- *
- * @deprecated 3.1.1.3
- * @see https://github.com/10up/grunt-wp-plugin/issues/21#issuecomment-62003284
- */
- public function load_old_textdomain( $mofile, $textdomain ) {
-
- // Fallback for old text domain
- if ( ( 'easy-digital-downloads' === $textdomain ) && ! file_exists( $mofile ) ) {
- $mofile = dirname( $mofile ) . DIRECTORY_SEPARATOR . str_replace( $textdomain, 'edd', basename( $mofile ) );
- }
-
- // Return (possibly overridden) mofile
- return $mofile;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/class-edd-roles.php b/wp-content/plugins/easy-digital-downloads/includes/class-edd-roles.php
deleted file mode 100644
index 7970c4d0..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/class-edd-roles.php
+++ /dev/null
@@ -1,297 +0,0 @@
- true,
- 'edit_posts' => true,
- 'delete_posts' => true,
- 'unfiltered_html' => true,
- 'upload_files' => true,
- 'export' => true,
- 'import' => true,
- 'delete_others_pages' => true,
- 'delete_others_posts' => true,
- 'delete_pages' => true,
- 'delete_private_pages' => true,
- 'delete_private_posts' => true,
- 'delete_published_pages' => true,
- 'delete_published_posts' => true,
- 'edit_others_pages' => true,
- 'edit_others_posts' => true,
- 'edit_pages' => true,
- 'edit_private_pages' => true,
- 'edit_private_posts' => true,
- 'edit_published_pages' => true,
- 'edit_published_posts' => true,
- 'manage_categories' => true,
- 'manage_links' => true,
- 'moderate_comments' => true,
- 'publish_pages' => true,
- 'publish_posts' => true,
- 'read_private_pages' => true,
- 'read_private_posts' => true,
- ) );
-
- add_role( 'shop_accountant', __( 'Shop Accountant', 'easy-digital-downloads' ), array(
- 'read' => true,
- 'edit_posts' => false,
- 'delete_posts' => false,
- ) );
-
- add_role( 'shop_worker', __( 'Shop Worker', 'easy-digital-downloads' ), array(
- 'read' => true,
- 'edit_posts' => false,
- 'upload_files' => true,
- 'delete_posts' => false,
- ) );
-
- add_role( 'shop_vendor', __( 'Shop Vendor', 'easy-digital-downloads' ), array(
- 'read' => true,
- 'edit_posts' => false,
- 'upload_files' => true,
- 'delete_posts' => false,
- ) );
- }
-
- /**
- * Add new shop-specific capabilities.
- *
- * @since 1.4.4
- */
- public function add_caps() {
- global $wp_roles;
-
- if ( class_exists( 'WP_Roles' ) ) {
- if ( ! isset( $wp_roles ) ) {
- $wp_roles = new WP_Roles(); // WPCS: override ok.
- }
- }
-
- if ( is_object( $wp_roles ) ) {
- $wp_roles->add_cap( 'shop_manager', 'view_shop_reports' );
- $wp_roles->add_cap( 'shop_manager', 'view_shop_sensitive_data' );
- $wp_roles->add_cap( 'shop_manager', 'export_shop_reports' );
- $wp_roles->add_cap( 'shop_manager', 'manage_shop_settings' );
- $wp_roles->add_cap( 'shop_manager', 'manage_shop_discounts' );
-
- $wp_roles->add_cap( 'administrator', 'view_shop_reports' );
- $wp_roles->add_cap( 'administrator', 'view_shop_sensitive_data' );
- $wp_roles->add_cap( 'administrator', 'export_shop_reports' );
- $wp_roles->add_cap( 'administrator', 'manage_shop_discounts' );
- $wp_roles->add_cap( 'administrator', 'manage_shop_settings' );
-
- // Add the main post type capabilities.
- $capabilities = $this->get_core_caps();
- foreach ( $capabilities as $cap_group ) {
- foreach ( $cap_group as $cap ) {
- $wp_roles->add_cap( 'shop_manager', $cap );
- $wp_roles->add_cap( 'administrator', $cap );
- $wp_roles->add_cap( 'shop_worker', $cap );
- }
- }
-
- $wp_roles->add_cap( 'shop_accountant', 'edit_products' );
- $wp_roles->add_cap( 'shop_accountant', 'read_private_products' );
- $wp_roles->add_cap( 'shop_accountant', 'view_shop_reports' );
- $wp_roles->add_cap( 'shop_accountant', 'export_shop_reports' );
- $wp_roles->add_cap( 'shop_accountant', 'edit_shop_payments' );
-
- $wp_roles->add_cap( 'shop_vendor', 'edit_product' );
- $wp_roles->add_cap( 'shop_vendor', 'edit_products' );
- $wp_roles->add_cap( 'shop_vendor', 'delete_product' );
- $wp_roles->add_cap( 'shop_vendor', 'delete_products' );
- $wp_roles->add_cap( 'shop_vendor', 'publish_products' );
- $wp_roles->add_cap( 'shop_vendor', 'edit_published_products' );
- $wp_roles->add_cap( 'shop_vendor', 'upload_files' );
- $wp_roles->add_cap( 'shop_vendor', 'assign_product_terms' );
- }
- }
-
- /**
- * Gets the core post type capabilities.
- *
- * @since 1.4.4
- *
- * @return array $capabilities Core post type capabilities.
- */
- public function get_core_caps() {
- $capabilities = array();
-
- $capability_types = array( 'product', 'shop_payment', 'shop_discount' );
-
- foreach ( $capability_types as $capability_type ) {
- $capabilities[ $capability_type ] = array(
- // Post type
- "edit_{$capability_type}",
- "read_{$capability_type}",
- "delete_{$capability_type}",
- "edit_{$capability_type}s",
- "edit_others_{$capability_type}s",
- "publish_{$capability_type}s",
- "read_private_{$capability_type}s",
- "delete_{$capability_type}s",
- "delete_private_{$capability_type}s",
- "delete_published_{$capability_type}s",
- "delete_others_{$capability_type}s",
- "edit_private_{$capability_type}s",
- "edit_published_{$capability_type}s",
-
- // Terms
- "manage_{$capability_type}_terms",
- "edit_{$capability_type}_terms",
- "delete_{$capability_type}_terms",
- "assign_{$capability_type}_terms",
-
- // Custom
- "view_{$capability_type}_stats",
- "import_{$capability_type}s",
- );
- }
-
- return $capabilities;
- }
-
- /**
- * Map meta caps to primitive caps.
- *
- * @since 2.0
- *
- * @param array $caps Capabilities for meta capability.
- * @param string $cap Capability name.
- * @param int $user_id User ID.
- * @param mixed $args Arguments.
- *
- * @return array $caps
- */
- public function meta_caps( $caps = array(), $cap = '', $user_id = 0, $args = array() ) {
-
- // Ensure user ID is a valid integer.
- $user_id = absint( $user_id );
-
- switch ( $cap ) {
- case 'view_product_stats':
- if ( empty( $args[0] ) ) {
- break;
- }
-
- $download = get_post( $args[0] );
-
- // Bail if download was not found.
- if ( empty( $download ) ) {
- break;
- }
-
- // No stats for auto-drafts.
- if ( 'auto-draft' === $download->post_status ) {
- $caps = array( 'do_not_allow' );
- break;
- }
-
- if ( user_can( $user_id, 'view_shop_reports' ) || absint( $download->post_author ) === $user_id ) {
- $caps = array();
- }
-
- break;
- }
-
- return $caps;
-
- }
-
- /**
- * Remove core post type capabilities (called on uninstall).
- *
- * @since 1.5.2
- */
- public function remove_caps() {
- global $wp_roles;
-
- if ( class_exists( 'WP_Roles' ) ) {
- if ( ! isset( $wp_roles ) ) {
- $wp_roles = new WP_Roles(); // WPCS: override ok.
- }
- }
-
- if ( is_object( $wp_roles ) ) {
-
- /** Shop Manager Capabilities */
- $wp_roles->remove_cap( 'shop_manager', 'view_shop_reports' );
- $wp_roles->remove_cap( 'shop_manager', 'view_shop_sensitive_data' );
- $wp_roles->remove_cap( 'shop_manager', 'export_shop_reports' );
- $wp_roles->remove_cap( 'shop_manager', 'manage_shop_discounts' );
- $wp_roles->remove_cap( 'shop_manager', 'manage_shop_settings' );
-
- /** Site Administrator Capabilities */
- $wp_roles->remove_cap( 'administrator', 'view_shop_reports' );
- $wp_roles->remove_cap( 'administrator', 'view_shop_sensitive_data' );
- $wp_roles->remove_cap( 'administrator', 'export_shop_reports' );
- $wp_roles->remove_cap( 'administrator', 'manage_shop_discounts' );
- $wp_roles->remove_cap( 'administrator', 'manage_shop_settings' );
-
- /** Remove the Main Post Type Capabilities */
- $capabilities = $this->get_core_caps();
-
- foreach ( $capabilities as $cap_group ) {
- foreach ( $cap_group as $cap ) {
- $wp_roles->remove_cap( 'shop_manager', $cap );
- $wp_roles->remove_cap( 'administrator', $cap );
- $wp_roles->remove_cap( 'shop_worker', $cap );
- }
- }
-
- /** Shop Accountant Capabilities */
- $wp_roles->remove_cap( 'shop_accountant', 'edit_products' );
- $wp_roles->remove_cap( 'shop_accountant', 'read_private_products' );
- $wp_roles->remove_cap( 'shop_accountant', 'view_shop_reports' );
- $wp_roles->remove_cap( 'shop_accountant', 'export_shop_reports' );
-
- /** Shop Vendor Capabilities */
- $wp_roles->remove_cap( 'shop_vendor', 'edit_product' );
- $wp_roles->remove_cap( 'shop_vendor', 'edit_products' );
- $wp_roles->remove_cap( 'shop_vendor', 'delete_product' );
- $wp_roles->remove_cap( 'shop_vendor', 'delete_products' );
- $wp_roles->remove_cap( 'shop_vendor', 'publish_products' );
- $wp_roles->remove_cap( 'shop_vendor', 'edit_published_products' );
- $wp_roles->remove_cap( 'shop_vendor', 'upload_files' );
- }
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/class-edd-session.php b/wp-content/plugins/easy-digital-downloads/includes/class-edd-session.php
deleted file mode 100644
index 8b2fb5cd..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/class-edd-session.php
+++ /dev/null
@@ -1,426 +0,0 @@
-use_php_sessions = $this->use_php_sessions();
-
- if ( $this->use_php_sessions ) {
- if ( is_multisite() ) {
- $this->prefix = '_' . get_current_blog_id();
- }
-
- // Use PHP SESSION (must be enabled via the EDD_USE_PHP_SESSIONS constant)
- add_action( 'init', array( $this, 'maybe_start_session' ), -2 );
- } else {
- if ( ! $this->should_start_session() ) {
- return;
- }
-
- // Use WP_Session (default)
- if ( ! defined( 'WP_SESSION_COOKIE' ) ) {
- define( 'WP_SESSION_COOKIE', 'edd_wp_session' );
- }
-
- if ( ! class_exists( 'Recursive_ArrayAccess' ) ) {
- require_once EDD_PLUGIN_DIR . 'includes/libraries/class-recursive-arrayaccess.php';
- }
-
- if ( ! class_exists( 'WP_Session' ) ) {
- require_once EDD_PLUGIN_DIR . 'includes/libraries/class-wp-session.php';
- require_once EDD_PLUGIN_DIR . 'includes/libraries/wp-session.php';
- }
-
- add_filter( 'wp_session_expiration_variant', array( $this, 'set_expiration_variant_time' ), 99999 );
- add_filter( 'wp_session_expiration', array( $this, 'set_expiration_time' ), 99999 );
- }
-
- // Based off our session handling, we need to use different hooks and priorities.
- if ( empty( $this->session ) && ! $this->use_php_sessions ) {
- $hook = 'plugins_loaded';
- $priority = 10;
- } else {
- $hook = 'init';
- $priority = -1;
- }
-
- add_action( $hook, array( $this, 'init' ), $priority );
- }
-
- /**
- * Setup the WP_Session instance.
- *
- * @since 1.5
- */
- public function init() {
- if ( $this->use_php_sessions ) {
- $key = 'edd' . $this->prefix;
- $this->session = isset( $_SESSION[ $key ] ) && is_array( $_SESSION[ $key ] )
- ? $_SESSION[ $key ]
- : array();
- } else {
- $this->session = WP_Session::get_instance();
- }
-
- $use_cookie = $this->use_cart_cookie();
- $cart = $this->get( 'edd_cart' );
- $purchase = $this->get( 'edd_purchase' );
-
- if ( $use_cookie ) {
- if ( ! empty( $cart ) || ! empty( $purchase ) ) {
- $this->set_cart_cookie();
- } else {
- $this->set_cart_cookie( false );
- }
- }
-
- return $this->session;
- }
-
- /**
- * Retrieve session ID.
- *
- * @since 1.6
- *
- * @return string Session ID
- */
- public function get_id() {
- return $this->session->session_id;
- }
-
- /**
- * Retrieve a session variable.
- *
- * @since 1.5
- *
- * @param string $key Session key.
- * @return mixed Session variable.
- */
- public function get( $key ) {
- $key = sanitize_key( $key );
- $return = false;
-
- if ( isset( $this->session[ $key ] ) && ! empty( $this->session[ $key ] ) ) {
- preg_match( '/[oO]\s*:\s*\d+\s*:\s*"\s*(?!(?i)(stdClass))/', $this->session[ $key ], $matches );
-
- if ( ! empty( $matches ) ) {
- $this->set( $key, null );
- return false;
- }
-
- if ( is_numeric( $this->session[ $key ] ) ) {
- $return = $this->session[ $key ];
- } else {
- $maybe_json = json_decode( $this->session[ $key ] );
-
- // Since json_last_error is PHP 5.3+, we have to rely on a `null` value for failing to parse JSON.
- if ( is_null( $maybe_json ) ) {
- $is_serialized = is_serialized( $this->session[ $key ] );
- if ( $is_serialized ) {
- $value = @unserialize( $this->session[ $key ] );
- $this->set( $key, (array) $value );
- $return = $value;
- } else {
- $return = $this->session[ $key ];
- }
- } else {
- $return = json_decode( $this->session[ $key ], true );
- }
- }
- }
-
- return $return;
- }
-
- /**
- * Set a session variable.
- *
- * @since 1.5
- *
- * @param string $key Session key.
- * @param int|string|array $value Session variable.
- *
- * @return mixed Session variable
- */
- public function set( $key, $value ) {
- $key = sanitize_key( $key );
-
- if ( is_array( $value ) ) {
- $this->session[ $key ] = wp_json_encode( $value );
- } else {
- $this->session[ $key ] = esc_attr( $value );
- }
-
- if ( $this->use_php_sessions ) {
- $_SESSION[ 'edd' . $this->prefix ] = $this->session;
- }
-
- return $this->session[ $key ];
- }
-
- /**
- * Set a cookie to identify whether the cart is empty or not.
- *
- * This is for hosts and caching plugins to identify if caching should be disabled.
- *
- * @since 1.8
- *
- * @param bool $set Whether to set or destroy. Default true.
- */
- public function set_cart_cookie( $set = true ) {
-
- // Bail if headers already sent.
- if ( headers_sent() ) {
- return;
- }
-
- if ( $set ) {
- @setcookie( 'edd_items_in_cart', '1', time() + 30 * 60, COOKIEPATH, COOKIE_DOMAIN, is_ssl() );
- } elseif ( isset( $_COOKIE['edd_items_in_cart'] ) ) {
- @setcookie( 'edd_items_in_cart', '', time() - 3600, COOKIEPATH, COOKIE_DOMAIN, is_ssl() );
- }
- }
-
- /**
- * Force the cookie expiration variant time to 23 hours.
- *
- * @since 2.0
- * @since 3.0 Set default value of $exp parameter to 1 as it is unused.
- *
- * @param int $exp Default expiration (1 hour).
- * @return int Cookie expiration variant time.
- */
- public function set_expiration_variant_time( $exp = 1 ) {
- return HOUR_IN_SECONDS * 23;
- }
-
- /**
- * Force the cookie expiration time to 24 hours.
- *
- * @since 1.9
- * @since 3.0 Set default value of $exp parameter to 1 as it is unused.
- *
- * @param int $exp Default expiration (1 hour).
- * @return int Cookie expiration time.
- */
- public function set_expiration_time( $exp = 1 ) {
- return HOUR_IN_SECONDS * 24;
- }
-
- /**
- * Starts a new session if one hasn't started yet.
- *
- * Checks to see if the server supports PHP sessions
- * or if the EDD_USE_PHP_SESSIONS constant is defined
- *
- * @since 2.1
- * @return bool $ret True if we are using PHP sessions, false otherwise.
- */
- public function use_php_sessions() {
-
- // Set default return value to false.
- $ret = false;
-
- // If the database variable is already set, no need to run autodetection.
- $edd_use_php_sessions = (bool) get_option( 'edd_use_php_sessions' );
-
- if ( ! $edd_use_php_sessions ) {
-
- // Attempt to detect if the server supports PHP sessions
- if ( function_exists( 'session_start' ) ) {
- $this->set( 'edd_use_php_sessions', 1 );
-
- if ( $this->get( 'edd_use_php_sessions' ) ) {
- $ret = true;
-
- // Set the database option
- update_option( 'edd_use_php_sessions', true );
- }
- }
- } else {
- $ret = $edd_use_php_sessions;
- }
-
- // Enable or disable PHP Sessions based on the EDD_USE_PHP_SESSIONS constant.
- if ( defined( 'EDD_USE_PHP_SESSIONS' ) && EDD_USE_PHP_SESSIONS ) {
- $ret = true;
- } else if ( defined( 'EDD_USE_PHP_SESSIONS' ) && ! EDD_USE_PHP_SESSIONS ) {
- $ret = false;
- }
-
- // Filter & return.
- return (bool) apply_filters( 'edd_use_php_sessions', $ret );
- }
-
- /**
- * Determines if a user has set the EDD_USE_CART_COOKIE.
- *
- * @since 2.5
- *
- * @return bool If the store should use the edd_items_in_cart cookie to help avoid caching
- */
- public function use_cart_cookie() {
-
- // Set default return value to true.
- $ret = true;
-
- if ( defined( 'EDD_USE_CART_COOKIE' ) && ! EDD_USE_CART_COOKIE ) {
- $ret = false;
- }
-
- // Filter & return.
- return (bool) apply_filters( 'edd_use_cart_cookie', $ret );
- }
-
- /**
- * Determines if we should start sessions.
- *
- * @since 2.5.11
- *
- * @return bool True if sessions should start, false otherwise.
- */
- public function should_start_session() {
-
- // Set default return value to true.
- $start_session = true;
-
- if ( ! empty( $_SERVER['REQUEST_URI'] ) ) {
- $blacklist = $this->get_blacklist();
- $uri = ltrim( $_SERVER['REQUEST_URI'], '/' );
- $uri = untrailingslashit( $uri );
-
- if ( in_array( $uri, $blacklist, true ) ) {
- $start_session = false;
- }
-
- if ( false !== strpos( $uri, 'feed=' ) ) {
- $start_session = false;
- }
-
- // We do not want to start sessions in the admin unless we're processing an ajax request.
- if ( is_admin() && false === strpos( $uri, 'wp-admin/admin-ajax.php' ) ) {
- $start_session = false;
- }
-
- // Starting sessions while saving the file editor can break the save process, so don't start.
- if ( false !== strpos( $uri, 'wp_scrape_key' ) ) {
- $start_session = false;
- }
- }
-
- // Filter & return.
- return (bool) apply_filters( 'edd_start_session', $start_session );
- }
-
- /**
- * Retrieve the URI blacklist.
- *
- * These are the URIs where we never start sessions.
- *
- * @since 2.5.11
- *
- * @return array URI blacklist.
- */
- public function get_blacklist() {
- $blacklist = apply_filters( 'edd_session_start_uri_blacklist', array(
- 'feed',
- 'feed/rss',
- 'feed/rss2',
- 'feed/rdf',
- 'feed/atom',
- 'comments/feed'
- ) );
-
- // Look to see if WordPress is in a sub folder or this is a network site that uses sub folders
- $folder = str_replace( network_home_url(), '', get_site_url() );
-
- if ( ! empty( $folder ) ) {
- foreach ( $blacklist as $path ) {
- $blacklist[] = $folder . '/' . $path;
- }
- }
-
- return $blacklist;
- }
-
- /**
- * Starts a new session if one hasn't started yet.
- *
- * @since 2.1.3
- */
- public function maybe_start_session() {
-
- // Bail if should not start session.
- if ( ! $this->should_start_session() ) {
- return;
- }
-
- // Bail if headers already sent.
- if ( headers_sent() ) {
- return;
- }
-
- // Start if old version of PHP & no session ID exists.
- if ( version_compare( PHP_VERSION, '5.4', '<' ) && ! session_id() ) {
- session_start();
-
- // Start if modern PHP and session-status is not active.
- } elseif ( defined( 'PHP_SESSION_ACTIVE' ) && ( session_status() !== PHP_SESSION_ACTIVE ) ) {
- session_start();
- }
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/class-edd-stats.php b/wp-content/plugins/easy-digital-downloads/includes/class-edd-stats.php
deleted file mode 100644
index c1ce208a..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/class-edd-stats.php
+++ /dev/null
@@ -1,522 +0,0 @@
- __( 'Today', 'easy-digital-downloads' ),
- 'yesterday' => __( 'Yesterday', 'easy-digital-downloads' ),
- 'this_week' => __( 'This Week', 'easy-digital-downloads' ),
- 'last_week' => __( 'Last Week', 'easy-digital-downloads' ),
- 'this_month' => __( 'This Month', 'easy-digital-downloads' ),
- 'last_month' => __( 'Last Month', 'easy-digital-downloads' ),
- 'this_quarter' => __( 'This Quarter', 'easy-digital-downloads' ),
- 'last_quarter' => __( 'Last Quarter', 'easy-digital-downloads' ),
- 'this_year' => __( 'This Year', 'easy-digital-downloads' ),
- 'last_year' => __( 'Last Year', 'easy-digital-downloads' )
- ) );
- }
-
- /**
- * Setup the dates passed to our constructor.
- *
- * This calls the convert_date() member function to ensure the dates are formatted correctly
- *
- * @since 1.8
- * @return void
- */
- public function setup_dates( $_start_date = 'this_month', $_end_date = false ) {
-
- if ( empty( $_start_date ) ) {
- $_start_date = 'this_month';
- }
-
- if ( empty( $_end_date ) ) {
- $_end_date = $_start_date;
- }
-
- $this->start_date = $this->convert_date( $_start_date );
- $this->end_date = $this->convert_date( $_end_date, true );
-
- }
-
- /**
- * Converts a date to a timestamp
- *
- * @since 1.8
- * @return array|WP_Error If the date is invalid, a WP_Error object will be returned
- */
- public function convert_date( $date, $end_date = false ) {
-
- $this->timestamp = false;
- $second = $end_date ? 59 : 0;
- $minute = $end_date ? 59 : 0;
- $hour = $end_date ? 23 : 0;
- $day = 1;
- $month = date( 'n', current_time( 'timestamp' ) );
- $year = date( 'Y', current_time( 'timestamp' ) );
-
- if ( ( is_string( $date ) || is_int( $date ) ) && array_key_exists( $date, $this->get_predefined_dates() ) ) {
-
- // This is a predefined date rate, such as last_week
- switch( $date ) {
-
- case 'this_month' :
-
- if ( $end_date ) {
-
- $day = cal_days_in_month( CAL_GREGORIAN, $month, $year );
- $hour = 23;
- $minute = 59;
- $second = 59;
-
- }
-
- break;
-
- case 'last_month' :
-
- if ( $month == 1 ) {
-
- $month = 12;
- $year--;
-
- } else {
-
- $month--;
-
- }
-
- if ( $end_date ) {
- $day = cal_days_in_month( CAL_GREGORIAN, $month, $year );
- }
-
- break;
-
- case 'today' :
-
- $day = date( 'd', current_time( 'timestamp' ) );
-
- if ( $end_date ) {
- $hour = 23;
- $minute = 59;
- $second = 59;
- }
-
- break;
-
- case 'yesterday' :
-
- $day = date( 'd', current_time( 'timestamp' ) ) - 1;
-
- // Check if Today is the first day of the month (meaning subtracting one will get us 0)
- if ( $day < 1 ) {
-
- // If current month is 1
- if ( 1 == $month ) {
-
- $year -= 1; // Today is January 1, so skip back to last day of December
- $month = 12;
- $day = cal_days_in_month( CAL_GREGORIAN, $month, $year );
-
- } else {
-
- // Go back one month and get the last day of the month
- $month -= 1;
- $day = cal_days_in_month( CAL_GREGORIAN, $month, $year );
-
- }
- }
-
- break;
-
- case 'this_week' :
-
- $days_to_week_start = ( date( 'w', current_time( 'timestamp' ) ) - 1 ) *60*60*24;
- $today = date( 'd', current_time( 'timestamp' ) ) *60*60*24;
-
- if ( $today < $days_to_week_start ) {
-
- if ( $month > 1 ) {
- $month -= 1;
- } else {
- $month = 12;
- }
-
- }
-
- if ( ! $end_date ) {
-
- // Getting the start day
-
- $day = date( 'd', current_time( 'timestamp' ) - $days_to_week_start ) - 1;
- $day += get_option( 'start_of_week' );
-
- } else {
-
- // Getting the end day
-
- $day = date( 'd', current_time( 'timestamp' ) - $days_to_week_start ) - 1;
- $day += get_option( 'start_of_week' ) + 6;
-
- }
-
- break;
-
- case 'last_week' :
-
- $days_to_week_start = ( date( 'w', current_time( 'timestamp' ) ) - 1 ) *60*60*24;
- $today = date( 'd', current_time( 'timestamp' ) ) *60*60*24;
-
- if ( $today < $days_to_week_start ) {
-
- if ( $month > 1 ) {
- $month -= 1;
- } else {
- $month = 12;
- }
-
- }
-
- if ( ! $end_date ) {
-
- // Getting the start day
-
- $day = date( 'd', current_time( 'timestamp' ) - $days_to_week_start ) - 8;
- $day += get_option( 'start_of_week' );
-
- } else {
-
- // Getting the end day
-
- $day = date( 'd', current_time( 'timestamp' ) - $days_to_week_start ) - 8;
- $day += get_option( 'start_of_week' ) + 6;
-
- }
-
- break;
-
- case 'this_quarter' :
-
- $month_now = date( 'n', current_time( 'timestamp' ) );
-
- if ( $month_now <= 3 ) {
-
- if ( ! $end_date ) {
- $month = 1;
- } else {
- $month = 3;
- $day = cal_days_in_month( CAL_GREGORIAN, $month, $year );
- $hour = 23;
- $minute = 59;
- $second = 59;
- }
-
- } else if ( $month_now <= 6 ) {
-
- if ( ! $end_date ) {
- $month = 4;
- } else {
- $month = 6;
- $day = cal_days_in_month( CAL_GREGORIAN, $month, $year );
- $hour = 23;
- $minute = 59;
- $second = 59;
- }
-
- } else if ( $month_now <= 9 ) {
-
- if ( ! $end_date ) {
- $month = 7;
- } else {
- $month = 9;
- $day = cal_days_in_month( CAL_GREGORIAN, $month, $year );
- $hour = 23;
- $minute = 59;
- $second = 59;
- }
-
- } else {
-
- if ( ! $end_date ) {
- $month = 10;
- } else {
- $month = 12;
- $day = cal_days_in_month( CAL_GREGORIAN, $month, $year );
- $hour = 23;
- $minute = 59;
- $second = 59;
- }
- }
-
- break;
-
- case 'last_quarter' :
-
- $month_now = date( 'n', current_time( 'timestamp' ) );
-
- if ( $month_now <= 3 ) {
-
- if ( ! $end_date ) {
- $month = 10;
- } else {
- $year -= 1;
- $month = 12;
- $day = cal_days_in_month( CAL_GREGORIAN, $month, $year );
- $hour = 23;
- $minute = 59;
- $second = 59;
- }
-
- } else if ( $month_now <= 6 ) {
-
- if ( ! $end_date ) {
- $month = 1;
- } else {
- $month = 3;
- $day = cal_days_in_month( CAL_GREGORIAN, $month, $year );
- $hour = 23;
- $minute = 59;
- $second = 59;
- }
-
- } else if ( $month_now <= 9 ) {
-
- if ( ! $end_date ) {
- $month = 4;
- } else {
- $month = 6;
- $day = cal_days_in_month( CAL_GREGORIAN, $month, $year );
- $hour = 23;
- $minute = 59;
- $second = 59;
- }
-
- } else {
-
- if ( ! $end_date ) {
- $month = 7;
- } else {
- $month = 9;
- $day = cal_days_in_month( CAL_GREGORIAN, $month, $year );
- $hour = 23;
- $minute = 59;
- $second = 59;
- }
- }
-
- break;
-
- case 'this_year' :
-
- if ( ! $end_date ) {
- $month = 1;
- } else {
- $month = 12;
- $day = cal_days_in_month( CAL_GREGORIAN, $month, $year );
- $hour = 23;
- $minute = 59;
- $second = 59;
- }
-
- break;
-
- case 'last_year' :
-
- $year -= 1;
- if ( ! $end_date ) {
- $month = 1;
- $day = 1;
- } else {
- $month = 12;
- $day = cal_days_in_month( CAL_GREGORIAN, $month, $year );
- $hour = 23;
- $minute = 59;
- $second = 59;
- }
-
- break;
-
- }
-
-
- } else if ( is_numeric( $date ) ) {
-
- // return $date unchanged since it is a timestamp
- $this->timestamp = true;
-
- } else if ( false !== strtotime( $date ) ) {
-
- $date = strtotime( $date, current_time( 'timestamp' ) );
- $year = date( 'Y', $date );
- $month = date( 'm', $date );
- $day = date( 'd', $date );
-
- } else {
- return new WP_Error( 'invalid_date', __( 'Improper date provided.', 'easy-digital-downloads' ) );
- }
-
- // Create an exact timestamp
- if ( false === $this->timestamp ) {
- $date = mktime( $hour, $minute, $second, $month, $day, $year );
- }
-
- return apply_filters( 'edd_stats_date', $date, $end_date, $this );
- }
-
- /**
- * Modifies the WHERE flag for payment counts
- *
- * Only get payments in our date range
- *
- * @since 1.8
- * @return string
- */
- public function count_where( $where = '' ) {
-
- $start_where = $end_where = '';
-
- if ( $this->start_date ) {
-
- if ( $this->timestamp ) {
- $format = 'Y-m-d H:i:s';
- } else {
- $format = 'Y-m-d 00:00:00';
- }
-
- $start_date = date( $format, $this->start_date );
- $start_where = " AND date_created >= '{$start_date}'";
- }
-
- if ( $this->end_date ) {
-
- if ( $this->timestamp ) {
- $format = 'Y-m-d H:i:s';
- } else {
- $format = 'Y-m-d 23:59:59';
- }
-
- $end_date = date( $format, $this->end_date );
-
- $end_where = " AND date_created <= '{$end_date}'";
- }
-
- $where .= "{$start_where}{$end_where}";
-
- return $where;
- }
-
- /**
- * Modifies the WHERE flag for payment queries
- *
- * @since 1.8
- * @return string
- */
- public function payments_where( $where = '' ) {
- global $wpdb;
-
- $start_where = '';
- $end_where = '';
-
- if ( ! is_wp_error( $this->start_date ) ) {
-
- if ( $this->timestamp ) {
- $format = 'Y-m-d H:i:s';
- } else {
- $format = 'Y-m-d 00:00:00';
- }
-
- $start_date = date( $format, $this->start_date );
- $start_where = " AND {$wpdb->posts}.post_date >= '{$start_date}'";
- }
-
- if ( ! is_wp_error( $this->end_date ) ) {
-
- if ( $this->timestamp ) {
- $format = 'Y-m-d H:i:s';
- } else {
- $format = 'Y-m-d 23:59:59';
- }
-
- $end_date = date( $format, $this->end_date );
-
- $end_where = " AND {$wpdb->posts}.post_date <= '{$end_date}'";
- }
-
- $where .= "{$start_where}{$end_where}";
-
- return $where;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/class-stats.php b/wp-content/plugins/easy-digital-downloads/includes/class-stats.php
deleted file mode 100644
index f0bd0373..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/class-stats.php
+++ /dev/null
@@ -1,3237 +0,0 @@
-set_date_ranges();
-
- // Maybe parse query.
- if ( ! empty( $query ) ) {
- $this->parse_query( $query );
-
- $this->query_var_originals = $this->query_vars;
-
- // Set defaults.
- } else {
- $this->query_var_originals = $this->query_vars = array(
- 'start' => '',
- 'end' => '',
- 'range' => '',
- 'exclude_taxes' => false,
- 'currency' => false,
- 'currency_sql' => '',
- 'status' => array(),
- 'status_sql' => '',
- 'type' => array(),
- 'type_sql' => '',
- 'where_sql' => '',
- 'date_query_sql' => '',
- 'date_query_column' => '',
- 'column' => '',
- 'table' => '',
- 'function' => 'SUM',
- 'output' => 'raw',
- 'relative' => false,
- 'relative_start' => '',
- 'relative_end' => '',
- 'grouped' => false,
- 'product_id' => '',
- 'price_id' => null,
- 'revenue_type' => 'gross',
- );
- }
-
- }
-
- /**
- * Builds a fully qualified amount column and function, given the currency settings,
- * tax settings, and accepted functions.
- *
- * @param array $args {
- * Optional arguments.
- *
- * @type string $column_prefix Column prefix (table alias or name).
- * @type array $accepted_function Accepted functions for this query.
- * }
- *
- * @return string Example: `SUM( total / rate )`
- * @throws \InvalidArgumentException
- */
- private function get_amount_column_and_function( $args = array() ) {
- $args = wp_parse_args( $args, array(
- 'column_prefix' => '',
- 'accepted_functions' => array(),
- 'requested_function' => false,
- 'rate' => true,
- ) );
-
- $column = $this->query_vars['column'];
- $column_prefix = '';
-
- if ( ! empty( $args['column_prefix'] ) ) {
- $column_prefix = $args['column_prefix'] . '.';
- }
-
- if ( empty( $column ) ) {
- $column = true === $this->query_vars['exclude_taxes'] ? "{$column_prefix}total - {$column_prefix}tax" : $column_prefix . 'total';
- } else {
- $column = $column_prefix . $column;
- }
-
- $default_function = is_array( $args['accepted_functions'] ) && isset( $args['accepted_functions'][0] ) ? $args['accepted_functions'][0] : false;
- $function = ! empty( $this->query_vars['function'] ) ? $this->query_vars['function'] : $default_function;
-
- if ( ! empty( $args['requested_function'] ) ) {
- $function = $args['requested_function'];
- }
-
- if ( empty( $function ) ) {
- throw new \InvalidArgumentException( 'Missing select function.' );
- }
-
- if ( ! empty( $args['accepted_functions'] ) && ! in_array( strtoupper( $function ), $args['accepted_functions'], true ) ) {
- if ( ! empty( $default_function ) ) {
- $function = $default_function;
- } else {
- throw new \InvalidArgumentException( sprintf( 'Invalid function "%s". Must be one of: %s', $this->query_vars['function'], json_encode( $args['accepted_functions'] ) ) );
- }
- }
-
- $function = strtoupper( $function );
-
- // Multiply by rate if currency conversion is enabled.
- if (
- ! empty( $args['rate'] ) &&
- in_array( $function, array( 'SUM', 'AVG' ), true ) &&
- ( empty( $this->query_vars['currency'] ) || 'convert' === $this->query_vars['currency'] ) &&
- ( false !== strpos( $column, 'total' ) || false !== strpos( $column, 'tax' ) )
- ) {
- $column = sprintf( '(%s) / %s', $column, $column_prefix . 'rate' );
- }
-
- return sprintf( '%s(%s)', $function, $column );
- }
-
- /** Calculation Methods ***************************************************/
-
- /** Orders ***************************************************************/
-
- /**
- * Calculate order earnings.
- *
- * @since 3.0
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type bool $exclude_taxes If taxes should be excluded from calculations. Default `false`.
- * @type string $function SQL function. Accepts `SUM` and `AVG`. Default `SUM`.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended to the
- * query.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return string Formatted order earnings.
- */
- public function get_order_earnings( $query = array() ) {
- $this->parse_query( $query );
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_orders;
- $this->query_vars['date_query_column'] = 'date_created';
-
- if ( empty( $this->query_vars['function'] ) ) {
- $this->query_vars['function'] = 'SUM';
- }
-
- /*
- * By default we're checking sales only and excluding refunds. This gives us gross order earnings.
- * This may be overridden in $query parameters that get passed through.
- */
- $this->query_vars['type'] = $this->get_revenue_type_order_types();
- $this->query_vars['status'] = edd_get_gross_order_statuses();
-
- /**
- * Filters Order statuses that should be included when calculating stats.
- *
- * @since 2.7
- *
- * @param array $statuses Order statuses to include when generating stats.
- */
- $this->query_vars['status'] = array_unique( apply_filters( 'edd_payment_stats_post_statuses', $this->query_vars['status'] ) );
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- $function = $this->get_amount_column_and_function( array(
- 'accepted_functions' => array( 'SUM', 'AVG' )
- ) );
-
- $initial_query = "SELECT {$function} AS total
- FROM {$this->query_vars['table']}
- WHERE 1=1
- {$this->query_vars['status_sql']}
- {$this->query_vars['type_sql']}
- {$this->query_vars['currency_sql']}
- {$this->query_vars['where_sql']}
- {$this->query_vars['date_query_sql']}";
-
- $initial_result = $this->get_db()->get_row( $initial_query );
-
- if ( true === $this->query_vars['relative'] ) {
-
- $relative_date_query_sql = $this->generate_relative_date_query_sql();
-
- $relative_query = "SELECT {$function} AS total
- FROM {$this->query_vars['table']}
- WHERE 1=1
- {$this->query_vars['status_sql']}
- {$this->query_vars['type_sql']}
- {$this->query_vars['currency_sql']}
- {$this->query_vars['where_sql']}
- {$relative_date_query_sql}";
-
-
- $relative_result = $this->get_db()->get_row( $relative_query );
- }
-
- $total = null === $initial_result->total
- ? 0.00
- : (float) $initial_result->total;
-
- if ( 'array' === $this->query_vars['output'] ) {
- $output = array(
- 'value' => $total,
- 'relative_data' => ( true === $this->query_vars['relative'] ) ? $this->generate_relative_data( floatval( $total ), floatval( $relative_result->total ) ) : array(),
- );
- } else {
- if ( true === $this->query_vars['relative'] ) {
- $output = $this->generate_relative_markup( floatval( $total ), floatval( $relative_result->total ) );
- } else {
- $output = $this->maybe_format( $total );
- }
- }
-
- // Reset query vars.
- $this->post_query();
-
- return $output;
- }
-
- /**
- * Calculate the number of orders.
- *
- * @since 3.0
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type string $function SQL function. Accepts `COUNT` and `AVG`. Default `COUNT`.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended to the
- * query.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return int Number of orders.
- */
- public function get_order_count( $query = array() ) {
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_orders;
- $this->query_vars['column'] = 'id';
- $this->query_vars['date_query_column'] = 'date_created';
-
- /*
- * By default we're checking sales only and excluding refunds. This gives us gross order counts.
- * This may be overridden in $query parameters that get passed through.
- */
- $this->query_vars['type'] = 'sale';
- $this->query_vars['status'] = $this->get_revenue_type_statuses();
-
- /**
- * Filters Order statuses that should be included when calculating stats.
- *
- * @since 2.7
- *
- * @param array $statuses Order statuses to include when generating stats.
- */
- $this->query_vars['status'] = apply_filters( 'edd_payment_stats_post_statuses', $this->query_vars['status'] );
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- $function = $this->get_amount_column_and_function( array(
- 'accepted_functions' => array( 'COUNT', 'AVG' )
- ) );
-
- // First get the 'current' date filter's results.
- $initial_query = "SELECT COUNT(id) AS total
- FROM {$this->query_vars['table']}
- WHERE 1=1
- {$this->query_vars['status_sql']}
- {$this->query_vars['type_sql']}
- {$this->query_vars['currency_sql']}
- {$this->query_vars['where_sql']}
- {$this->query_vars['date_query_sql']}";
-
- $initial_result = $this->get_db()->get_row( $initial_query );
-
- if ( true === $this->query_vars['relative'] ) {
-
- // Now get the relative data.
- $relative_date_query_sql = $this->generate_relative_date_query_sql();
-
- $relative_query = "SELECT COUNT(id) AS total
- FROM {$this->query_vars['table']}
- WHERE 1=1
- {$this->query_vars['status_sql']}
- {$this->query_vars['type_sql']}
- {$this->query_vars['currency_sql']}
- {$this->query_vars['where_sql']}
- {$relative_date_query_sql}";
-
- $relative_result = $this->get_db()->get_row( $relative_query );
- }
-
- $total = null === $initial_result
- ? 0
- : absint( $initial_result->total );
-
- if ( true === $this->query_vars['relative'] ) {
- $total = $this->generate_relative_markup( absint( $total ), absint( $relative_result->total ) );
- }
-
- // Reset query vars.
- $this->post_query();
-
- return $total;
- }
-
- /**
- * Calculate the busiest day of the week for stores.
- *
- * @since 3.0
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type string $function This method does not allow any SQL functions to be passed.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended to the
- * query.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return string Busiest day of the week.
- */
- public function get_busiest_day( $query = array() ) {
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_orders;
- $this->query_vars['column'] = 'id';
- $this->query_vars['date_query_column'] = 'date_created';
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- $sql = "SELECT DAYOFWEEK(date_created) AS day, COUNT({$this->query_vars['column']}) as total
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$this->query_vars['status_sql']} {$this->query_vars['currency_sql']} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}
- GROUP BY day
- ORDER BY total DESC
- LIMIT 1";
-
- $result = $this->get_db()->get_row( $sql );
-
- $days = array(
- __( 'Sunday', 'easy-digital-downloads' ),
- __( 'Monday', 'easy-digital-downloads' ),
- __( 'Tuesday', 'easy-digital-downloads' ),
- __( 'Wednesday', 'easy-digital-downloads' ),
- __( 'Thursday', 'easy-digital-downloads' ),
- __( 'Friday', 'easy-digital-downloads' ),
- __( 'Saturday', 'easy-digital-downloads' ),
- );
-
- $day = null === $result
- ? ''
- : $days[ $result->day - 1 ];
-
- // Reset query vars.
- $this->post_query();
-
- return $day;
- }
-
- /**
- * Calculate number of refunded orders.
- *
- * @since 3.0
- *
- * @see \EDD\Stats::get_order_count()
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type string $function SQL function. Accepts `COUNT` and `AVG`. Default `COUNT`.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended to the
- * query.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return int Number of refunded orders.
- */
- public function get_order_refund_count( $query = array() ) {
- $query['status'] = isset( $query['status'] )
- ? $query['status']
- : array( 'complete' );
-
- if ( ! array( $query['status'] ) ) {
- $query['status'] = array( $query['status'] );
- }
-
- $query['type'] = array( 'refund' );
-
- return $this->get_order_count( $query );
- }
-
- /**
- * Calculate number of refunded order items.
- *
- * @since 3.0
- *
- * @see \EDD\Stats::get_order_item_count()
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type string $function SQL function. Accepts `COUNT` and `AVG`. Default `COUNT`.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended to the
- * query.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return int Number of refunded orders.
- */
- public function get_order_item_refund_count( $query = array() ) {
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_order_items;
- $this->query_vars['column'] = 'id';
- $this->query_vars['date_query_column'] = 'date_created';
-
- if ( empty( $this->query_vars['function'] ) ) {
- $this->query_vars['function'] = 'COUNT';
- }
-
- // Base value for status.
- $query['status'] = isset( $query['status'] )
- ? $query['status']
- : array( 'refunded' );
-
- /*
- * The type should be `sale` because we're querying for fully refunded order items only.
- * That means we look in `type` = `sale` and `status` = `refunded`.
- */
- $this->query_vars['where_sql'] .= " AND {$this->get_db()->edd_orders}.type = 'sale' ";
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- $function = $this->get_amount_column_and_function( array(
- 'column_prefix' => $this->query_vars['table'],
- 'accepted_functions' => array( 'COUNT', 'AVG' )
- ) );
-
- $product_id = ! empty( $this->query_vars['product_id'] )
- ? $this->get_db()->prepare( 'AND product_id = %d', absint( $this->query_vars['product_id'] ) )
- : '';
-
- $price_id = $this->generate_price_id_query_sql();
-
- $currency_sql = str_replace( $this->get_db()->edd_order_items, $this->get_db()->edd_orders, $this->query_vars['currency_sql'] );
-
- // Calculating an average requires a subquery.
- if ( 'AVG' === $this->query_vars['function'] ) {
- $sql = "SELECT AVG(id) AS total
- FROM (
- SELECT COUNT({$this->query_vars['table']}.id) AS id
- FROM {$this->query_vars['table']}
- INNER JOIN {$this->get_db()->edd_orders} ON( {$this->get_db()->edd_orders}.id = {$this->query_vars['table']}.order_id )
- WHERE 1=1 {$product_id} {$price_id} {$this->query_vars['status_sql']} {$currency_sql} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}
- GROUP BY order_id
- ) AS counts";
- } elseif ( true === $this->query_vars['grouped'] ) {
- $sql = "SELECT {$this->query_vars['table']}.product_id, {$this->query_vars['table']}.price_id, {$function} AS total
- FROM {$this->query_vars['table']}
- INNER JOIN {$this->get_db()->edd_orders} ON( {$this->get_db()->edd_orders}.id = {$this->query_vars['table']}.order_id )
- WHERE 1=1 {$product_id} {$price_id} {$this->query_vars['status_sql']} {$currency_sql} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}
- GROUP BY product_id, price_id
- ORDER BY total DESC";
- } else {
- $sql = "SELECT {$function} AS total
- FROM {$this->query_vars['table']}
- INNER JOIN {$this->get_db()->edd_orders} ON( {$this->get_db()->edd_orders}.id = {$this->query_vars['table']}.order_id )
- WHERE 1=1 {$product_id} {$price_id} {$this->query_vars['status_sql']} {$currency_sql} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}";
- }
-
- $result = $this->get_db()->get_results( $sql );
-
- if ( true === $this->query_vars['grouped'] ) {
- array_walk( $result, function ( &$value ) {
-
- // Format resultant object.
- $value->product_id = absint( $value->product_id );
- $value->price_id = is_numeric( $value->price_id ) ? absint( $value->price_id ) : null;
- $value->total = absint( $value->total );
-
- // Add instance of EDD_Download to resultant object.
- $value->object = edd_get_download( $value->product_id );
- } );
- } else {
- $result = null === $result[0]->total
- ? 0.00
- : absint( $result[0]->total );
- }
-
- // Reset query vars.
- $this->post_query();
-
- return $result;
-
- return $this->get_order_item_count( $query );
- }
-
- /**
- * Calculate total amount for refunded orders.
- *
- * @since 3.0
- *
- * @see \EDD\Stats::get_order_earnings()
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type bool $exclude_taxes If taxes should be excluded from calculations. Default `false`.
- * @type string $function SQL function. Default `SUM`.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended to the
- * query.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return string Formatted amount from refunded orders.
- */
- public function get_order_refund_amount( $query = array() ) {
- $this->parse_query( $query );
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_orders;
- $this->query_vars['date_query_column'] = 'date_created';
-
- if ( empty( $this->query_vars['function'] ) ) {
- $this->query_vars['function'] = 'SUM';
- }
-
- /*
- * By default we're checking refunds only and excluding any other types. This gives us gross refund amounts.
- * This may be overridden in $query parameters that get passed through.
- */
- $this->query_vars['type'] = 'refund';
- $this->query_vars['status'] = array( 'complete' );
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- $function = $this->get_amount_column_and_function( array(
- 'accepted_functions' => array( 'SUM', 'AVG' )
- ) );
-
- $initial_query = "SELECT {$function} AS total
- FROM {$this->query_vars['table']}
- WHERE 1=1
- {$this->query_vars['status_sql']}
- {$this->query_vars['type_sql']}
- {$this->query_vars['currency_sql']}
- {$this->query_vars['where_sql']}
- {$this->query_vars['date_query_sql']}";
-
- $initial_result = $this->get_db()->get_row( $initial_query );
-
- if ( true === $this->query_vars['relative'] ) {
-
- $relative_date_query_sql = $this->generate_relative_date_query_sql();
-
- $relative_query = "SELECT {$function} AS total
- FROM {$this->query_vars['table']}
- WHERE 1=1
- {$this->query_vars['status_sql']}
- {$this->query_vars['type_sql']}
- {$this->query_vars['currency_sql']}
- {$this->query_vars['where_sql']}
- {$relative_date_query_sql}";
-
- $relative_result = $this->get_db()->get_row( $relative_query );
- }
-
- $total = null === $initial_result->total
- ? 0.00
- : (float) $initial_result->total;
-
- if ( true === $this->query_vars['relative'] ) {
- $total = -( floatval( $initial_result->total ) );
- $relative = -( floatval( $relative_result->total ) );
- $total = $this->generate_relative_markup( $total, $relative, true );
- } else {
- $total = $this->maybe_format( -( $total ) );
- }
-
- // Reset query vars.
- $this->post_query();
-
- return $total;
- }
-
- /**
- * Calculate average time for an order to be refunded.
- *
- * @since 3.0
- *
- * @see \EDD\Stats::get_order_earnings()
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type string $function SQL function. Accepts `AVG` only. Default `AVG`.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended to the
- * query.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return string Average time for an order to be refunded in human readable format.
- */
- public function get_average_refund_time( $query = array() ) {
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_orders;
- $this->query_vars['column'] = 'date_completed';
- $this->query_vars['date_query_column'] = 'date_created';
-
- $type_sql = $this->get_db()->prepare( 'AND o2.type = %s', esc_sql( 'refund' ) );
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- $sql = "SELECT AVG( TIMESTAMPDIFF( SECOND, {$this->query_vars['table']}.{$this->query_vars['column']}, o2.date_created ) ) AS time_to_refund
- FROM {$this->query_vars['table']}
- INNER JOIN {$this->query_vars['table']} o2 ON {$this->query_vars['table']}.id = o2.parent
- WHERE 1=1 {$type_sql} {$this->query_vars['currency_sql']} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}";
-
- $result = $this->get_db()->get_var( $sql );
-
- $time_to_refund = null === $result
- ? ''
- : $result;
-
- // Beginning of time.
- $base = strtotime( '1970-01-01 00:00:00' );
-
- if ( ! empty( $time_to_refund ) ) {
- $time_to_refund = absint( $time_to_refund );
-
- $intervals = array( 'year', 'month', 'day', 'hour', 'minute', 'second' );
- $diffs = array();
-
- foreach ( $intervals as $interval ) {
- $time = strtotime( '+1 ' . $interval, $base );
-
- $add = 1;
- $looped = 0;
-
- while ( $time_to_refund >= $time ) {
- $add++;
- $time = strtotime( '+' . $add . ' ' . $interval, $base );
- $looped++;
- }
-
- $base = strtotime( '+' . $looped . ' ' . $interval, $base );
- $diffs[ $interval ] = $looped;
- }
-
- $count = 0;
- $times = array();
-
- foreach ( $diffs as $interval => $value ) {
-
- // Keep precision to 2.
- if ( $count >= 2 ) {
- break;
- }
-
- // Add value and interval if value is bigger than 0.
- if ( $value > 0 ) {
- $interval = substr( $interval, 0, 1 );
-
- // Add value and interval to times array.
- $times[] = $value . $interval;
- $count ++;
- }
- }
- }
-
- // Reset query vars.
- $this->post_query();
-
- return empty( $time_to_refund )
- ? ''
- : implode( ' ', $times );
- }
-
- /**
- * Calculate refund rate.
- *
- * @since 3.0
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * @type bool $exclude_taxes If taxes should be excluded from calculations. Default `false`.
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type string $function This method does not allow any SQL functions to be passed.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended to the
- * query.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return float|int Rate of refunded orders.
- */
- public function get_refund_rate( $query = array() ) {
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_orders;
- $this->query_vars['column'] = 'id';
- $this->query_vars['date_query_column'] = 'date_created';
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- $status_sql = $this->get_db()->prepare( "AND status = %s AND type = '%s'", esc_sql( 'complete' ), esc_sql( 'refund' ) );
-
- $ignore_free = $this->get_db()->prepare( "AND {$this->query_vars['table']}.total > %d", 0 );
-
- $sql = "SELECT COUNT(id ) / o.number_orders * 100 AS `refund_rate`
- FROM {$this->query_vars['table']}
- CROSS JOIN (
- SELECT COUNT(id) AS number_orders
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$this->query_vars['status_sql']} {$this->query_vars['currency_sql']} {$ignore_free} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}
- ) o
- WHERE 1=1 {$status_sql} {$this->query_vars['currency_sql']} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}";
-
- $result = $this->get_db()->get_var( $sql );
-
- $total = null === $result
- ? 0
- : round( $result, 2 );
-
- if ( 'formatted' === $this->query_vars['output'] ) {
- $total .= '%';
- $total = esc_html( $total );
- }
-
- // Reset query vars.
- $this->post_query();
-
- return $total;
- }
-
- /** Order Items **********************************************************/
-
- /**
- * Calculate order item earnings.
- *
- * @since 3.0
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type bool $exclude_taxes If taxes should be excluded from calculations. Default `false`.
- * @type string $function SQL function. Default `SUM`.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended to the
- * query.
- * @type int $product_id Product ID. If empty, an aggregation of the values in the `total` column in the
- * `edd_order_items` table will be returned.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return array|float|int Formatted order item earnings.
- */
- public function get_order_item_earnings( $query = array() ) {
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_order_items;
- $this->query_vars['column'] = true === $this->query_vars['exclude_taxes'] ? 'total - tax' : 'total';
- $this->query_vars['date_query_column'] = 'date_created';
- $this->query_vars['status'] = edd_get_gross_order_statuses();
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- $product_id = ! empty( $this->query_vars['product_id'] )
- ? $this->get_db()->prepare( "AND {$this->query_vars['table']}.product_id = %d", absint( $this->query_vars['product_id'] ) )
- : '';
-
- $price_id = $this->generate_price_id_query_sql();
-
- $region = ! empty( $this->query_vars['region'] )
- ? $this->get_db()->prepare( 'AND edd_oa.region = %s', esc_sql( $this->query_vars['region'] ) )
- : '';
-
- $country = ! empty( $this->query_vars['country'] )
- ? $this->get_db()->prepare( 'AND edd_oa.country = %s', esc_sql( $this->query_vars['country'] ) )
- : '';
-
- $status = ! empty( $this->query_vars['status'] )
- ? " AND {$this->query_vars['table']}.status IN ('" . implode( "', '", $this->query_vars['status'] ) . "')"
- : '';
-
- $join = $currency = '';
- if ( ! empty( $country ) || ! empty( $region ) ) {
- $join .= " INNER JOIN {$this->get_db()->edd_order_addresses} edd_oa ON {$this->query_vars['table']}.order_id = edd_oa.order_id ";
- }
-
- $join .= " INNER JOIN {$this->get_db()->edd_orders} edd_o ON ({$this->query_vars['table']}.order_id = edd_o.id) AND edd_o.status IN ('" . implode( "', '", $this->query_vars['status'] ) . "') ";
-
- if ( ! empty( $this->query_vars['currency'] ) && array_key_exists( strtoupper( $this->query_vars['currency'] ), edd_get_currencies() ) ) {
- $currency = $this->get_db()->prepare( "AND edd_o.currency = %s", strtoupper( $this->query_vars['currency'] ) );
- }
-
- /**
- * The adjustments query needs a different order status check than the order items. This is due to the fact that
- * adjustments refunded would end up being double counted, and therefore create an inaccurate revenue report.
- */
- $adjustments_join = " INNER JOIN {$this->get_db()->edd_orders} edd_o ON ({$this->query_vars['table']}.order_id = edd_o.id) AND edd_o.type = 'sale' AND edd_o.status IN ('" . implode( "', '", edd_get_net_order_statuses() ) . "') ";
-
- /**
- * With the addition of including fees into the calcualtion, the order_items
- * and order_adjustments for the order items needs to be a SUM and then the final function
- * (SUM or AVG) needs to be run on the final UNION Query.
- */
- $order_item_function = $this->get_amount_column_and_function( array(
- 'column_prefix' => $this->query_vars['table'],
- 'accepted_functions' => array( 'SUM', 'AVG' ),
- 'requested_function' => 'SUM',
- ) );
-
- $order_adjustment_function = $this->get_amount_column_and_function( array(
- 'column_prefix' => 'oadj',
- 'accepted_functions' => array( 'SUM', 'AVG' ),
- 'requested_function' => 'SUM',
- ) );
-
- $union_function = $this->get_amount_column_and_function( array(
- 'column_prefix' => '',
- 'accepted_functions' => array( 'SUM', 'AVG' ),
- 'rate' => false,
- ) );
-
- if ( true === $this->query_vars['grouped'] ) {
- $order_items = "SELECT
- {$this->query_vars['table']}.product_id,
- {$this->query_vars['table']}.price_id,
- {$order_item_function} AS total
- FROM {$this->query_vars['table']}
- {$join}
- WHERE 1=1
- {$product_id}
- {$price_id}
- {$region}
- {$country}
- {$currency}
- {$this->query_vars['where_sql']}
- {$this->query_vars['date_query_sql']}
- GROUP BY {$this->query_vars['table']}.product_id, {$this->query_vars['table']}.price_id";
-
- $order_adjustments = "SELECT
- {$this->query_vars['table']}.product_id as product_id,
- {$this->query_vars['table']}.price_id as price_id,
- {$order_adjustment_function} as total
- FROM {$this->get_db()->edd_order_adjustments} oadj
- INNER JOIN {$this->query_vars['table']} ON
- ({$this->query_vars['table']}.id = oadj.object_id)
- {$product_id}
- {$price_id}
- {$region}
- {$country}
- {$currency}
- {$adjustments_join}
- WHERE oadj.object_type = 'order_item'
- AND oadj.type != 'discount'
- {$this->query_vars['date_query_sql']}
- GROUP BY {$this->query_vars['table']}.product_id, {$this->query_vars['table']}.price_id";
-
- $sql = "SELECT product_id, price_id, {$union_function} AS total
- FROM ({$order_items} UNION {$order_adjustments})a
- GROUP BY product_id, price_id
- ORDER BY total DESC";
- } else {
- $order_items = "SELECT
- {$order_item_function} AS total
- FROM {$this->query_vars['table']}
- {$join}
- WHERE 1=1
- {$product_id}
- {$price_id}
- {$region}
- {$country}
- {$currency}
- {$this->query_vars['where_sql']}
- {$this->query_vars['date_query_sql']}";
-
- $order_adjustments = "SELECT
- {$order_adjustment_function} as total
- FROM {$this->get_db()->edd_order_adjustments} oadj
- INNER JOIN {$this->query_vars['table']} ON
- ({$this->query_vars['table']}.id = oadj.object_id)
- {$product_id}
- {$price_id}
- {$region}
- {$country}
- {$currency}
- {$adjustments_join}
- WHERE oadj.object_type = 'order_item'
- AND oadj.type != 'discount'
- {$this->query_vars['date_query_sql']}";
-
- $sql = "SELECT {$union_function} AS total FROM ({$order_items} UNION {$order_adjustments})a";
- }
-
- $result = $this->get_db()->get_results( $sql );
-
- if ( true === $this->query_vars['grouped'] ) {
- array_walk( $result, function ( &$value ) {
-
- // Format resultant object.
- $value->product_id = absint( $value->product_id );
- $value->price_id = is_numeric( $value->price_id ) ? absint( $value->price_id ) : null;
- $value->total = $this->maybe_format( $value->total );
-
- // Add instance of EDD_Download to resultant object.
- $value->object = edd_get_download( $value->product_id );
- } );
- } else {
- $result = null === $result[0]->total
- ? $this->maybe_format( 0.00 )
- : $this->maybe_format( floatval( $result[0]->total ) );
- }
-
- // Reset query vars.
- $this->post_query();
-
- return $result;
- }
-
- /**
- * Calculate the number of times a specific item has been purchased.
- *
- * @since 3.0
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type string $function SQL function. Accepts `COUNT` and `AVG`. Default `COUNT`.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended to the
- * query.
- * @type int $product_id Product ID. If empty, an aggregation of the values in the `total` column in the
- * `edd_order_items` table will be returned.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return array|int Number of times a specific item has been purchased.
- */
- public function get_order_item_count( $query = array() ) {
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_order_items;
- $this->query_vars['column'] = 'id';
- $this->query_vars['date_query_column'] = 'date_created';
- $this->query_vars['status'] = array( 'complete', 'partially_refunded' );
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- $function = $this->get_amount_column_and_function( array(
- 'column_prefix' => $this->query_vars['table'],
- 'accepted_functions' => array( 'COUNT', 'AVG' ),
- ) );
-
- $product_id = ! empty( $this->query_vars['product_id'] )
- ? $this->get_db()->prepare( 'AND product_id = %d', absint( $this->query_vars['product_id'] ) )
- : '';
-
- $price_id = $this->generate_price_id_query_sql();
-
- $region = ! empty( $this->query_vars['region'] )
- ? $this->get_db()->prepare( 'AND edd_oa.region = %s', esc_sql( $this->query_vars['region'] ) )
- : '';
-
- $country = ! empty( $this->query_vars['country'] )
- ? $this->get_db()->prepare( 'AND edd_oa.country = %s', esc_sql( $this->query_vars['country'] ) )
- : '';
-
- $statuses = edd_get_net_order_statuses();
- $status_string = $this->get_placeholder_string( $statuses );
-
- $join = $this->get_db()->prepare(
- "INNER JOIN {$this->get_db()->edd_orders} edd_o ON ({$this->query_vars['table']}.order_id = edd_o.id) AND edd_o.status IN({$status_string}) AND edd_o.type = 'sale' ",
- ...$statuses
- );
-
- $currency = '';
- if ( ! empty( $country ) || ! empty( $region ) ) {
- $join .= " INNER JOIN {$this->get_db()->edd_order_addresses} edd_oa ON {$this->query_vars['table']}.order_id = edd_oa.order_id ";
- }
- if ( ! empty( $this->query_vars['currency'] ) && array_key_exists( strtoupper( $this->query_vars['currency'] ), edd_get_currencies() ) ) {
- $currency = $this->get_db()->prepare( "AND edd_o.currency = %s", strtoupper( $this->query_vars['currency'] ) );
- }
-
- // Calculating an average requires a subquery.
- if ( 'AVG' === $this->query_vars['function'] ) {
- $sql = "SELECT AVG(id) AS total
- FROM (
- SELECT COUNT({$this->query_vars['table']}.id) AS id
- FROM {$this->query_vars['table']}
- {$join}
- WHERE 1=1 {$product_id} {$price_id} {$region} {$country} {$currency} {$this->query_vars['status_sql']} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}
- GROUP BY order_id
- ) AS counts";
- } elseif ( true === $this->query_vars['grouped'] ) {
- $sql = "SELECT product_id, price_id, {$function} AS total
- FROM {$this->query_vars['table']}
- {$join}
- WHERE 1=1 {$product_id} {$price_id} {$region} {$country} {$currency} {$this->query_vars['status_sql']} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}
- GROUP BY product_id, price_id
- ORDER BY total DESC";
- } else {
- $sql = "SELECT {$function} AS total
- FROM {$this->query_vars['table']}
- {$join}
- WHERE 1=1 {$product_id} {$price_id} {$region} {$country} {$currency} {$this->query_vars['status_sql']} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}";
- }
-
- $result = $this->get_db()->get_results( $sql );
-
- if ( true === $this->query_vars['grouped'] ) {
- array_walk( $result, function ( &$value ) {
-
- // Format resultant object.
- $value->product_id = absint( $value->product_id );
- $value->price_id = is_numeric( $value->price_id ) ? absint( $value->price_id ) : null;
- $value->total = absint( $value->total );
-
- // Add instance of EDD_Download to resultant object.
- $value->object = edd_get_download( $value->product_id );
- } );
- } else {
- $result = null === $result[0]->total
- ? 0
- : absint( $result[0]->total );
- }
-
- // Reset query vars.
- $this->post_query();
-
- return $result;
- }
-
- /**
- * Calculate most valuable order items.
- *
- * @since 3.0
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type bool $exclude_taxes If taxes should be excluded from calculations. Default `false`.
- * @type string $function This method does not allow any SQL functions to be passed.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended to the
- * query.
- * @type int $number Number of order items to fetch. Default 1.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return array Array of objects with most valuable order items. Each object has the product ID, total earnings,
- * and an instance of EDD_Download.
- */
- public function get_most_valuable_order_items( $query = array() ) {
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_order_items;
- $this->query_vars['date_query_column'] = 'date_created';
- $this->query_vars['exclude_taxes'] = true;
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- // By default, the most valuable customer is returned.
- $number = isset( $this->query_vars['number'] )
- ? absint( $this->query_vars['number'] )
- : 1;
-
- $function = $this->get_amount_column_and_function( array(
- 'column_prefix' => $this->query_vars['table'],
- 'accepted_functions' => array( 'SUM' )
- ) );
-
- $statuses = edd_get_net_order_statuses();
- $status_string = $this->get_placeholder_string( $statuses );
-
- $where = $this->get_db()->prepare(
- "AND {$this->get_db()->edd_order_items}.status IN('complete','partially_refunded')
- AND {$this->get_db()->edd_orders}.status IN({$status_string}) ",
- ...$statuses
- );
- if ( ! empty( $this->query_vars['currency'] ) && array_key_exists( strtoupper( $this->query_vars['currency'] ), edd_get_currencies() ) ) {
- $where .= $this->get_db()->prepare(
- " AND {$this->get_db()->edd_orders}.currency = %s ",
- strtoupper( $this->query_vars['currency'] )
- );
- }
-
- $sql = "SELECT product_id, price_id, {$function} AS total
- FROM {$this->query_vars['table']}
- INNER JOIN {$this->get_db()->edd_orders} ON({$this->get_db()->edd_orders}.id = {$this->query_vars['table']}.order_id)
- WHERE 1=1 {$where} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}
- GROUP BY product_id, price_id
- ORDER BY total DESC
- LIMIT {$number}";
-
- $result = $this->get_db()->get_results( $sql );
-
- array_walk( $result, function ( &$value ) {
-
- // Format resultant object.
- $value->product_id = absint( $value->product_id );
- $value->price_id = is_numeric( $value->price_id ) ? absint( $value->price_id ) : null;
- $download_model = new \EDD\Models\Download(
- $value->product_id,
- $value->price_id,
- array(
- 'start' => $this->query_vars['start'],
- 'end' => $this->query_vars['end'],
- )
- );
-
- $value->sales = absint( $download_model->get_net_sales() );
- $value->total = $this->maybe_format($download_model->get_net_earnings() );
-
- // Add instance of EDD_Download to resultant object.
- $value->object = edd_get_download( $value->product_id );
- } );
-
- // Reset query vars.
- $this->post_query();
-
- return $result;
- }
-
- /** Discounts ************************************************************/
-
- /**
- * Calculate the usage count of discount codes.
- *
- * @since 3.0
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type string $function This method does not allow any SQL functions to be passed.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended
- * to the query.
- * @type string $discount_code Discount code to fetch the usage count for.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return int Number of times a discount code has been used.
- */
- public function get_discount_usage_count( $query = array() ) {
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_order_adjustments;
- $this->query_vars['column'] = 'id';
- $this->query_vars['date_query_column'] = 'date_created';
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- $discount_code = isset( $this->query_vars['discount_code'] )
- ? $this->get_db()->prepare( 'AND type = %s AND description = %s', 'discount', sanitize_text_field( $this->query_vars['discount_code'] ) )
- : $this->get_db()->prepare( 'AND type = %s', 'discount' );
-
- $sql = "SELECT COUNT({$this->query_vars['column']})
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$discount_code} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}";
-
- $result = $this->get_db()->get_var( $sql );
-
- $total = null === $result
- ? 0
- : absint( $result );
-
- // Reset query vars.
- $this->post_query();
-
- return $total;
- }
-
- /**
- * Retrieve the most popular discount code.
- *
- * @since 3.0
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type string $function This method does not allow any SQL functions to be passed.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended
- * to the query.
- * @type string $discount_code Discount code to fetch the usage count for.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return array Most popular discounts with usage count.
- */
- public function get_most_popular_discounts( $query = array() ) {
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_order_adjustments;
- $this->query_vars['column'] = 'id';
- $this->query_vars['date_query_column'] = 'date_created';
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- // By default, the most valuable discount is returned.
- $number = isset( $this->query_vars['number'] )
- ? absint( $this->query_vars['number'] )
- : 1;
-
- $discount = $this->get_db()->prepare( 'AND type = %s', 'discount' );
-
- $sql = "SELECT description AS code, COUNT({$this->query_vars['column']}) AS count
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$discount} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}
- GROUP BY description
- ORDER BY count DESC
- LIMIT {$number}";
-
- $result = $this->get_db()->get_results( $sql );
-
- array_walk( $result, function ( &$value ) {
-
- // Add instance of EDD_Discount to resultant object.
- $value->object = edd_get_discount_by_code( $value->code );
-
- // Format resultant object.
- if ( ! empty( $value->object ) ) {
- $value->discount_id = absint( $value->object->id );
- $value->count = absint( $value->count );
- } else {
- $value->discount_id = 0;
- $value->count = '—';
- }
- } );
-
- // Reset query vars.
- $this->post_query();
-
- return $result;
- }
-
- /**
- * Calculate the savings from using a discount code.
- *
- * @since 3.0
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type bool $exclude_taxes If taxes should be excluded from calculations. Default `false`.
- * @type string $function This method does not allow any SQL functions to be passed.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended
- * to the query.
- * @type string $discount_code Discount code to fetch the savings amount for. Default empty. If empty, the amount
- * saved from using any discount will be returned.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return float Savings from using a discount code.
- */
- public function get_discount_savings( $query = array() ) {
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_order_adjustments;
- $this->query_vars['column'] = true === $this->query_vars['exclude_taxes'] ? 'total - tax' : 'total';
- $this->query_vars['date_query_column'] = 'date_created';
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- $function = $this->get_amount_column_and_function( array(
- 'accepted_functions' => array( 'SUM' )
- ) );
-
- $discount_code = ! empty( $this->query_vars['discount_code'] )
- ? $this->get_db()->prepare( 'AND type = %s AND description = %s', 'discount', sanitize_text_field( $this->query_vars['discount_code'] ) )
- : $this->get_db()->prepare( 'AND type = %s', 'discount' );
-
- $sql = "SELECT {$function}
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$discount_code} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}";
-
- $result = $this->get_db()->get_var( $sql );
-
- $total = null === $result
- ? 0.00
- : floatval( $result );
-
- $total = $this->maybe_format( $total );
-
- // Reset query vars.
- $this->post_query();
-
- return $total;
- }
-
- /**
- * Calculate the average discount amount applied to an order.
- *
- * @since 3.0
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type bool $exclude_taxes If taxes should be excluded from calculations. Default `false`.
- * @type string $function This method does not allow any SQL functions to be passed.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended
- * to the query.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return float Average discount amount applied to an order.
- */
- public function get_average_discount_amount( $query = array() ) {
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_order_adjustments;
- $this->query_vars['column'] = 'total';
- $this->query_vars['date_query_column'] = 'date_created';
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- $function = $this->get_amount_column_and_function( array(
- 'accepted_functions' => array( 'AVG' )
- ) );
-
- $type_discount = $this->get_db()->prepare( 'AND type = %s', 'discount' );
-
- $sql = "SELECT {$function}
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$type_discount} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}";
-
- $result = $this->get_db()->get_var( $sql );
-
- $total = null === $result
- ? 0.00
- : floatval( $result );
-
- $total = $this->maybe_format( $total );
-
- // Reset query vars.
- $this->post_query();
-
- return $total;
- }
-
- /**
- * Calculate the ratio of discounted to non-discounted orders.
- *
- * @since 3.0
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type string $function This method does not allow any SQL functions to be passed.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended
- * to the query.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return string Ratio of discounted to non-discounted orders. Format is A:B where A and B are integers.
- */
- public function get_ratio_of_discounted_orders( $query = array() ) {
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_orders;
- $this->query_vars['column'] = 'id';
- $this->query_vars['date_query_column'] = 'date_created';
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- $sql = "SELECT COUNT(id) AS total, o.discounted_orders
- FROM {$this->query_vars['table']}
- CROSS JOIN (
- SELECT COUNT(id) AS discounted_orders
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$this->query_vars['status_sql']} AND discount > 0 {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}
- ) o
- WHERE 1=1 {$this->query_vars['status_sql']} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}";
-
- $result = $this->get_db()->get_row( $sql );
-
- // No need to calculate the ratio if there are no orders.
- if ( 0 === (int) $result->discounted_orders || 0 === (int) $result->total ) {
- return 0;
- }
-
- // Calculate GCD.
- $result->total = absint( $result->total );
- $result->discounted_orders = absint( $result->discounted_orders );
-
- $original_result = clone $result;
-
- while ( 0 !== $result->total ) {
- $remainder = $result->discounted_orders % $result->total;
- $result->discounted_orders = $result->total;
- $result->total = $remainder;
- }
-
- $ratio = absint( $result->discounted_orders );
-
- // Reset query vars.
- $this->post_query();
-
- // Return the formatted ratio.
- return ( $original_result->discounted_orders / $ratio ) . ':' . ( $original_result->total / $ratio );
- }
-
- /** Gateways *************************************************************/
-
- /**
- * Perform gateway calculations based on data passed.
- *
- * @internal This method must remain `private`, it exists to reduce duplicated code.
- *
- * @since 3.0
- * @access private
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * @type bool $exclude_taxes If taxes should be excluded from calculations. Default `false`.
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type string $function SQL function. Accepts `COUNT`, `AVG`, and `SUM`. Default `COUNT`.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended
- * to the query.
- * @type string $gateway Gateway name. This is checked against a list of registered payment gateways.
- * If a gateway is not passed, a list of objects are returned for each gateway and the
- * number of orders processed with that gateway.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return mixed array|int|float Either a list of payment gateways and counts or just a single value.
- */
- private function get_gateway_data( $query = array() ) {
- $query = wp_parse_args( $query, array(
- 'type' => 'sale',
- 'status' => edd_get_gross_order_statuses(),
- ) );
-
- $this->parse_query( $query );
-
- // Set up default values.
- $gateways = edd_get_payment_gateways();
- $defaults = array();
-
- // Set up an object for each gateway.
- foreach ( $gateways as $id => $data ) {
- $object = new \stdClass();
- $object->gateway = $id;
- $object->total = 0;
-
- $defaults[] = $object;
- }
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_orders;
- $this->query_vars['date_query_column'] = 'date_created';
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- $function = $this->get_amount_column_and_function( array(
- 'accepted_functions' => array( 'COUNT', 'AVG', 'SUM' )
- ) );
-
- $gateway = ! empty( $this->query_vars['gateway'] )
- ? $this->get_db()->prepare( 'AND gateway = %s', sanitize_text_field( $this->query_vars['gateway'] ) )
- : '';
-
- $sql = "SELECT gateway, {$function} AS total
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$this->query_vars['type_sql']} {$this->query_vars['status_sql']} {$this->query_vars['currency_sql']} {$gateway} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}
- GROUP BY gateway";
-
- $result = $this->get_db()->get_results( $sql );
-
- // Ensure count values are always valid integers if counting sales.
- if ( 'COUNT' === $this->query_vars['function'] ) {
- array_walk( $result, function ( &$value ) {
- $value->total = absint( $value->total );
- } );
- } elseif ( 'SUM' === $this->query_vars['function'] || 'AVG' === $this->query_vars['function'] ) {
- array_walk( $result, function ( &$value ) {
- $value->total = floatval( abs( $value->total ) );
- } );
- }
-
- if ( empty( $gateway ) && true === $this->query_vars['grouped'] ) {
- $results = array();
-
- // Merge defaults with values returned from the database.
- foreach ( $defaults as $key => $value ) {
-
- // Filter based on gateway.
- $filter = wp_filter_object_list( $result, array( 'gateway' => $value->gateway ) );
-
- $filter = ! empty( $filter )
- ? array_values( $filter )
- : array();
-
- if ( ! empty( $filter ) ) {
- $results[] = $filter[0];
- } else {
- $results[] = $defaults[ $key ];
- }
- }
- } elseif ( false === $this->query_vars['grouped'] ) {
- $total = 0;
-
- array_walk( $result, function( $value ) use ( &$total ) {
- $total += $value->total;
- } );
-
- $results = 'COUNT' === $this->query_vars['function']
- ? absint( $total )
- : $this->maybe_format( $total );
- }
-
- if ( ! empty( $gateway ) && true === $this->query_vars['grouped'] ) {
-
- // Filter based on gateway if passed.
- $filter = wp_filter_object_list( $result, array( 'gateway' => $this->query_vars['gateway'] ) );
-
- $results = 'COUNT' === $this->query_vars['function']
- ? absint( $filter[0]->total )
- : $this->maybe_format( $filter[0]->total );
- }
-
- // Reset query vars.
- $this->post_query();
-
- // Return array of objects with gateway name and count.
- return $results;
- }
-
- /**
- * Calculate the number of processed by a gateway.
- *
- * @since 3.0
- *
- * @see \EDD\Stats::get_gateway_data()
- *
- * @param array $query See \EDD\Stats::get_gateway_data().
- *
- * @return int|array List of objects containing the number of sales processed either for every gateway or the gateway
- * passed as a query parameter.
- */
- public function get_gateway_sales( $query = array() ) {
-
- $query['column'] = 'id';
- $query['function'] = 'COUNT';
-
- // Dispatch to \EDD\Stats::get_gateway_data().
- return $this->get_gateway_data( $query );
- }
-
- /**
- * Calculate the total order amount of processed by a gateway.
- *
- * @since 3.0
- *
- * @see \EDD\Stats::get_gateway_data()
- *
- * @param array $query See \EDD\Stats::get_gateway_data().
- *
- * @return array List of objects containing the amount processed either for every gateway or the gateway
- * passed as a query parameter.
- */
- public function get_gateway_earnings( $query = array() ) {
-
- // Summation is required as we are returning earnings.
- $query['function'] = isset( $query['function'] )
- ? $query['function']
- : 'SUM';
-
- // Dispatch to \EDD\Stats::get_gateway_data().
- $result = $this->get_gateway_data( $query );
-
- // Rename object var.
- if ( is_array( $result ) ) {
- array_walk( $result, function ( &$value ) {
- $value->earnings = $value->total;
- $value->earnings = $this->maybe_format( $value->earnings );
- unset( $value->total );
- } );
- } else {
- $result = $this->maybe_format( $result );
- }
-
- // Reset query vars.
- $this->post_query();
-
- // Return array of objects with gateway name and earnings.
- return $result;
- }
-
- /**
- * Calculate the amount for refunded orders processed by a gateway.
- *
- * @since 3.0
- *
- * @see \EDD\Stats::get_gateway_earnings()
- *
- * @param array $query See \EDD\Stats::get_gateway_earnings().
- *
- * @return array List of objects containing the amount for refunded orders processed either for every
- * gateway or the gateway passed as a query parameter.
- */
- public function get_gateway_refund_amount( $query = array() ) {
-
- // Ensure orders are refunded.
- $this->query_vars['where_sql'] = $this->get_db()->prepare( 'AND status = %s', 'refunded' );
-
- // Dispatch to \EDD\Stats::get_gateway_data().
- $result = $this->get_gateway_earnings( $query );
-
- // Reset query vars.
- $this->post_query();
-
- // Return array of objects with gateway name and amount from refunded orders.
- return $result;
- }
-
- /**
- * Calculate the average order amount of processed by a gateway.
- *
- * @since 3.0
- *
- * @see \EDD\Stats::get_gateway_data()
- *
- * @param array $query See \EDD\Stats::get_gateway_data().
- *
- * @return array List of objects containing the average order value processed either for every gateway
- * pr the gateway passed as a query parameter.
- */
- public function get_gateway_average_value( $query = array() ) {
-
- // Function needs to be `AVG`.
- $query['function'] = 'AVG';
-
- // Dispatch to \EDD\Stats::get_gateway_data().
- $result = $this->get_gateway_data( $query );
-
- // Rename object var.
- array_walk( $result, function( &$value ) {
- $value->earnings = $value->count;
- $value->earnings = $this->maybe_format( $value->earnings );
- unset( $value->count );
- } );
-
- // Reset query vars.
- $this->post_query();
-
- // Return array of objects with gateway name and earnings.
- return $result;
- }
-
- /** Tax ******************************************************************/
-
- /**
- * Calculate total tax collected.
- *
- * @since 3.0
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type string $function SQL function. Accepts `SUM` and `AVG`. Default `SUM`.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended
- * to the query.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return string Formatted amount of total tax collected.
- */
- public function get_tax( $query = array() ) {
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_orders;
- $this->query_vars['column'] = 'tax';
- $this->query_vars['date_query_column'] = 'date_created';
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- $function = $this->get_amount_column_and_function( array(
- 'accepted_functions' => array( 'SUM', 'AVG' )
- ) );
-
- $product_id = ! empty( $this->query_vars['download_id'] )
- ? $this->get_db()->prepare( 'AND product_id = %d', absint( $this->query_vars['download_id'] ) )
- : '';
-
- $price_id = $this->generate_price_id_query_sql();
-
- if ( true === $this->query_vars['relative'] ) {
- $relative_date_query_sql = $this->generate_relative_date_query_sql();
-
- $sql = "SELECT IFNULL({$function}, 0) AS total, IFNULL(relative, 0) AS relative
- FROM {$this->query_vars['table']}
- CROSS JOIN (
- SELECT IFNULL({$function}, 0) AS relative
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$this->query_vars['status_sql']} {$this->query_vars['currency_sql']} {$this->query_vars['where_sql']} {$relative_date_query_sql}
- ) o
- WHERE 1=1 {$this->query_vars['status_sql']} {$this->query_vars['currency_sql']} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}";
- } elseif ( ! empty( $product_id ) || ! empty( $price_id ) ) {
-
- // Regenerate SQL clauses due to alias.
- $table = $this->query_vars['table'];
- $this->query_vars['table'] = 'o';
- $this->pre_query( $query );
- $this->query_vars['table'] = $table;
-
- $function = $this->get_amount_column_and_function( array(
- 'column_prefix' => 'oi',
- 'accepted_functions' => array( 'SUM', 'AVG' )
- ) );
-
- $sql = "SELECT {$function} AS total
- FROM {$this->query_vars['table']} o
- INNER JOIN {$this->get_db()->edd_order_items} oi ON o.id = oi.order_id
- WHERE 1=1 {$product_id} {$price_id} {$this->query_vars['status_sql']} {$this->query_vars['currency_sql']} {$this->query_vars['date_query_sql']}";
-
- $this->pre_query( $query );
- } else {
- $sql = "SELECT {$function} AS total
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$this->query_vars['status_sql']} {$this->query_vars['currency_sql']} {$this->query_vars['date_query_sql']}";
- }
-
- $result = $this->get_db()->get_row( $sql );
-
- $total = null === $result->total
- ? 0.00
- : (float) $result->total;
-
- if ( true === $this->query_vars['relative'] ) {
- $total = floatval( $result->total );
- $relative = floatval( $result->relative );
- $total = $this->generate_relative_markup( $total, $relative );
- } else {
- $total = $this->maybe_format( $total );
- }
-
- // Reset query vars.
- $this->post_query();
-
- return $total;
- }
-
- /**
- * Calculate total tax collected for country and state passed.
- *
- * @since 3.0
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type string $function SQL function. Default `COUNT`.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended
- * to the query.
- * @type string $country Country name. Defaults to store's base country.
- * @type string $region Region name. Defaults to store's base state.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return string Formatted amount of total tax collected for country and state passed.
- */
- public function get_tax_by_location( $query = array() ) {
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_orders;
- $this->query_vars['column'] = 'tax';
- $this->query_vars['date_query_column'] = 'date_created';
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- $function = $this->get_amount_column_and_function( array(
- 'column_prefix' => $this->query_vars['table'],
- 'accepted_functions' => array( 'SUM', 'AVG' )
- ) );
-
- $region = ! empty( $this->query_vars['region'] )
- ? $this->get_db()->prepare( 'AND oa.region = %s', esc_sql( $this->query_vars['region'] ) )
- : '';
-
- $country = ! empty( $this->query_vars['country'] )
- ? $this->get_db()->prepare( 'AND oa.country = %s', esc_sql( $this->query_vars['country'] ) )
- : '';
-
- $product_id = ! empty( $this->query_vars['download_id'] )
- ? $this->get_db()->prepare( 'AND oi.product_id = %d', absint( $this->query_vars['download_id'] ) )
- : '';
-
- $price_id = ! is_null( $this->query_vars['price_id'] ) && is_numeric( $this->query_vars['price_id'] )
- ? $this->get_db()->prepare( 'AND oi.price_id = %d', absint( $this->query_vars['price_id'] ) )
- : '';
-
- $join = ! empty( $product_id )
- ? "INNER JOIN {$this->get_db()->edd_order_items} oi ON {$this->query_vars['table']}.id = oi.order_id"
- : '';
-
- // Re-parse function to fetch tax from the order items table.
- if ( ! empty( $product_id ) && 'tax' === $this->query_vars['column'] ) {
- $function = $this->get_amount_column_and_function( array(
- 'column_prefix' => 'oi',
- 'accepted_functions' => array( 'SUM', 'AVG' )
- ) );
- }
-
- $sql = "SELECT {$function} AS total
- FROM {$this->query_vars['table']}
- INNER JOIN {$this->get_db()->edd_order_addresses} oa ON {$this->query_vars['table']}.id = oa.order_id
- {$join}
- WHERE 1=1 {$region} {$country} {$product_id} {$price_id} {$this->query_vars['status_sql']} {$this->query_vars['currency_sql']} {$this->query_vars['date_query_sql']}";
-
- $result = $this->get_db()->get_row( $sql );
-
- $total = null === $result->total
- ? 0.00
- : (float) $result->total;
-
- $total = $this->maybe_format( $total );
-
- // Reset query vars.
- $this->post_query();
-
- return $total;
- }
-
- /** Customers ************************************************************/
-
- /**
- * Calculate the number of customers.
- *
- * @since 3.0
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type string $function This method does not allow any SQL functions to be passed.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended
- * to the query.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return int Number of customers.
- */
- public function get_customer_count( $query = array() ) {
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_customers;
- $this->query_vars['column'] = 'id';
- $this->query_vars['date_query_column'] = 'date_created';
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- $where = $this->query_vars['where_sql'];
- // Allow `purchase_count` to be set to `true` to query only customers with orders.
- if ( isset( $query['purchase_count'] ) && true === $query['purchase_count'] ) {
- $where .= " AND {$this->query_vars['table']}.purchase_count > 0";
- }
-
- if ( true === $this->query_vars['relative'] ) {
- $relative_date_query_sql = $this->generate_relative_date_query_sql();
-
- $sql = "SELECT IFNULL(COUNT(id), 0) AS total, IFNULL(relative, 0) AS relative
- FROM {$this->query_vars['table']}
- CROSS JOIN (
- SELECT IFNULL(COUNT(id), 0) AS relative
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$where} {$relative_date_query_sql}
- ) o
- WHERE 1=1 {$where} {$this->query_vars['date_query_sql']}";
- } else {
- $sql = "SELECT COUNT(id) AS total
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$where} {$this->query_vars['date_query_sql']}";
- }
-
- $result = $this->get_db()->get_row( $sql );
-
- $total = null === $result->total
- ? 0
- : absint( $result->total );
-
- if ( 'array' === $this->query_vars['output'] ) {
- $output = array(
- 'value' => $total,
- 'relative_data' => ( true === $this->query_vars['relative'] ) ? $this->generate_relative_data( absint( $result->total ), absint( $result->relative ) ) : array(),
- );
- } else {
- if ( true === $this->query_vars['relative'] ) {
- $output = $this->generate_relative_markup( absint( $result->total ), absint( $result->relative ) );
- } else {
- $output = $this->maybe_format( $total );
- }
- }
-
- // Reset query vars.
- $this->post_query();
-
- return $output;
- }
-
- /**
- * Calculate the lifetime value of a customer.
- *
- * @since 3.0
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type bool $exclude_taxes If taxes should be excluded from calculations. Default `false`.
- * @type string $function SQL function. Accepts `AVG` and `SUM`. Default `SUM`.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended
- * to the query.
- * @type int $customer_id Customer ID. Default empty.
- * @type int $user_id User ID. Default empty.
- * @type string $email Email address.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return string Formatted lifetime value of a customer.
- */
- public function get_customer_lifetime_value( $query = array() ) {
- $this->parse_query( $query );
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_orders;
- $this->query_vars['column'] = 'total';
- $this->query_vars['date_query_column'] = 'date_created';
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- $function = $this->get_amount_column_and_function( array(
- 'accepted_functions' => array( 'SUM', 'AVG' )
- ) );
-
- $user = isset( $this->query_vars['user_id'] )
- ? $this->get_db()->prepare( 'AND user_id = %d', absint( $this->query_vars['user_id'] ) )
- : '';
-
- $customer = isset( $this->query_vars['customer'] )
- ? $this->get_db()->prepare( 'AND customer_id = %d', absint( $this->query_vars['customer'] ) )
- : '';
-
- $email = isset( $this->query_vars['email'] )
- ? $this->get_db()->prepare( 'AND email = %s', absint( $this->query_vars['email'] ) )
- : '';
-
- $function = $this->get_amount_column_and_function( array(
- 'accepted_functions' => array( 'SUM', 'AVG' ),
- 'rate' => false
- ) );
-
- $inner_function = $this->get_amount_column_and_function( array(
- 'accepted_functions' => array( 'SUM' )
- ) );
-
- $sql = "SELECT {$function} AS total
- FROM (
- SELECT {$inner_function} AS total
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$this->query_vars['status_sql']} {$this->query_vars['currency_sql']} {$user} {$customer} {$email} {$this->query_vars['date_query_sql']}
- GROUP BY customer_id
- ) o";
-
- $result = $this->get_db()->get_row( $sql );
-
- $total = null === $result->total
- ? 0.00
- : (float) $result->total;
-
- $total = $this->maybe_format( $total );
-
- // Reset query vars.
- $this->post_query();
-
- return $total;
- }
-
- /**
- * Calculate the number of orders made by a customer.
- *
- * @since 3.0
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type string $function SQL function. Accepts `AVG` and `SUM`. Default `SUM`.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended
- * to the query.
- * @type int $customer_id Customer ID. Default empty.
- * @type int $user_id User ID. Default empty.
- * @type string $email Email address.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return int Number of orders made by a customer.
- */
- public function get_customer_order_count( $query = array() ) {
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_orders;
- $this->query_vars['column'] = 'id';
- $this->query_vars['date_query_column'] = 'date_created';
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- $function = $this->get_amount_column_and_function( array(
- 'accepted_functions' => array( 'COUNT', 'AVG' )
- ) );
-
- $user = isset( $this->query_vars['user_id'] )
- ? $this->get_db()->prepare( 'AND user_id = %d', absint( $this->query_vars['user_id'] ) )
- : '';
-
- $customer = isset( $this->query_vars['customer'] )
- ? $this->get_db()->prepare( 'AND customer_id = %d', absint( $this->query_vars['customer'] ) )
- : '';
-
- $email = isset( $this->query_vars['email'] )
- ? $this->get_db()->prepare( 'AND email = %s', sanitize_email( $this->query_vars['email'] ) )
- : '';
-
- if ( true === $this->query_vars['relative'] ) {
- $relative_date_query_sql = $this->generate_relative_date_query_sql();
-
- if ( 'AVG(id)' === $function ) {
- $sql = "SELECT COUNT(id) / COUNT(DISTINCT customer_id) AS total, IFNULL(relative, 0) AS relative
- FROM {$this->query_vars['table']}
- CROSS JOIN (
- SELECT COUNT(id) / COUNT(DISTINCT customer_id) AS relative
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$this->query_vars['status_sql']} {$user} {$customer} {$email} {$this->query_vars['where_sql']} {$relative_date_query_sql}
- ) o
- WHERE 1=1 {$this->query_vars['status_sql']} {$user} {$customer} {$email} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}";
- } else {
- $sql = "SELECT COUNT(id) AS total, IFNULL(relative, 0) AS relative
- FROM {$this->query_vars['table']}
- CROSS JOIN (
- SELECT COUNT(id), IFNULL(relative, 0) AS relative
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$this->query_vars['status_sql']} {$user} {$customer} {$email} {$this->query_vars['where_sql']} {$relative_date_query_sql}
- ) o
- WHERE 1=1 {$this->query_vars['status_sql']} {$user} {$customer} {$email} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}";
- }
- } else {
- if ( 'AVG(id)' === $function ) {
- $sql = "SELECT COUNT(id) / COUNT(DISTINCT customer_id) AS total
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$this->query_vars['status_sql']} {$user} {$customer} {$email} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}";
- } else {
- $sql = "SELECT COUNT(id) as total
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$this->query_vars['status_sql']} {$user} {$customer} {$email} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}";
- }
- }
- $result = $this->get_db()->get_row( $sql );
-
- $total = null === $result
- ? 0
- : absint( $result->total );
-
- if ( true === $this->query_vars['relative'] ) {
- $total = absint( $result->total );
- $relative = absint( $result->relative );
- $total = $this->generate_relative_markup( $total, $relative );
- } else {
- $total = $this->maybe_format( $total );
- }
-
- // Reset query vars.
- $this->post_query();
- return $total;
- }
-
- /**
- * Calculate the average age of a customer.
- *
- * @since 3.0
- *
- * @see \EDD\Stats::get_order_count()
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type string $function This method does not allow any SQL functions to be passed.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended
- * to the query.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return int|float Average age of a customer.
- */
- public function get_customer_age( $query = array() ) {
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_customers;
- $this->query_vars['column'] = 'id';
- $this->query_vars['date_query_column'] = 'date_created';
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- $sql = "SELECT AVG(DATEDIFF(NOW(), date_created))
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$this->query_vars['date_query_sql']}";
-
- $result = $this->get_db()->get_var( $sql );
-
- // Reset query vars.
- $this->post_query();
-
- return null === $result
- ? 0
- : round( $result, 2 );
- }
-
- /**
- * Calculate the most valuable customers.
- *
- * @since 3.0
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type bool $exclude_taxes If taxes should be excluded from calculations. Default `false`.
- * @type string $function This method does not allow any SQL functions to be passed.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended
- * to the query.
- * @type int $number Number of customers to fetch. Default 1.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return array Array of objects with most valuable customers. Each object has the customer ID, total amount spent
- * by that customer and an instance of EDD_Customer.
- */
- public function get_most_valuable_customers( $query = array() ) {
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_orders;
- $this->query_vars['column'] = 'id';
- $this->query_vars['date_query_column'] = 'date_created';
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- // By default, the most valuable customer is returned.
- $number = isset( $this->query_vars['number'] )
- ? absint( $this->query_vars['number'] )
- : 1;
-
- $column = true === $this->query_vars['exclude_taxes']
- ? 'total - tax'
- : 'total';
-
- $sql = "SELECT customer_id, SUM({$column}) AS total
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$this->query_vars['status_sql']} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}
- GROUP BY customer_id
- ORDER BY total DESC
- LIMIT {$number}";
-
- $result = $this->get_db()->get_results( $sql );
-
- array_walk( $result, function ( &$value ) {
-
- // Format resultant object.
- $value->customer_id = absint( $value->customer_id );
- $value->total = $this->maybe_format( $value->total );
-
- // Add instance of EDD_Download to resultant object.
- $value->object = edd_get_customer( $value->customer_id );
- } );
-
- // Reset query vars.
- $this->post_query();
-
- return $result;
- }
-
- /** File Downloads *******************************************************/
-
- /**
- * Calculate the number of file downloads.
- *
- * @since 3.0
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type string $function SQL function. Accepts `COUNT` and `AVG`. Default `COUNT`.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended
- * to the query.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return int Number of file downloads.
- */
- public function get_file_download_count( $query = array() ) {
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_logs_file_downloads;
- $this->query_vars['column'] = 'id';
- $this->query_vars['date_query_column'] = 'date_created';
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- // Only `COUNT` and `AVG` are accepted by this method.
- $accepted_functions = array( 'COUNT', 'AVG' );
-
- $function = isset( $this->query_vars['function'] ) && in_array( strtoupper( $this->query_vars['function'] ), $accepted_functions, true )
- ? $this->query_vars['function'] . "({$this->query_vars['column']})"
- : 'COUNT(id)';
-
- $product_id = ! empty( $this->query_vars['download_id'] )
- ? $this->get_db()->prepare( 'AND product_id = %d', absint( $this->query_vars['download_id'] ) )
- : '';
-
- $price_id = $this->generate_price_id_query_sql();
-
- if ( true === $this->query_vars['relative'] ) {
- $relative_date_query_sql = $this->generate_relative_date_query_sql();
-
- $sql = "SELECT IFNULL({$function}, 0) AS total, IFNULL(relative, 0) AS relative
- FROM {$this->query_vars['table']}
- CROSS JOIN (
- SELECT IFNULL({$function}, 0) AS relative
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$this->query_vars['where_sql']} {$relative_date_query_sql}
- ) o
- WHERE 1=1 {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}";
- } else {
- $sql = "SELECT {$function} AS total
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$product_id} {$price_id} {$this->query_vars['date_query_sql']}";
- }
-
- $result = $this->get_db()->get_row( $sql );
-
- $total = null === $result->total
- ? 0
- : absint( $result->total );
-
- if ( true === $this->query_vars['relative'] ) {
- $total = absint( $result->total );
- $relative = absint( $result->relative );
- $total = $this->generate_relative_markup( $total, $relative );
- } else {
- $total = $this->maybe_format( $total );
- }
-
- // Reset query vars.
- $this->post_query();
-
- return $total;
- }
-
- /**
- * Calculate most downloaded products.
- *
- * @since 3.0
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type string $function SQL function. Accepts `COUNT` and `AVG`. Default `COUNT`.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended
- * to the query.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return array Array of objects with most valuable order items. Each object has the product ID, number of downloads,
- * and an instance of EDD_Download.
- */
- public function get_most_downloaded_products( $query = array() ) {
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_logs_file_downloads;
- $this->query_vars['column'] = 'id';
- $this->query_vars['date_query_column'] = 'date_created';
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- // By default, the most valuable customer is returned.
- $number = isset( $this->query_vars['number'] )
- ? absint( $this->query_vars['number'] )
- : 1;
-
- $sql = "SELECT product_id, file_id, COUNT(id) AS total
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}
- GROUP BY product_id
- ORDER BY total DESC
- LIMIT {$number}";
-
- $result = $this->get_db()->get_results( $sql );
-
- array_walk( $result, function ( &$value ) {
-
- // Format resultant object.
- $value->product_id = absint( $value->product_id );
- $value->file_id = absint( $value->file_id );
- $value->total = absint( $value->total );
-
- // Add instance of EDD_Download to resultant object.
- $value->object = edd_get_download( $value->product_id );
- } );
-
- // Reset query vars.
- $this->post_query();
-
- return $result;
- }
-
- /**
- * Calculate average number of file downloads.
- *
- * @since 3.0
- *
- * @param array $query {
- * Optional. Array of query parameters.
- * Default empty.
- *
- * Each method accepts query parameters to be passed. Parameters passed to methods override the ones passed in
- * the constructor. This is by design to allow for multiple calculations to be executed from one instance of
- * this class.
- *
- * @type string $start Start day and time (based on the beginning of the given day).
- * @type string $end End day and time (based on the end of the given day).
- * @type string $range Date range. If a range is passed, this will override and `start` and `end`
- * values passed. See \EDD\Reports\get_dates_filter_options() for valid date ranges.
- * @type string $function SQL function. Accepts `COUNT` and `AVG`. Default `COUNT`.
- * @type string $where_sql Reserved for internal use. Allows for additional WHERE clauses to be appended
- * to the query.
- * @type string $output The output format of the calculation. Accepts `raw` and `formatted`. Default `raw`.
- * }
- *
- * @return int Average file downloads.
- */
- public function get_average_file_download_count( $query = array() ) {
-
- // Add table and column name to query_vars to assist with date query generation.
- $this->query_vars['table'] = $this->get_db()->edd_logs_file_downloads;
- $this->query_vars['column'] = 'customer_id';
- $this->query_vars['date_query_column'] = 'date_created';
-
- // Run pre-query checks and maybe generate SQL.
- $this->pre_query( $query );
-
- $product_id = ! empty( $this->query_vars['download_id'] )
- ? $this->get_db()->prepare( 'AND product_id = %d', absint( $this->query_vars['download_id'] ) )
- : '';
-
- $price_id = $this->generate_price_id_query_sql();
-
- $file_id = ! empty( $this->query_vars['file_id'] )
- ? $this->get_db()->prepare( 'AND file_id = %d', absint( $this->query_vars['file_id'] ) )
- : '';
-
- $sql = "SELECT AVG(total) AS total
- FROM (
- SELECT {$this->query_vars['column']}, COUNT(id) AS total
- FROM {$this->query_vars['table']}
- WHERE 1=1 {$product_id} {$price_id} {$this->query_vars['where_sql']} {$this->query_vars['date_query_sql']}
- GROUP BY {$this->query_vars['column']}
- ) o";
-
- $result = $this->get_db()->get_var( $sql );
-
- $result = null === $result
- ? 0
- : absint( $result );
-
- // Reset query vars.
- $this->post_query();
-
- return $result;
- }
-
- /** Private Methods ******************************************************/
-
- /**
- * Parse query vars to be passed to the calculation methods.
- *
- * @since 3.0
- * @access private
- *
- * @see \EDD\Stats::__construct()
- *
- * @param array $query Array of arguments. See \EDD\Stats::__construct().
- */
- private function parse_query( $query = array() ) {
- $query_var_defaults = array(
- 'start' => '',
- 'end' => '',
- 'range' => '',
- 'exclude_taxes' => false,
- 'currency' => false,
- 'currency_sql' => '',
- 'status' => array(),
- 'status_sql' => '',
- 'type' => array(),
- 'type_sql' => '',
- 'where_sql' => '',
- 'date_query_sql' => '',
- 'date_query_column' => '',
- 'column' => '',
- 'table' => '',
- 'function' => 'SUM',
- 'output' => 'raw',
- 'relative' => false,
- 'relative_start' => '',
- 'relative_end' => '',
- 'grouped' => false,
- 'product_id' => '',
- 'price_id' => null,
- 'revenue_type' => 'gross',
- 'country' => '',
- 'region' => '',
- );
-
- if ( empty( $this->query_vars ) ) {
- $this->query_vars_defaults = $this->query_vars = wp_parse_args( $query, $query_var_defaults );
- } else {
- $this->query_vars = wp_parse_args( $query, $this->query_vars );
- }
-
- // Use Carbon to set up start and end date based on range passed.
- if ( ! empty( $this->query_vars['range'] ) && isset( $this->date_ranges[ $this->query_vars['range'] ] ) ) {
-
- if ( ! empty( $this->date_ranges[ $this->query_vars['range'] ]['start'] ) ) {
- $this->query_vars['start'] = $this->date_ranges[ $this->query_vars['range'] ]['start']->format( 'mysql' );
- }
-
- if ( ! empty( $this->date_ranges[ $this->query_vars['range'] ]['end'] ) ) {
- $this->query_vars['end'] = $this->date_ranges[ $this->query_vars['range'] ]['end']->format( 'mysql' );
- }
- }
-
- // Use Carbon to set up start and end date based on range passed.
- if ( true === $this->query_vars['relative'] && ! empty( $this->query_vars['range'] ) && isset( $this->relative_date_ranges[ $this->query_vars['range'] ] ) ) {
-
- if ( ! empty( $this->relative_date_ranges[ $this->query_vars['range'] ]['start'] ) ) {
- $this->query_vars['relative_start'] = $this->relative_date_ranges[ $this->query_vars['range'] ]['start']->format( 'mysql' );
- }
-
- if ( ! empty( $this->relative_date_ranges[ $this->query_vars['range'] ]['end'] ) ) {
- $this->query_vars['relative_end'] = $this->relative_date_ranges[ $this->query_vars['range'] ]['end']->format( 'mysql' );
- }
- }
-
- // Validate currency.
- if ( empty( $this->query_vars['currency'] ) ) {
- $this->query_vars['currency'] = false;
- } elseif ( array_key_exists( strtoupper( $this->query_vars['currency'] ), edd_get_currencies() ) ) {
- $this->query_vars['currency'] = strtoupper( $this->query_vars['currency'] );
- } else {
- $this->query_vars['currency'] = 'convert';
- }
-
- // Correctly format functions and column names.
- if ( ! empty( $this->query_vars['function'] ) ) {
- $this->query_vars['function'] = strtoupper( $this->query_vars['function'] );
- }
-
- if ( ! empty( $this->query_vars['column'] ) ) {
- $this->query_vars['column'] = strtolower( $this->query_vars['column'] );
- }
-
- /** Parse country ****************************************************/
- $country = isset( $this->query_vars['country'] )
- ? sanitize_text_field( $this->query_vars['country'] )
- : '';
-
- if ( $country ) {
- $country_list = array_filter( edd_get_country_list() );
-
- // Maybe convert country code to country name.
- $country = in_array( $country, array_flip( $country_list ), true )
- ? $country_list[ $country ]
- : $country;
-
- // Ensure a valid county has been passed.
- $country = in_array( $country, $country_list, true )
- ? $country
- : null;
-
- // Convert back to country code for SQL query.
- $country_list = array_flip( $country_list );
- $this->query_vars['country'] = is_null( $country )
- ? ''
- : $country_list[ $country ];
- }
-
- /** Parse state ******************************************************/
-
- $state = isset( $this->query_vars['region'] )
- ? sanitize_text_field( $this->query_vars['region'] )
- : '';
-
- // Only parse state if one was passed.
- if ( $state ) {
- $state_list = array_filter( edd_get_shop_states( $this->query_vars['country'] ) );
-
- // Maybe convert state code to state name.
- $state = in_array( $state, array_flip( $state_list ), true )
- ? $state_list[ $state ]
- : $state;
-
- // Ensure a valid state has been passed.
- $state = in_array( $state, $state_list, true )
- ? $state
- : null;
-
- // Convert back to state code for SQL query.
- $state_codes = array_flip( $state_list );
- $this->query_vars['region'] = is_null( $state )
- ? ''
- : $state_codes[ $state ];
- }
-
- /**
- * Fires after the item query vars have been parsed.
- *
- * @since 3.0
- *
- * @param \EDD\Stats &$this The \EDD\Stats (passed by reference).
- */
- do_action_ref_array( 'edd_order_stats_parse_query', array( &$this ) );
- }
-
- /**
- * Ensures arguments exist before going ahead and calculating statistics.
- *
- * @since 3.0
- * @access private
- *
- * @param array $query
- */
- private function pre_query( $query = array() ) {
-
- // Maybe parse query.
- if ( ! empty( $query ) ) {
- $this->parse_query( $query );
- }
-
- // Generate date query SQL if dates have been set.
- if ( ! empty( $this->query_vars['start'] ) || ! empty( $this->query_vars['end'] ) ) {
- $date_query_sql = ' AND ';
-
- if ( ! empty( $this->query_vars['start'] ) ) {
- $start_date = EDD()->utils->date( $this->query_vars['start'], edd_get_timezone_id(), false )->format( 'mysql' );
- $date_query_sql .= "{$this->query_vars['table']}.{$this->query_vars['date_query_column']} ";
- $date_query_sql .= $this->get_db()->prepare( '>= %s', $start_date );
- }
-
- // Join dates with `AND` if start and end date set.
- if ( ! empty( $this->query_vars['start'] ) && ! empty( $this->query_vars['end'] ) ) {
- $date_query_sql .= ' AND ';
- }
-
- if ( ! empty( $this->query_vars['end'] ) ) {
- $end_date = EDD()->utils->date( $this->query_vars['end'], edd_get_timezone_id(), false )->format( 'mysql' );
- $date_query_sql .= $this->get_db()->prepare( "{$this->query_vars['table']}.{$this->query_vars['date_query_column']} <= %s", $end_date );
- }
-
- $this->query_vars['date_query_sql'] = $date_query_sql;
- }
-
- // Generate status SQL if statuses have been set.
- if ( ! empty( $this->query_vars['status'] ) ) {
- if ( 'any' === $this->query_vars['status'] ) {
- $this->query_vars['status_sql'] = '';
- } else {
- $this->query_vars['status'] = array_map( 'sanitize_text_field', $this->query_vars['status'] );
-
- $placeholders = $this->get_placeholder_string( $this->query_vars['status'] );
-
- $this->query_vars['status_sql'] = $this->get_db()->prepare( "AND {$this->query_vars['table']}.status IN ({$placeholders})", $this->query_vars['status'] );
- }
- }
-
- if ( ! empty( $this->query_vars['type'] ) ) {
-
- // We always want to format this as an array, so account for a possible string.
- if ( ! is_array( $this->query_vars['type'] ) ) {
- $this->query_vars['type'] = array( $this->query_vars['type'] );
- }
-
- $this->query_vars['type'] = array_map( 'sanitize_text_field', $this->query_vars['type'] );
-
- $placeholders = $this->get_placeholder_string( $this->query_vars['type'] );
-
- $this->query_vars['type_sql'] = $this->get_db()->prepare( "AND {$this->query_vars['table']}.type IN ({$placeholders})", $this->query_vars['type'] );
- }
-
- if ( ! empty( $this->query_vars['currency'] ) && 'convert' !== strtolower( $this->query_vars['currency'] ) ) {
- $this->query_vars['currency_sql'] = $this->get_db()->prepare( "AND {$this->query_vars['table']}.currency = %s", $this->query_vars['currency'] );
- }
- }
-
- /**
- * Runs after a query. Resets query vars back to the originals passed in via the constructor.
- *
- * @since 3.0
- * @access private
- */
- private function post_query() {
- $this->query_vars = $this->query_var_originals;
- }
-
- /**
- * Format the data if requested via the query parameter.
- *
- * @since 3.0
- * @access private
- *
- * @param mixed $data Data to format.
- *
- * @return mixed Raw or formatted data depending on query parameter.
- */
- private function maybe_format( $data = null ) {
-
- // Bail if nothing was passed.
- if ( null === $data ) {
- return $data;
- }
-
- $allowed_output_formats = array( 'raw', 'typed', 'formatted' );
-
- // Output format. Default raw.
- $output = isset( $this->query_vars['output'] ) && in_array( $this->query_vars['output'], $allowed_output_formats, true )
- ? $this->query_vars['output']
- : 'raw';
-
- // Return data as is if the format is raw.
- if ( 'raw' === $output ) {
- return $data;
- }
-
- $currency = $this->query_vars['currency'];
- if ( empty( $currency ) || 'convert' === strtolower( $currency ) ) {
- $currency = edd_get_currency();
- }
-
- if ( is_object( $data ) ) {
- foreach ( array_keys( get_object_vars( $data ) ) as $field ) {
- if ( is_numeric( $data->{$field} ) ) {
- $data->{$field} = edd_format_amount( $data->{$field}, true, $currency, $output );
-
- if ( 'formatted' === $output ) {
- $data->{$field} = edd_currency_filter( $data->{$field}, $currency );
- }
- }
- }
- } elseif ( is_array( $data ) ) {
- foreach ( array_keys( $data ) as $field ) {
- if ( is_numeric( $data[ $field ] ) ) {
- $data[ $field ] = edd_format_amount( $data[ $field ], true, $currency, $output );
-
- if ( 'formatted' === $output ) {
- $data[ $field ] = edd_currency_filter( $data[ $field ], $currency );
- }
- }
- }
- } else {
- if ( is_numeric( $data ) ) {
- $data = edd_format_amount( $data, true, $currency, $output );
-
- if ( 'formatted' === $output ) {
- $data = edd_currency_filter( $data, $currency );
- }
- }
- }
-
- return $data;
- }
-
- /**
- * Generate date query SQL for relative time periods.
- *
- * @since 3.0
- * @access protected
- *
- * @return string Date query SQL.
- */
- private function generate_relative_date_query_sql() {
-
- // Bail if relative calculation not requested.
- if ( false === $this->query_vars['relative'] ) {
- return '';
- }
-
- // Generate date query SQL if dates have been set.
- if ( ! empty( $this->query_vars['relative_start'] ) || ! empty( $this->query_vars['relative_end'] ) ) {
- $date_query_sql = "AND {$this->query_vars['table']}.{$this->query_vars['date_query_column']} ";
-
- if ( ! empty( $this->query_vars['relative_start'] ) ) {
- $date_query_sql .= $this->get_db()->prepare( '>= %s', $this->query_vars['relative_start'] );
- }
-
- // Join dates with `AND` if start and end date set.
- if ( ! empty( $this->query_vars['relative_start'] ) && ! empty( $this->query_vars['relative_end'] ) ) {
- $date_query_sql .= ' AND ';
- }
-
- if ( ! empty( $this->query_vars['relative_end'] ) ) {
- $date_query_sql .= $this->get_db()->prepare( "{$this->query_vars['table']}.{$this->query_vars['date_query_column']} <= %s", $this->query_vars['relative_end'] );
- }
-
- return $date_query_sql;
- }
- }
-
- /**
- * Generates price ID query SQL.
- *
- * @since 3.0
- * @return string
- */
- private function generate_price_id_query_sql() {
- return ! is_null( $this->query_vars['price_id'] ) && is_numeric( $this->query_vars['price_id'] )
- ? $this->get_db()->prepare( "AND {$this->query_vars['table']}.price_id = %d", absint( $this->query_vars['price_id'] ) )
- : '';
- }
-
- /** Private Getters *******************************************************/
-
- /**
- * Return the global database interface.
- *
- * @since 3.0
- * @access private
- * @static
- *
- * @return \wpdb|\stdClass
- */
- private static function get_db() {
- return isset( $GLOBALS['wpdb'] )
- ? $GLOBALS['wpdb']
- : new \stdClass();
- }
-
- /** Private Setters ******************************************************/
-
- /**
- * Set up the date ranges available.
- *
- * @since 3.0
- * @access private
- */
- private function set_date_ranges() {
-
- // Retrieve the time in UTC for the date ranges to be correctly parsed.
- $date = EDD()->utils->date( 'now', edd_get_timezone_id(), false );
-
- $date_filters = Reports\get_dates_filter_options();
- $filter = Reports\get_filter_value( 'dates' );
-
- foreach ( $date_filters as $range => $label ) {
- $this->date_ranges[ $range ] = Reports\parse_dates_for_range( $range );
- $this->relative_date_ranges[ $range ] = Reports\parse_relative_dates_for_range( $range );
- }
-
- }
-
- /**
- * Based on the query_vars['revenue_type'], use gross or net statuses.
- *
- * @since 3.0
- *
- * @return array The statuses of orders to use for the stats generation.
- */
- private function get_revenue_type_statuses() {
- if ( 'net' === $this->query_vars['revenue_type'] ) {
- return edd_get_net_order_statuses();
- }
-
- return edd_get_gross_order_statuses();
- }
-
- /**
- * Based on the query_vars['revenue_type'], use just sale or also include refunds.
- *
- * @since 3.0
- *
- * @return array The order types to use when generating stats.
- */
- private function get_revenue_type_order_types() {
- $order_types = array( 'sale' );
- if ( 'net' === $this->query_vars['revenue_type'] ) {
- $order_types[] = 'refund';
- }
-
- return $order_types;
- }
-
- /**
- * Calculates the relative change between two datasets
- * and outputs an array of details about comparison.
- *
- * @since 3.1
- *
- * @param int|float $total The primary value result for the stat.
- * @param int|float $relative The value relative to the previous date range.
- * @param bool $reverse If the stat being displayed is a 'reverse' state, where lower is better.
- *
- * @return array Details about the relative change between two datasets.
- */
- public function generate_relative_data( $total = 0, $relative = 0, $reverse = false ) {
- $output = array(
- 'comparable' => true,
- 'no_change' => false,
- 'percentage_change' => false,
- 'formatted_percentage_change' => false,
- 'positive_change' => false,
- 'total' => $total,
- 'relative' => $relative,
- 'reverse' => $reverse,
- );
-
- if ( ( floatval( 0 ) === floatval( $total ) && floatval( 0 ) === floatval( $relative ) ) || ( $total === $relative ) ) {
- // There is no change between datasets.
- $output['no_change'] = true;
- } else if ( floatval( 0 ) !== floatval( $relative ) ) {
- // There is a calculatable difference between datasets.
- $percentage_change = ( $total - $relative ) / $relative * 100;
- $formatted_percentage_change = absint( $percentage_change );
- $positive_change = false;
-
- if ( absint( $percentage_change ) < 100 ) {
- $formatted_percentage_change = number_format( $percentage_change, 2 );
- $formatted_percentage_change = $formatted_percentage_change < 1 ? $formatted_percentage_change * -1 : $formatted_percentage_change;
- }
-
- // Check if stat is in a 'reverse' state, where lower is better.
- $positive_change = (bool) ! $reverse;
- if ( 0 > $percentage_change ) {
- $positive_change = (bool) $reverse;
- }
-
- $output['percentage_change'] = $percentage_change;
- $output['formatted_percentage_change'] = $formatted_percentage_change;
- $output['positive_change'] = $positive_change;
- } else {
- // There is no data to compare.
- $output['comparable'] = false;
- }
-
- return $output;
- }
-
- /**
- * Generates output for the report tiles when a relative % change is requested.
- *
- * @since 3.0
- *
- * @param int|float $total The primary value result for the stat.
- * @param int|float $relative The value relative to the previous date range.
- * @param bool $reverse If the stat being displayed is a 'reverse' state, where lower is better.
- */
- private function generate_relative_markup( $total = 0, $relative = 0, $reverse = false ) {
-
- $relative_data = $this->generate_relative_data( $total, $relative, $reverse );
- $total_output = $this->maybe_format( $relative_data['total'] );
- $relative_markup = '';
-
- if ( $relative_data['no_change'] ) {
- $relative_output = esc_html__( 'No Change', 'easy-digital-downloads' );
- } else if ( $relative_data['comparable'] ) {
- if ( 0 < $relative_data['percentage_change'] ) {
- $direction = $relative_data['reverse'] ? 'up reverse' : 'up';
- $relative_output = ' ' . $relative_data['formatted_percentage_change'] . '%';
- } else {
- $direction = $relative_data['reverse'] ? 'down reverse' : 'down';
- $relative_output = ' ' . $relative_data['formatted_percentage_change'] . '%';
- }
- } else {
- $relative_output = '—' . __( 'No data to compare', 'easy-digital-downloads' ) . '';
- }
-
- $relative_markup = $total_output;
- if ( ! empty( $relative_output ) ) {
- $relative_markup .= '
' . $relative_output . '
';
- }
-
- return $relative_markup;
- }
-
- /**
- * Gets a placeholder string from an array.
- *
- * @since 3.1
- * @param array $array
- * @return string
- */
- private function get_placeholder_string( $array ) {
- return implode( ', ', array_fill( 0, count( $array ), '%s' ) );
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/class-utilities.php b/wp-content/plugins/easy-digital-downloads/includes/class-utilities.php
deleted file mode 100644
index 351e890e..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/class-utilities.php
+++ /dev/null
@@ -1,415 +0,0 @@
-set_gmt_offset();
- $this->set_date_format();
- $this->set_time_format();
- $this->set_time_zone();
- $this->includes();
- }
-
- /**
- * Loads needed files for core utilities.
- *
- * @since 3.0
- */
- private function includes() {
- $utils_dir = EDD_PLUGIN_DIR . 'includes/utils/';
-
- // Interfaces.
- require_once $utils_dir . 'interface-static-registry.php';
- require_once $utils_dir . 'interface-error-logger.php';
-
- // Exceptions.
- require_once $utils_dir . 'class-edd-exception.php';
- require_once $utils_dir . 'exceptions/class-attribute-not-found.php';
- require_once $utils_dir . 'exceptions/class-invalid-argument.php';
- require_once $utils_dir . 'exceptions/class-invalid-parameter.php';
-
- // Date management.
- require_once $utils_dir . 'class-date.php';
-
- // Registry.
- require_once $utils_dir . 'class-registry.php';
- }
-
- /**
- * Retrieves a given registry instance by name.
- *
- * @since 3.0
- *
- * @param string $name Registry name.
- * @return \EDD\Utils\Registry|\WP_Error The registry instance if it exists, otherwise a WP_Error..
- */
- public function get_registry( $name ) {
- switch ( $name ) {
- case 'reports':
- if ( ! did_action( 'edd_reports_init' ) ) {
- _doing_it_wrong( __FUNCTION__, 'The Report registry cannot be retrieved prior to the edd_reports_init hook.', 'EDD 3.0' );
- } elseif ( class_exists( '\EDD\Reports\Data\Report_Registry' ) ) {
- $registry = Reports\Data\Report_Registry::instance();
- }
- break;
-
- case 'reports:endpoints':
- if ( ! did_action( 'edd_reports_init' ) ) {
- _doing_it_wrong( __FUNCTION__, 'The Endpoints registry cannot be retrieved prior to the edd_reports_init hook.', 'EDD 3.0' );
- } elseif ( class_exists( '\EDD\Reports\Data\Endpoint_Registry' ) ) {
- $registry = Reports\Data\Endpoint_Registry::instance();
- }
- break;
-
- case 'reports:endpoints:views':
- if ( ! did_action( 'edd_reports_init' ) ) {
- _doing_it_wrong( __FUNCTION__, 'The Endpoint Views registry cannot be retrieved prior to the edd_reports_init hook.', 'EDD 3.0' );
- } elseif ( class_exists( '\EDD\Reports\Data\Endpoint_View_Registry' ) ) {
- $registry = Reports\Data\Endpoint_View_Registry::instance();
- }
- break;
-
- default:
- $registry = new \WP_Error( 'invalid_registry', "The '{$name}' registry does not exist." );
- break;
- }
-
- return $registry;
- }
-
- /**
- * Retrieves a date format string based on a given short-hand format.
- *
- * @see edd_get_date_format()
- * @see edd_get_date_picker_format()
- *
- * @since 3.0
- *
- * @param string $format Shorthand date format string. Accepts 'date', 'time', 'mysql', 'datetime',
- * 'picker-field' or 'picker-js'. If none of the accepted values, the
- * original value will simply be returned. Default is the value of the
- * `$date_format` property, derived from the core 'date_format' option.
- * @return string date_format()-compatible date format string.
- */
- public function get_date_format_string( $format = 'date' ) {
-
- // Default to 'date' if empty
- if ( empty( $format ) ) {
- $format = 'date';
- }
-
- // Bail if format is not known
- if ( ! in_array( $format, array( 'date', 'time', 'datetime', 'mysql', 'date-attribute', 'date-js', 'date-mysql', 'time-mysql' ), true ) ) {
- return $format;
- }
-
- // What known format are we getting?
- switch ( $format ) {
-
- // jQuery UI Datepicker fields, placeholders, etc...
- case 'date-attribute':
- $retval = 'yyyy-mm-dd';
- break;
-
- // jQuery UI Datepicker JS variable
- case 'date-js':
- $retval = 'yy-mm-dd';
- break;
-
- // Date in MySQL format
- case 'date-mysql':
- $retval = 'Y-m-d';
- break;
-
- // Time in MySQL format
- case 'time-mysql':
- $retval = 'H:i:s';
- break;
-
- // MySQL datetime columns
- case 'mysql':
- $retval = 'Y-m-d H:i:s';
- break;
-
- // WordPress date_format + time_format
- case 'datetime':
- $retval = $this->get_date_format() . ' ' . $this->get_time_format();
- break;
-
- // WordPress time_format only
- case 'time':
- $retval = $this->get_time_format();
- break;
-
- // WordPress date_format only
- case 'date':
- default:
- $retval = $this->get_date_format();
- break;
- }
-
- return $retval;
- }
-
- /**
- * Retrieves a date instance for the WP timezone (and offset) based on the given date string.
- *
- * @since 3.0
- *
- * @param string $date_string Optional. Date string. Default 'now'.
- * @param string $timezone Optional. Timezone to generate the Carbon instance for.
- * Default is the timezone set in WordPress settings.
- * @param bool $localize Optional. Whether to apply the offset in seconds to the generated
- * date. Default false.
- *
- * @return \EDD\Utils\Date Date instance. Time is returned as UTC.
- * @throws \Exception
- */
- public function date( $date_string = 'now', $timezone = null, $localize = false ) {
-
- // Fallback to this time zone
- if ( null === $timezone && true === $localize ) {
- $timezone = $this->get_time_zone();
- } elseif ( null === $timezone && false === $localize ) {
- $timezone = 'UTC';
- }
-
- // If the date string cannot be property converted to a valid time, reset it to now.
- if ( ! strtotime( $date_string ) ) {
- $date_string = 'now';
- }
-
- /*
- * Create the DateTime object with the "local" WordPress timezone.
- *
- * Note that supplying the timezone during DateTime instantiation doesn't actually
- * convert the UNIX timestamp, it just lays the groundwork for deriving the offset.
- */
- $date = new Utils\Date( $date_string, new \DateTimezone( $timezone ) );
-
- if ( false === $localize ) {
- /*
- * The offset is automatically applied when the Date object is instantiated.
- *
- * If $apply_offset is false, the interval needs to be removed again after the fact.
- */
- $offset = $date->getOffset();
- $interval = \DateInterval::createFromDateString( "-{$offset} seconds" );
- $date->add( $interval );
- }
-
- return $date;
- }
-
- /**
- * Retrieves the WordPress GMT offset property, as cached at run-time.
- *
- * @since 3.0
- *
- * @param bool $refresh Optional. Whether to refresh the `$gmt_offset` value before retrieval.
- * Default false.
- * @return int Value of the gmt_offset property.
- */
- public function get_gmt_offset( $refresh = false ) {
- if ( is_null( $this->gmt_offset ) || ( true === $refresh ) ) {
- $this->set_gmt_offset();
- }
-
- return $this->gmt_offset;
- }
-
- /**
- * Retrieves the WordPress date format, as cached at run-time.
- *
- * @since 3.0
- *
- * @param bool $refresh Optional. Whether to refresh the `$gmt_offset` value before retrieval.
- * Default false.
- * @return string Value of the `$date_format` property.
- */
- public function get_date_format( $refresh = false ) {
- if ( is_null( $this->date_format ) || ( true === $refresh ) ) {
- $this->set_date_format();
- }
-
- return $this->date_format;
- }
-
- /**
- * Retrieves the WordPress time format, as cached at run-time.
- *
- * @since 3.0
- *
- * @param bool $refresh Optional. Whether to refresh the `$gmt_offset` value before retrieval.
- * Default false.
- * @return string Value of the `$time_format` property.
- */
- public function get_time_format( $refresh = false ) {
- if ( is_null( $this->time_format ) || ( true === $refresh ) ) {
- $this->set_time_format();
- }
-
- return $this->time_format;
- }
-
- /**
- * Retrieves the WordPress time zone, as cached at run-time.
- *
- * @since 3.0
- *
- * @param bool $refresh Optional. Whether to refresh the `$time_zone` value before retrieval.
- * Default false.
- * @return string Value of the `$time_zone` property.
- */
- public function get_time_zone( $refresh = false ) {
- if ( is_null( $this->time_zone ) || ( true === $refresh ) ) {
- $this->set_time_zone();
- }
-
- return $this->time_zone;
- }
-
- /**
- * Gets a valid date string in the format Y-m-d HH:MM:00
- *
- * @since 3.0
- * @param string $date A valid date string.
- * @param int $hour The hour.
- * @param int $minute The minute.
- * @return string
- */
- public function get_date_string( $date = '', $hour = 0, $minute = 0 ) {
- if ( empty( $date ) || ! strtotime( $date ) ) {
- $date = date( 'Y-m-d' );
- }
-
- $hour = absint( $hour );
- if ( $hour > 23 ) {
- $hour = 23;
- }
- $hour = str_pad( $hour, 2, '0', STR_PAD_LEFT );
-
- $minute = absint( $minute );
- if ( $minute > 59 ) {
- $minute = 59;
- }
- $minute = str_pad( $minute, 2, '0', STR_PAD_LEFT );
-
- return "{$date} {$hour}:{$minute}:00";
- }
-
- /** Private Setters *******************************************************/
-
- /**
- * Private setter for GMT offset
- *
- * @since 3.0
- */
- private function set_gmt_offset() {
- $this->gmt_offset = get_option( 'gmt_offset', 0 ) * HOUR_IN_SECONDS;
- }
-
- /**
- * Private setter for date format
- *
- * @since 3.0
- */
- private function set_date_format() {
- $this->date_format = get_option( 'date_format', 'M j, Y' );
- }
-
- /**
- * Private setter for time format
- *
- * @since 3.0
- */
- private function set_time_format() {
- $this->time_format = get_option( 'time_format', 'g:i a' );
- }
-
- /**
- * Private setter for time zone
- *
- * @since 3.0
- */
- private function set_time_zone() {
-
- // Default return value
- $retval = 'UTC';
-
- // Get some useful values
- $timezone = get_option( 'timezone_string' );
- $gmt_offset = $this->get_gmt_offset();
-
- // Use timezone string if it's available
- if ( ! empty( $timezone ) ) {
- $retval = $timezone;
-
- // Use GMT offset to calculate
- } elseif ( is_numeric( $gmt_offset ) ) {
- $hours = abs( floor( $gmt_offset / HOUR_IN_SECONDS ) );
- $minutes = abs( floor( ( $gmt_offset / MINUTE_IN_SECONDS ) % MINUTE_IN_SECONDS ) );
- $math = ( $gmt_offset >= 0 ) ? '+' : '-';
- $value = ! empty( $minutes ) ? "{$hours}:{$minutes}" : $hours;
- $retval = "GMT{$math}{$value}";
- }
-
- // Set
- $this->time_zone = $retval;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/compat-functions.php b/wp-content/plugins/easy-digital-downloads/includes/compat-functions.php
deleted file mode 100644
index 503a6009..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/compat-functions.php
+++ /dev/null
@@ -1,102 +0,0 @@
- $value ) {
- if ( substr( $name, 0, 5 ) == 'HTTP_' ) {
- $headers[ str_replace( ' ', '-', ucwords( strtolower( str_replace( '_', ' ', substr( $name, 5 ) ) ) ) ) ] = $value;
- }
- }
- return $headers;
- }
-endif;
-
-if ( ! function_exists( 'wp_timezone_string' ) ) :
- /**
- * Polyfill for wp_timezone_string() function added in WP 5.3.0
- *
- * Retrieves the timezone of the site as a string.
- *
- * @since 3.1.0.3
- * @return string PHP timezone name or a ±HH:MM offset.
- */
- function wp_timezone_string() {
- $timezone_string = get_option( 'timezone_string' );
-
- if ( $timezone_string ) {
- return $timezone_string;
- }
-
- $offset = (float) get_option( 'gmt_offset' );
- $hours = (int) $offset;
- $minutes = ( $offset - $hours );
-
- $sign = ( $offset < 0 ) ? '-' : '+';
- $abs_hour = abs( $hours );
- $abs_mins = abs( $minutes * 60 );
- $tz_offset = sprintf( '%s%02d:%02d', $sign, $abs_hour, $abs_mins );
-
- return $tz_offset;
- }
-endif;
diff --git a/wp-content/plugins/easy-digital-downloads/includes/compat/class-base.php b/wp-content/plugins/easy-digital-downloads/includes/compat/class-base.php
deleted file mode 100644
index ecf65f6d..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/compat/class-base.php
+++ /dev/null
@@ -1,78 +0,0 @@
-hooks();
-
- $this->show_notices = apply_filters( 'edd_show_deprecated_notices', ( defined( 'WP_DEBUG' ) && WP_DEBUG ) );
- $this->show_backtrace = apply_filters( 'edd_show_backtrace', ( defined( 'WP_DEBUG' ) && WP_DEBUG ) && ! defined( 'EDD_DOING_TESTS' ) );
- }
-
- /**
- * Getter for component.
- *
- * @since 3.0
- *
- * @return string Component.
- */
- public function get_component() {
- return $this->component;
- }
-
- /**
- * Backwards compatibility hooks for component.
- *
- * @since 3.0
- * @access protected
- */
- abstract protected function hooks();
-}
\ No newline at end of file
diff --git a/wp-content/plugins/easy-digital-downloads/includes/compat/class-customer.php b/wp-content/plugins/easy-digital-downloads/includes/compat/class-customer.php
deleted file mode 100644
index a6ed560f..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/compat/class-customer.php
+++ /dev/null
@@ -1,303 +0,0 @@
-edd_customers;
-
- case 'primary_key' :
- return 'id';
-
- case 'version' :
- $table = edd_get_component_interface( 'customer', 'table' );
-
- return $table instanceof Table ? $table->get_version() : false;
- case 'meta_type' :
- return 'customer';
-
- case 'date_key' :
- return 'date_created';
-
- case 'cache_group' :
- return 'customers';
- }
-
- return null;
- }
-
- /**
- * Magic method to handle calls to method that no longer exist.
- *
- * @since 3.0
- *
- * @param string $name Name of the method.
- * @param array $arguments Enumerated array containing the parameters passed to the $name'ed method.
- * @return mixed Dependent on the method being dispatched to.
- */
- public function __call( $name, $arguments ) {
- switch ( $name ) {
- case 'add':
- case 'insert':
- return edd_add_customer( $arguments[0] );
-
- case 'update':
- return edd_update_customer( $arguments[0], $arguments[1] );
-
- case 'delete':
- if ( ! is_bool( $arguments[0] ) ) {
- return false;
- }
-
- $column = is_email( $arguments[0] ) ? 'email' : 'id';
- $customer = edd_get_customer_by( $column, $arguments[0] );
- edd_delete_customer( $customer->id );
- break;
- case 'exists':
- return (bool) edd_get_customer_by( 'email', $arguments[0] );
-
- case 'get_customer_by':
- return edd_get_customer_by( $arguments[0], $arguments[1] );
-
- case 'get_customers':
- return edd_get_customers( $arguments[0] );
-
- case 'count':
- return edd_count_customers();
-
- case 'get_column':
- return edd_get_customer_by( $arguments[0], $arguments[1] );
-
- case 'attach_payment':
- /** @var $customer \EDD_Customer */
- $customer = edd_get_customer( $arguments[0] );
-
- if ( ! $customer ) {
- return false;
- }
-
- return $customer->attach_payment( $arguments[1], false );
-
- case 'remove_payment':
- /** @var $customer \EDD_Customer */
- $customer = edd_get_customer( $arguments[0] );
-
- if ( ! $customer ) {
- return false;
- }
-
- return $customer->remove_payment( $arguments[1], false );
-
- case 'increment_stats':
- /** @var $customer \EDD_Customer */
- $customer = edd_get_customer( $arguments[0] );
-
- if ( ! $customer ) {
- return false;
- }
-
- $increased_count = $customer->increase_purchase_count();
- $increased_value = $customer->increase_value( $arguments[1] );
-
- return ( $increased_count && $increased_value )
- ? true
- : false;
-
- case 'decrement_stats':
- /** @var $customer \EDD_Customer */
- $customer = edd_get_customer( $arguments[0] );
-
- if ( ! $customer ) {
- return false;
- }
-
- $decreased_count = $customer->decrease_purchase_count();
- $decreased_value = $customer->decrease_value( $arguments[1] );
-
- return ( $decreased_count && $decreased_value )
- ? true
- : false;
- }
- }
-
- /**
- * Backwards compatibility hooks for customers.
- *
- * @since 3.0
- * @access protected
- */
- protected function hooks() {
-
- /** Filters **********************************************************/
-
- add_filter( 'get_user_metadata', array( $this, 'get_user_meta' ), 99, 4 );
- add_filter( 'update_user_metadata', array( $this, 'update_user_meta' ), 99, 5 );
- add_filter( 'add_user_metadata', array( $this, 'update_user_meta' ), 99, 5 );
- }
-
- /**
- * Backwards compatibility filters for get_user_meta() calls on customers.
- *
- * @since 3.0
- *
- * @param mixed $value The value get_post_meta would return if we don't filter.
- * @param int $object_id The object ID post meta was requested for.
- * @param string $meta_key The meta key requested.
- * @param bool $single If a single value or an array of the value is requested.
- *
- * @return mixed The value to return.
- */
- public function get_user_meta( $value, $object_id, $meta_key, $single ) {
- if ( 'get_user_metadata' !== current_filter() ) {
- $message = __( 'This function is not meant to be called directly. It is only here for backwards compatibility purposes.', 'easy-digital-downloads' );
- _doing_it_wrong( __FUNCTION__, esc_html( $message ), 'EDD 3.0' );
- }
-
- if ( '_edd_user_address' !== $meta_key ) {
- return $value;
- }
-
- $value = edd_get_customer_address( $object_id );
-
- if ( $this->show_notices ) {
- _doing_it_wrong( 'get_user_meta()', 'User addresses being stored in meta have been deprecated since Easy Digital Downloads 3.0! Use edd_get_customer_address() instead.', 'EDD 3.0' );
-
- if ( $this->show_backtrace ) {
- $backtrace = debug_backtrace();
- trigger_error( print_r( $backtrace, 1 ) );
- }
- }
-
- return array( $value );
- }
-
- /**
- * Listen for calls to update_user_meta() for customers and see if we need to filter them.
- *
- * This is here for backwards compatibility purposes with the migration to custom tables in EDD 3.0.
- *
- * @since 3.0
- *
- * @param null|bool $check Whether to allow updating metadata for the given type.
- * @param int $object_id Object ID.
- * @param string $meta_key Meta key.
- * @param mixed $meta_value Meta value. Must be serializable if non-scalar.
- * @param mixed $prev_value Optional. If specified, only update existing metadata entries with the specified value.
- * Otherwise, update all entries.
- *
- * @return mixed Returns 'null' if no action should be taken and WordPress core can continue, or non-null to avoid usermeta.
- */
- public function update_user_meta( $check, $object_id, $meta_key, $meta_value, $prev_value ) {
- if ( '_edd_user_address' !== $meta_key ) {
- return $check;
- }
-
- // Fetch saved primary address.
- $addresses = edd_get_customer_addresses(
- array(
- 'number' => 1,
- 'is_primary' => true,
- 'customer_id' => $object_id,
- )
- );
-
- // Defaults.
- $defaults = array(
- 'line1' => '',
- 'line2' => '',
- 'city' => '',
- 'state' => '',
- 'country' => '',
- 'zip' => '',
- );
-
- $address = wp_parse_args( (array) $meta_value, $defaults );
-
- if ( is_array( $addresses ) && ! empty( $addresses[0] ) ) {
- $customer_address = $addresses[0];
-
- edd_update_customer_address(
- $customer_address->id,
- array(
- 'address' => $address['line1'],
- 'address2' => $address['line2'],
- 'city' => $address['city'],
- 'region' => $address['state'],
- 'postal_code' => $address['zip'],
- 'country' => $address['country'],
- )
- );
- } else {
- $customer = edd_get_customer_by( 'user_id', absint( $object_id ) );
-
- if ( $customer ) {
- edd_add_customer_address(
- array(
- 'customer_id' => $customer->id,
- 'address' => $address['line1'],
- 'address2' => $address['line2'],
- 'city' => $address['city'],
- 'region' => $address['state'],
- 'postal_code' => $address['zip'],
- 'country' => $address['country'],
- 'is_primary' => true,
- )
- );
- }
- }
-
- if ( $this->show_notices ) {
- _doing_it_wrong( 'add_user_meta()/update_user_meta()', 'User addresses being stored in meta have been deprecated since Easy Digital Downloads 3.0! Use edd_add_customer_address()/edd_update_customer_address()() instead.', 'EDD 3.0' );
-
- if ( $this->show_backtrace ) {
- $backtrace = debug_backtrace();
- trigger_error( print_r( $backtrace, 1 ) );
- }
- }
-
- return $check;
- }
-
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/compat/class-customermeta.php b/wp-content/plugins/easy-digital-downloads/includes/compat/class-customermeta.php
deleted file mode 100644
index 0a2d5bfd..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/compat/class-customermeta.php
+++ /dev/null
@@ -1,100 +0,0 @@
-edd_customermeta;
-
- case 'primary_key' :
- return 'meta_id';
-
- case 'version' :
- $table = edd_get_component_interface( 'customer', 'meta' );
-
- return $table instanceof Table ? $table->get_version() : false;
- }
-
- return null;
- }
-
- /**
- * Magic method to handle calls to method that no longer exist.
- *
- * @since 3.0
- *
- * @param string $name Name of the method.
- * @param array $arguments Enumerated array containing the parameters passed to the $name'ed method.
- * @return mixed Dependent on the method being dispatched to.
- */
- public function __call( $name, $arguments ) {
- switch ( $name ) {
- case 'get_meta' :
- return edd_get_customer_meta(
- isset( $arguments[0] ) ? $arguments[0] : 0,
- isset( $arguments[1] ) ? $arguments[1] : '',
- isset( $arguments[2] ) ? $arguments[2] : false
- );
-
- case 'add_meta' :
- return edd_add_customer_meta(
- isset( $arguments[0] ) ? $arguments[0] : 0,
- isset( $arguments[1] ) ? $arguments[1] : '',
- isset( $arguments[2] ) ? $arguments[2] : false,
- isset( $arguments[3] ) ? $arguments[3] : false
- );
-
- case 'update_meta' :
- return edd_update_customer_meta(
- isset( $arguments[0] ) ? $arguments[0] : 0,
- isset( $arguments[1] ) ? $arguments[1] : '',
- isset( $arguments[2] ) ? $arguments[2] : false,
- isset( $arguments[3] ) ? $arguments[3] : ''
- );
-
- case 'delete_meta' :
- return edd_delete_customer_meta(
- isset( $arguments[0] ) ? $arguments[0] : 0,
- isset( $arguments[1] ) ? $arguments[1] : '',
- isset( $arguments[2] ) ? $arguments[2] : ''
- );
- }
-
- return null;
- }
-
- /**
- * Backwards compatibility hooks for customer meta.
- *
- * @since 3.0
- * @access protected
- */
- protected function hooks() {
- // No hooks.
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/compat/class-discount-query.php b/wp-content/plugins/easy-digital-downloads/includes/compat/class-discount-query.php
deleted file mode 100644
index 01640a2d..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/compat/class-discount-query.php
+++ /dev/null
@@ -1,81 +0,0 @@
-swap_types( $query ) );
- }
-
- /**
- * Swap out types in an item.
- *
- * @since 3.0
- *
- * @param array $item Array of item arguments
- * @return array
- */
- public function filter_item( $item = array() ) {
- return parent::filter_item( $this->swap_types( $item ) );
- }
-
- /**
- * Swap out the type arguments.
- *
- * @since 3.0
- *
- * @param array $args
- * @return array
- */
- private function swap_types( $args = array() ) {
-
- // Switch `type` to `amount_type`
- if ( empty( $args['amount_type'] ) && ! empty( $args['type'] ) ) {
- $args['amount_type'] = $args['type'];
- }
-
- // Force `type` to `discount`
- $args['type'] = 'discount';
-
- // Return swapped arguments
- return $args;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/compat/class-discount.php b/wp-content/plugins/easy-digital-downloads/includes/compat/class-discount.php
deleted file mode 100644
index a3795052..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/compat/class-discount.php
+++ /dev/null
@@ -1,546 +0,0 @@
-get( 'post_type' ) ) {
- return;
- }
-
- // Force filters to run
- $query->set( 'suppress_filters', false );
-
- // Setup doing-it-wrong message
- $message = sprintf(
- __( 'As of Easy Digital Downloads 3.0, discounts no longer exist in the %1$s table. They have been migrated to %2$s. Discounts should be accessed using %3$s, %4$s or instantiating a new instance of %5$s. See %6$s for more information.', 'easy-digital-downloads' ),
- '' . $wpdb->posts . '',
- '' . edd_get_component_interface( 'adjustment', 'table' )->table_name . '',
- 'edd_get_discounts()',
- 'edd_get_discount()',
- 'EDD_Discount',
- 'https://easydigitaldownloads.com/development/'
- );
-
- _doing_it_wrong( 'get_posts()/get_post()', $message, '3.0' );
- }
-
- /**
- * Backwards compatibility layer for wp_count_posts().
- *
- * @since 3.0
- *
- * @param string $query SQL query.
- * @return string $request Rewritten SQL query.
- */
- public function wp_count_posts( $query ) {
- global $wpdb;
-
- $expected = "SELECT post_status, COUNT( * ) AS num_posts FROM {$wpdb->posts} WHERE post_type = 'edd_discount' GROUP BY post_status";
-
- if ( $expected === $query ) {
- $query = "SELECT status AS post_status, COUNT( * ) AS num_posts FROM {$wpdb->edd_adjustments} WHERE type = 'discount' GROUP BY post_status";
- }
-
- return $query;
- }
-
- /**
- * Fill the returned WP_Post objects with the data from the discounts table.
- *
- * @since 3.0
- *
- * @param array $posts Posts returned from the SQL query.
- * @param \WP_Query $query Instance of WP_Query.
- *
- * @return array New WP_Post objects.
- */
- public function posts_results( $posts, $query ) {
- if ( 'posts_results' !== current_filter() ) {
- $message = __( 'This function is not meant to be called directly. It is only here for backwards compatibility purposes.', 'easy-digital-downloads' );
- _doing_it_wrong( __FUNCTION__, esc_html( $message ), 'EDD 3.0' );
- }
-
- if ( 'edd_discount' === $query->get( 'post_type' ) ) {
- $new_posts = array();
-
- foreach ( $posts as $post ) {
- $discount = edd_get_discount( $post->id );
-
- $object_vars = array(
- 'ID' => $discount->id,
- 'post_title' => $discount->name,
- 'post_status' => $discount->status,
- 'post_type' => 'edd_discount',
- 'post_date' => EDD()->utils->date( $discount->date_created, null, true )->toDateTimeString(),
- 'post_date_gmt' => $discount->date_created,
- 'post_modified' => EDD()->utils->date( $discount->date_modified, null, true )->toDateTimeString(),
- 'post_modified_gmt' => $discount->date_created,
- );
-
- foreach ( $object_vars as $object_var => $value ) {
- $post->{$object_var} = $value;
- }
-
- $post = new \WP_Post( $post );
-
- $new_posts[] = $post;
- }
-
- return $new_posts;
- }
-
- return $posts;
- }
-
- /**
- * Hijack the SQL query and rewrite it to fetch data from the discounts table.
- *
- * @since 3.0
- *
- * @param string $request SQL query.
- * @param \WP_Query $query Instance of WP_Query.
- *
- * @return string $request Rewritten SQL query.
- */
- public function posts_request( $request, $query ) {
- global $wpdb;
-
- if ( 'posts_request' !== current_filter() ) {
- $message = __( 'This function is not meant to be called directly. It is only here for backwards compatibility purposes.', 'easy-digital-downloads' );
- _doing_it_wrong( __FUNCTION__, esc_html( $message ), '3.0' );
- }
-
- if ( 'edd_discount' === $query->get( 'post_type' ) ) {
- $defaults = array(
- 'number' => 30,
- 'status' => array( 'active', 'inactive', 'expired' ),
- 'order' => 'DESC',
- 'orderby' => 'date_created',
- );
-
- $args = array(
- 'number' => $query->get( 'posts_per_page' ),
- 'status' => $query->get( 'post_status', array( 'active', 'inactive' ) ),
- );
-
- $orderby = $query->get( 'orderby', false );
- if ( $orderby ) {
- switch ( $orderby ) {
- case 'none':
- case 'ID':
- case 'author':
- case 'post__in':
- case 'type':
- case 'post_type':
- $args['orderby'] = 'id';
- break;
- case 'title':
- $args['orderby'] = 'name';
- break;
- case 'date':
- case 'post_date':
- case 'modified':
- case 'post_modified':
- $args['orderby'] = 'date_created';
- break;
- default:
- $args['orderby'] = 'id';
- break;
- }
- }
-
- $offset = $query->get( 'offset', false );
- if ( $offset ) {
- $args['offset'] = absint( $offset );
- } else {
- $args['offset'] = 0;
- }
-
- if ( 'any' === $args['status'] ) {
- $args['status'] = $defaults['status'];
- }
-
- $args = wp_parse_args( $args, $defaults );
-
- if ( array_key_exists( 'number', $args ) ) {
- $args['number'] = absint( $args['number'] );
- }
-
- $table_name = edd_get_component_interface( 'adjustment', 'table' )->table_name;
-
- $meta_query = $query->get( 'meta_query' );
-
- $clauses = array();
- $sql_where = "WHERE type = 'discount'";
-
- $meta_key = $query->get( 'meta_key', false );
- $meta_value = $query->get( 'meta_value', false );
- $columns = wp_list_pluck( edd_get_component_interface( 'adjustment', 'schema' )->columns, 'name' );
-
- // 'meta_key' and 'meta_value' passed as arguments
- if ( $meta_key && $meta_value ) {
- /**
- * Check that the key exists as a column in the table.
- * Note: there is no backwards compatibility support for product requirements and excluded
- * products as these would be serialized under the old schema.
- */
- if ( in_array( $meta_key, $columns, true ) ) {
- $sql_where .= ' ' . $wpdb->prepare( "{$meta_key} = %s", $meta_value );
- }
- }
-
- if ( ! empty( $meta_query ) ) {
- foreach ( $meta_query as $key => $query ) {
- $relation = 'AND'; // Default relation
-
- if ( is_string( $query ) && 'relation' === $key ) {
- $relation = $query;
- }
-
- if ( is_array( $query ) ) {
- if ( array_key_exists( 'key', $query ) ) {
- $query['key'] = str_replace( '_edd_discount_', '', $query['key'] );
-
- /**
- * Check that the key exists as a column in the table.
- * Note: there is no backwards compatibility support for product requirements and excluded
- * products as these would be serialized under the old schema.
- */
- if ( in_array( $query['key'], $columns, true ) && array_key_exists( 'value', $query ) ) {
- $meta_compare = ! empty( $query['compare'] ) ? $query['compare'] : '=';
- $meta_compare = strtoupper( $meta_compare );
-
- $meta_value = $query['value'];
-
- $where = null;
-
- switch ( $meta_compare ) {
- case 'IN':
- case 'NOT IN':
- $meta_compare_string = '(' . substr( str_repeat( ',%s', count( $meta_value ) ), 1 ) . ')';
- $where = $wpdb->prepare( $meta_compare_string, $meta_value );
- break;
-
- case 'BETWEEN':
- case 'NOT BETWEEN':
- $meta_value = array_slice( $meta_value, 0, 2 );
- $where = $wpdb->prepare( '%1$s AND %1$s', $meta_value );
- break;
-
- case 'LIKE':
- case 'NOT LIKE':
- $meta_value = '%' . $wpdb->esc_like( $meta_value ) . '%';
- $where = $wpdb->prepare( '%s', $meta_value );
- break;
-
- // EXISTS with a value is interpreted as '='.
- case 'EXISTS':
- $where = $wpdb->prepare( '%s', $meta_value );
- break;
-
- // 'value' is ignored for NOT EXISTS.
- case 'NOT EXISTS':
- $where = $query['key'] . ' IS NULL';
- break;
-
- default:
- $where = $wpdb->prepare( '%s', $meta_value );
- break;
- }
-
- if ( ! is_null( $where ) ) {
- $clauses['where'][] = $query['key'] . ' ' . $meta_compare . ' ' . $where;
- }
- }
- }
-
- if ( ! empty( $clauses['where'] ) && is_array( $clauses['where'] ) ) {
- $sql_where .= ' AND ( ' . implode( ' ' . $relation . ' ', $clauses['where'] ) . ' )';
- }
- }
- }
- }
-
- $request = "SELECT id FROM {$table_name} {$sql_where} ORDER BY {$args['orderby']} {$args['order']} LIMIT {$args['offset']}, {$args['number']};";
- }
-
- return $request;
- }
-
- /**
- * Backwards compatibility filters for get_post_meta() calls on discounts.
- *
- * @since 3.0
- *
- * @param mixed $value The value get_post_meta would return if we don't filter.
- * @param int $object_id The object ID post meta was requested for.
- * @param string $meta_key The meta key requested.
- * @param bool $single If a single value or an array of the value is requested.
- *
- * @return mixed The value to return.
- */
- public function get_post_metadata( $value, $object_id, $meta_key, $single ) {
-
- $meta_keys = apply_filters( 'edd_post_meta_discount_backwards_compat_keys', array(
- '_edd_discount_status',
- '_edd_discount_amount',
- '_edd_discount_uses',
- '_edd_discount_name',
- '_edd_discount_code',
- '_edd_discount_expiration',
- '_edd_discount_start',
- '_edd_discount_is_single_use',
- '_edd_discount_is_not_global',
- '_edd_discount_product_condition',
- '_edd_discount_min_price',
- '_edd_discount_max_uses'
- ) );
-
- // Bail early of not a back-compat key
- if ( ! in_array( $meta_key, $meta_keys, true ) ) {
- return $value;
- }
-
- // Bail if discount does not exist
- $discount = edd_get_discount( $object_id );
- if ( empty( $discount->id ) ) {
- return $value;
- }
-
- switch ( $meta_key ) {
- case '_edd_discount_name':
- case '_edd_discount_status':
- case '_edd_discount_amount':
- case '_edd_discount_uses':
- case '_edd_discount_code':
- case '_edd_discount_expiration':
- case '_edd_discount_start':
- case '_edd_discount_product_condition':
- case '_edd_discount_min_price':
- case '_edd_discount_max_uses':
- $key = str_replace( '_edd_discount_', '', $meta_key );
-
- $value = $discount->{$key};
-
- if ( $this->show_notices ) {
- _doing_it_wrong( 'get_post_meta()', 'All discount postmeta has been deprecated since Easy Digital Downloads 3.0! Use edd_get_adjustment_meta() instead.', 'EDD 3.0' );
-
- if ( $this->show_backtrace ) {
- $backtrace = debug_backtrace();
- trigger_error( print_r( $backtrace, 1 ) );
- }
- }
-
- break;
-
- case '_edd_discount_is_single_use':
- $value = $discount->get_once_per_customer();
-
- if ( $this->show_notices ) {
- _doing_it_wrong( 'get_post_meta()', 'All discount postmeta has been deprecated since Easy Digital Downloads 3.0! Use edd_get_adjustment_meta() instead.', 'EDD 3.0' );
-
- if ( $this->show_backtrace ) {
- $backtrace = debug_backtrace();
- trigger_error( print_r( $backtrace, 1 ) );
- }
- }
-
- break;
-
- case '_edd_discount_is_not_global':
- $value = $discount->get_scope();
-
- if ( $this->show_notices ) {
- _doing_it_wrong( 'get_post_meta()', 'All discount postmeta has been deprecated since Easy Digital Downloads 3.0! Use edd_get_adjustment_meta() instead.', 'EDD 3.0' );
-
- if ( $this->show_backtrace ) {
- $backtrace = debug_backtrace();
- trigger_error( print_r( $backtrace, 1 ) );
- }
- }
-
- break;
- default:
- /*
- * Developers can hook in here with add_filter( 'edd_get_post_meta_discount_backwards_compat-meta_key... in order to
- * Filter their own meta values for backwards compatibility calls to get_post_meta instead of EDD_Discount::get_meta
- */
- $value = apply_filters( 'edd_get_post_meta_discount_backwards_compat-' . $meta_key, $value, $object_id );
- break;
- }
-
- return $value;
- }
-
-
- /**
- * Backwards compatibility filters for add/update_post_meta() calls on discounts.
- *
- * @since 3.0
- *
- * @param mixed $check Comes in 'null' but if returned not null, WordPress Core will not interact with the postmeta table.
- * @param int $object_id The object ID post meta was requested for.
- * @param string $meta_key The meta key requested.
- * @param mixed $meta_value The value get_post_meta would return if we don't filter.
- * @param mixed $prev_value The previous value of the meta
- *
- * @return mixed Returns 'null' if no action should be taken and WordPress core can continue, or non-null to avoid postmeta.
- */
- public function update_post_metadata( $check, $object_id, $meta_key, $meta_value, $prev_value ) {
-
- $meta_keys = apply_filters( 'edd_update_post_meta_discount_backwards_compat_keys', array(
- '_edd_discount_status',
- '_edd_discount_amount',
- '_edd_discount_uses',
- '_edd_discount_name',
- '_edd_discount_code',
- '_edd_discount_expiration',
- '_edd_discount_start',
- '_edd_discount_is_single_use',
- '_edd_discount_is_not_global',
- '_edd_discount_product_condition',
- '_edd_discount_min_price',
- '_edd_discount_max_uses'
- ) );
-
- // Bail early of not a back-compat key
- if ( ! in_array( $meta_key, $meta_keys, true ) ) {
- return $check;
- }
-
- // Bail if discount does not exist
- $discount = edd_get_discount( $object_id );
- if ( empty( $discount->id ) ) {
- return $check;
- }
-
- switch ( $meta_key ) {
- case '_edd_discount_name':
- case '_edd_discount_status':
- case '_edd_discount_amount':
- case '_edd_discount_uses':
- case '_edd_discount_code':
- case '_edd_discount_expiration':
- case '_edd_discount_start':
- case '_edd_discount_product_condition':
- case '_edd_discount_min_price':
- case '_edd_discount_max_uses':
- $key = str_replace( '_edd_discount_', '', $meta_key );
- $discount->{$key} = $meta_value;
- $check = $discount->save();
-
- if ( $this->show_notices ) {
- _doing_it_wrong( 'add_post_meta()/update_post_meta()', 'All discount postmeta has been deprecated since Easy Digital Downloads 3.0! Use edd_add_adjustment_meta()/edd_update_adjustment_meta() instead.', 'EDD 3.0' );
-
- if ( $this->show_backtrace ) {
- $backtrace = debug_backtrace();
- trigger_error( print_r( $backtrace, 1 ) );
- }
- }
-
- break;
- case '_edd_discount_is_single_use':
- $discount->once_per_customer = $meta_value;
- $check = $discount->save();
-
- // Since the old discounts data was simply stored in a single post meta entry, just don't let it be added.
- if ( $this->show_notices ) {
- _doing_it_wrong( 'add_post_meta()/update_post_meta()', 'All discount postmeta has been deprecated since Easy Digital Downloads 3.0! Use edd_add_adjustment_meta()/edd_update_adjustment_meta() instead.', 'EDD 3.0' );
-
- if ( $this->show_backtrace ) {
- $backtrace = debug_backtrace();
- trigger_error( print_r( $backtrace, 1 ) );
- }
- }
-
- break;
- case '_edd_discount_is_not_global':
- $discount->scope = $meta_value;
- $check = $discount->save();
-
- // Since the old discounts data was simply stored in a single post meta entry, just don't let it be added.
- if ( $this->show_notices ) {
- _doing_it_wrong( 'add_post_meta()/update_post_meta()', 'All discount postmeta has been deprecated since Easy Digital Downloads 3.0! Use edd_add_adjustment_meta()/edd_update_adjustment_meta() instead.', 'EDD 3.0' );
-
- if ( $this->show_backtrace ) {
- $backtrace = debug_backtrace();
- trigger_error( print_r( $backtrace, 1 ) );
- }
- }
-
- break;
- default:
- /*
- * Developers can hook in here with add_filter( 'edd_get_post_meta_discount_backwards_compat-meta_key... in order to
- * Filter their own meta values for backwards compatibility calls to get_post_meta instead of EDD_Discount::get_meta
- */
- $check = apply_filters( 'edd_update_post_meta_discount_backwards_compat-' . $meta_key, $check, $object_id, $meta_value, $prev_value );
- break;
- }
-
- return $check;
-
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/compat/class-edd-payment-compat.php b/wp-content/plugins/easy-digital-downloads/includes/compat/class-edd-payment-compat.php
deleted file mode 100644
index 19328a6e..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/compat/class-edd-payment-compat.php
+++ /dev/null
@@ -1,972 +0,0 @@
-ID = absint( $payment_id );
- $this->payment = get_post( $this->ID );
- if ( ! $this->payment instanceof WP_Post ) {
- return false;
- }
- $this->setup();
- }
-
- /**
- * Sets up the payment object.
- *
- * @since 3.0
- * @return void
- */
- private function setup() {
- $this->payment_meta = $this->get_meta();
- $this->cart_details = $this->setup_cart_details();
- $this->status = $this->setup_status();
- $this->completed_date = $this->setup_completed_date();
- $this->mode = $this->setup_mode();
- $this->total = $this->setup_total();
- $this->tax = $this->setup_tax();
- $this->tax_rate = $this->setup_tax_rate();
- $this->fees_total = $this->setup_fees_total();
- $this->subtotal = $this->setup_subtotal();
- $this->discounts = $this->setup_discounts();
- $this->currency = $this->setup_currency();
- $this->fees = $this->setup_fees();
- $this->gateway = $this->setup_gateway();
- $this->transaction_id = $this->setup_transaction_id();
- $this->ip = $this->setup_ip();
- $this->customer_id = $this->setup_customer_id();
- $this->user_id = $this->setup_user_id();
- $this->email = $this->setup_email();
- $this->user_info = $this->setup_user_info();
- $this->address = $this->setup_address();
- $this->key = $this->setup_payment_key();
- $this->number = $this->setup_payment_number();
- $this->downloads = $this->setup_downloads();
- $this->has_unlimited_downloads = $this->setup_has_unlimited();
- $this->order = $this->_shim_order();
- }
-
- /**
- * Get a post meta item for the payment
- *
- * @since 3.0
- * @param string $meta_key The Meta Key
- * @param boolean $single Return single item or array
- * @return mixed The value from the post meta
- */
- private function get_meta( $meta_key = '_edd_payment_meta', $single = true ) {
-
- $meta = get_post_meta( $this->ID, $meta_key, $single );
- if ( '_edd_payment_meta' === $meta_key ) {
-
- if ( empty( $meta ) ) {
- $meta = array();
- }
-
- // #5228 Fix possible data issue introduced in 2.6.12
- if ( is_array( $meta ) && isset( $meta[0] ) ) {
- $bad_meta = $meta[0];
- unset( $meta[0] );
-
- if ( is_array( $bad_meta ) ) {
- $meta = array_merge( $meta, $bad_meta );
- }
-
- update_post_meta( $this->ID, '_edd_payment_meta', $meta );
- }
-
- // Payment meta was simplified in EDD v1.5, so these are here for backwards compatibility
- if ( empty( $meta['key'] ) ) {
- $meta['key'] = $this->setup_payment_key();
- }
-
- if ( empty( $meta['email'] ) ) {
- $meta['email'] = $this->setup_email();
- }
-
- if ( empty( $meta['date'] ) ) {
- $meta['date'] = get_post_field( 'post_date', $this->ID );
- }
- }
-
- $meta = apply_filters( 'edd_get_payment_meta_' . $meta_key, $meta, $this->ID );
-
- if ( is_serialized( $meta ) ) {
- preg_match( '/[oO]\s*:\s*\d+\s*:\s*"\s*(?!(?i)(stdClass))/', $meta, $matches );
- if ( ! empty( $matches ) ) {
- $meta = array();
- }
- }
-
- return apply_filters( 'edd_get_payment_meta', $meta, $this->ID, $meta_key );
- }
-
- /**
- * Setup the payment completed date
- *
- * @since 3.0
- * @return string The date the payment was completed
- */
- private function setup_completed_date() {
- if ( in_array( $this->payment->post_status, array( 'pending', 'preapproved', 'processing' ), true ) ) {
- return false; // This payment was never completed
- }
- $date = $this->get_meta( '_edd_completed_date', true );
-
- // phpcs:ignore WordPress.PHP.DisallowShortTernary
- return $date ?: $this->payment->date;
- }
-
- /**
- * Setup the payment mode
- *
- * @since 3.0
- * @return string The payment mode
- */
- private function setup_mode() {
- return $this->get_meta( '_edd_payment_mode' );
- }
-
- /**
- * Setup the payment total
- *
- * @since 3.0
- * @return float The payment total
- */
- private function setup_total() {
- $amount = $this->get_meta( '_edd_payment_total', true );
-
- if ( empty( $amount ) && '0.00' != $amount ) {
- $meta = $this->get_meta( '_edd_payment_meta', true );
- $meta = maybe_unserialize( $meta );
-
- if ( isset( $meta['amount'] ) ) {
- $amount = $meta['amount'];
- }
- }
-
- return $amount;
- }
-
- /**
- * Setup the payment tax
- *
- * @since 3.0
- * @return float The tax for the payment
- */
- private function setup_tax() {
- $tax = $this->get_meta( '_edd_payment_tax', true );
-
- // We don't have tax as its own meta and no meta was passed
- if ( '' === $tax ) {
-
- $tax = isset( $this->payment_meta['tax'] ) ? $this->payment_meta['tax'] : 0;
-
- }
-
- return $tax;
-
- }
-
- /**
- * Setup the payment tax rate
- *
- * @since 3.0
- * @return float The tax rate for the payment
- */
- private function setup_tax_rate() {
- return $this->get_meta( '_edd_payment_tax_rate', true );
- }
-
- /**
- * Setup the payment fees
- *
- * @since 3.0
- * @return float The fees total for the payment
- */
- private function setup_fees_total() {
- $fees_total = (float) 0.00;
-
- $payment_fees = isset( $this->payment_meta['fees'] ) ? $this->payment_meta['fees'] : array();
- if ( ! empty( $payment_fees ) ) {
- foreach ( $payment_fees as $fee ) {
- $fees_total += (float) $fee['amount'];
- }
- }
-
- return $fees_total;
-
- }
-
- /**
- * Setup the payment subtotal
- *
- * @since 3.0
- * @return float The subtotal of the payment
- */
- private function setup_subtotal() {
- $subtotal = 0;
- $cart_details = $this->cart_details;
-
- if ( is_array( $cart_details ) ) {
-
- foreach ( $cart_details as $item ) {
-
- if ( isset( $item['subtotal'] ) ) {
-
- $subtotal += $item['subtotal'];
-
- }
- }
- } else {
-
- $subtotal = $this->total;
- $tax = edd_use_taxes() ? $this->tax : 0;
- $subtotal -= $tax;
-
- }
-
- return $subtotal;
- }
-
- /**
- * Setup the payments discount codes
- *
- * @since 3.0
- * @return array Array of discount codes on this payment
- */
- private function setup_discounts() {
- return ! empty( $this->payment_meta['user_info']['discount'] ) ? $this->payment_meta['user_info']['discount'] : array();
- }
-
- /**
- * Setup the currency code
- *
- * @since 3.0
- * @return string The currency for the payment
- */
- private function setup_currency() {
- return isset( $this->payment_meta['currency'] ) ? $this->payment_meta['currency'] : apply_filters( 'edd_payment_currency_default', edd_get_currency(), $this );
- }
-
- /**
- * Setup any fees associated with the payment
- *
- * @since 3.0
- * @return array The Fees
- */
- private function setup_fees() {
- return isset( $this->payment_meta['fees'] ) ? $this->payment_meta['fees'] : array();
- }
-
- /**
- * Setup the gateway used for the payment
- *
- * @since 3.0
- * @return string The gateway
- */
- private function setup_gateway() {
- return $this->get_meta( '_edd_payment_gateway', true );
- }
-
- /**
- * Setup the transaction ID
- *
- * @since 3.0
- * @return string The transaction ID for the payment
- */
- private function setup_transaction_id() {
- $transaction_id = $this->get_meta( '_edd_payment_transaction_id', true );
-
- if ( empty( $transaction_id ) || (int) $transaction_id === (int) $this->ID ) {
-
- $gateway = $this->gateway;
- $transaction_id = apply_filters( 'edd_get_payment_transaction_id-' . $gateway, $this->ID );
-
- }
-
- return $transaction_id;
- }
-
- /**
- * Setup the IP Address for the payment
- *
- * @since 3.0
- * @return string The IP address for the payment
- */
- private function setup_ip() {
- return $this->get_meta( '_edd_payment_user_ip', true );
- }
-
- /**
- * Setup the customer ID
- *
- * @since 3.0
- * @return int The Customer ID
- */
- private function setup_customer_id() {
- return $this->get_meta( '_edd_payment_customer_id', true );
- }
-
- /**
- * Setup the User ID associated with the purchase
- *
- * @since 3.0
- * @return int The User ID
- */
- private function setup_user_id() {
- $user_id = $this->get_meta( '_edd_payment_user_id', true );
- $customer = new EDD_Customer( $this->customer_id );
-
- // Make sure it exists, and that it matches that of the associated customer record
- if ( ! empty( $customer->user_id ) && ( empty( $user_id ) || (int) $user_id !== (int) $customer->user_id ) ) {
-
- $user_id = $customer->user_id;
-
- // Backfill the user ID, or reset it to be correct in the event of data corruption
- update_post_meta( $this->ID, '_edd_payment_user_id', $user_id );
-
- }
-
- return $user_id;
- }
-
- /**
- * Setup the email address for the purchase
- *
- * @since 3.0
- * @return string The email address for the payment
- */
- private function setup_email() {
- $email = $this->get_meta( '_edd_payment_user_email', true );
-
- if ( empty( $email ) ) {
- $email = EDD()->customers->get_column( 'email', $this->customer_id );
- }
-
- return $email;
- }
-
- /**
- * Setup the user info
- *
- * @since 3.0
- * @return array The user info associated with the payment
- */
- private function setup_user_info() {
- $defaults = array(
- 'first_name' => $this->first_name,
- 'last_name' => $this->last_name,
- 'discount' => $this->discounts,
- );
-
- $user_info = isset( $this->payment_meta['user_info'] ) ? $this->payment_meta['user_info'] : array();
-
- if ( is_serialized( $user_info ) ) {
- preg_match( '/[oO]\s*:\s*\d+\s*:\s*"\s*(?!(?i)(stdClass))/', $user_info, $matches );
- if ( ! empty( $matches ) ) {
- $user_info = array();
- }
- }
-
- // As per Github issue #4248, we need to run maybe_unserialize here still.
- $user_info = wp_parse_args( maybe_unserialize( $user_info ), $defaults );
-
- // Ensure email index is in the old user info array
- if ( empty( $user_info['email'] ) ) {
- $user_info['email'] = $this->email;
- }
-
- if ( empty( $user_info ) ) {
- // Get the customer, but only if it's been created
- $customer = new EDD_Customer( $this->customer_id );
-
- if ( $customer->id > 0 ) {
- $name = explode( ' ', $customer->name, 2 );
- $user_info = array(
- 'first_name' => $name[0],
- 'last_name' => $name[1],
- 'email' => $customer->email,
- 'discount' => 'none',
- );
- }
- } else {
- // Get the customer, but only if it's been created
- $customer = new EDD_Customer( $this->customer_id );
- if ( $customer->id > 0 ) {
- foreach ( $user_info as $key => $value ) {
- if ( ! empty( $value ) ) {
- continue;
- }
-
- switch ( $key ) {
- case 'first_name':
- $name = explode( ' ', $customer->name, 2 );
-
- $user_info[ $key ] = $name[0];
- break;
-
- case 'last_name':
- $name = explode( ' ', $customer->name, 2 );
- $last_name = ! empty( $name[1] ) ? $name[1] : '';
-
- $user_info[ $key ] = $last_name;
- break;
-
- case 'email':
- $user_info[ $key ] = $customer->email;
- break;
- }
- }
- }
- }
-
- return $user_info;
- }
-
- /**
- * Setup the Address for the payment
- *
- * @since 3.0
- * @return array The Address information for the payment
- */
- private function setup_address() {
- $address = ! empty( $this->payment_meta['user_info']['address'] ) ? $this->payment_meta['user_info']['address'] : array();
- $defaults = array(
- 'line1' => '',
- 'line2' => '',
- 'city' => '',
- 'country' => '',
- 'state' => '',
- 'zip' => '',
- );
-
- return wp_parse_args( $address, $defaults );
- }
-
- /**
- * Setup the payment key
- *
- * @since 3.0
- * @return string The Payment Key
- */
- private function setup_payment_key() {
- return $this->get_meta( '_edd_payment_purchase_key', true );
- }
-
- /**
- * Setup the payment number
- *
- * @since 3.0
- * @return int|string Integer by default, or string if sequential order numbers is enabled
- */
- private function setup_payment_number() {
- $number = false;
- if ( edd_get_option( 'enable_sequential' ) ) {
- $number = $this->get_meta( '_edd_payment_number', true );
- }
-
- return $number ?: $this->ID;
- }
-
- /**
- * Setup the cart details
- *
- * @since 3.0
- * @return array The cart details
- */
- private function setup_cart_details() {
- return isset( $this->payment_meta['cart_details'] ) ? maybe_unserialize( $this->payment_meta['cart_details'] ) : array();
- }
-
- /**
- * Setup the downloads array
- *
- * @since 3.0
- * @return array Downloads associated with this payment
- */
- private function setup_downloads() {
- return isset( $this->payment_meta['downloads'] ) ? maybe_unserialize( $this->payment_meta['downloads'] ) : array();
- }
-
- /**
- * Setup the Unlimited downloads setting
- *
- * @since 3.0
- * @return bool If this payment has unlimited downloads
- */
- private function setup_has_unlimited() {
- return (bool) $this->get_meta( '_edd_payment_unlimited_downloads', true );
- }
-
- /**
- * Sets up the payment status.
- *
- * @since 3.0
- * @return string
- */
- private function setup_status() {
- return 'publish' === $this->payment->post_status ? 'complete' : $this->payment->post_status;
- }
-
- /**
- * Shims the payment, as much as possible, into an EDD Order object.
- * @todo deprecate in 3.1
- *
- * @return EDD\Orders\Order
- */
- public function _shim_order() {
- return new \EDD\Orders\Order(
- array(
- 'id' => $this->ID,
- 'parent' => $this->payment->parent,
- 'order_number' => $this->number,
- 'status' => $this->status,
- 'type' => 'sale',
- 'user_id' => $this->user_id,
- 'customer_id' => $this->customer_id,
- 'email' => $this->email,
- 'ip' => $this->ip,
- 'gateway' => $this->gateway,
- 'mode' => $this->mode,
- 'currency' => $this->currency,
- 'payment_key' => $this->key,
- 'subtotal' => $this->subtotal,
- 'discount' => $this->discounted_amount,
- 'tax' => $this->tax,
- 'total' => $this->total,
- 'rate' => $this->get_order_tax_rate(),
- 'date_created' => $this->payment->post_date_gmt,
- 'date_modified' => $this->payment->post_modified,
- 'date_completed' => $this->completed_date,
- 'items' => $this->get_order_items(),
- )
- );
- }
-
- /**
- * Updates the payment tax rate to match the expected order tax rate.
- *
- * @since 3.0
- * @return float
- */
- private function get_order_tax_rate() {
- $tax_rate = (float) $this->tax_rate;
- if ( $tax_rate < 1 ) {
- $tax_rate = $tax_rate * 100;
- }
-
- return $tax_rate;
- }
-
- /**
- * Gets an array of order item objects from the cart details.
- *
- * @since 3.0
- * @return array
- */
- private function get_order_items() {
- $order_items = array();
- if ( empty( $this->cart_details ) ) {
- return $order_items;
- }
- foreach ( $this->cart_details as $key => $cart_item ) {
- $product_name = isset( $cart_item['name'] )
- ? $cart_item['name']
- : '';
- $price_id = $this->get_valid_price_id_for_cart_item( $cart_item );
- if ( ! empty( $product_name ) ) {
- $option_name = edd_get_price_option_name( $cart_item['id'], $price_id );
- if ( ! empty( $option_name ) ) {
- $product_name .= ' — ' . $option_name;
- }
- }
- $order_item_args = array(
- 'order_id' => $this->ID,
- 'product_id' => $cart_item['id'],
- 'product_name' => $product_name,
- 'price_id' => $price_id,
- 'cart_index' => $key,
- 'type' => 'download',
- 'status' => $this->status,
- 'quantity' => ! empty( $cart_item['quantity'] ) ? $cart_item['quantity'] : 1,
- 'amount' => ! empty( $cart_item['item_price'] ) ? (float) $cart_item['item_price'] : (float) $cart_item['price'],
- 'subtotal' => (float) $cart_item['subtotal'],
- 'discount' => ! empty( $cart_item['discount'] ) ? (float) $cart_item['discount'] : 0.00,
- 'tax' => $cart_item['tax'],
- 'total' => (float) $cart_item['price'],
- 'date_created' => $this->payment->post_date_gmt,
- 'date_modified' => $this->payment->post_modified_gmt,
- );
-
- $order_items[] = new EDD\Orders\Order_Item( $order_item_args );
- }
-
- return $order_items;
- }
-
- /**
- * Retrieves a valid price ID for a given cart item.
- * If the product does not have variable prices, then `null` is always returned.
- * If the supplied price ID does not match a price ID that actually exists, then the default
- * variable price is returned instead of the supplied one.
- *
- * @since 3.0
- *
- * @param array $cart_item Array of cart item details.
- *
- * @return int|null
- */
- private function get_valid_price_id_for_cart_item( $cart_item ) {
- // If the product doesn't have variable prices, just return `null`.
- if ( ! edd_has_variable_prices( $cart_item['id'] ) ) {
- return null;
- }
-
- $variable_prices = edd_get_variable_prices( $cart_item['id'] );
- if ( ! is_array( $variable_prices ) || empty( $variable_prices ) ) {
- return null;
- }
-
- // Get the price ID that's set to the cart item right now.
- $price_id = isset( $cart_item['item_number']['options']['price_id'] ) && is_numeric( $cart_item['item_number']['options']['price_id'] )
- ? absint( $cart_item['item_number']['options']['price_id'] )
- : null;
-
- // Now let's confirm it's actually a valid price ID.
- $variable_price_ids = array_map( 'intval', array_column( $variable_prices, 'index' ) );
-
- return in_array( $price_id, $variable_price_ids, true ) ? $price_id : edd_get_default_variable_price( $cart_item['id'] );
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/compat/class-log.php b/wp-content/plugins/easy-digital-downloads/includes/compat/class-log.php
deleted file mode 100644
index 912f96cb..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/compat/class-log.php
+++ /dev/null
@@ -1,344 +0,0 @@
-{$key};
- break;
- }
-
- if ( $this->show_notices ) {
- _doing_it_wrong( 'get_post_meta()', 'All log postmeta has been deprecated since Easy Digital Downloads 3.0! Use edd_get_api_request_log() instead.', 'EDD 3.0' );
-
- if ( $this->show_backtrace ) {
- $backtrace = debug_backtrace();
- trigger_error( print_r( $backtrace, 1 ) );
- }
- }
-
- return $value;
- }
-
- /**
- * Listen for calls to update_post_meta for API request logs and see if we need to filter them.
- *
- * This is here for backwards compatibility purposes with the migration to custom tables in EDD 3.0.
- *
- * @since 3.0
- *
- * @param mixed $check Comes in 'null' but if returned not null, WordPress Core will not interact with the
- * postmeta table.
- * @param int $object_id The object ID post meta was requested for.
- * @param string $meta_key The meta key requested.
- * @param mixed $meta_value The value get_post_meta would return if we don't filter.
- * @param mixed $prev_value The previous value of the meta.
- * @return mixed Returns 'null' if no action should be taken and WordPress core can continue, or non-null to avoid postmeta.
- */
- public function api_request_log_update_post_meta( $check, $object_id, $meta_key, $meta_value, $prev_value ) {
- $meta_keys = array(
- '_edd_log_request_ip',
- '_edd_log_user',
- '_edd_log_key',
- '_edd_log_token',
- '_edd_log_time',
- '_edd_log_version',
- );
-
- if ( ! in_array( $meta_key, $meta_keys, true ) ) {
- return $check;
- }
-
- $api_request_log = edd_get_api_request_log( $object_id );
-
- if ( ! $api_request_log ) {
- return $check;
- }
-
- switch ( $meta_key ) {
- case '_edd_log_request_ip':
- case '_edd_log_user':
- case '_edd_log_key':
- case '_edd_log_token':
- case '_edd_log_time':
- case '_edd_log_version':
- $key = str_replace( '_edd_log_', '', $meta_key );
-
- switch ( $key ) {
- case 'request_ip':
- $key = 'ip';
- break;
- case 'key':
- $key = 'api_key';
- break;
- case 'user':
- $key = 'user_id';
- break;
- }
-
- $check = edd_update_api_request_log( $object_id, array(
- $key => $meta_value,
- ) );
- break;
- }
-
- if ( $this->show_notices ) {
- _doing_it_wrong( 'add_post_meta()/update_post_meta()', 'All log postmeta has been deprecated since Easy Digital Downloads 3.0! Use edd_add_order_meta()/edd_update_order_meta()() instead.', 'EDD 3.0' );
-
- if ( $this->show_backtrace ) {
- $backtrace = debug_backtrace();
- trigger_error( print_r( $backtrace, 1 ) );
- }
- }
-
- return $check;
- }
-
- /**
- * Backwards compatibility filters for get_post_meta() calls on file download logs.
- *
- * @since 3.0
- *
- * @param mixed $value The value get_post_meta would return if we don't filter.
- * @param int $object_id The object ID post meta was requested for.
- * @param string $meta_key The meta key requested.
- * @param bool $single If a single value or an array of the value is requested.
- *
- * @return mixed The value to return.
- */
- public function file_download_log_get_post_meta( $value, $object_id, $meta_key, $single ) {
- if ( 'get_post_metadata' !== current_filter() ) {
- $message = __( 'This function is not meant to be called directly. It is only here for backwards compatibility purposes.', 'easy-digital-downloads' );
- _doing_it_wrong( __FUNCTION__, $message, 'EDD 3.0' );
- }
-
- $meta_keys = array(
- '_edd_log_user_info',
- '_edd_log_user_id',
- '_edd_log_file_id',
- '_edd_log_ip',
- '_edd_log_payment_id',
- '_edd_log_price_id',
- '_edd_log_customer_id',
- );
-
- if ( ! in_array( $meta_key, $meta_keys, true ) ) {
- return $value;
- }
-
- $file_download_log = edd_get_file_download_log( $object_id );
-
- if ( ! $file_download_log ) {
- return $value;
- }
-
- switch ( $meta_key ) {
- case '_edd_log_user_id':
- case '_edd_log_file_id':
- case '_edd_log_ip':
- case '_edd_log_payment_id':
- case '_edd_log_price_id':
- case '_edd_log_customer_id':
- $key = str_replace( '_edd_log_', '', $meta_key );
-
- switch ( $key ) {
- case 'request_ip':
- $key = 'ip';
- break;
- case 'key':
- $key = 'api_key';
- break;
- case 'user':
- $key = 'user_id';
- break;
- case 'payment_id':
- $key = 'order_id';
- break;
- }
-
- if ( isset( $file_download_log->{$key} ) ) {
- $value = $file_download_log->{$key};
- }
-
- if ( 'user_id' === $key ) {
- $customer = new \EDD_Customer( $file_download_log->customer_id );
- $value = ! empty( $customer->user_id ) ? $customer->user_id : 0;
- }
- break;
- }
-
- if ( $this->show_notices ) {
- _doing_it_wrong( 'get_post_meta()', __( 'All log postmeta has been deprecated since Easy Digital Downloads 3.0! Use edd_get_api_request_log() instead.', 'easy-digital-downloads' ), 'EDD 3.0' );
-
- if ( $this->show_backtrace ) {
- $backtrace = debug_backtrace();
- trigger_error( print_r( $backtrace, 1 ) );
- }
- }
-
- return $value;
- }
-
- /**
- * Listen for calls to update_post_meta for file download logs and see if we need to filter them.
- *
- * This is here for backwards compatibility purposes with the migration to custom tables in EDD 3.0.
- *
- * @since 3.0
- *
- * @param mixed $check Comes in 'null' but if returned not null, WordPress Core will not interact with
- * the postmeta table.
- * @param int $object_id The object ID post meta was requested for.
- * @param string $meta_key The meta key requested.
- * @param mixed $meta_value The value get_post_meta would return if we don't filter.
- * @param mixed $prev_value The previous value of the meta
- *
- * @return mixed Returns 'null' if no action should be taken and WordPress core can continue, or non-null to avoid postmeta
- */
- public function file_download_log_update_post_meta( $check, $object_id, $meta_key, $meta_value, $prev_value ) {
- $meta_keys = array(
- '_edd_log_user_info',
- '_edd_log_user_id',
- '_edd_log_file_id',
- '_edd_log_ip',
- '_edd_log_payment_id',
- '_edd_log_price_id',
- '_edd_log_customer_id',
- );
-
- if ( ! in_array( $meta_key, $meta_keys, true ) ) {
- return $check;
- }
-
- $file_download_log = edd_get_file_download_log( $object_id );
-
- if ( ! $file_download_log ) {
- return $check;
- }
-
- switch ( $meta_key ) {
- case '_edd_log_user_id':
- case '_edd_log_file_id':
- case '_edd_key_ip':
- case '_edd_log_payment_id':
- case '_edd_log_price_id':
- case '_edd_log_customer_id':
- $key = str_replace( '_edd_log_', '', $meta_key );
-
- if ( 'payment_id' === $key ) {
- $key = 'order_id';
- }
-
- $check = edd_update_file_download_log( $object_id, array(
- $key => $meta_value,
- ) );
- break;
- }
-
- return $check;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/compat/class-payment.php b/wp-content/plugins/easy-digital-downloads/includes/compat/class-payment.php
deleted file mode 100644
index 2493a3ad..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/compat/class-payment.php
+++ /dev/null
@@ -1,313 +0,0 @@
-posts} WHERE post_type = 'edd_payment' GROUP BY post_status";
-
- if ( $expected === $query ) {
- $query = "SELECT status AS post_status, COUNT( * ) AS num_posts FROM {$wpdb->edd_orders} GROUP BY post_status";
- }
-
- return $query;
- }
-
- /**
- * Add a message for anyone to trying to get payments via get_post/get_posts/WP_Query.
- * Force filters to run for all queries that have `edd_discount` as the post type.
- *
- * This is here for backwards compatibility purposes with the migration to custom tables in EDD 3.0.
- *
- * @since 3.0
- *
- * @param \WP_Query $query
- */
- public function pre_get_posts( $query ) {
- global $wpdb;
-
- if ( 'pre_get_posts' !== current_filter() ) {
- $message = __( 'This function is not meant to be called directly. It is only here for backwards compatibility purposes.', 'easy-digital-downloads' );
- _doing_it_wrong( __FUNCTION__, $message, 'EDD 3.0' );
- }
-
- // Bail if not a payment
- if ( 'edd_payment' !== $query->get( 'post_type' ) ) {
- return;
- }
-
- // Force filters to run
- $query->set( 'suppress_filters', false );
-
- // Setup doing-it-wrong message
- $message = sprintf(
- __( 'As of Easy Digital Downloads 3.0, orders no longer exist in the %1$s table. They have been migrated to %2$s. Orders should be accessed using %3$s or %4$s. See %5$s for more information.', 'easy-digital-downloads' ),
- '' . $wpdb->posts . '',
- '' . edd_get_component_interface( 'order', 'table' )->table_name . '',
- 'edd_get_orders()',
- 'edd_get_order()',
- 'https://easydigitaldownloads.com/development/'
- );
-
- _doing_it_wrong( 'get_posts()/get_post()/WP_Query', $message, 'EDD 3.0' );
- }
-
- /**
- * Backwards compatibility filters for get_post_meta() calls on payments.
- *
- * @since 3.0
- *
- * @param mixed $value The value get_post_meta would return if we don't filter.
- * @param int $object_id The object ID post meta was requested for.
- * @param string $meta_key The meta key requested.
- * @param bool $single If a single value or an array of the value is requested.
- *
- * @return mixed The value to return.
- */
- public function get_post_metadata( $value, $object_id, $meta_key, $single ) {
-
- if ( 'get_post_metadata' !== current_filter() ) {
- $message = __( 'This function is not meant to be called directly. It is only here for backwards compatibility purposes.', 'easy-digital-downloads' );
- _doing_it_wrong( __FUNCTION__, esc_html( $message ), 'EDD 3.0' );
- }
-
- // Bail early of not a back-compat key
- if ( ! in_array( $meta_key, $this->get_meta_key_whitelist(), true ) ) {
- return $value;
- }
-
- // Bail if order does not exist
- $order = $this->_shim_edd_get_order( $object_id );
- if ( empty( $order ) ) {
- return $value;
- }
-
- switch ( $meta_key ) {
- case '_edd_payment_purchase_key':
- $value = $order->payment_key;
- break;
- case '_edd_payment_transaction_id':
- $value = $order->get_transaction_id();
- break;
- case '_edd_payment_user_email':
- $value = $order->email;
- break;
- case '_edd_payment_meta':
- $p = edd_get_payment( $object_id );
- $value = array( $p->get_meta( '_edd_payment_meta' ) );
- break;
- case '_edd_completed_date':
- $value = $order->date_completed;
- break;
- case '_edd_payment_gateway':
- $value = $order->gateway;
- break;
- case '_edd_payment_user_id':
- $value = $order->user_id;
- break;
- case '_edd_payment_user_ip':
- $value = $order->ip;
- break;
- case '_edd_payment_mode':
- $value = $order->mode;
- break;
- case '_edd_payment_tax_rate':
- $value = $order->get_tax_rate();
- /*
- * Tax rates are now stored as percentages (e.g. `20.00`) but previously they were stored as
- * decimals (e.g. `0.2`) so we convert it back to a decimal.
- */
- if ( is_numeric( $value ) ) {
- $value = $value / 100;
- }
- break;
- case '_edd_payment_customer_id':
- $value = $order->customer_id;
- break;
- case '_edd_payment_total':
- $value = $order->total;
- break;
- case '_edd_payment_tax':
- $value = $order->tax;
- break;
- case '_edd_payment_number':
- $value = $order->get_number();
- break;
- default :
- $value = edd_get_order_meta( $order->id, $meta_key, true );
- break;
- }
-
- if ( $this->show_notices ) {
- _doing_it_wrong( 'get_post_meta()', 'All payment postmeta has been deprecated since Easy Digital Downloads 3.0! Use edd_get_order() instead.', 'EDD 3.0' );
-
- if ( $this->show_backtrace ) {
- $backtrace = debug_backtrace();
- trigger_error( print_r( $backtrace, 1 ) );
- }
- }
-
- return $value;
- }
-
- /**
- * Backwards compatibility filters for add/update_post_meta() calls on payments.
- *
- * @since 3.0
- *
- * @param mixed $check Comes in 'null' but if returned not null, WordPress Core will not interact with the postmeta table.
- * @param int $object_id The object ID post meta was requested for.
- * @param string $meta_key The meta key requested.
- * @param mixed $meta_value The value get_post_meta would return if we don't filter.
- * @param mixed $prev_value The previous value of the meta
- *
- * @return mixed Returns 'null' if no action should be taken and WordPress core can continue, or non-null to avoid postmeta.
- */
- public function update_post_metadata( $check, $object_id, $meta_key, $meta_value, $prev_value ) {
-
- // Bail early of not a back-compat key
- if ( ! in_array( $meta_key, $this->get_meta_key_whitelist(), true ) ) {
- return $check;
- }
-
- // Bail if payment does not exist
- $payment = edd_get_payment( $object_id );
- if ( empty( $payment ) ) {
- return $check;
- }
-
- $check = $payment->update_meta( $meta_key, $meta_value );
-
- if ( $this->show_notices ) {
- _doing_it_wrong( 'add_post_meta()/update_post_meta()', 'All payment postmeta has been deprecated since Easy Digital Downloads 3.0! Use edd_add_order_meta()/edd_update_order_meta()() instead.', 'EDD 3.0' );
-
- if ( $this->show_backtrace ) {
- $backtrace = debug_backtrace();
- trigger_error( print_r( $backtrace, 1 ) );
- }
- }
-
- return $check;
- }
-
- /**
- * Retrieves a list of whitelisted meta keys that we want to catch in get/update post meta calls.
- *
- * @since 3.0
- * @return array
- */
- private function get_meta_key_whitelist() {
- $meta_keys = array(
- '_edd_payment_purchase_key',
- '_edd_payment_transaction_id',
- '_edd_payment_meta',
- '_edd_completed_date',
- '_edd_payment_gateway',
- '_edd_payment_user_id',
- '_edd_payment_user_email',
- '_edd_payment_user_ip',
- '_edd_payment_mode',
- '_edd_payment_tax_rate',
- '_edd_payment_customer_id',
- '_edd_payment_total',
- '_edd_payment_tax',
- '_edd_payment_number',
- '_edd_sl_upgraded_payment_id', // EDD SL
- '_edd_sl_is_renewal', // EDD SL
- '_edds_stripe_customer_id', // EDD Stripe
- );
-
- /**
- * Allows the whitelisted post meta keys to be filtered. Extensions should add their meta key(s) to this
- * list if they want add/update/get post meta calls to be routed to order meta.
- *
- * @param array $meta_keys
- *
- * @since 3.0
- */
- $meta_keys = apply_filters( 'edd_30_post_meta_key_whitelist', $meta_keys );
-
- return (array) $meta_keys;
- }
-
- /**
- * Gets the order from the database.
- * This is a duplicate of edd_get_order, but is defined separately here
- * for pending migration purposes.
- *
- * @todo deprecate in 3.1
- *
- * @param int $order_id
- * @return false|EDD\Orders\Order
- */
- private function _shim_edd_get_order( $order_id ) {
- $orders = new \EDD\Database\Queries\Order();
-
- // Return order
- return $orders->get_item( $order_id );
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/compat/class-tax.php b/wp-content/plugins/easy-digital-downloads/includes/compat/class-tax.php
deleted file mode 100644
index a41b2953..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/compat/class-tax.php
+++ /dev/null
@@ -1,97 +0,0 @@
- $tax_rate['country'],
- 'scope' => $scope,
- 'amount' => floatval( $tax_rate['rate'] ),
- 'description' => $region,
- );
-
- edd_add_tax_rate( $adjustment_data );
- }
-
- // Return the value so it is stored for backwards compatibility purposes.
- return $value;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/compat/class-template.php b/wp-content/plugins/easy-digital-downloads/includes/compat/class-template.php
deleted file mode 100644
index 86924574..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/compat/class-template.php
+++ /dev/null
@@ -1,119 +0,0 @@
-exists( $template ) && $wp_filesystem->is_writable( $template ) ) {
- $contents = $wp_filesystem->get_contents( $template );
-
- $get_post_call_exists = strstr( $contents, 'get_post( $edd_receipt_args[\'id\'] )' );
-
- if ( false === $get_post_call_exists ) {
- return;
- }
-
- $contents = str_replace( 'get_post( $edd_receipt_args[\'id\'] )', 'edd_get_payment( $edd_receipt_args[\'id\'] )', $contents );
- $updated = $wp_filesystem->put_contents( $template, $contents );
-
- // Only display a notice if we could not update the file.
- if ( ! $updated ) {
- add_action( 'admin_notices', function() use ( $template ) {
- ?>
-
-
-
', '' ); ?>
-
-
- $name,
- 'schema' => '\\EDD\\Database\\Schema',
- 'table' => '\\EDD\\Database\\Table',
- 'query' => '\\EDD\\Database\\Query',
- 'object' => '\\EDD\\Database\\Row',
- 'meta' => false
- ) );
-
- // Setup the component
- EDD()->components[ $name ] = new EDD\Component( $r );
-
- // Component registered
- do_action( 'edd_registered_component', $name, $r, $args );
-}
-
-/**
- * Get an EDD Component object
- *
- * @since 3.0
- * @param string $name
- *
- * @return EDD\Component|false False if not exists, EDD\Component if exists
- */
-function edd_get_component( $name = '' ) {
- $name = sanitize_key( $name );
-
- // Return component if exists, or false
- return isset( EDD()->components[ $name ] )
- ? EDD()->components[ $name ]
- : false;
-}
-
-/**
- * Get an EDD Component interface
- *
- * @since 3.0
- * @param string $component
- * @param string $interface
- *
- * @return mixed False if not exists, EDD Component interface if exists
- */
-function edd_get_component_interface( $component = '', $interface = '' ) {
-
- // Get component
- $c = edd_get_component( $component );
-
- // Bail if no component
- if ( empty( $c ) ) {
- return $c;
- }
-
- // Return interface, or false if not exists
- return $c->get_interface( $interface );
-}
-
-/**
- * Setup all EDD components
- *
- * @since 3.0
- */
-function edd_setup_components() {
- static $setup = false;
-
- // Never register components more than 1 time per request
- if ( false !== $setup ) {
- return;
- }
-
- // Register customer.
- edd_register_component( 'customer', array(
- 'schema' => '\\EDD\\Database\\Schemas\\Customers',
- 'table' => '\\EDD\\Database\\Tables\\Customers',
- 'meta' => '\\EDD\\Database\\Tables\\Customer_Meta',
- 'query' => '\\EDD\\Database\\Queries\\Customer',
- 'object' => 'EDD_Customer'
- ) );
-
- // Register customer address.
- edd_register_component( 'customer_address', array(
- 'schema' => '\\EDD\\Database\\Schemas\\Customer_Addresses',
- 'table' => '\\EDD\\Database\\Tables\\Customer_Addresses',
- 'query' => '\\EDD\\Database\\Queries\\Customer_Address',
- 'object' => '\\EDD\\Customers\\Customer_Address',
- 'meta' => false
- ) );
-
- // Register customer email address.
- edd_register_component( 'customer_email_address', array(
- 'schema' => '\\EDD\\Database\\Schemas\\Customer_Email_Addresses',
- 'table' => '\\EDD\\Database\\Tables\\Customer_Email_Addresses',
- 'query' => '\\EDD\\Database\\Queries\\Customer_Email_Address',
- 'object' => '\\EDD\\Customers\\Customer_Email_Address',
- 'meta' => false
- ) );
-
- // Register adjustment.
- edd_register_component( 'adjustment', array(
- 'schema' => '\\EDD\\Database\\Schemas\\Adjustments',
- 'table' => '\\EDD\\Database\\Tables\\Adjustments',
- 'meta' => '\\EDD\\Database\\Tables\\Adjustment_Meta',
- 'query' => '\\EDD\\Database\\Queries\\Adjustment',
- 'object' => '\\EDD\\Adjustments\\Adjustment'
- ) );
-
- // Register note.
- edd_register_component( 'note', array(
- 'schema' => '\\EDD\\Database\\Schemas\\Notes',
- 'table' => '\\EDD\\Database\\Tables\\Notes',
- 'meta' => '\\EDD\\Database\\Tables\\Note_Meta',
- 'query' => '\\EDD\\Database\\Queries\\Note',
- 'object' => '\\EDD\\Notes\\Note'
- ) );
-
- // Register order.
- edd_register_component( 'order', array(
- 'schema' => '\\EDD\\Database\\Schemas\\Orders',
- 'table' => '\\EDD\\Database\\Tables\\Orders',
- 'meta' => '\\EDD\\Database\\Tables\\Order_Meta',
- 'query' => '\\EDD\\Database\\Queries\\Order',
- 'object' => '\\EDD\\Orders\\Order'
- ) );
-
- // Register order item.
- edd_register_component( 'order_item', array(
- 'schema' => '\\EDD\\Database\\Schemas\\Order_Items',
- 'table' => '\\EDD\\Database\\Tables\\Order_Items',
- 'meta' => '\\EDD\\Database\\Tables\\Order_Item_Meta',
- 'query' => '\\EDD\\Database\\Queries\\Order_Item',
- 'object' => '\\EDD\\Orders\\Order_Item'
- ) );
-
- // Register order adjustment.
- edd_register_component( 'order_adjustment', array(
- 'schema' => '\\EDD\\Database\\Schemas\\Order_Adjustments',
- 'table' => '\\EDD\\Database\\Tables\\Order_Adjustments',
- 'meta' => '\\EDD\\Database\\Tables\\Order_Adjustment_Meta',
- 'query' => '\\EDD\\Database\\Queries\\Order_Adjustment',
- 'object' => '\\EDD\\Orders\\Order_Adjustment',
- ) );
-
- // Register order address.
- edd_register_component( 'order_address', array(
- 'schema' => '\\EDD\\Database\\Schemas\\Order_Addresses',
- 'table' => '\\EDD\\Database\\Tables\\Order_Addresses',
- 'query' => '\\EDD\\Database\\Queries\\Order_Address',
- 'object' => '\\EDD\\Orders\\Order_Address',
- 'meta' => false
- ) );
-
- // Register order transaction.
- edd_register_component( 'order_transaction', array(
- 'schema' => '\\EDD\\Database\\Schemas\\Order_Transactions',
- 'table' => '\\EDD\\Database\\Tables\\Order_Transactions',
- 'query' => '\\EDD\\Database\\Queries\\Order_Transaction',
- 'object' => '\\EDD\\Orders\\Order_Transaction',
- 'meta' => false
- ) );
-
- // Register log.
- edd_register_component( 'log', array(
- 'schema' => '\\EDD\\Database\\Schemas\\Logs',
- 'table' => '\\EDD\\Database\\Tables\\Logs',
- 'meta' => '\\EDD\\Database\\Tables\\Log_Meta',
- 'query' => '\\EDD\\Database\\Queries\\Log',
- 'object' => '\\EDD\\Logs\\Log'
- ) );
-
- // Register log API request.
- edd_register_component( 'log_api_request', array(
- 'schema' => '\\EDD\\Database\\Schemas\\Logs_Api_Requests',
- 'table' => '\\EDD\\Database\\Tables\\Logs_Api_Requests',
- 'meta' => '\\EDD\\Database\\Tables\\Logs_Api_Request_Meta',
- 'query' => '\\EDD\\Database\\Queries\\Log_Api_Request',
- 'object' => '\\EDD\\Logs\\Api_Request_Log',
- ) );
-
- // Register log file download.
- edd_register_component( 'log_file_download', array(
- 'schema' => '\\EDD\\Database\\Schemas\\Logs_File_Downloads',
- 'table' => '\\EDD\\Database\\Tables\\Logs_File_Downloads',
- 'meta' => '\\EDD\\Database\\Tables\\Logs_File_Download_Meta',
- 'query' => '\\EDD\\Database\\Queries\\Log_File_Download',
- 'object' => '\\EDD\\Logs\\File_Download_Log',
- ) );
-
- edd_register_component( 'notification', array(
- 'schema' => '\\EDD\\Database\\Schemas\\Notifications',
- 'table' => '\\EDD\\Database\\Tables\\Notifications',
- 'query' => '\\EDD\\Database\\Queries\\Notification',
- 'object' => '\\EDD\\Notifications\\Notification',
- 'meta' => false,
- ) );
-
- // Set the locally static setup var.
- $setup = true;
-
- // Action to allow third party components to be setup.
- do_action( 'edd_setup_components' );
-}
-
-/**
- * Install all component database tables
- *
- * This function installs all database tables used by all components (including
- * third-party and add-ons that use the Component API)
- *
- * This is used by unit tests and tools.
- *
- * @since 3.0
- */
-function edd_install_component_database_tables() {
-
- // Get the components
- $components = EDD()->components;
-
- // Bail if no components setup yet
- if ( empty( $components ) ) {
- return;
- }
-
- // Drop all component tables
- foreach ( $components as $component ) {
-
- // Objects
- $object = $component->get_interface( 'table' );
- if ( $object instanceof \EDD\Database\Table && ! $object->exists() ) {
- $object->install();
- }
-
- // Meta
- $meta = $component->get_interface( 'meta' );
- if ( $meta instanceof \EDD\Database\Table && ! $meta->exists() ) {
- $meta->install();
- }
- }
-}
-
-/**
- * Uninstall all component database tables
- *
- * This function is destructive and disastrous, so do not call it directly
- * unless you fully intend to destroy all data (including third-party add-ons
- * that use the Component API)
- *
- * This is used by unit tests and tools.
- *
- * @since 3.0
- */
-function edd_uninstall_component_database_tables() {
-
- // Get the components
- $components = EDD()->components;
-
- // Bail if no components setup yet
- if ( empty( $components ) ) {
- return;
- }
-
- // Drop all component tables
- foreach ( $components as $component ) {
-
- // Objects
- $object = $component->get_interface( 'table' );
- if ( $object instanceof \EDD\Database\Table && $object->exists() ) {
- $object->uninstall();
- }
-
- // Meta
- $meta = $component->get_interface( 'meta' );
- if ( $meta instanceof \EDD\Database\Table && $meta->exists() ) {
- $meta->uninstall();
- }
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/country-functions.php b/wp-content/plugins/easy-digital-downloads/includes/country-functions.php
deleted file mode 100644
index 68fcecf7..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/country-functions.php
+++ /dev/null
@@ -1,420 +0,0 @@
-get_states( $country );
-
- return apply_filters( 'edd_shop_states', $states, $country );
-}
-
-/**
- * Get Country List
- *
- * @since 1.0
- * @return array $countries A list of the available countries
- */
-function edd_get_country_list() {
- return apply_filters( 'edd_countries', include EDD_PLUGIN_DIR . 'i18n/countries.php' );
-}
-
-/**
- * Get States List
- *
- * @since 1.2
- * @return array
- */
-function edd_get_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_us_states', $countries->get_states( 'US' ) );
-}
-
-/**
- * Get Angola States
- *
- * @since 2.8.5
- * @return array $states A list of states
- */
-function edd_get_angola_provinces_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_angola_provinces', $countries->get_states( 'AO' ) );
-}
-
-/**
- * Get Provinces List
- *
- * @since 1.2
- * @return array
- */
-function edd_get_provinces_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_canada_provinces', $countries->get_states( 'CA' ) );
-}
-
-/**
- * Get Australian States
- *
- * @since 1.6
- * @return array $states A list of states
- */
-function edd_get_australian_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_australian_states', $countries->get_states( 'AU' ) );
-}
-
-/**
- * Get Bangladeshi States (districts)
- *
- * @since 2.2.3
- * @return array $states A list of states
- */
-function edd_get_bangladeshi_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_bangladeshi_states', $countries->get_states( 'BD' ) );
-}
-
-/**
- * Get Brazil States
- *
- * @since 1.6
- * @return array $states A list of states
- */
-function edd_get_brazil_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_brazil_states', $countries->get_states( 'BR' ) );
-}
-
-/**
- * Get Bulgarian States
- *
- * @since 2.2.3
- * @return array $states A list of states
- */
-function edd_get_bulgarian_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_bulgarian_states', $countries->get_states( 'BG' ) );
-}
-
-/**
- * Get Hong Kong States
- *
- * @since 1.6
- * @return array $states A list of states
- */
-function edd_get_hong_kong_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_hong_kong_states', $countries->get_states( 'HK' ) );
-}
-
-/**
- * Get Hungary States
- *
- * @since 1.6
- * @return array $states A list of states
- */
-function edd_get_hungary_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_hungary_states', $countries->get_states( 'HU' ) );
-}
-
-/**
- * Get Japanese States
- *
- * @since 2.2.3
- * @return array $states A list of states
- */
-function edd_get_japanese_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_japanese_states', $countries->get_states( 'JP' ) );
-}
-
-/**
- * Get Chinese States
- *
- * @since 1.6
- * @return array $states A list of states
- */
-function edd_get_chinese_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_chinese_states', $countries->get_states( 'CN' ) );
-}
-
-/**
- * Get United Kingdom States
- *
- * @since 2.9
- * @return array $states A list of states
- */
-function edd_get_united_kingdom_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_united_kingdom_states', $countries->get_states( 'GB' ) );
-}
-
-/**
- * Get New Zealand States
- *
- * @since 1.6
- * @return array $states A list of states
- */
-function edd_get_new_zealand_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_new_zealand_states', $countries->get_states( 'NZ' ) );
-}
-
-/**
- * Get Peruvian States
- *
- * @since 2.2.3
- * @return array $states A list of states
- */
-function edd_get_peruvian_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_peruvian_states', $countries->get_states( 'PE' ) );
-}
-
-/**
- * Get Indonesian States
- *
- * @since 1.6
- * @return array $states A list of states
- */
-function edd_get_indonesian_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_indonesia_states', $countries->get_states( 'ID' ) );
-}
-
-/**
- * Get Indian States
- *
- * @since 1.6
- * @return array $states A list of states
- */
-function edd_get_indian_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_indian_states', $countries->get_states( 'IN' ) );
-}
-
-/**
- * Get Iranian States
- *
- * @since 2.2.3
- * @return array $states A list of states
- */
-function edd_get_iranian_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_iranian_states', $countries->get_states( 'IR' ) );
-}
-
-/**
- * Get Italian Provinces
- *
- * @since 2.2.3
- * @return array $states A list of states
- */
-function edd_get_italian_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_italian_states', $countries->get_states( 'IT' ) );
-}
-
-/**
- * Get Malaysian States
- *
- * @since 1.6
- * @return array $states A list of states
- */
-function edd_get_malaysian_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_malaysian_states', $countries->get_states( 'MY' ) );
-}
-
-/**
- * Get Mexican States
- *
- * @since 2.2.3
- * @return array $states A list of states
- */
-function edd_get_mexican_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_mexican_states', $countries->get_states( 'MX' ) );
-}
-
-/**
- * Get Nepalese States (Districts)
- *
- * @since 2.2.3
- * @return array $states A list of states
- */
-function edd_get_nepalese_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_nepalese_states', $countries->get_states( 'NP' ) );
-}
-
-/**
- * Get South African States
- *
- * @since 1.6
- * @return array $states A list of states
- */
-function edd_get_south_african_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_south_african_states', $countries->get_states( 'ZA' ) );
-}
-
-/**
- * Get Thailand States
- *
- * @since 1.6
- * @return array $states A list of states
- */
-function edd_get_thailand_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_thailand_states', $countries->get_states( 'TH' ) );
-}
-
-/**
- * Get Turkey States
- *
- * @since 2.2.3
- * @return array $states A list of states
- */
-function edd_get_turkey_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_turkey_states', $countries->get_states( 'TR' ) );
-}
-
-/**
- * Get Spain States
- *
- * @since 2.2
- * @return array $states A list of states
- */
-function edd_get_spain_states_list() {
- $countries = new EDD\Utils\Countries();
-
- return apply_filters( 'edd_spain_states', $countries->get_states( 'ES' ) );
-}
-
-/**
- * Returns a list of Netherland's provinces.
- *
- * @since 3.0
- * @return array $states A list of Netherland's provinces.
- */
-function edd_get_netherlands_provinces_list() {
- $countries = new EDD\Utils\Countries();
-
- /**
- * Filters the list of Netherland's provinces.
- *
- * @since 3.0
- *
- * @param array $states A list of Netherland's provinces.
- */
- return apply_filters( 'edd_netherlands_provinces', $countries->get_states( 'NL' ) );
-}
-
-/**
- * Given a country code, return the country name
- *
- * @since 2.8.7
- * @param string $country_code The ISO Code for the country
- *
- * @return string
- */
-function edd_get_country_name( $country_code = '' ) {
- $country_list = edd_get_country_list();
- $country_name = isset( $country_list[ $country_code ] ) ? $country_list[ $country_code ] : $country_code;
-
- return apply_filters( 'edd_get_country_name', $country_name, $country_code );
-}
-
-/**
- * Given a country and state code, return the state name
- *
- * @since 2.9
- * @param string $country_code The ISO Code for the country
- * @param string $state_code The ISO Code for the state
- *
- * @return string
- */
-function edd_get_state_name( $country_code = '', $state_code = '' ) {
- if ( empty( $country_code ) ) {
- $country_code = edd_get_shop_country();
- }
- $countries = new EDD\Utils\Countries();
- $state_name = $countries->get_state_name( $country_code, $state_code );
-
- return apply_filters( 'edd_get_state_name', $state_name, $state_code );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/currency/functions.php b/wp-content/plugins/easy-digital-downloads/includes/currency/functions.php
deleted file mode 100644
index d9bacec3..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/currency/functions.php
+++ /dev/null
@@ -1,119 +0,0 @@
- __( 'US Dollars ($)', 'easy-digital-downloads' ),
- 'EUR' => __( 'Euros (€)', 'easy-digital-downloads' ),
- 'GBP' => __( 'Pound Sterling (£)', 'easy-digital-downloads' ),
- 'AUD' => __( 'Australian Dollars ($)', 'easy-digital-downloads' ),
- 'BRL' => __( 'Brazilian Real (R$)', 'easy-digital-downloads' ),
- 'CAD' => __( 'Canadian Dollars ($)', 'easy-digital-downloads' ),
- 'CZK' => __( 'Czech Koruna', 'easy-digital-downloads' ),
- 'DKK' => __( 'Danish Krone', 'easy-digital-downloads' ),
- 'HKD' => __( 'Hong Kong Dollar ($)', 'easy-digital-downloads' ),
- 'HUF' => __( 'Hungarian Forint', 'easy-digital-downloads' ),
- 'ILS' => __( 'Israeli Shekel (₪)', 'easy-digital-downloads' ),
- 'JPY' => __( 'Japanese Yen (¥)', 'easy-digital-downloads' ),
- 'MYR' => __( 'Malaysian Ringgits', 'easy-digital-downloads' ),
- 'MXN' => __( 'Mexican Peso ($)', 'easy-digital-downloads' ),
- 'NZD' => __( 'New Zealand Dollar ($)', 'easy-digital-downloads' ),
- 'NOK' => __( 'Norwegian Krone', 'easy-digital-downloads' ),
- 'PHP' => __( 'Philippine Pesos', 'easy-digital-downloads' ),
- 'PLN' => __( 'Polish Zloty', 'easy-digital-downloads' ),
- 'SGD' => __( 'Singapore Dollar ($)', 'easy-digital-downloads' ),
- 'SEK' => __( 'Swedish Krona', 'easy-digital-downloads' ),
- 'CHF' => __( 'Swiss Franc', 'easy-digital-downloads' ),
- 'TWD' => __( 'Taiwan New Dollars', 'easy-digital-downloads' ),
- 'THB' => __( 'Thai Baht (฿)', 'easy-digital-downloads' ),
- 'INR' => __( 'Indian Rupee (₹)', 'easy-digital-downloads' ),
- 'TRY' => __( 'Turkish Lira (₺)', 'easy-digital-downloads' ),
- 'RIAL' => __( 'Iranian Rial (﷼)', 'easy-digital-downloads' ),
- 'RUB' => __( 'Russian Rubles', 'easy-digital-downloads' ),
- 'AOA' => __( 'Angolan Kwanza', 'easy-digital-downloads' ),
- );
-
- return apply_filters( 'edd_currencies', $currencies );
-}
-
-/**
- * Accepts an amount (ideally from the database, unmodified) and formats it
- * for display. The amount itself is formatted and the currency prefix/suffix
- * is applied and positioned.
- *
- * @since 3.0
- *
- * @param int|float|string $amount
- * @param string $currency
- *
- * @return string
- */
-function edd_display_amount( $amount, $currency ) {
- $formatter = new Money_Formatter( $amount, new Currency( $currency ) );
-
- return $formatter->format_for_display()
- ->apply_symbol();
-}
-
-/**
- * Get the store's set currency
- *
- * @since 1.5.2
- * @return string The currency code
- */
-function edd_get_currency() {
- $currency = edd_get_option( 'currency', 'USD' );
- return apply_filters( 'edd_currency', $currency );
-}
-
-/**
- * Given a currency determine the symbol to use. If no currency given, site default is used.
- * If no symbol is determined, the currency string is returned.
- *
- * @since 2.2
- *
- * @param string $currency The currency string
- *
- * @return string The symbol to use for the currency
- */
-function edd_currency_symbol( $currency = '' ) {
- if ( empty( $currency ) ) {
- $currency = edd_get_currency();
- }
-
- $currency = new Currency( $currency );
-
- return $currency->symbol;
-}
-
-/**
- * Get the name of a currency
- *
- * @since 2.2
- *
- * @param string $code The currency code
- *
- * @return string The currency's name
- */
-function edd_get_currency_name( $code = 'USD' ) {
- $currencies = edd_get_currencies();
- $name = isset( $currencies[ $code ] ) ? $currencies[ $code ] : $code;
- return apply_filters( 'edd_currency_name', $name );
-}
-
diff --git a/wp-content/plugins/easy-digital-downloads/includes/customer-functions.php b/wp-content/plugins/easy-digital-downloads/includes/customer-functions.php
deleted file mode 100644
index 201a38ad..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/customer-functions.php
+++ /dev/null
@@ -1,971 +0,0 @@
-add_item( $data );
-}
-
-/**
- * Delete a customer.
- *
- * @since 3.0
- *
- * @param int ID of customer to delete.
- * @return int|false `1` if the customer was deleted successfully, false on error.
- */
-function edd_delete_customer( $customer_id = 0 ) {
- $customers = new EDD\Database\Queries\Customer();
-
- return $customers->delete_item( $customer_id );
-}
-
-/**
- * Destroy a customer.
- *
- * Completely deletes a customer, and the addresses and email addresses with it.
- *
- * @since 3.0
- *
- * @param int $customer_id Customer ID.
- * @return int|false `1` if the customer was deleted successfully, false on error.
- */
-function edd_destroy_customer( $customer_id = 0 ) {
-
- // Bail if a customer ID was not passed.
- if ( empty( $customer_id ) ) {
- return false;
- }
-
- // Get email addresses.
- $email_addresses = edd_get_customer_email_addresses( array(
- 'customer_id' => $customer_id,
- 'no_found_rows' => true,
- ) );
-
- // Destroy email addresses.
- if ( ! empty( $email_addresses ) ) {
- foreach ( $email_addresses as $email_address ) {
- edd_delete_customer_email_address( $email_address->id );
- }
- }
-
- // Get addresses.
- $addresses = edd_get_customer_addresses( array(
- 'customer_id' => $customer_id,
- 'no_found_rows' => true,
- ) );
-
- // Destroy addresses.
- if ( ! empty( $addresses ) ) {
- foreach ( $addresses as $address ) {
- edd_delete_customer_address( $address->id );
- }
- }
-
- // Delete the customer.
- $customer_destroyed = edd_delete_customer( $customer_id );
- if ( ! empty( $customer_destroyed ) ) {
- /**
- * Action that runs when a customer is destroyed with the edd_destroy_customer function.
- *
- * This action is similar to edd_customer_deleted and includes running that action,
- * but also includes deleting all customer addresses and email addresses.
- *
- * @since 3.0.4
- *
- * @param int $customer_id Customer ID being destroyed.
- */
- do_action( 'edd_customer_destroyed', $customer_id );
- }
-
- return $customer_destroyed;
-}
-
-/**
- * Update a customer.
- *
- * @since 3.0
- *
- * @param int $customer_id Customer ID.
- * @param array $data {
- * Array of customer data. Default empty.
- *
- * @type int $user_id WordPress user ID linked to the customer account.
- * Default 0.
- * @type string $email Customer's primary email address. Default empty.
- * @type string $name Customer's name. Default empty.
- * @type string $status Customer's status. Default `active`.
- * @type float $purchase_value Aggregated purchase value of the customer.
- * Default 0.
- * @type int $purchase_count Aggregated purchase count of the customer.
- * Default 0.
- * @type string $date_created Optional. Automatically calculated on add/edit.
- * The date & time the customer was created.
- * Format: YYYY-MM-DD HH:MM:SS. Default empty.
- * @type string $date_modified Optional. Automatically calculated on add/edit.
- * The date & time the customer was last modified.
- * Format: YYYY-MM-DD HH:MM:SS. Default empty.
- * }
- *
- * @return int|false Number of rows updated if successful, false otherwise.
- */
-function edd_update_customer( $customer_id = 0, $data = array() ) {
- $customers = new EDD\Database\Queries\Customer();
-
- return $customers->update_item( $customer_id, $data );
-}
-
-/**
- * Get a customer item by ID.
- *
- * @since 3.0
- *
- * @param int $customer_id Customer ID.
- * @return EDD_Customer|false Customer object if successful, false otherwise.
- */
-function edd_get_customer( $customer_id = 0 ) {
- $customers = new EDD\Database\Queries\Customer();
-
- // Return customer.
- return $customers->get_item( $customer_id );
-}
-
-/**
- * Get a customer item by a specific field value.
- *
- * @since 3.0
- *
- * @param string $field Database table field.
- * @param string $value Value of the row.
- *
- * @return EDD_Customer|false Customer object if successful, false otherwise.
- */
-function edd_get_customer_by( $field = '', $value = '' ) {
- // For backwards compatibility in filters only.
- $customers_db = EDD()->customers;
-
- /**
- * Filters the Customer before querying the database.
- *
- * Return a non-null value to bypass the default query and return early.
- *
- * @since 2.9.23
- *
- * @param mixed|null $customer Customer to return instead. Default null to use default method.
- * @param string $field The field to retrieve by.
- * @param mixed $value The value to search by.
- * @param EDD\Compat\Customer $edd_customers_db Customer database class. Deprecated in 3.0.
- */
- $found = apply_filters( 'edd_pre_get_customer', null, $field, $value, $customers_db );
-
- if ( null !== $found ) {
- return $found;
- }
-
- $customers = new EDD\Database\Queries\Customer();
- if ( 'email' === $field ) {
- $customer_emails = new EDD\Database\Queries\Customer_Email_Address();
- $customer_email = $customer_emails->get_item_by( 'email', $value );
-
- $customer = false;
- if ( ! empty( $customer_email->customer_id ) ) {
- $customer = $customers->get_item_by( 'id', $customer_email->customer_id );
- }
- } else {
- $customer = $customers->get_item_by( $field, $value );
- }
-
- /**
- * Filters the single Customer retrieved from the database based on field.
- *
- * @since 2.9.23
- *
- * @param EDD_Customer|false $customer Customer query result. False if no Customer is found.
- * @param array $args Arguments used to query the Customer.
- * @param EDD\Compat\Customer $edd_customers_db Customer database class. Deprecated in 3.0.
- */
- $customer = apply_filters( "edd_get_customer_by_{$field}", $customer, $customers->query_vars, $customers_db );
-
- /**
- * Filters the single Customer retrieved from the database.
- *
- * @since 2.9.23
- *
- * @param EDD_Customer|false $customer Customer query result. False if no Customer is found.
- * @param array $args Arguments used to query the Customer.
- * @param EDD_DB_Customers $edd_customers_db Customer database class.
- */
- $customer = apply_filters( 'edd_get_customer', $customer, $customers->query_vars, $customers_db );
-
- return $customer;
-}
-
-/**
- * Get a field from a customer object.
- *
- * @since 3.0
- *
- * @param int $customer_id Customer ID. Default `0`.
- * @param string $field Field to retrieve from object. Default empty.
- *
- * @return mixed Null if customer does not exist. Value of Customer if exists.
- */
-function edd_get_customer_field( $customer_id = 0, $field = '' ) {
- $customer = edd_get_customer( $customer_id );
-
- // Check that field exists.
- return isset( $customer->{$field} )
- ? $customer->{$field}
- : null;
-}
-
-/**
- * Query for customers.
- *
- * @see \EDD\Database\Queries\Customer::__construct()
- *
- * @since 3.0
- *
- * @param array $args Arguments. See `EDD\Database\Queries\Customer` for
- * accepted arguments.
- * @return \EDD_Customer[] Array of `EDD_Customer` objects.
- */
-function edd_get_customers( $args = array() ) {
-
- // Parse args
- $r = wp_parse_args( $args, array(
- 'number' => 30
- ) );
-
- if ( -1 == $r['number'] ) {
- _doing_it_wrong( __FUNCTION__, esc_html__( 'Do not use -1 to retrieve all results.', 'easy-digital-downloads' ), '3.0' );
- $r['number'] = 9999999;
- }
-
- // Instantiate a query object
- $customers = new EDD\Database\Queries\Customer();
-
- // Return customers
- return $customers->query( $r );
-}
-
-/**
- * Get total number of customers.
- *
- * @see \EDD\Database\Queries\Customer::__construct()
- *
- * @since 3.0
- *
- * @param array $args Arguments. See `EDD\Database\Queries\Customer` for
- * accepted arguments.
- * @return int Number of customers returned based on query arguments passed.
- */
-function edd_count_customers( $args = array() ) {
-
- // Parse args
- $r = wp_parse_args( $args, array(
- 'count' => true
- ) );
-
- // Query for count(s)
- $customers = new EDD\Database\Queries\Customer( $r );
-
- // Return count(s)
- return absint( $customers->found_items );
-}
-
-/**
- * Query for and return array of customer counts, keyed by status.
- *
- * @since 3.0
- *
- * @param array $args Arguments. See `EDD\Database\Queries\Customer` for
- * accepted arguments.
- * @return array Customer counts keyed by status.
- */
-function edd_get_customer_counts( $args = array() ) {
-
- // Parse arguments
- $r = wp_parse_args( $args, array(
- 'count' => true,
- 'groupby' => 'status'
- ) );
-
- // Query for count
- $counts = new EDD\Database\Queries\Customer( $r );
-
- // Format & return
- return edd_format_counts( $counts, $r['groupby'] );
-}
-
-/**
- * Return the role used to edit customers.
- *
- * @since 3.0
- *
- * @return string Role used to edit customers.
- */
-function edd_get_edit_customers_role() {
-
- /**
- * Filter role used to edit customers.
- *
- * @since 2.3
- *
- * @param string WordPress role used to edit customers. Default `edit_shop_payments`.
- */
- return apply_filters( 'edd_edit_customers_role', 'edit_shop_payments' );
-}
-
-/**
- * Retrieve all of the IP addresses used by a customer.
- *
- * @since 3.0
- *
- * @param int $customer_id Customer ID.
- *
- * @return array Array of objects containing IP addresses.
- */
-function edd_get_customer_ip_addresses( $customer_id = 0 ) {
-
- // Bail if no customer ID was passed.
- if ( empty( $customer_id ) ) {
- return array();
- }
-
- $customer = edd_get_customer( $customer_id );
-
- return $customer->get_ips();
-}
-
-/** Meta **********************************************************************/
-
-/**
- * Add meta data field to a customer.
- *
- * @since 3.0
- *
- * @param int $customer_id Customer ID.
- * @param string $meta_key Meta data name.
- * @param mixed $meta_value Meta data value. Must be serializable if non-scalar.
- * @param bool $unique Optional. Whether the same key should not be added.
- * Default false.
- *
- * @return int|false Meta ID on success, false on failure.
- */
-function edd_add_customer_meta( $customer_id, $meta_key, $meta_value, $unique = false ) {
- return add_metadata( 'edd_customer', $customer_id, $meta_key, $meta_value, $unique );
-}
-
-/**
- * Remove meta data matching criteria from a customer.
- *
- * You can match based on the key, or key and value. Removing based on key and
- * value, will keep from removing duplicate meta data with the same key. It also
- * allows removing all meta data matching key, if needed.
- *
- * @since 3.0
- *
- * @param int $customer_id Customer ID.
- * @param string $meta_key Meta data name.
- * @param mixed $meta_value Optional. Meta data value. Must be serializable if
- * non-scalar. Default empty.
- *
- * @return bool True on success, false on failure.
- */
-function edd_delete_customer_meta( $customer_id, $meta_key, $meta_value = '' ) {
- return delete_metadata( 'edd_customer', $customer_id, $meta_key, $meta_value );
-}
-
-/**
- * Retrieve customer meta field for a customer.
- *
- * @since 3.0
- *
- * @param int $customer_id Customer ID.
- * @param string $key Optional. The meta key to retrieve. By default, returns
- * data for all keys. Default empty.
- * @param bool $single Optional, default is false.
- * If true, return only the first value of the specified meta_key.
- * This parameter has no effect if meta_key is not specified.
- *
- * @return mixed Will be an array if $single is false. Will be value of meta data
- * field if $single is true.
- */
-function edd_get_customer_meta( $customer_id, $key = '', $single = false ) {
- return get_metadata( 'edd_customer', $customer_id, $key, $single );
-}
-
-/**
- * Update customer meta field based on customer ID.
- *
- * Use the $prev_value parameter to differentiate between meta fields with the
- * same key and customer ID.
- *
- * If the meta field for the customer does not exist, it will be added.
- *
- * @since 3.0
- *
- * @param int $customer_id Customer ID.
- * @param string $meta_key Meta data key.
- * @param mixed $meta_value Meta data value. Must be serializable if non-scalar.
- * @param mixed $prev_value Optional. Previous value to check before removing.
- * Default empty.
- *
- * @return int|bool Meta ID if the key didn't exist, true on successful update,
- * false on failure.
- */
-function edd_update_customer_meta( $customer_id, $meta_key, $meta_value, $prev_value = '' ) {
- return update_metadata( 'edd_customer', $customer_id, $meta_key, $meta_value, $prev_value );
-}
-
-/**
- * Delete everything from customer meta matching meta key.
- *
- * @since 3.0
- *
- * @param string $meta_key Key to search for when deleting.
- *
- * @return bool Whether the customer meta key was deleted from the database.
- */
-function edd_delete_customer_meta_by_key( $meta_key ) {
- return delete_metadata( 'edd_customer', null, $meta_key, '', true );
-}
-
-/** Customer Addresses **********************************************************/
-
-/**
- * Get a customer address by ID.
- *
- * @internal This method is named edd_fetch_customer_address as edd_get_customer_address
- * exists for backwards compatibility purposes and returns an array instead of
- * an object.
- *
- * @since 3.0
- *
- * @param int $customer_address_id Customer address ID.
- * @return EDD\Customers\Customer_Address Customer address object.
- */
-function edd_fetch_customer_address( $customer_address_id = 0 ) {
- $customer_addresses = new EDD\Database\Queries\Customer_Address();
-
- // Return customer address.
- return $customer_addresses->get_item( $customer_address_id );
-}
-
-/**
- * Add a customer address.
- *
- * @since 3.0
- *
- * @param array $data {
- * Array of customer address data. Default empty.
- *
- * The `date_created` and `date_modified` parameters do not need to be passed.
- * They will be automatically populated if empty.
- *
- * @type int $customer_id Customer ID. Default `0`.
- * @type string $type Address type. Default `billing`.
- * @type string $status Address status, if used or not. Default `active`.
- * @type string $address First line of address. Default empty.
- * @type string $address2 Second line of address. Default empty.
- * @type string $city City. Default empty.
- * @type string $region Region. See `edd_get_shop_states()` for
- * accepted values. Default empty.
- * @type string $postal_code Postal code. Default empty.
- * @type string $country Country. See `edd_get_country_list()` for
- * accepted values. Default empty.
- * @type string $date_created Optional. Automatically calculated on add/edit.
- * The date & time the address was inserted.
- * Format: YYYY-MM-DD HH:MM:SS. Default empty.
- * @type string $date_modified Optional. Automatically calculated on add/edit.
- * The date & time the address was last modified.
- * Format: YYYY-MM-DD HH:MM:SS. Default empty.
- * }
- * @return int|false ID of newly created customer address, false on error.
- */
-function edd_add_customer_address( $data = array() ) {
-
- // A customer ID must be supplied for every address inserted.
- if ( empty( $data['customer_id'] ) ) {
- return false;
- }
-
- $customer_addresses = new EDD\Database\Queries\Customer_Address();
-
- return $customer_addresses->add_item( $data );
-}
-
-/**
- * Delete a customer address.
- *
- * @since 3.0
- *
- * @param int $customer_address_id Customer address ID.
- * @return int|false `1` if the adjustment was deleted successfully, false on error.
- */
-function edd_delete_customer_address( $customer_address_id = 0 ) {
- $customer_addresses = new EDD\Database\Queries\Customer_Address();
-
- return $customer_addresses->delete_item( $customer_address_id );
-}
-
-/**
- * Update a customer address.
- *
- * @since 3.0
- *
- * @param int $customer_address_id Customer address ID.
- * @param array $data {
- * Array of customer address data. Default empty.
- *
- * @type int $customer_id Customer ID. Default `0`.
- * @type string $type Address type. Default `billing`.
- * @type string $status Address status, if used or not. Default `active`.
- * @type string $address First line of address. Default empty.
- * @type string $address2 Second line of address. Default empty.
- * @type string $city City. Default empty.
- * @type string $region Region. See `edd_get_shop_states()` for
- * accepted values. Default empty.
- * @type string $postal_code Postal code. Default empty.
- * @type string $country Country. See `edd_get_country_list()` for
- * accepted values. Default empty.
- * @type string $date_created Optional. Automatically calculated on add/edit.
- * The date & time the adjustment was inserted.
- * Format: YYYY-MM-DD HH:MM:SS. Default empty.
- * @type string $date_modified Optional. Automatically calculated on add/edit.
- * The date & time the adjustment was last modified.
- * Format: YYYY-MM-DD HH:MM:SS. Default empty.
- * }
- *
- * @return int|false Number of rows updated if successful, false otherwise.
- */
-function edd_update_customer_address( $customer_address_id = 0, $data = array() ) {
- $customer_addresses = new EDD\Database\Queries\Customer_Address();
-
- return $customer_addresses->update_item( $customer_address_id, $data );
-}
-
-/**
- * Get a customer address by a specific field value.
- *
- * @since 3.0
- *
- * @param string $field Database table field.
- * @param string $value Value of the row.
- *
- * @return \EDD\Customers\Customer_Address|false Customer_Address if successful,
- * false otherwise.
- */
-function edd_get_customer_address_by( $field = '', $value = '' ) {
- $customer_addresses = new EDD\Database\Queries\Customer_Address();
-
- // Return customer address
- return $customer_addresses->get_item_by( $field, $value );
-}
-
-/**
- * Query for customer addresses.
- *
- * @see \EDD\Database\Queries\Customer_Address::__construct()
- *
- * @since 3.0
- *
- * @param array $args Arguments. See `EDD\Database\Queries\Customer_Address` for
- * accepted arguments.
- * @return \EDD\Customers\Customer_Address[] Array of `Customer_Address` objects.
- */
-function edd_get_customer_addresses( $args = array() ) {
-
- // Parse args
- $r = wp_parse_args( $args, array(
- 'number' => 30
- ) );
-
- // Instantiate a query object
- $customer_addresses = new EDD\Database\Queries\Customer_Address();
-
- // Return addresses
- return $customer_addresses->query( $r );
-}
-
-/**
- * Count customer addresses.
- *
- * @see \EDD\Database\Queries\Customer_Address::__construct()
- *
- * @since 3.0
- *
- * @param array $args Arguments. See `EDD\Database\Queries\Customer_Address` for
- * accepted arguments.
- * @return int Number of customer addresses returned based on query arguments passed.
- */
-function edd_count_customer_addresses( $args = array() ) {
-
- // Parse args
- $r = wp_parse_args( $args, array(
- 'count' => true
- ) );
-
- // Query for count(s)
- $customer_addresses = new EDD\Database\Queries\Customer_Address( $r );
-
- // Return count(s)
- return absint( $customer_addresses->found_items );
-}
-
-/**
- * Maybe add a customer address. Only unique addresses will be added. Used
- * by `edd_build_order()` and `edd_add_manual_order()` to maybe add order
- * addresses to the customer addresses table. Also used by the data migrator
- * class when migrating orders from 2.9.
- *
- * @since 3.0
- *
- * @param int $customer_id Customer ID.
- * @param array $data {
- * Array of customer address data. Default empty.
- *
- * @type string $type Address type. Default `billing`.
- * @type string $status Address status, if used or not. Default `active`.
- * @type string $address First line of address. Default empty.
- * @type string $address2 Second line of address. Default empty.
- * @type string $city City. Default empty.
- * @type string $region Region. See `edd_get_shop_states()` for
- * accepted values. Default empty.
- * @type string $postal_code Postal code. Default empty.
- * @type string $country Country. See `edd_get_country_list()` for
- * accepted values. Default empty.
- * @type string $date_created Optional. Automatically calculated on add/edit.
- * The date & time the address was inserted.
- * Format: YYYY-MM-DD HH:MM:SS. Default empty.
- * @type string $date_modified Optional. Automatically calculated on add/edit.
- * The date & time the address was last modified.
- * Format: YYYY-MM-DD HH:MM:SS. Default empty.
- * }
- *
- * @return int|false ID of the insert customer address. False otherwise.
- */
-function edd_maybe_add_customer_address( $customer_id = 0, $data = array() ) {
-
- // Bail if nothing passed.
- if ( empty( $customer_id ) || empty( $data ) ) {
- return false;
- }
-
- // Set up an array with empty address keys. If all of these are empty in $data, the address should not be added.
- $empty_address = array(
- 'address' => '',
- 'address2' => '',
- 'city' => '',
- 'region' => '',
- 'country' => '',
- 'postal_code' => '',
- );
- $address_to_check = array_intersect_key( $data, $empty_address );
- $address_to_check = array_filter( $address_to_check );
- if ( empty( $address_to_check ) ) {
- return false;
- }
- $address_to_check['customer_id'] = $customer_id;
- $address_to_check['type'] = empty( $data['type'] ) ? 'billing' : $data['type'];
-
- // Check if this address is already assigned to the customer.
- $address_exists = edd_get_customer_addresses( $address_to_check );
- if ( ! empty( $address_exists ) ) {
- if ( 'billing' === $address_to_check['type'] ) {
- edd_update_customer_address( $address_exists[0], array( 'is_primary' => true ) );
- }
- return false;
- }
-
- $data['customer_id'] = $customer_id;
- if ( 'billing' === $address_to_check['type'] ) {
- $data['is_primary'] = true;
- }
-
- // Add the new address to the customer record.
- return edd_add_customer_address( $data );
-}
-
-/**
- * Query for and return array of customer address counts, keyed by status.
- *
- * @see \EDD\Database\Queries\Customer_Address::__construct()
- *
- * @since 3.0
- *
- * @param array $args Arguments. See `EDD\Database\Queries\Customer_Address` for
- * accepted arguments.
- * @return array Customer address counts keyed by status.
- */
-function edd_get_customer_address_counts( $args = array() ) {
-
- // Parse args
- $r = wp_parse_args( $args, array(
- 'count' => true,
- 'groupby' => 'status'
- ) );
-
- // Query for count
- $counts = new EDD\Database\Queries\Customer_Address( $r );
-
- // Format & return
- return edd_format_counts( $counts, $r['groupby'] );
-}
-
-/** Customer Email Addresses *************************************************/
-
-/**
- * Add a customer email address.
- *
- * @since 3.0
- *
- * @param array $data {
- * Array of customer email address data. Default empty.
- *
- * The `date_created` and `date_modified` parameters do not need to be passed.
- * They will be automatically populated if empty.
- *
- * @type int $customer_id Customer ID. Default `0`.
- * @type string $type Email address type. Default `secondary`.
- * @type string $status Email address type. Default `active`.
- * @type string $email Email address. Default empty.
- * @type string $date_created Optional. Automatically calculated on add/edit.
- * The date & time the email address was inserted.
- * Format: YYYY-MM-DD HH:MM:SS. Default empty.
- * @type string $date_modified Optional. Automatically calculated on add/edit.
- * The date & time the email address was last
- * modified. Format: YYYY-MM-DD HH:MM:SS. Default empty.
- * }
- * @return int|false ID of newly created customer email address, false on error.
- */
-function edd_add_customer_email_address( $data ) {
-
- // A customer ID and email must be supplied for every address inserted.
- if ( empty( $data['customer_id'] ) || empty( $data['email'] ) ) {
- return false;
- }
-
- // Instantiate a query object.
- $customer_email_addresses = new EDD\Database\Queries\Customer_Email_Address();
-
- // Check if the address already exists for this customer.
- $existing_addresses = $customer_email_addresses->query(
- array(
- 'customer_id' => $data['customer_id'],
- 'email' => $data['email'],
- )
- );
- if ( ! empty( $existing_addresses ) ) {
- return false;
- }
-
- // Add the email address to the customer.
- return $customer_email_addresses->add_item( $data );
-}
-
-/**
- * Delete a customer email address.
- *
- * @since 3.0
- *
- * @param int $customer_email_address_id Customer email address ID.
- * @return int|false `1` if the customer email address was deleted successfully,
- * false on error.
- */
-function edd_delete_customer_email_address( $customer_email_address_id ) {
- $customer_email_addresses = new EDD\Database\Queries\Customer_Email_Address();
-
- return $customer_email_addresses->delete_item( $customer_email_address_id );
-}
-
-/**
- * Update a customer email address.
- *
- * @since 3.0
- *
- * @param int $customer_email_address_id Customer email address ID.
- * @param array $data {
- * Array of customer email address data. Default empty.
- *
- * @type int $customer_id Customer ID. Default `0`.
- * @type string $type Email address type. Default `secondary`.
- * @type string $status Email address type. Default `active`.
- * @type string $email Email address. Default empty.
- * @type string $date_created Optional. Automatically calculated on add/edit.
- * The date & time the email address was inserted.
- * Format: YYYY-MM-DD HH:MM:SS. Default empty.
- * @type string $date_modified Optional. Automatically calculated on add/edit.
- * The date & time the email address was last
- * modified. Format: YYYY-MM-DD HH:MM:SS. Default empty.
- * }
- *
- * @return int|false Number of rows updated if successful, false otherwise.
- */
-function edd_update_customer_email_address( $customer_email_address_id, $data = array() ) {
- $customer_email_addresses = new EDD\Database\Queries\Customer_Email_Address();
-
- return $customer_email_addresses->update_item( $customer_email_address_id, $data );
-}
-
-/**
- * Get a customer email address by ID.
- *
- * @since 3.0
- *
- * @param int $customer_email_address_id Customer email address ID.
- * @return \EDD\Customers\Customer_Email_Address|false Customer_Email_Address if
- * successful, false otherwise.
- */
-function edd_get_customer_email_address( $customer_email_address_id ) {
- $customer_email_addresses = new EDD\Database\Queries\Customer_Email_Address();
-
- // Return customer email address
- return $customer_email_addresses->get_item( $customer_email_address_id );
-}
-
-/**
- * Get a customer email address by a specific field value.
- *
- * @since 3.0
- *
- * @param string $field Database table field.
- * @param string $value Value of the row.
- *
- * @return \EDD\Customers\Customer_Email_Address|false Customer_Email_Address if
- * successful, false otherwise.
- */
-function edd_get_customer_email_address_by( $field = '', $value = '' ) {
- $customer_email_addresses = new EDD\Database\Queries\Customer_Email_Address();
-
- // Return customer email address
- return $customer_email_addresses->get_item_by( $field, $value );
-}
-
-/**
- * Query for customer email addresses.
- *
- * @see \EDD\Database\Queries\Customer_Email_Address::__construct()
- *
- * @since 3.0
- *
- * @param array $args Arguments. See `EDD\Database\Queries\Customer_Email_Address`
- * for accepted arguments.
- * @return \EDD\Customers\Customer_Email_Address[] Array of `Customer_Email_Address` objects.
- */
-function edd_get_customer_email_addresses( $args = array() ) {
-
- // Parse args
- $r = wp_parse_args( $args, array(
- 'number' => 30
- ) );
-
- // Instantiate a query object
- $customer_email_addresses = new EDD\Database\Queries\Customer_Email_Address();
-
- // Return customer email addresses
- return $customer_email_addresses->query( $r );
-}
-
-/**
- * Count customer addresses.
- *
- * @see \EDD\Database\Queries\Customer_Email_Address::__construct()
- *
- * @since 3.0
- *
- * @param array $args Arguments. See `EDD\Database\Queries\Customer_Email_Address`
- * for accepted arguments.
- * @return int Number of customer email addresses returned based on query arguments passed.
- */
-function edd_count_customer_email_addresses( $args = array() ) {
-
- // Parse args
- $r = wp_parse_args( $args, array(
- 'count' => true
- ) );
-
- // Query for count(s)
- $customer_email_addresses = new EDD\Database\Queries\Customer_Email_Address( $r );
-
- // Return count(s)
- return absint( $customer_email_addresses->found_items );
-}
-
-/**
- * Query for and return array of customer email counts, keyed by status.
- *
- * @see \EDD\Database\Queries\Customer_Email_Address::__construct()
- *
- * @since 3.0
- *
- * @param array $args Arguments. See `EDD\Database\Queries\Customer_Email_Address`
- * for accepted arguments.
- * @return array Customer email addresses keyed by status.
- */
-function edd_get_customer_email_address_counts( $args = array() ) {
-
- // Parse args
- $r = wp_parse_args( $args, array(
- 'count' => true,
- 'groupby' => 'status'
- ) );
-
- // Query for count
- $counts = new EDD\Database\Queries\Customer_Email_Address( $r );
-
- // Format & return
- return edd_format_counts( $counts, $r['groupby'] );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/customers/class-customer-address.php b/wp-content/plugins/easy-digital-downloads/includes/customers/class-customer-address.php
deleted file mode 100644
index 6768d070..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/customers/class-customer-address.php
+++ /dev/null
@@ -1,145 +0,0 @@
- $customer_id,
- 'email' => $data['email'],
- 'type' => 'primary',
- )
- );
-}
-add_action( 'edd_customer_added', 'edd_process_customer_added', 10, 2 );
-
-/**
- * Is intended to be used when updating a customer directly with edd_add_customer function.
- *
- * Because the edd_update_customer function only directly interacts with the customers DB table, we may
- * need to do some additional actions like managing email addresses.
- *
- * @since 3.0.4
- *
- * @param int $customer_id The customer ID being updated.
- * @param array $data The data passed in to update the customer with.
- * @param EDD_Customer $prev_customer_obj The customer object, prior to these updates.
- */
-function edd_process_customer_updated( $customer_id, $data, $prev_customer_obj ) {
- $customer = edd_get_customer( $customer_id );
- $email_updated = false;
-
- // Process a User ID change.
- if ( intval( $customer->user_id ) !== intval( $prev_customer_obj->user_id ) ) {
- // Attach the User Email to the customer as well.
- $user = new WP_User( $customer->user_id );
- if ( $user instanceof WP_User ) {
-
- // Only update this if it doesn't match already.
- if ( $customer->email !== $user->user_email ) {
- $customers = new EDD\Database\Queries\Customer();
- $customers->update_item( $customer_id, array( 'email' => $user->user_email ) );
- }
-
- // Our transition hook for the type will handle demoting any other email addresses.
- edd_add_customer_email_address(
- array(
- 'customer_id' => $customer->id,
- 'email' => $user->user_email,
- 'type' => 'primary',
- )
- );
-
- $email_updated = true;
- }
-
- // Remove the old user email from this account.
- $previous_user = new WP_User( $prev_customer_obj->user_id );
- if ( $previous_user instanceof WP_User ) {
- $existing_email_addresses = edd_get_customer_email_addresses(
- array(
- 'customer_id' => $customer->id,
- 'email' => $previous_user->user_email,
- )
- );
-
- if ( ! empty( $existing_email_addresses ) ) {
- // Should only be one, but let's foreach to be safe.
- foreach ( $existing_email_addresses as $existing_address ) {
- edd_delete_customer_email_address( $existing_address->id );
- }
- }
- }
-
- // Update some payment meta if we need to.
- $order_ids = edd_get_orders( array( 'customer_id' => $customer->id, 'number' => 9999999 ) );
-
- foreach ( $order_ids as $order_id ) {
- edd_update_order( $order_id, array( 'user_id' => $customer->user_id ) );
- }
- }
-
- // If the email address changed, set the new one as primary.
- if ( false === $email_updated && $prev_customer_obj->email !== $customer->email ) {
-
- // Our transition hook for the type will handle demoting any other email addresses.
- edd_add_customer_email_address(
- array(
- 'customer_id' => $customer->id,
- 'email' => $customer->email,
- 'type' => 'primary',
- )
- );
- }
-}
-add_action( 'edd_customer_updated', 'edd_process_customer_updated', 10, 3 );
-
-/**
- * When a new primary email address is added to the database, any other primary email addresses should be demoted.
- *
- * @param string $old_value The previous value of `type`.
- * @param string $new_value The new value of `type`.
- * @param int $item_id The address ID in the edd_customer_email_addresses table.
- * @return void
- */
-function edd_demote_customer_primary_email_addresses( $old_value, $new_value, $item_id ) {
- if ( ! $new_value ) {
- return;
- }
-
- // If we're not setting the `type` to `primary` we do not need to make any adjustments.
- if ( 'primary' !== $new_value ) {
- return;
- }
-
- $email_address = edd_get_customer_email_address( $item_id );
- $previous_primary_email_addresses = edd_get_customer_email_addresses(
- array(
- 'id__not_in' => array( $item_id ),
- 'fields' => 'ids',
- 'customer_id' => $email_address->customer_id,
- 'type' => 'primary',
- )
- );
-
- if ( empty( $previous_primary_email_addresses ) ) {
- return;
- }
-
- foreach ( $previous_primary_email_addresses as $previous ) {
- edd_update_customer_email_address( $previous, array( 'type' => 'secondary' ) );
- }
-}
-add_action( 'edd_transition_customer_email_address_type', 'edd_demote_customer_primary_email_addresses', 10, 3 );
-
-/**
- * When a new primary address is added to the database, any other primary addresses should be demoted.
- *
- * @param string $old_value The previous value of `is_primary`.
- * @param string $new_value The new value of `is_primary`.
- * @param int $item_id The address ID in the edd_customer_addresses table.
- * @return void
- */
-function edd_demote_customer_primary_addresses( $old_value, $new_value, $item_id ) {
- if ( ! $new_value ) {
- return;
- }
- $address = edd_fetch_customer_address( $item_id );
- $previous_primary_addresses = edd_get_customer_addresses(
- array(
- 'id__not_in' => array( $item_id ),
- 'fields' => 'ids',
- 'customer_id' => $address->customer_id,
- 'is_primary' => true,
- )
- );
- if ( empty( $previous_primary_addresses ) ) {
- return;
- }
- foreach ( $previous_primary_addresses as $previous ) {
- edd_update_customer_address( $previous, array( 'is_primary' => false ) );
- }
-}
-add_action( 'edd_transition_customer_address_is_primary', 'edd_demote_customer_primary_addresses', 10, 3 );
-
-/**
- * Updates the email address of a customer record when the email on a user is updated.
- *
- * @since 2.4.0
- *
- * @param int $user_id User ID.
- * @param WP_User $old_user_data Object containing user's data prior to update.
- *
- * @return void
- */
-function edd_update_customer_email_on_user_update( $user_id, $old_user_data ) {
- $user = get_userdata( $user_id );
-
- // Bail if the email address didn't actually change just now.
- if ( empty( $user ) || $user->user_email === $old_user_data->user_email ) {
- return;
- }
-
- $customer = edd_get_customer_by( 'user_id', $user_id );
-
- if ( empty( $customer ) || $user->user_email === $customer->email ) {
- return;
- }
-
- // Bail if we have another customer with this email address already.
- if ( edd_get_customer_by( 'email', $user->user_email ) ) {
- return;
- }
-
- $success = edd_update_customer( $customer->id, array( 'email' => $user->user_email ) );
-
- if ( ! $success ) {
- return;
- }
-
- /**
- * Triggers after the customer has been successfully updated.
- *
- * @param WP_User $user
- * @param EDD_Customer $customer
- */
- do_action( 'edd_update_customer_email_on_user_update', $user, $customer );
-}
-add_action( 'profile_update', 'edd_update_customer_email_on_user_update', 10, 2 );
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/README.md b/wp-content/plugins/easy-digital-downloads/includes/database/README.md
deleted file mode 100644
index 749da0ca..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/README.md
+++ /dev/null
@@ -1,384 +0,0 @@
-# Custom Tables #
-
-### The schema for each custom table is described below
-
-## The Adjustments Table:
-This table stores things that can be used to adjust an order. This includes things like discount codes and tax rates. Note that these things do not represent an adjustment that was used for a specific order. To see a record of those, look at the order_adjustments table.
-
-This table's data is intended to be mutable.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| id | The unique id of the row, which auto increments. |
-| parent | This column does not currently serve any purpose, but might be used in the future. |
-| name | The name of the adjustment. For discount codes, this is the name of the discount. For tax rates, this is the name of the country for which the tax rate applies. All tax rates in a country share the same value in this column. For example, all tax rates in Canada will use "CA" here. |
-| code | For discount codes, this is the value which users can enter upon checkout. For tax rates, this column is blank. |
-| status | A string which indicates the status of the adjustment. For tax rates this will be "active" or "inactive". For discount codes, this will be "active" even if the discount has expired, and this is intentional. |
-| type | The type of adjustment this is. For discounts this is "discount". For tax rates this is "tax_rate". |
-| scope | A value which defines how the adjustment can be used. For discount codes the value is always "global". For tax rates, the values can be "country", or "region". |
-| amount_type | The type of amount this is, either "percent" or "flat", with flat being a monetary value. |
-| amount | The amount of the adjustment, stored as a decimal and representing either a percent or flat amount. |
-| description | For tax rates, this is the "state" or "province". For example, for Ontario (the province in Canada), this value will be "ON". For discount codes this column is not currently used. |
-| max_uses | An integer indicating the maximum number of times this adjustment can be used. |
-| use_count | An integer indicating the number of times this adjustment has been used. |
-| once_per_customer | A boolean value in the form of 1 (for true) and 0 (for false). If 1, this adjustment should only be used once per customer. If 0, there is no limit to the number of times it can be used. |
-| min_charge_amount | For discount codes, this is the minimum amount required in the cart prior to this adjustment being applied. For tax rates this is typically not applicable. |
-| start_date | For discount codes, this is the date when a discount code will begin to work. This is not applicable to tax rates. |
-| end_date | For discount codes, this is the date when a discount code will cease to work. This is not applicable to tax rates. |
-| date_created | The date this row was created. |
-| date_modified | The date this row was last modified. |
-| uuid | A unique identifying string representing this row. |
-
-## The Adjustment Meta Table:
-This table stores various and custom/extra information about an adjustment.
-
-This table's data is intended to be mutable.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| meta_id | The unique id of the row, which auto increments. |
-| edd_adjustment_id | The id of the adjustment to which this row relates. |
-| meta_key | The reference key (like a variable name) of the data in question. |
-| meta_value | The value. This can be anything needed as its purpose is for anything extra. |
-
-## The Customer Addresses Table:
-This table stores the addresses of customers.
-
-This table's data is intended to be mutable.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| id | The unique id of the row, which auto increments. |
-| customer_id | The id of the customer to which this address belongs. This id corresponds to the id column in the Customers table. |
-| name | The name of the person connected to this physical address. |
-| type | The type of address this row represents. Typical values are "billing" and "shipping". |
-| status | This currently does not serve any purpose, but might in the future. |
-| address | The first line of a physical address. |
-| address2 | The second line of a physical address. |
-| city | The city of a physical address. |
-| region | A 2 letter representation of the region/state/province. For example, in the US, this is the "State". In Canada, this is the "Province". |
-| postal_code | The postal code for a physical address. It accepts any string. |
-| country | The 2 letter representation of a country for a physical address. |
-| date_created | The date this row was created. |
-| date_modified | The date this row was last modified. |
-| uuid | A unique identifying string representing this row. |
-
-## The Customer Email Addresses Table:
-This table stores the email addresses of customers.
-
-This table's data is intended to be mutable.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| id | The unique id of the row, which auto increments. |
-| customer_id | The id of the customer to which this email address belongs. This id corresponds to the id column in the Customers table. |
-| type | A string representing the priority (or importance) of this email address. Typical values are "primary" and "secondary". |
-| status | This does not serve any purpose at this time, but might in the future. |
-| email | An email address, which is connected to a customer. |
-| date_created | The date this row was created. |
-| date_modified | The date this row was last modified. |
-| uuid | A unique identifying string representing this row. |
-
-## The Customer Meta Table:
-This table stores various and custom/extra information about a customer.
-
-This table's data is intended to be mutable.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| meta_id | The unique id of the row, which auto increments. |
-| edd_customer_id | The id of the customer to which this row relates. |
-| meta_key | The reference key (like a variable name) of the data in question. |
-| meta_value | The value. This can be anything needed as its purpose is for anything extra. |
-
-## The Customers Table:
-This table stores customers. Customers are people who have made a purchase in your store.
-
-This table's data is intended to be mutable.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| id | The unique id of the row, which auto increments. This is also the id of the customer. |
-| user_id | The id of the WordPress user which is linked to this customer. The same real-world person owns both, the WP user, and the EDD customer. |
-| email | The primary email address of this customer. This value will typically match whatever the "primary" email is in the customer emails table in the "type" column. |
-| name | This is the customer's name, and includes their first and last name together in a single string. |
-| status | Currently, this stores the word "active" for all customers, until such time as functionality for "inactive" customers gets added to EDD. |
-| purchase_value | This is the total amount of money this customer has paid. |
-| purchase_count | This is the total number of purchases this customer has initiated. |
-| date_created | The date this row was created. |
-| date_modified | The date this row was last modified. |
-| uuid | A unique identifying string representing this row. |
-
-## The Log Meta Table:
-This table stores various and custom/extra information about a log.
-
-This table's data is intended to be immutable.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| meta_id | The unique id of the row, which auto increments. |
-| edd_log_id | The id of the log to which this row relates. |
-| meta_key | The reference key (like a variable name) of the data in question. |
-| meta_value | The value. This can be anything needed as its purpose is for anything extra. |
-
-## The Logs Table:
-This table stores general-purpose logs, which are typically records of events happening, like a payment being completed or refunded. Note that logs are intended to be "created by a machine" as opposed to "created by a human". If you are writing code that automatically logs something, make it a log in this table. If you are writing code that creates a UI which allows a human being to write a note, store it in the notes table.
-
-This table's data is intended to be immutable.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| id | The unique id of the row, which auto increments. |
-| object_id | The id of the thing to which this log relates. For example, the id of the "order" or the "discount code". |
-| object_type | This describes the type of thing this log is for. For example, "order" indicates this log is for an order. |
-| user_id | This is the ID of the WordPress user who created this log. |
-| type | This column indicates the type of log this is. For example, the word "refund" would indicate that this log is about a refund taking place. |
-| title | This is the title of the log. Typically this is a short sentence describing what the log is about. |
-| content | This is a longer description of the log. Typically this will be a sentence or paragraph describing the event which took place. |
-| date_created | The date this row was created. |
-| date_modified | The date this row was last modified. |
-| uuid | A unique identifying string representing this row. |
-
-## The Logs API Requests Table:
-Every time a request is made to the EDD REST API, that request is logged in this table.
-
-This table's data is intended to be immutable.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| id | The unique id of the row, which auto increments. |
-| user_id | This stores the ID of the WordPress user who created this log. |
-| api_key | This stores the api key used to make this API request. |
-| token | This stores the token used to make this API request. |
-| version | This stores the version of the API for which this call was made. |
-| request | This stores what the URL variables were when the request was made. |
-| error | Errors that took place during the call. Defaults to be empty. |
-| ip | The IP address of the machine which made the request. |
-| date_created | The date this row was created. |
-| date_modified | The date this row was last modified. |
-| uuid | A unique identifying string representing this row. |
-
-## The Log API Request Meta Table:
-This table stores various and custom/extra information about an API Request Log.
-
-This table's data is intended to be immutable.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| meta_id | The unique id of the row, which auto increments. |
-| edd_logs_api_request_id | The id of the api request log to which this row relates. |
-| meta_key | The reference key (like a variable name) of the data in question. |
-| meta_value | The value. This can be anything needed as its purpose is for anything extra. |
-
-## The Logs File Downloads Table:
-Every time a deliverable file is downloaded via EDD, it is logged in this table.
-
-This table's data is intended to be immutable.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| id | The unique id of the row, which auto increments. |
-| product_id | The ID of the EDD product whose file was downloaded. |
-| file_id | The id of the file being downloaded. This ID comes from the files attached to an EDD product. |
-| order_id | The ID of the order which is enabling this download to take place. |
-| price_id | The variable price ID which was purchased, and which enabled this download to take place. 0 if the product is not variably-priced. |
-| customer_id | The ID of the customer who downloaded this file. |
-| ip | The IP address of the machine which made the request to download the file. |
-| user_agent | The name/user-agent of the browser which was used to download the file. |
-| date_created | The date this row was created. |
-| date_modified | The date this row was last modified. |
-| uuid | A unique identifying string representing this row. |
-
-## The Log File Download Meta Table:
-This table stores various and custom/extra information about a file download log.
-
-This table's data is intended to be immutable.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| meta_id | The unique id of the row, which auto increments. |
-| edd_logs_file_download_id | The id of the file download log to which this row relates. |
-| meta_key | The reference key (like a variable name) of the data in question. |
-| meta_value | The value. This can be anything needed as its purpose is for anything extra. |
-
-## The Note Meta Table:
-This table stores various and custom/extra information about a note.
-
-This table's data is intended to be mutable.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| meta_id | The unique id of the row, which auto increments. |
-| edd_note_id | The id of the note to which this row relates. |
-| meta_key | The reference key (like a variable name) of the data in question. |
-| meta_value | The value. This can be anything needed as its purpose is for anything extra. |
-
-## The Notes Table:
-This table is for storing notes created by human beings, as opposed to notes/logs/data created automatically by code or automatic code events happening. Note that logs are intended to be "created by a machine" as opposed to "created by a human". If you are writing code that automatically logs something, make it a log in the logs table. If you are writing code that creates a UI which allows a human being to write a note, store it in the notes table here.
-
-This table's data is intended to be mutable.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| id | The unique id of the row, which auto increments. |
-| object_id | The id of the thing to which this note relates. For example, the id of the "order" for which this note was created. |
-| object_type | This describes the type of thing this note is for. For example, "order" indicates this note is for/about an order. |
-| user_id | This is the ID of the WordPress user who created this note. |
-| content | This is the main/unique content of the note, the note itself. |
-| date_created | The date this row was created. |
-| date_modified | The date this row was last modified. |
-| uuid | A unique identifying string representing this row. |
-
-## The Order Addresses Table:
-When a user completes a purchase/order and enters their address on the checkout page, that address is stored in a new row here. This allows the address attached to the order to remain what it was at the time of purchase, regardless of whether the customer changes their address in the future. This is because the address attached to an order should remain unchanged forever. These addresses should be considered immutable. Even if a customer has 2 orders and uses the exact same address for each order, a new row will be created here, unique to that order, despite possibly being identical to a previous row.
-
-This table's data is intended to be immutable.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| id | The unique id of the row, which auto increments. |
-| order_id | The id of the order to which this address is attached. |
-| name | The name of the person attached to this physical address. |
-| type | The type of address this row represents. Typical values are "billing" and "shipping". |
-| address | The first line of a physical address. |
-| address2 | The second line of a physical address. |
-| city | The city of a physical address. |
-| region | A 2 letter representation of the region/state/province. For example, in the US, this is the "State". In Canada, this is the "Province". |
-| postal_code | The postal code for a physical address. It accepts any string. |
-| country | The 2 letter representation of a country for a physical address. |
-| date_created | The date this row was created. |
-| date_modified | The date this row was last modified. |
-| uuid | A unique identifying string representing this row. |
-
-## The Order Adjustment Meta Table:
- This table stores various and custom/extra information about an order adjustment.
-
-This table's data is intended to be immutable.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| meta_id | The unique id of the row, which auto increments. |
-| edd_order_adjustment_id | The id of the adjustment to which this row relates. |
-| meta_key | The reference key (like a variable name) of the data in question. |
-| meta_value | The value. This can be anything needed as its purpose is for anything extra. |
-
-## The Order Adjustments Table:
-This table stores things that adjusted the total amount of a specific order, or the amount of an item within an order. This includes things like discount codes and tax rates.
-
-This table's data is intended to be immutable.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| id | The unique id of the row, which auto increments. |
-| parent | The ID of another order adjustment which is considered to be the parent of this adjustment. This is used for adjustments attached to refunds. The parent references the ID of the original order adjustment that was refunded. |
-| object_id | The ID of the row that this row adjusted the amount/cost of. This is typically an order (in the orders table) or an order_item (in the order_items table). The type of object is indicated in the object_type column. |
-| object_type | This typically indicates the EDD custom table that the object_id value can be found within, and to which row within that table this row relates. For example, the orders table (indicated by the word "order") or the order_items table (indicated by the word "order_item"). |
-| type_id | This value indicates the row ID in the adjustments table from which this order adjustment originated. For example, if this value is "25", go to the adjustments table and look at the row with the ID "25" to see the corresponding adjustment. |
-| type | A string which indicates the type of adjustment this is. Typically this is something like "fee", "tax_rate", or "discount". |
-| type_key | The fees API allows for customizing the array key value for a given fee. This can be a string or numeric. This "fee ID" is stored as the type_key, as it represents the fee's key in the 2.x array. |
-| description | A description of the order adjustment. |
-| subtotal | If the amount type for this row is a percentage, the value in this column is intentionally unused. Otherwise, it stores the monetary amount of this adjustment before tax. For example, if you have a $10 shipping fee with a 10% tax rate, $10 is stored in this column. |
-| tax | If the object_type for this row is a percentage, the value in this column is intentionally unused. Otherwise, it stores the monetary amount of the tax on this adjustment. For example, if you have a $10 shipping fee, the tax on the $10 is stored in this column. |
-| total | Like the subtotal and tax columns, this column stores a monetary amount sometimes, and at others stores a percentage rate. To determine the type of amount being stored, percentage vs flat amount, trace the row back to the adjustments table using the type_id value from this table, and check the amount_type column's value from the adjustments table. For example, if you have a $10 shipping fee with a 10% tax rate, $11 is stored in this column. |
-| date_created | The date this row was created. |
-| date_modified | The date this row was last modified. |
-| uuid | A unique identifying string representing this row. |
-
-## The Order Item Meta Table:
-This table stores various and custom/extra information about an order item.
-
-This table's data is intended to be immutable.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| meta_id | The unique id of the row, which auto increments. |
-| edd_order_item_id | The id of the order item to which this row relates. |
-| meta_key | The reference key (like a variable name) of the data in question. |
-| meta_value | The value. This can be anything needed as its purpose is for anything extra. |
-
-## The Order Items Table:
-This table stores items (or "products", also known as "downloads" in EDD) that were part of an order. It also stores various data about the items, like the tax that was on the item,.
-
-One way to think about this is that a "for-sale thing" is called a "product" when in an un-purchased state, and called an "item" when in a purchased state.
-
-This table's data is intended to be immutable.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| id | The unique id of the row, which auto increments. |
-| parent | The ID of another order item which is considered to be the parent of this item. This is used for order items attached to refunds. The parent references the ID of the original order item that was refunded. |
-| order_id | The ID of the order to which this item belongs. |
-| product_id | The ID of the product which was purchased. |
-| product_name | This is what the name of the product was at the time of this purchase. |
-| price_id | This is the ID of the variable price which was purchased. |
-| price_name | This is what the name of the variable price was at the time of this purchase. |
-| cart_index | This is the position at which this item was sitting in the cart when this order took place, starting at 0 for the first position. |
-| type | This indicates the type of product that this item is. In its current form, all things sold in EDD have the type of "download", and thus does not currently have any functional relevance. This is here to enable possible future changes only. |
-| status | This indicates the status of this item in regards to purchase completion. Typical values include (but are not limited to) "completed", and "refunded". When set to "inherit", it will inherit the status of the order to which it belongs. When set to anything other than "inherit" it will override the status of the order, but only for this item. |
-| quantity | A single item in the cart can have a quantity. This indicates that quantity. Through this column's data, a single order_item can actually represent multiple items, and the values in the subtotal and total columns reflect that quantity. |
-| amount | This is what the unadjusted price of this item was at the time of purchase. It does not include tax, discounts, fees, or any other price adjusters. |
-| subtotal | This is the cost of the line item in the cart including quantity, but not including tax, discounts, fees, or any other price adjusters. |
-| discount | This column stores the portion of the discount from the total that applied directly to this item. |
-| tax | This column stores the portion of tax from the total that applied directly to this item. |
-| total | This contains the total cost of this item, including quantity, taxes, item-specific discounts (but not cart-wide discounts). *Note that this amount does not include any fees in the cart that are specific to this item. For example, a shipping fee that exists because of this item is not included in the total found in this column. |
-| date_created | The date this row was created. |
-| date_modified | The date this row was last modified. |
-| uuid | A unique identifying string representing this row. |
-
-## The Order Transactions Table:
-Where a transaction represents an actual exchange of money, this table stores all of the transactions that were part of an order. Some orders will contain multiple transactions. For example, many payment gateways (for example: Stripe and PayPal) do not allow the purchasing of multiple recurring-enabled items in a single transaction. This is because 1 item could be monthly, and another could yearly. Each item will create a different transaction on the customer's credit card, and will show up separately on the customer's credit card statement. This table helps you to keep track of which transactions were part of which order.
-
-This table's data is intended to be immutable.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| id | The unique id of the row, which auto increments. |
-| object_id | The ID of the row to which this transaction belongs. Typically this will be the ID of an order in the orders table. |
-| object_type | The table that the object_id value can be found within, and to which row within that table this row relates. For example, the orders table is indicated by the word "order", and is typically the value that will be found here. |
-| transaction_id | The ID of the transaction, which originates from the payment gateway. |
-| gateway | The name of the payment gateway where this transaction took place. |
-| status | The status of this transaction. For example, if complete, the status will be set to "complete". |
-| total | The total amount of this transaction. |
-| date_created | The date this row was created. |
-| date_modified | The date this row was last modified. |
-| uuid | A unique identifying string representing this row. |
-
-## The Order Meta Table:
-This table stores various and custom/extra information about an order.
-
-This table's data is intended to be immutable.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| meta_id | The unique id of the row, which auto increments. |
-| edd_order_id | The id of the order item to which this row relates. |
-| meta_key | The reference key (like a variable name) of the data in question. |
-| meta_value | The value. This can be anything needed as its purpose is for anything extra. |
-
-## The Orders Table:
-This table stores orders (called "payments" prior to EDD 3.0). It also stores various data about the order, like the customer ID, the email entered by the customer at checkout, the IP address of the machine where checkout was completed, and more. See table below for full breakdown of each column.
-
-This table's data is intended to be immutable. However, some column data is also intended to be mutable. The user_id customer_id, and email column values will change if an order is re-assigned to a new customer.
-
-| Table Column | Table Column's Description |
-| ------------- | ------------- |
-| id | The unique id of the row, which auto increments. This also serves as the id of the order itself. |
-| parent | The ID of another order which is considered to be the parent of this order. This is used in scenarios like refund orders, which are automatically generated when a refund takes place. Refund orders use this column to refer to the original order where the item being refunded was originally purchased. Another scenario where this is used is for renewal payments done through the EDD Recurring Payments extension. Each renewal payment will use this column to indicate which order was the one where the customer originally initiated the subscription. |
-| order_number | This column serves several different purposes:
1. By default, it will be blank for every order (except "refund" orders).
2. If the order in question is a "refund" order, this will contain a string in this format: "ORIGINAL_ORDER_NUMBER-R-THE_NUMBER_OF_REFUNDS_IN_THAT_ORDER". So if it is the 2nd refund from order #1, it will be "1-R-2".
3. If you have "Sequential Order Numbers" enabled in your EDD settings, this column will be populated by the value determined by your settings for that.
4. If the order in question is a refund for a "Sequentially Ordered" order, the format is the same as for "Non-Sequentially Ordered" orders, but it is important to note that the ORIGINAL_ORDER_NUMBER value will be the value from the "id" column of the original order, not the "order_number" column.
5. Extensions may modify the way this column works. For example, the "Advanced Sequential Order Numbers" extension for EDD will put its own value in this column, overriding the values from EDD core. |
-| status | This column has 2 purposes:
1) It identifies the financial/accounting status of the order. a) If the transaction(s) for the order have completed successfully, this value here will be "complete". b) If the transaction(s) for the order have not yet completed successfully, this value here will be "pending". c) If the transaction(s) for the order have not completed successfully and it has been 7 days, this value here will be "abandoned". d) If the transaction(s) for the order failed at the payment gateway (for example, insufficient funds), this will be set to "failed". e) If this order has been partially refunded, the status of the order currently remains set to "complete". f) If all of the items in this order have been refunded, this value will be "refunded".
2) It identifies if the order is in the trash. If the order has been put in the trash, the financial status is no longer stored here, but gets moved to the order_meta table with the key "pre_trash_status". The value in this column will then be "trash". |
-| type | The type of order this is. Typical values are "sale" or "refund". |
-| user_id | The ID of the user currently attached to this order. Note that this column is mutable and will change if the user attached to the EDD customer changes, or if the customer attached to an order changes. |
-| customer_id | The ID of the customer currently attached to this order. Note that this column is mutable and will change if the customer attached to the EDD order changes, or if the user attached to a customer changes. |
-| email | The email address currently attached to this order. Note that this column is mutable and will change if the customer attached to the EDD order changes, or if the customer's email is updated. |
-| ip | The IP address of the machine on which this order was completed. |
-| gateway | A string representing the payment gateway which was used to complete the payments on this order. |
-| mode | This stores whether the order was done in test mode or live mode. |
-| currency | The 3 letter currency code which this order used/will-use. |
-| payment_key | A unique key representing this payment. This key is generated by combining a few different values about this order, like the email address, the date, an optional auth key which can be defined as a constant, and a unique id generated by the uniqid function in PHP. See class-edd-payment.php for the full breakdown of how this is generated. |
-| subtotal | This is the amount of the items in the cart added together. It does not include any taxes or discounts. Note: Fees are considered to be both line items and adjustments. In relation to the orders table, fees are treated as line items, and are thus included in the subtotal. But note that they are the only "adjustments" that are included in the subtotal, as other adjustments are not included in the subtotal. |
-| discount | This is the total amount of discount(s) that were applied to the order. |
-| tax | This is the total amount of the tax that was applied to the order. |
-| total | This is the total amount of the order. |
-| date_created | The date this row was created. |
-| date_modified | The date this row was last modified. |
-| uuid | A unique identifying string representing this row. |
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-base.php b/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-base.php
deleted file mode 100644
index cc837bc7..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-base.php
+++ /dev/null
@@ -1,337 +0,0 @@
-{$key};
- }
-
- // Return null if not exists
- return null;
- }
-
- /**
- * Converts the given object to an array.
- *
- * @since 1.0.0
- *
- * @return array Array version of the given object.
- */
- public function to_array() {
- return get_object_vars( $this );
- }
-
- /** Protected *************************************************************/
-
- /**
- * Maybe append the prefix to string.
- *
- * @since 1.0.0
- *
- * @param string $string
- * @param string $sep
- * @return string
- */
- protected function apply_prefix( $string = '', $sep = '_' ) {
- return ! empty( $this->prefix )
- ? "{$this->prefix}{$sep}{$string}"
- : $string;
- }
-
- /**
- * Return the first letters of a string of words with a separator.
- *
- * Used primarily to guess at table aliases when none is manually set.
- *
- * Applies the following formatting to a string:
- * - Trim whitespace
- * - No accents
- * - No trailing underscores
- *
- * @since 1.0.0
- *
- * @param string $string
- * @param string $sep
- * @return string
- */
- protected function first_letters( $string = '', $sep = '_' ) {
-
- // Set empty default return value
- $retval = '';
-
- // Bail if empty or not a string
- if ( empty( $string ) || ! is_string( $string ) ) {
- return $retval;
- }
-
- // Trim spaces off the ends
- $unspace = trim( $string );
- $accents = remove_accents( $unspace );
- $lower = strtolower( $accents );
- $parts = explode( $sep, $lower );
-
- // Loop through parts and concatenate the first letters together
- foreach ( $parts as $part ) {
- $retval .= substr( $part, 0, 1 );
- }
-
- // Return the result
- return $retval;
- }
-
- /**
- * Sanitize a table name string.
- *
- * Used to make sure that a table name value meets MySQL expectations.
- *
- * Applies the following formatting to a string:
- * - Trim whitespace
- * - No accents
- * - No special characters
- * - No hyphens
- * - No double underscores
- * - No trailing underscores
- *
- * @since 1.0.0
- *
- * @param string $name The name of the database table
- *
- * @return string Sanitized database table name
- */
- protected function sanitize_table_name( $name = '' ) {
-
- // Bail if empty or not a string
- if ( empty( $name ) || ! is_string( $name ) ) {
- return false;
- }
-
- // Trim spaces off the ends
- $unspace = trim( $name );
-
- // Only non-accented table names (avoid truncation)
- $accents = remove_accents( $unspace );
-
- // Only lowercase characters, hyphens, and dashes (avoid index corruption)
- $lower = sanitize_key( $accents );
-
- // Replace hyphens with single underscores
- $under = str_replace( '-', '_', $lower );
-
- // Single underscores only
- $single = str_replace( '__', '_', $under );
-
- // Remove trailing underscores
- $clean = trim( $single, '_' );
-
- // Bail if table name was garbaged
- if ( empty( $clean ) ) {
- return false;
- }
-
- // Return the cleaned table name
- return $clean;
- }
-
- /**
- * Set class variables from arguments.
- *
- * @since 1.0.0
- * @param array $args
- */
- protected function set_vars( $args = array() ) {
-
- // Bail if empty or not an array
- if ( empty( $args ) ) {
- return;
- }
-
- // Cast to an array
- if ( ! is_array( $args ) ) {
- $args = (array) $args;
- }
-
- // Set all properties
- foreach ( $args as $key => $value ) {
- $this->{$key} = $value;
- }
- }
-
- /**
- * Return the global database interface.
- *
- * See: https://core.trac.wordpress.org/ticket/31556
- *
- * @since 1.0.0
- *
- * @return \wpdb Database interface, or False if not set
- */
- protected function get_db() {
-
- // Default database return value (might change)
- $retval = false;
-
- // Look for a commonly used global database interface
- if ( isset( $GLOBALS[ $this->db_global ] ) ) {
- $retval = $GLOBALS[ $this->db_global ];
- }
-
- /*
- * Developer note:
- *
- * It should be impossible for a database table to be interacted with
- * before the primary database interface it is setup.
- *
- * However, because applications are complicated, it is unsafe to assume
- * anything, so this silently returns false instead of halting everything.
- *
- * If you are here because this method is returning false for you, that
- * means the database table is being invoked too early in the lifecycle
- * of the application.
- *
- * In WordPress, that means before the $wpdb global is created; in other
- * environments, you will need to adjust accordingly.
- */
-
- // Return the database interface
- return $retval;
- }
-
- /**
- * Check if an operation succeeded.
- *
- * @since 1.0.0
- *
- * @param mixed $result
- * @return bool
- */
- protected function is_success( $result = false ) {
-
- // Bail if no row exists
- if ( empty( $result ) ) {
- $retval = false;
-
- // Bail if an error occurred
- } elseif ( is_wp_error( $result ) ) {
- $this->last_error = $result;
- $retval = false;
-
- // No errors
- } else {
- $retval = true;
- }
-
- // Return the result
- return (bool) $retval;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-column.php b/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-column.php
deleted file mode 100644
index b72c1972..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-column.php
+++ /dev/null
@@ -1,965 +0,0 @@
-parse_args( $args );
-
- // Maybe set variables from arguments
- if ( ! empty( $r ) ) {
- $this->set_vars( $r );
- }
- }
-
- /** Argument Handlers *****************************************************/
-
- /**
- * Parse column arguments
- *
- * @since 1.0.0
- * @param array $args Default empty array.
- * @return array
- */
- private function parse_args( $args = array() ) {
-
- // Parse arguments
- $r = wp_parse_args( $args, array(
-
- // Table
- 'name' => '',
- 'type' => '',
- 'length' => '',
- 'unsigned' => false,
- 'zerofill' => false,
- 'binary' => false,
- 'allow_null' => false,
- 'default' => '',
- 'extra' => '',
- 'encoding' => $this->get_db()->charset,
- 'collation' => $this->get_db()->collate,
- 'comment' => '',
-
- // Query
- 'pattern' => false,
- 'searchable' => false,
- 'sortable' => false,
- 'date_query' => false,
- 'transition' => false,
- 'in' => true,
- 'not_in' => true,
-
- // Special
- 'primary' => false,
- 'created' => false,
- 'modified' => false,
- 'uuid' => false,
-
- // Cache
- 'cache_key' => false,
-
- // Validation
- 'validate' => '',
-
- // Capabilities
- 'caps' => array(),
-
- // Backwards Compatibility
- 'aliases' => array(),
-
- // Column Relationships
- 'relationships' => array()
- ) );
-
- // Force some arguments for special column types
- $r = $this->special_args( $r );
-
- // Set the args before they are sanitized
- $this->set_vars( $r );
-
- // Return array
- return $this->validate_args( $r );
- }
-
- /**
- * Validate arguments after they are parsed.
- *
- * @since 1.0.0
- * @param array $args Default empty array.
- * @return array
- */
- private function validate_args( $args = array() ) {
-
- // Sanitization callbacks
- $callbacks = array(
- 'name' => 'sanitize_key',
- 'type' => 'strtoupper',
- 'length' => 'intval',
- 'unsigned' => 'wp_validate_boolean',
- 'zerofill' => 'wp_validate_boolean',
- 'binary' => 'wp_validate_boolean',
- 'allow_null' => 'wp_validate_boolean',
- 'default' => array( $this, 'sanitize_default' ),
- 'extra' => 'wp_kses_data',
- 'encoding' => 'wp_kses_data',
- 'collation' => 'wp_kses_data',
- 'comment' => 'wp_kses_data',
-
- 'primary' => 'wp_validate_boolean',
- 'created' => 'wp_validate_boolean',
- 'modified' => 'wp_validate_boolean',
- 'uuid' => 'wp_validate_boolean',
-
- 'searchable' => 'wp_validate_boolean',
- 'sortable' => 'wp_validate_boolean',
- 'date_query' => 'wp_validate_boolean',
- 'transition' => 'wp_validate_boolean',
- 'in' => 'wp_validate_boolean',
- 'not_in' => 'wp_validate_boolean',
- 'cache_key' => 'wp_validate_boolean',
-
- 'pattern' => array( $this, 'sanitize_pattern' ),
- 'validate' => array( $this, 'sanitize_validation' ),
- 'caps' => array( $this, 'sanitize_capabilities' ),
- 'aliases' => array( $this, 'sanitize_aliases' ),
- 'relationships' => array( $this, 'sanitize_relationships' )
- );
-
- // Default args array
- $r = array();
-
- // Loop through and try to execute callbacks
- foreach ( $args as $key => $value ) {
-
- // Callback is callable
- if ( isset( $callbacks[ $key ] ) && is_callable( $callbacks[ $key ] ) ) {
- $r[ $key ] = call_user_func( $callbacks[ $key ], $value );
-
- // Callback is malformed so just let it through to avoid breakage
- } else {
- $r[ $key ] = $value;
- }
- }
-
- // Return sanitized arguments
- return $r;
- }
-
- /**
- * Force column arguments for special column types
- *
- * @since 1.0.0
- * @param array $args Default empty array.
- * @return array
- */
- private function special_args( $args = array() ) {
-
- // Primary key columns are always used as cache keys
- if ( ! empty( $args['primary'] ) ) {
- $args['cache_key'] = true;
-
- // All UUID columns need to follow a very specific pattern
- } elseif ( ! empty( $args['uuid'] ) ) {
- $args['name'] = 'uuid';
- $args['type'] = 'varchar';
- $args['length'] = '100';
- $args['in'] = false;
- $args['not_in'] = false;
- $args['searchable'] = false;
- $args['sortable'] = false;
- }
-
- // Return args
- return (array) $args;
- }
-
- /** Public Helpers ********************************************************/
-
- /**
- * Return if a column type is numeric or not.
- *
- * @since 1.0.0
- * @return bool
- */
- public function is_numeric() {
- return $this->is_type( array(
- 'tinyint',
- 'int',
- 'mediumint',
- 'bigint'
- ) );
- }
-
- /** Private Helpers *******************************************************/
-
- /**
- * Return if this column is of a certain type.
- *
- * @since 1.0.0
- * @param mixed $type Default empty string. The type to check. Also accepts an array.
- * @return bool True if of type, False if not
- */
- private function is_type( $type = '' ) {
-
- // If string, cast to array
- if ( is_string( $type ) ) {
- $type = (array) $type;
- }
-
- // Make them lowercase
- $types = array_map( 'strtolower', $type );
-
- // Return if match or not
- return (bool) in_array( strtolower( $this->type ), $types, true );
- }
-
- /** Private Sanitizers ****************************************************/
-
- /**
- * Sanitize capabilities array
- *
- * @since 1.0.0
- * @param array $caps Default empty array.
- * @return array
- */
- private function sanitize_capabilities( $caps = array() ) {
- return wp_parse_args( $caps, array(
- 'select' => 'exist',
- 'insert' => 'exist',
- 'update' => 'exist',
- 'delete' => 'exist'
- ) );
- }
-
- /**
- * Sanitize aliases array using `sanitize_key()`
- *
- * @since 1.0.0
- * @param array $aliases Default empty array.
- * @return array
- */
- private function sanitize_aliases( $aliases = array() ) {
- return array_map( 'sanitize_key', $aliases );
- }
-
- /**
- * Sanitize relationships array
- *
- * @todo
- * @since 1.0.0
- * @param array $relationships Default empty array.
- * @return array
- */
- private function sanitize_relationships( $relationships = array() ) {
- return array_filter( $relationships );
- }
-
- /**
- * Sanitize the default value
- *
- * @since 1.0.0
- * @param string $default
- * @return string|null
- */
- private function sanitize_default( $default = '' ) {
-
- // Null
- if ( ( true === $this->allow_null ) && is_null( $default ) ) {
- return null;
-
- // String
- } elseif ( is_string( $default ) ) {
- return wp_kses_data( $default );
-
- // Integer
- } elseif ( $this->is_numeric( $default ) ) {
- return (int) $default;
- }
-
- // @todo datetime, decimal, and other column types
-
- // Unknown, so return the default's default
- return '';
- }
-
- /**
- * Sanitize the pattern
- *
- * @since 1.0.0
- * @param mixed $pattern
- * @return string
- */
- private function sanitize_pattern( $pattern = false ) {
-
- // Allowed patterns
- $allowed_patterns = array( '%s', '%d', '%f' );
-
- // Return pattern if allowed
- if ( in_array( $pattern, $allowed_patterns, true ) ) {
- return $pattern;
- }
-
- // Fallback to digit or string
- return $this->is_numeric()
- ? '%d'
- : '%s';
- }
-
- /**
- * Sanitize the validation callback
- *
- * @since 1.0.0
- * @param string $callback Default empty string. A callable PHP function name or method
- * @return string The most appropriate callback function for the value
- */
- private function sanitize_validation( $callback = '' ) {
-
- // Return callback if it's callable
- if ( is_callable( $callback ) ) {
- return $callback;
- }
-
- // UUID special column
- if ( true === $this->uuid ) {
- $callback = array( $this, 'validate_uuid' );
-
- // Datetime fallback
- } elseif ( $this->is_type( 'datetime' ) ) {
- $callback = array( $this, 'validate_datetime' );
-
- // Decimal fallback
- } elseif ( $this->is_type( 'decimal' ) ) {
- $callback = array( $this, 'validate_decimal' );
-
- // Intval fallback
- } elseif ( $this->is_numeric() ) {
- $callback = 'intval';
- }
-
- // Return the callback
- return $callback;
- }
-
- /** Public Validators *****************************************************/
-
- /**
- * Fallback to validate a datetime value if no other is set.
- *
- * This assumes NO_ZERO_DATES is off or overridden.
- *
- * If MySQL drops support for zero dates, this method will need to be
- * updated to support different default values based on the environment.
- *
- * @since 1.0.0
- * @param string $value Default ''. A datetime value that needs validating
- * @return string A valid datetime value
- */
- public function validate_datetime( $value = '' ) {
-
- // Handle "empty" values
- if ( empty( $value ) || ( '0000-00-00 00:00:00' === $value ) ) {
- $value = ! empty( $this->default )
- ? $this->default
- : '';
-
- // Convert to MySQL datetime format via date() && strtotime
- } elseif ( function_exists( 'date' ) ) {
- $value = date( 'Y-m-d H:i:s', strtotime( $value ) );
- }
-
- // Return the validated value
- return $value;
- }
-
- /**
- * Validate a decimal
- *
- * (Recommended decimal column length is '18,9'.)
- *
- * This is used to validate a mixed value before it is saved into a decimal
- * column in a database table.
- *
- * Uses number_format() which does rounding to the last decimal if your
- * value is longer than specified.
- *
- * @since 1.0.0
- * @param mixed $value Default empty string. The decimal value to validate
- * @param int $decimals Default 9. The number of decimal points to accept
- * @return float
- */
- public function validate_decimal( $value = 0, $decimals = 9 ) {
-
- // Protect against non-numeric values
- if ( ! is_numeric( $value ) ) {
- $value = 0;
- }
-
- // Protect against non-numeric decimals
- if ( ! is_numeric( $decimals ) ) {
- $decimals = 9;
- }
-
- // Is the value negative?
- $negative_exponent = ( $value < 0 )
- ? -1
- : 1;
-
- // Only numbers and period
- $value = preg_replace( '/[^0-9\.]/', '', (string) $value );
-
- // Format to number of decimals, and cast as float
- $formatted = number_format( $value, $decimals, '.', '' );
-
- // Adjust for negative values
- $retval = $formatted * $negative_exponent;
-
- // Return
- return $retval;
- }
-
- /**
- * Validate a UUID.
- *
- * This uses the v4 algorithm to generate a UUID that is used to uniquely
- * and universally identify a given database row without any direct
- * connection or correlation to the data in that row.
- *
- * From http://php.net/manual/en/function.uniqid.php#94959
- *
- * @since 1.0.0
- * @param string $value The UUID value (empty on insert, string on update)
- * @return string Generated UUID.
- */
- public function validate_uuid( $value = '' ) {
-
- // Default URN UUID prefix
- $prefix = 'urn:uuid:';
-
- // Bail if not empty and correctly prefixed
- // (UUIDs should _never_ change once they are set)
- if ( ! empty( $value ) && ( 0 === strpos( $value, $prefix ) ) ) {
- return $value;
- }
-
- // Put the pieces together
- $value = sprintf( "{$prefix}%04x%04x-%04x-%04x-%04x-%04x%04x%04x",
-
- // 32 bits for "time_low"
- mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),
-
- // 16 bits for "time_mid"
- mt_rand( 0, 0xffff ),
-
- // 16 bits for "time_hi_and_version",
- // four most significant bits holds version number 4
- mt_rand( 0, 0x0fff ) | 0x4000,
-
- // 16 bits, 8 bits for "clk_seq_hi_res",
- // 8 bits for "clk_seq_low",
- // two most significant bits holds zero and one for variant DCE1.1
- mt_rand( 0, 0x3fff ) | 0x8000,
-
- // 48 bits for "node"
- mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )
- );
-
- // Return the new UUID
- return $value;
- }
-
- /** Table Helpers *********************************************************/
-
- /**
- * Return a string representation of what this column's properties look like
- * in a MySQL.
- *
- * @todo
- * @since 1.0.0
- * @return string
- */
- public function get_create_string() {
-
- // Default return val
- $retval = '';
-
- // Bail if no name
- if ( ! empty( $this->name ) ) {
- $retval .= $this->name;
- }
-
- // Type
- if ( ! empty( $this->type ) ) {
- $retval .= " {$this->type}";
- }
-
- // Length
- if ( ! empty( $this->length ) ) {
- $retval .= '(' . $this->length . ')';
- }
-
- // Unsigned
- if ( ! empty( $this->unsigned ) ) {
- $retval .= " unsigned";
- }
-
- // Zerofill
- if ( ! empty( $this->zerofill ) ) {
- // TBD
- }
-
- // Binary
- if ( ! empty( $this->binary ) ) {
- // TBD
- }
-
- // Allow null
- if ( ! empty( $this->allow_null ) ) {
- $retval .= " NOT NULL ";
- }
-
- // Default
- if ( ! empty( $this->default ) ) {
- $retval .= " default '{$this->default}'";
-
- // A literal false means no default value
- } elseif ( false !== $this->default ) {
-
- // Numeric
- if ( $this->is_numeric() ) {
- $retval .= " default '0'";
- } elseif ( $this->is_type( 'datetime' ) ) {
- $retval .= " default '0000-00-00 00:00:00'";
- } else {
- $retval .= " default ''";
- }
- }
-
- // Extra
- if ( ! empty( $this->extra ) ) {
- $retval .= " {$this->extra}";
- }
-
- // Encoding
- if ( ! empty( $this->encoding ) ) {
-
- } else {
-
- }
-
- // Collation
- if ( ! empty( $this->collation ) ) {
-
- } else {
-
- }
-
- // Return the create string
- return $retval;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-compare.php b/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-compare.php
deleted file mode 100644
index b82ca271..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-compare.php
+++ /dev/null
@@ -1,157 +0,0 @@
- array(),
- 'join' => array(),
- );
-
- if ( isset( $clause['compare'] ) ) {
- $clause['compare'] = strtoupper( $clause['compare'] );
- } else {
- $clause['compare'] = isset( $clause['value'] ) && is_array( $clause['value'] ) ? 'IN' : '=';
- }
-
- if ( ! in_array(
- $clause['compare'], array(
- '=',
- '!=',
- '>',
- '>=',
- '<',
- '<=',
- 'LIKE',
- 'NOT LIKE',
- 'IN',
- 'NOT IN',
- 'BETWEEN',
- 'NOT BETWEEN',
- 'EXISTS',
- 'NOT EXISTS',
- 'REGEXP',
- 'NOT REGEXP',
- 'RLIKE',
- ), true
- ) ) {
- $clause['compare'] = '=';
- }
-
- if ( isset( $clause['compare_key'] ) && 'LIKE' === strtoupper( $clause['compare_key'] ) ) {
- $clause['compare_key'] = strtoupper( $clause['compare_key'] );
- } else {
- $clause['compare_key'] = '=';
- }
-
- $compare = $clause['compare'];
- $compare_key = $clause['compare_key'];
-
- // Build the WHERE clause.
-
- // Column name and value.
- if ( array_key_exists( 'key', $clause ) && array_key_exists( 'value', $clause ) ) {
- $column = sanitize_key( $clause['key'] );
- $value = $clause['value'];
-
- if ( in_array( $compare, array( 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN' ), true ) ) {
- if ( ! is_array( $value ) ) {
- $value = preg_split( '/[,\s]+/', $value );
- }
- } else {
- $value = trim( $value );
- }
-
- switch ( $compare ) {
- case 'IN':
- case 'NOT IN':
- $compare_string = '(' . substr( str_repeat( ',%s', count( $value ) ), 1 ) . ')';
- $where = $wpdb->prepare( $compare_string, $value );
- break;
-
- case 'BETWEEN':
- case 'NOT BETWEEN':
- $value = array_slice( $value, 0, 2 );
- $where = $wpdb->prepare( '%s AND %s', $value );
- break;
-
- case 'LIKE':
- case 'NOT LIKE':
- $value = '%' . $wpdb->esc_like( $value ) . '%';
- $where = $wpdb->prepare( '%s', $value );
- break;
-
- // EXISTS with a value is interpreted as '='.
- case 'EXISTS':
- $compare = '=';
- $where = $wpdb->prepare( '%s', $value );
- break;
-
- // 'value' is ignored for NOT EXISTS.
- case 'NOT EXISTS':
- $where = '';
- break;
-
- default:
- $where = $wpdb->prepare( '%s', $value );
- break;
-
- }
-
- if ( $where ) {
- $sql_chunks['where'][] = "{$column} {$compare} {$where}";
- }
- }
-
- /*
- * Multiple WHERE clauses (for meta_key and meta_value) should
- * be joined in parentheses.
- */
- if ( 1 < count( $sql_chunks['where'] ) ) {
- $sql_chunks['where'] = array( '( ' . implode( ' AND ', $sql_chunks['where'] ) . ' )' );
- }
-
- return $sql_chunks;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-date.php b/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-date.php
deleted file mode 100644
index f40dc656..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-date.php
+++ /dev/null
@@ -1,1242 +0,0 @@
-',
- '>=',
- '<',
- '<=',
- 'IN',
- 'NOT IN',
- 'BETWEEN',
- 'NOT BETWEEN'
- );
-
- /**
- * Supported multi-value comparison types
- *
- * @since 1.1.0
- * @var array
- */
- public $multi_value_keys = array(
- 'IN',
- 'NOT IN',
- 'BETWEEN',
- 'NOT BETWEEN'
- );
-
- /**
- * Supported relation types
- *
- * @since 1.1.0
- * @var array
- */
- public $relation_keys = array(
- 'OR',
- 'AND'
- );
-
- /**
- * Constructor.
- *
- * Time-related parameters that normally require integer values ('year', 'month', 'week', 'dayofyear', 'day',
- * 'dayofweek', 'dayofweek_iso', 'hour', 'minute', 'second') accept arrays of integers for some values of
- * 'compare'. When 'compare' is 'IN' or 'NOT IN', arrays are accepted; when 'compare' is 'BETWEEN' or 'NOT
- * BETWEEN', arrays of two valid values are required. See individual argument descriptions for accepted values.
- *
- * @since 1.0.0
- *
- * @param array $date_query {
- * Array of date query clauses.
- *
- * @type array {
- * @type string $column Optional. The column to query against. If undefined, inherits the value of
- * 'date_created'. Accepts 'date_created', 'date_created_gmt',
- * 'post_modified','post_modified_gmt', 'comment_date', 'comment_date_gmt'.
- * Default 'date_created'.
- * @type string $compare Optional. The comparison operator. Accepts '=', '!=', '>', '>=', '<', '<=',
- * 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'. Default '='.
- * @type string $relation Optional. The boolean relationship between the date queries. Accepts 'OR' or 'AND'.
- * Default 'OR'.
- * @type array {
- * Optional. An array of first-order clause parameters, or another fully-formed date query.
- *
- * @type string|array $before {
- * Optional. Date to retrieve posts before. Accepts `strtotime()`-compatible string,
- * or array of 'year', 'month', 'day' values.
- *
- * @type string $year The four-digit year. Default empty. Accepts any four-digit year.
- * @type string $month Optional when passing array.The month of the year.
- * Default (string:empty)|(array:1). Accepts numbers 1-12.
- * @type string $day Optional when passing array.The day of the month.
- * Default (string:empty)|(array:1). Accepts numbers 1-31.
- * }
- * @type string|array $after {
- * Optional. Date to retrieve posts after. Accepts `strtotime()`-compatible string,
- * or array of 'year', 'month', 'day' values.
- *
- * @type string $year The four-digit year. Accepts any four-digit year. Default empty.
- * @type string $month Optional when passing array. The month of the year. Accepts numbers 1-12.
- * Default (string:empty)|(array:12).
- * @type string $day Optional when passing array.The day of the month. Accepts numbers 1-31.
- * Default (string:empty)|(array:last day of month).
- * }
- * @type string $column Optional. Used to add a clause comparing a column other than the
- * column specified in the top-level `$column` parameter. Accepts
- * 'date_created', 'date_created_gmt', 'post_modified', 'post_modified_gmt',
- * 'comment_date', 'comment_date_gmt'. Default is the value of
- * top-level `$column`.
- * @type string $compare Optional. The comparison operator. Accepts '=', '!=', '>', '>=',
- * '<', '<=', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'. 'IN',
- * 'NOT IN', 'BETWEEN', and 'NOT BETWEEN'. Comparisons support
- * arrays in some time-related parameters. Default '='.
- * @type bool $inclusive Optional. Include results from dates specified in 'before' or
- * 'after'. Default false.
- * @type int|array $year Optional. The four-digit year number. Accepts any four-digit year
- * or an array of years if `$compare` supports it. Default empty.
- * @type int|array $month Optional. The two-digit month number. Accepts numbers 1-12 or an
- * array of valid numbers if `$compare` supports it. Default empty.
- * @type int|array $week Optional. The week number of the year. Accepts numbers 0-53 or an
- * array of valid numbers if `$compare` supports it. Default empty.
- * @type int|array $dayofyear Optional. The day number of the year. Accepts numbers 1-366 or an
- * array of valid numbers if `$compare` supports it.
- * @type int|array $day Optional. The day of the month. Accepts numbers 1-31 or an array
- * of valid numbers if `$compare` supports it. Default empty.
- * @type int|array $dayofweek Optional. The day number of the week. Accepts numbers 1-7 (1 is
- * Sunday) or an array of valid numbers if `$compare` supports it.
- * Default empty.
- * @type int|array $dayofweek_iso Optional. The day number of the week (ISO). Accepts numbers 1-7
- * (1 is Monday) or an array of valid numbers if `$compare` supports it.
- * Default empty.
- * @type int|array $hour Optional. The hour of the day. Accepts numbers 0-23 or an array
- * of valid numbers if `$compare` supports it. Default empty.
- * @type int|array $minute Optional. The minute of the hour. Accepts numbers 0-60 or an array
- * of valid numbers if `$compare` supports it. Default empty.
- * @type int|array $second Optional. The second of the minute. Accepts numbers 0-60 or an
- * array of valid numbers if `$compare` supports it. Default empty.
- * }
- * }
- * }
- */
- public function __construct( $date_query = array() ) {
-
- // Bail if not an array.
- if ( ! is_array( $date_query ) ) {
- return;
- }
-
- // Support for passing time-based keys in the top level of the array.
- if ( ! isset( $date_query[0] ) && ! empty( $date_query ) ) {
- $date_query = array( $date_query );
- }
-
- // Bail if empty.
- if ( empty( $date_query ) ) {
- return;
- }
-
- // Set column, compare, relation, and queries.
- $this->column = $this->get_column( $date_query );
- $this->compare = $this->get_compare( $date_query );
- $this->relation = $this->get_relation( $date_query );
- $this->queries = $this->sanitize_query( $date_query );
- }
-
- /**
- * Recursive-friendly query sanitizer.
- *
- * Ensures that each query-level clause has a 'relation' key, and that
- * each first-order clause contains all the necessary keys from
- * `$defaults`.
- *
- * @since 1.0.0
- *
- * @param array $queries
- * @param array $parent_query
- *
- * @return array Sanitized queries.
- */
- public function sanitize_query( $queries = array(), $parent_query = array() ) {
-
- // Default return value.
- $retval = array();
-
- // Setup defaults.
- $defaults = array(
- 'column' => $this->get_column(),
- 'compare' => $this->get_compare(),
- 'relation' => $this->get_relation()
- );
-
- // Numeric keys should always have array values.
- foreach ( $queries as $qkey => $qvalue ) {
- if ( is_numeric( $qkey ) && ! is_array( $qvalue ) ) {
- unset( $queries[ $qkey ] );
- }
- }
-
- // Each query should have a value for each default key.
- // Inherit from the parent when possible.
- foreach ( $defaults as $dkey => $dvalue ) {
-
- // Skip if already set.
- if ( isset( $queries[ $dkey ] ) ) {
- continue;
- }
-
- // Set the query.
- if ( isset( $parent_query[ $dkey ] ) ) {
- $queries[ $dkey ] = $parent_query[ $dkey ];
- } else {
- $queries[ $dkey ] = $dvalue;
- }
- }
-
- // Validate the dates passed in the query.
- if ( $this->is_first_order_clause( $queries ) ) {
- $this->validate_date_values( $queries );
- }
-
- // Add queries to return array.
- foreach ( $queries as $key => $q ) {
-
- // This is a first-order query. Trust the values and sanitize when building SQL.
- if ( ! is_array( $q ) || in_array( $key, $this->time_keys, true ) ) {
- $retval[ $key ] = $q;
-
- // Any array without a time key is another query, so we recurse.
- } else {
- $retval[] = $this->sanitize_query( $q, $queries );
- }
- }
-
- // Return sanitized queries.
- return $retval;
- }
-
- /**
- * Determine whether this is a first-order clause.
- *
- * Checks to see if the current clause has any time-related keys.
- * If so, it's first-order.
- *
- * @since 1.0.0
- *
- * @param array $query Query clause.
- *
- * @return bool True if this is a first-order clause.
- */
- protected function is_first_order_clause( $query = array() ) {
- $time_keys = array_intersect( $this->time_keys, array_keys( $query ) );
-
- return ! empty( $time_keys );
- }
-
- /**
- * Determines and validates what comparison operator to use.
- *
- * @since 1.0.0
- *
- * @param array $query A date query or a date subquery.
- *
- * @return string The comparison operator.
- */
- public function get_column( $query = array() ) {
-
- // Use column if passed
- $retval = ! empty( $query['column'] )
- ? esc_sql( $this->validate_column( $query['column'] ) )
- : $this->column;
-
- return $retval;
- }
-
- /**
- * Determines and validates what comparison operator to use.
- *
- * @since 1.0.0
- *
- * @param array $query A date query or a date subquery.
- *
- * @return string The comparison operator.
- */
- public function get_compare( $query = array() ) {
-
- // Compare must be in the allowed array
- $retval = ! empty( $query['compare'] ) && in_array( $query['compare'], $this->comparison_keys, true )
- ? strtoupper( $query['compare'] )
- : $this->compare;
-
- return $retval;
- }
-
- /**
- * Determines and validates what relation to use.
- *
- * @since 1.0.0
- *
- * @param array $query A date query or a date subquery.
- * @return string The relation operator.
- */
- public function get_relation( $query = array() ) {
-
- // Relation must be in the allowed array
- $retval = ! empty( $query['relation'] ) && in_array( $query['relation'], $this->relation_keys, true )
- ? strtoupper( $query['relation'] )
- : $this->relation;
-
- return $retval;
- }
-
- /**
- * Validates the given date_query values.
- *
- * Note that date queries with invalid date ranges are allowed to
- * continue (though of course no items will be found for impossible dates).
- * This method only generates debug notices for these cases.
- *
- * @since 1.0.0
- *
- * @param array $date_query The date_query array.
- *
- * @return bool True if all values in the query are valid, false if one or more fail.
- */
- public function validate_date_values( $date_query = array() ) {
-
- // Bail if empty.
- if ( empty( $date_query ) ) {
- return false;
- }
-
- $valid = true;
-
- /*
- * Validate 'before' and 'after' up front, then let the
- * validation routine continue to be sure that all invalid
- * values generate errors too.
- */
- if ( array_key_exists( 'before', $date_query ) && is_array( $date_query['before'] ) ) {
- $valid = $this->validate_date_values( $date_query['before'] );
- }
-
- if ( array_key_exists( 'after', $date_query ) && is_array( $date_query['after'] ) ) {
- $valid = $this->validate_date_values( $date_query['after'] );
- }
-
- // Values are passthroughs.
- if ( array_key_exists( 'value', $date_query ) ) {
- $valid = true;
- }
-
- // Array containing all min-max checks.
- $min_max_checks = array();
-
- // Days per year.
- if ( array_key_exists( 'year', $date_query ) ) {
- /*
- * If a year exists in the date query, we can use it to get the days.
- * If multiple years are provided (as in a BETWEEN), use the first one.
- */
- if ( is_array( $date_query['year'] ) ) {
- $_year = reset( $date_query['year'] );
- } else {
- $_year = $date_query['year'];
- }
-
- $max_days_of_year = date( 'z', mktime( 0, 0, 0, 12, 31, $_year ) ) + 1;
-
- // Otherwise we use the max of 366 (leap-year)
- } else {
- $max_days_of_year = 366;
- }
-
- // Days of year.
- $min_max_checks['dayofyear'] = array(
- 'min' => 1,
- 'max' => $max_days_of_year,
- );
-
- // Days per week.
- $min_max_checks['dayofweek'] = array(
- 'min' => 1,
- 'max' => 7,
- );
-
- // Days per week.
- $min_max_checks['dayofweek_iso'] = array(
- 'min' => 1,
- 'max' => 7,
- );
-
- // Months per year.
- $min_max_checks['month'] = array(
- 'min' => 1,
- 'max' => 12,
- );
-
- // Weeks per year.
- if ( isset( $_year ) ) {
- /*
- * If we have a specific year, use it to calculate number of weeks.
- * Note: the number of weeks in a year is the date in which Dec 28 appears.
- */
- $week_count = date( 'W', mktime( 0, 0, 0, 12, 28, $_year ) );
-
- // Otherwise set the week-count to a maximum of 53.
- } else {
- $week_count = 53;
- }
-
- // Weeks per year.
- $min_max_checks['week'] = array(
- 'min' => 1,
- 'max' => $week_count,
- );
-
- // Days per month.
- $min_max_checks['day'] = array(
- 'min' => 1,
- 'max' => 31,
- );
-
- // Hours per day.
- $min_max_checks['hour'] = array(
- 'min' => 0,
- 'max' => 23,
- );
-
- // Minutes per hour.
- $min_max_checks['minute'] = array(
- 'min' => 0,
- 'max' => 59,
- );
-
- // Seconds per minute.
- $min_max_checks['second'] = array(
- 'min' => 0,
- 'max' => 59,
- );
-
- // Loop through min/max checks.
- foreach ( $min_max_checks as $key => $check ) {
-
- // Skip if not in query.
- if ( ! array_key_exists( $key, $date_query ) ) {
- continue;
- }
-
- // Check for invalid values.
- foreach ( (array) $date_query[ $key ] as $_value ) {
- $is_between = ( $_value >= $check['min'] ) && ( $_value <= $check['max'] );
-
- if ( ! is_numeric( $_value ) || empty( $is_between ) ) {
- $valid = false;
- }
- }
- }
-
- // Bail if invalid query.
- if ( false === $valid ) {
- return $valid;
- }
-
- // Check what kinds of dates are being queried for.
- $day_exists = array_key_exists( 'day', $date_query ) && is_numeric( $date_query['day'] );
- $month_exists = array_key_exists( 'month', $date_query ) && is_numeric( $date_query['month'] );
- $year_exists = array_key_exists( 'year', $date_query ) && is_numeric( $date_query['year'] );
-
- // Checking at least day & month.
- if ( ! empty( $day_exists ) && ! empty( $month_exists ) ) {
-
- // Check for year query, or fallback to 2012 (for flexibility).
- $year = ! empty( $year_exists )
- ? $date_query['year']
- : '2012';
-
- // Parse the date to check.
- $to_check = sprintf( '%s-%s-%s', $year, $date_query['month'], $date_query['day'] );
-
- // Check the date.
- if ( ! $this->checkdate( $date_query['month'], $date_query['day'], $year, $to_check ) ) {
- $valid = false;
- }
- }
-
- // Return if valid or not
- return $valid;
- }
-
- /**
- * Validates a column name parameter.
- *
- * @since 1.0.0
- *
- * @param string $column The user-supplied column name.
- *
- * @return string A validated column name value.
- */
- public function validate_column( $column = '' ) {
- return preg_replace( '/[^a-zA-Z0-9_$\.]/', '', $column );
- }
-
- /**
- * Generate WHERE clause to be appended to a main query.
- *
- * @since 1.0.0
- *
- * @return string MySQL WHERE clauses.
- */
- public function get_sql() {
- $sql = $this->get_sql_clauses();
-
- /**
- * Filters the date query clauses.
- *
- * @since 1.0.0
- *
- * @param string $sql Clauses of the date query.
- * @param Date $this The Date query instance.
- */
- return apply_filters( 'get_date_sql', $sql, $this );
- }
-
- /**
- * Generate SQL clauses to be appended to a main query.
- *
- * Called by the public Date::get_sql(), this method is abstracted
- * out to maintain parity with the other Query classes.
- *
- * @since 1.0.0
- *
- * @return array {
- * Array containing JOIN and WHERE SQL clauses to append to the main query.
- *
- * @type string $join SQL fragment to append to the main JOIN clause.
- * @type string $where SQL fragment to append to the main WHERE clause.
- * }
- */
- protected function get_sql_clauses() {
- $sql = $this->get_sql_for_query( $this->queries );
-
- if ( ! empty( $sql['where'] ) ) {
- $sql['where'] = ' AND ' . $sql['where'];
- }
-
- return apply_filters( 'get_date_sql_clauses', $sql, $this );
- }
-
- /**
- * Generate SQL clauses for a single query array.
- *
- * If nested subqueries are found, this method recurses the tree to
- * produce the properly nested SQL.
- *
- * @since 1.0.0
- *
- * @param array $query Query to parse.
- * @param int $depth Optional. Number of tree levels deep we currently are.
- * Used to calculate indentation. Default 0.
- * @return array {
- * Array containing JOIN and WHERE SQL clauses to append to a single query array.
- *
- * @type string $join SQL fragment to append to the main JOIN clause.
- * @type string $where SQL fragment to append to the main WHERE clause.
- * }
- */
- protected function get_sql_for_query( $query = array(), $depth = 0 ) {
- $sql_chunks = array(
- 'join' => array(),
- 'where' => array(),
- );
-
- $sql = array(
- 'join' => '',
- 'where' => '',
- );
-
- $indent = '';
- for ( $i = 0; $i < $depth; $i++ ) {
- $indent .= ' ';
- }
-
- foreach ( $query as $key => $clause ) {
-
- if ( 'relation' === $key ) {
- $relation = $query['relation'];
-
- } elseif ( is_array( $clause ) ) {
-
- // This is a first-order clause.
- if ( $this->is_first_order_clause( $clause ) ) {
-
- // Get clauses & where count
- $clause_sql = $this->get_sql_for_clause( $clause, $query );
- $where_count = count( $clause_sql['where'] );
-
- if ( ! $where_count ) {
- $sql_chunks['where'][] = '';
-
- } elseif ( 1 === $where_count ) {
- $sql_chunks['where'][] = $clause_sql['where'][0];
-
- } else {
- $sql_chunks['where'][] = '( ' . implode( ' AND ', $clause_sql['where'] ) . ' )';
- }
-
- $sql_chunks['join'] = array_merge( $sql_chunks['join'], $clause_sql['join'] );
-
- // This is a subquery, so we recurse.
- } else {
- $clause_sql = $this->get_sql_for_query( $clause, $depth + 1 );
-
- $sql_chunks['where'][] = $clause_sql['where'];
- $sql_chunks['join'][] = $clause_sql['join'];
- }
- }
- }
-
- // Filter to remove empties.
- $sql_chunks['join'] = array_filter( $sql_chunks['join'] );
- $sql_chunks['where'] = array_filter( $sql_chunks['where'] );
-
- if ( empty( $relation ) ) {
- $relation = 'AND';
- }
-
- // Filter duplicate JOIN clauses and combine into a single string.
- if ( ! empty( $sql_chunks['join'] ) ) {
- $sql['join'] = implode( ' ', array_unique( $sql_chunks['join'] ) );
- }
-
- // Generate a single WHERE clause with proper brackets and indentation.
- if ( ! empty( $sql_chunks['where'] ) ) {
- $sql['where'] = '( ' . "\n " . $indent . implode( ' ' . "\n " . $indent . $relation . ' ' . "\n " . $indent, $sql_chunks['where'] ) . "\n" . $indent . ')';
- }
-
- // Filter and return
- return apply_filters( 'get_date_sql_for_query', $sql, $query, $depth, $this );
- }
-
- /**
- * Turns a first-order date query into SQL for a WHERE clause.
- *
- * @since 1.0.0
- *
- * @param array $query Date query clause.
- * @param array $parent_query Parent query of the current date query.
- *
- * @return array {
- * Array containing JOIN and WHERE SQL clauses to append to the main query.
- *
- * @type string $join SQL fragment to append to the main JOIN clause.
- * @type string $where SQL fragment to append to the main WHERE clause.
- * }
- */
- protected function get_sql_for_clause( $query = array(), $parent_query = array() ) {
-
- // The sub-parts of a $where part.
- $where_parts = array();
-
- $column = $this->get_column( $query );
- $compare = $this->get_compare( $query );
- $inclusive = ! empty( $query['inclusive'] );
-
- // Assign greater-than and less-than values.
- $lt = '<';
- $gt = '>';
-
- if ( $inclusive ) {
- $lt .= '=';
- $gt .= '=';
- }
-
- // Range queries.
- if ( ! empty( $query['after'] ) ) {
- $where_parts[] = $this->get_db()->prepare( "{$column} {$gt} %s", $this->build_mysql_datetime( $query['after'], ! $inclusive ) );
- }
-
- if ( ! empty( $query['before'] ) ) {
- $where_parts[] = $this->get_db()->prepare( "{$column} {$lt} %s", $this->build_mysql_datetime( $query['before'], $inclusive ) );
- }
-
- // Specific value queries.
- if ( isset( $query['year'] ) && $value = $this->build_numeric_value( $compare, $query['year'] ) ) {
- $where_parts[] = "YEAR( {$column} ) {$compare} {$value}";
- }
-
- if ( isset( $query['month'] ) && $value = $this->build_numeric_value( $compare, $query['month'] ) ) {
- $where_parts[] = "MONTH( {$column} ) {$compare} {$value}";
- } elseif ( isset( $query['monthnum'] ) && $value = $this->build_numeric_value( $compare, $query['monthnum'] ) ) {
- $where_parts[] = "MONTH( {$column} ) {$compare} {$value}";
- }
-
- if ( isset( $query['week'] ) && false !== ( $value = $this->build_numeric_value( $compare, $query['week'] ) ) ) {
- $where_parts[] = _wp_mysql_week( $column ) . " {$compare} {$value}";
- } elseif ( isset( $query['w'] ) && false !== ( $value = $this->build_numeric_value( $compare, $query['w'] ) ) ) {
- $where_parts[] = _wp_mysql_week( $column ) . " {$compare} {$value}";
- }
-
- if ( isset( $query['dayofyear'] ) && $value = $this->build_numeric_value( $compare, $query['dayofyear'] ) ) {
- $where_parts[] = "DAYOFYEAR( {$column} ) {$compare} {$value}";
- }
-
- if ( isset( $query['day'] ) && $value = $this->build_numeric_value( $compare, $query['day'] ) ) {
- $where_parts[] = "DAYOFMONTH( {$column} ) {$compare} {$value}";
- }
-
- if ( isset( $query['dayofweek'] ) && $value = $this->build_numeric_value( $compare, $query['dayofweek'] ) ) {
- $where_parts[] = "DAYOFWEEK( {$column} ) {$compare} {$value}";
- }
-
- if ( isset( $query['dayofweek_iso'] ) && $value = $this->build_numeric_value( $compare, $query['dayofweek_iso'] ) ) {
- $where_parts[] = "WEEKDAY( {$column} ) + 1 {$compare} {$value}";
- }
-
- // Straight value compare
- if ( isset( $query['value'] ) ) {
- $value = $this->build_value( $compare, $query['value'] );
- $where_parts[] = "{$column} {$compare} $value";
- }
-
- // Hour/Minute/Second
- if ( isset( $query['hour'] ) || isset( $query['minute'] ) || isset( $query['second'] ) ) {
-
- // Avoid notices.
- foreach ( array( 'hour', 'minute', 'second' ) as $unit ) {
- if ( ! isset( $query[ $unit ] ) ) {
- $query[ $unit ] = null;
- }
- }
-
- $time_query = $this->build_time_query( $column, $compare, $query['hour'], $query['minute'], $query['second'] );
-
- if ( ! empty( $time_query ) ) {
- $where_parts[] = $time_query;
- }
- }
-
- /*
- * Return an array of 'join' and 'where' for compatibility
- * with other query classes.
- */
- return array(
- 'where' => $where_parts,
- 'join' => array(),
- );
- }
-
- /**
- * Builds and validates a value string based on the comparison operator.
- *
- * @since 1.0.0
- *
- * @param string $compare The compare operator to use
- * @param string|array $value The value
- *
- * @return string|false|int The value to be used in SQL or false on error.
- */
- public function build_numeric_value( $compare = '=', $value = null ) {
-
- // Bail if null value
- if ( is_null( $value ) ) {
- return false;
- }
-
- switch ( $compare ) {
- case 'IN':
- case 'NOT IN':
- $value = (array) $value;
-
- // Remove non-numeric values.
- $value = array_filter( $value, 'is_numeric' );
-
- if ( empty( $value ) ) {
- return false;
- }
-
- return '(' . implode( ',', array_map( 'intval', $value ) ) . ')';
-
- case 'BETWEEN':
- case 'NOT BETWEEN':
- if ( ! is_array( $value ) || 2 != count( $value ) ) {
- $value = array( $value, $value );
- } else {
- $value = array_values( $value );
- }
-
- // If either value is non-numeric, bail.
- foreach ( $value as $v ) {
- if ( ! is_numeric( $v ) ) {
- return false;
- }
- }
-
- $value = array_map( 'intval', $value );
-
- return $value[0] . ' AND ' . $value[1];
-
- default:
- if ( ! is_numeric( $value ) ) {
- return false;
- }
-
- return (int) $value;
- }
- }
-
- /**
- * Builds and validates a value string based on the comparison operator.
- *
- * @since 1.0.0
- *
- * @param string $compare The compare operator to use
- * @param string|array $value The value
- *
- * @return string|false|int The value to be used in SQL or false on error.
- */
- public function build_value( $compare = '=', $value = null ) {
-
- if ( in_array( $compare, $this->multi_value_keys, true ) ) {
- if ( ! is_array( $value ) ) {
- $value = preg_split( '/[,\s]+/', $value );
- }
- } else {
- $value = trim( $value );
- }
-
- switch ( $compare ) {
- case 'IN':
- case 'NOT IN':
- $compare_string = '(' . substr( str_repeat( ',%s', count( $value ) ), 1 ) . ')';
- $where = $this->get_db()->prepare( $compare_string, $value );
- break;
-
- case 'BETWEEN':
- case 'NOT BETWEEN':
- $value = array_slice( $value, 0, 2 );
- $where = $this->get_db()->prepare( '%s AND %s', $value );
- break;
-
- case 'LIKE':
- case 'NOT LIKE':
- $value = '%' . $this->get_db()->esc_like( $value ) . '%';
- $where = $this->get_db()->prepare( '%s', $value );
- break;
-
- // EXISTS with a value is interpreted as '='.
- case 'EXISTS':
- $compare = '=';
- $where = $this->get_db()->prepare( '%s', $value );
- break;
-
- // 'value' is ignored for NOT EXISTS.
- case 'NOT EXISTS':
- $where = '';
- break;
-
- default:
- $where = $this->get_db()->prepare( '%s', $value );
- break;
- }
-
- return $where;
- }
-
- /**
- * Builds a MySQL format date/time based on some query parameters.
- *
- * You can pass an array of values (year, month, etc.) with missing parameter values being defaulted to
- * either the maximum or minimum values (controlled by the $default_to parameter). Alternatively you can
- * pass a string that will be run through strtotime().
- *
- * @since 1.0.0
- *
- * @param string|array $datetime An array of parameters or a strtotime() string
- * @param bool $default_to_max Whether to round up incomplete dates. Supported by values
- * of $datetime that are arrays, or string values that are a
- * subset of MySQL date format ('Y', 'Y-m', 'Y-m-d', 'Y-m-d H:i').
- * Default: false.
- *
- * @return string|false A MySQL format date/time or false on failure
- */
- public function build_mysql_datetime( $datetime = '', $default_to_max = false ) {
-
- // Get current time
- $now = time();
-
- // Datetime is string
- if ( is_string( $datetime ) ) {
-
- // Define matches so linters don't complain
- $matches = array();
-
- /*
- * Try to parse some common date formats, so we can detect
- * the level of precision and support the 'inclusive' parameter.
- */
-
- // Y
- if ( preg_match( '/^(\d{4})$/', $datetime, $matches ) ) {
- $datetime = array(
- 'year' => intval( $matches[1] ),
- );
-
- // Y-m
- } elseif ( preg_match( '/^(\d{4})\-(\d{2})$/', $datetime, $matches ) ) {
- $datetime = array(
- 'year' => intval( $matches[1] ),
- 'month' => intval( $matches[2] ),
- );
-
- // Y-m-d
- } elseif ( preg_match( '/^(\d{4})\-(\d{2})\-(\d{2})$/', $datetime, $matches ) ) {
- $datetime = array(
- 'year' => intval( $matches[1] ),
- 'month' => intval( $matches[2] ),
- 'day' => intval( $matches[3] ),
- );
-
- // Y-m-d H:i
- } elseif ( preg_match( '/^(\d{4})\-(\d{2})\-(\d{2}) (\d{2}):(\d{2})$/', $datetime, $matches ) ) {
- $datetime = array(
- 'year' => intval( $matches[1] ),
- 'month' => intval( $matches[2] ),
- 'day' => intval( $matches[3] ),
- 'hour' => intval( $matches[4] ),
- 'minute' => intval( $matches[5] ),
- );
- }
-
- // If no match is found, we don't support default_to_max.
- if ( ! is_array( $datetime ) ) {
- return gmdate( 'Y-m-d H:i:s', strtotime( $datetime, $now ) );
- }
- }
-
- // Map to ints
- $datetime = array_map( 'absint', $datetime );
-
- // Year
- if ( ! isset( $datetime['year'] ) ) {
- $datetime['year'] = date( 'Y', $now );
- }
-
- // Month
- if ( ! isset( $datetime['month'] ) ) {
- $datetime['month'] = ! empty( $default_to_max )
- ? 12
- : 1;
- }
-
- // Day
- if ( ! isset( $datetime['day'] ) ) {
- $datetime['day'] = ! empty( $default_to_max )
- ? (int) date( 't', mktime( 0, 0, 0, $datetime['month'], 1, $datetime['year'] ) )
- : 1;
- }
-
- // Hour
- if ( ! isset( $datetime['hour'] ) ) {
- $datetime['hour'] = ! empty( $default_to_max )
- ? 23
- : 0;
- }
-
- // Minute
- if ( ! isset( $datetime['minute'] ) ) {
- $datetime['minute'] = ! empty( $default_to_max )
- ? 59
- : 0;
- }
-
- // Second
- if ( ! isset( $datetime['second'] ) ) {
- $datetime['second'] = ! empty( $default_to_max )
- ? 59
- : 0;
- }
-
- // Combine and return
- return sprintf(
- '%04d-%02d-%02d %02d:%02d:%02d',
- $datetime['year'],
- $datetime['month'],
- $datetime['day'],
- $datetime['hour'],
- $datetime['minute'],
- $datetime['second']
- );
- }
-
- /**
- * Return a MySQL expression for selecting the week number based on the
- * day that the week starts.
- *
- * Uses the WordPress site option, if set.
- *
- * @since 1.0.0
- *
- * @param string $column Database column.
- * @param int $start_of_week Day that week starts on. 0 = Sunday.
- *
- * @return string SQL clause.
- */
- public function build_mysql_week( $column = '', $start_of_week = 0 ) {
-
- // Start of week option
- $start_of_week = (int) get_option( 'start_of_week', $start_of_week );
-
- // When does the week start?
- switch ( $start_of_week ) {
-
- // Monday
- case 1:
- $retval = "WEEK( {$column}, 1 )";
- break;
-
- // Tuesday - Saturday
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- $retval = "WEEK( DATE_SUB( {$column}, INTERVAL {$start_of_week} DAY ), 0 )";
- break;
-
- // Sunday
- case 0:
- default:
- $retval = "WEEK( {$column}, 0 )";
- break;
- }
-
- // Return SQL
- return $retval;
- }
-
- /**
- * Builds a query string for comparing time values (hour, minute, second).
- *
- * If just hour, minute, or second is set than a normal comparison will be done.
- * However if multiple values are passed, a pseudo-decimal time will be created
- * in order to be able to accurately compare against.
- *
- * @since 1.0.0
- *
- * @param string $column The column to query against. Needs to be pre-validated!
- * @param string $compare The comparison operator. Needs to be pre-validated!
- * @param int|null $hour Optional. An hour value (0-23).
- * @param int|null $minute Optional. A minute value (0-59).
- * @param int|null $second Optional. A second value (0-59).
- *
- * @return string|false A query part or false on failure.
- */
- public function build_time_query( $column, $compare, $hour = null, $minute = null, $second = null ) {
-
- // Have to have at least one
- if ( ! isset( $hour ) && ! isset( $minute ) && ! isset( $second ) ) {
- return false;
- }
-
- // Complex combined queries aren't supported for multi-value queries
- if ( in_array( $compare, $this->multi_value_keys, true ) ) {
- $retval = array();
-
- // Hour
- if ( isset( $hour ) && false !== ( $value = $this->build_numeric_value( $compare, $hour ) ) ) {
- $retval[] = "HOUR( {$column} ) {$compare} {$value}";
- }
-
- // Minute
- if ( isset( $minute ) && false !== ( $value = $this->build_numeric_value( $compare, $minute ) ) ) {
- $retval[] = "MINUTE( {$column} ) {$compare} {$value}";
- }
-
- // Second
- if ( isset( $second ) && false !== ( $value = $this->build_numeric_value( $compare, $second ) ) ) {
- $retval[] = "SECOND( {$column} ) {$compare} {$value}";
- }
-
- return implode( ' AND ', $retval );
- }
-
- // Cases where just one unit is set
-
- // Hour
- if ( isset( $hour ) && ! isset( $minute ) && ! isset( $second ) && false !== ( $value = $this->build_numeric_value( $compare, $hour ) ) ) {
- return "HOUR( {$column} ) {$compare} {$value}";
-
- // Minute
- } elseif ( ! isset( $hour ) && isset( $minute ) && ! isset( $second ) && false !== ( $value = $this->build_numeric_value( $compare, $minute ) ) ) {
- return "MINUTE( {$column} ) {$compare} {$value}";
-
- // Second
- } elseif ( ! isset( $hour ) && ! isset( $minute ) && isset( $second ) && false !== ( $value = $this->build_numeric_value( $compare, $second ) ) ) {
- return "SECOND( {$column} ) {$compare} {$value}";
- }
-
- // Single units were already handled. Since hour & second isn't allowed,
- // minute must to be set.
- if ( ! isset( $minute ) ) {
- return false;
- }
-
- // Defaults
- $format = $time = '';
-
- // Hour
- if ( null !== $hour ) {
- $format .= '%H.';
- $time .= sprintf( '%02d', $hour ) . '.';
- } else {
- $format .= '0.';
- $time .= '0.';
- }
-
- // Minute
- $format .= '%i';
- $time .= sprintf( '%02d', $minute );
-
- // Second
- if ( isset( $second ) ) {
- $format .= '%s';
- $time .= sprintf( '%02d', $second );
- }
-
- // Build the SQL
- $query = "DATE_FORMAT( {$column}, %s ) {$compare} %f";
-
- // Return the prepared SQL
- return $this->get_db()->prepare( $query, $format, $time );
- }
-
- /**
- * Test if the supplied date is valid for the Gregorian calendar.
- *
- * @since 1.0.0
- *
- * @link https://www.php.net/manual/en/function.checkdate.php
- *
- * @param int $month Month number.
- * @param int $day Day number.
- * @param int $year Year number.
- * @param string $source_date The date to filter.
- *
- * @return bool True if valid date, false if not valid date.
- */
- public function checkdate( $month = 0, $day = 0, $year = 0, $source_date = '' ) {
-
- // Check the date
- $retval = checkdate( $month, $day, $year );
-
- /**
- * Filters whether the given date is valid for the Gregorian calendar.
- *
- * @since 1.0.0
- *
- * @param bool $checkdate Whether the given date is valid.
- * @param string $source_date Date to check.
- */
- return (bool) apply_filters( 'wp_checkdate', $retval, $source_date );
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-meta.php b/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-meta.php
deleted file mode 100644
index ae9c4165..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-meta.php
+++ /dev/null
@@ -1,29 +0,0 @@
- '',
- 'from' => '',
- 'where' => array(),
- 'groupby' => '',
- 'orderby' => '',
- 'limits' => ''
- );
-
- /**
- * Request clauses.
- *
- * @since 1.0.0
- * @var array
- */
- protected $request_clauses = array(
- 'select' => '',
- 'from' => '',
- 'where' => '',
- 'groupby' => '',
- 'orderby' => '',
- 'limits' => ''
- );
-
- /**
- * Meta query container.
- *
- * @since 1.0.0
- * @var object|Queries\Meta
- */
- protected $meta_query = false;
-
- /**
- * Date query container.
- *
- * @since 1.0.0
- * @var object|Queries\Date
- */
- protected $date_query = false;
-
- /**
- * Compare query container.
- *
- * @since 1.0.0
- * @var object|Queries\Compare
- */
- protected $compare_query = false;
-
- /** Query Variables *******************************************************/
-
- /**
- * Parsed query vars set by the application, possibly filtered and changed.
- *
- * This is specifically marked as public, to allow byref actions to change
- * them from outside the class methods proper and inside filter functions.
- *
- * @since 1.0.0
- * @var array
- */
- public $query_vars = array();
-
- /**
- * Original query vars set by the application.
- *
- * These are the original query variables before any filters are applied,
- * and are the results of merging $query_var_defaults with $query_vars.
- *
- * @since 1.0.0
- * @var array
- */
- protected $query_var_originals = array();
-
- /**
- * Default values for query vars.
- *
- * These are computed at runtime based on the registered columns for the
- * database table this query relates to.
- *
- * @since 1.0.0
- * @var array
- */
- protected $query_var_defaults = array();
-
- /**
- * This private variable temporarily holds onto a random string used as the
- * default query var value. This is used internally when performing
- * comparisons, and allows for querying by falsy values.
- *
- * @since 1.1.0
- * @var string
- */
- protected $query_var_default_value = '';
-
- /** Results ***************************************************************/
-
- /**
- * List of items located by the query.
- *
- * @since 1.0.0
- * @var array
- */
- public $items = array();
-
- /**
- * The amount of found items for the current query.
- *
- * @since 1.0.0
- * @var int
- */
- protected $found_items = 0;
-
- /**
- * The number of pages.
- *
- * @since 1.0.0
- * @var int
- */
- protected $max_num_pages = 0;
-
- /**
- * SQL for database query.
- *
- * @since 1.0.0
- * @var string
- */
- protected $request = '';
-
- /** Methods ***************************************************************/
-
- /**
- * Sets up the item query, based on the query vars passed.
- *
- * @since 1.0.0
- *
- * @param string|array $query {
- * Optional. Array or query string of item query parameters.
- * Default empty.
- *
- * @type string $fields Site fields to return. Accepts 'ids' (returns an array of item IDs)
- * or empty (returns an array of complete item objects). Default empty.
- * To do a date query against a field, append the field name with _query
- * @type bool $count Whether to return a item count (true) or array of item objects.
- * Default false.
- * @type int $number Limit number of items to retrieve. Use 0 for no limit.
- * Default 100.
- * @type int $offset Number of items to offset the query. Used to build LIMIT clause.
- * Default 0.
- * @type bool $no_found_rows Whether to disable the `SQL_CALC_FOUND_ROWS` query.
- * Default true.
- * @type string|array $orderby Accepts false, an empty array, or 'none' to disable `ORDER BY` clause.
- * Default 'id'.
- * @type string $item How to item retrieved items. Accepts 'ASC', 'DESC'.
- * Default 'DESC'.
- * @type string $search Search term(s) to retrieve matching items for.
- * Default empty.
- * @type array $search_columns Array of column names to be searched.
- * Default empty array.
- * @type bool $update_item_cache Whether to prime the cache for found items.
- * Default false.
- * @type bool $update_meta_cache Whether to prime the meta cache for found items.
- * Default false.
- * }
- */
- public function __construct( $query = array() ) {
-
- // Setup
- $this->set_alias();
- $this->set_prefix();
- $this->set_columns();
- $this->set_item_shape();
- $this->set_query_var_defaults();
-
- // Maybe execute a query if arguments were passed
- if ( ! empty( $query ) ) {
- $this->query( $query );
- }
- }
-
- /**
- * Queries the database and retrieves items or counts.
- *
- * This method is public to allow subclasses to perform JIT manipulation
- * of the parameters passed into it.
- *
- * @since 1.0.0
- *
- * @param string|array $query Array or URL query string of parameters.
- * @return array|int List of items, or number of items when 'count' is passed as a query var.
- */
- public function query( $query = array() ) {
- $this->parse_query( $query );
-
- return $this->get_items();
- }
-
- /** Private Setters *******************************************************/
-
- /**
- * Set the time when items were last changed.
- *
- * We set this locally to avoid inconsistencies between method calls.
- *
- * @since 1.0.0
- */
- protected function set_last_changed() {
- $this->last_changed = microtime();
- }
-
- /**
- * Set up the table alias if not already set in the class.
- *
- * This happens before prefixes are applied.
- *
- * @since 1.0.0
- */
- protected function set_alias() {
- if ( empty( $this->table_alias ) ) {
- $this->table_alias = $this->first_letters( $this->table_name );
- }
- }
-
- /**
- * Prefix table names, cache groups, and other things.
- *
- * This is to avoid conflicts with other plugins or themes that might be
- * doing their own things.
- *
- * @since 1.0.0
- */
- protected function set_prefix() {
- $this->table_name = $this->apply_prefix( $this->table_name );
- $this->table_alias = $this->apply_prefix( $this->table_alias );
- $this->cache_group = $this->apply_prefix( $this->cache_group, '-' );
- }
-
- /**
- * Set columns objects
- *
- * @since 1.0.0
- */
- protected function set_columns() {
-
- // Bail if no table schema
- if ( ! class_exists( $this->table_schema ) ) {
- return;
- }
-
- // Invoke a new table schema class
- $schema = new $this->table_schema;
-
- // Maybe get the column objects
- if ( ! empty( $schema->columns ) ) {
- $this->columns = $schema->columns;
- }
- }
-
- /**
- * Set the default item shape if none exists
- *
- * @since 1.0.0
- */
- protected function set_item_shape() {
- if ( empty( $this->item_shape ) || ! class_exists( $this->item_shape ) ) {
- $this->item_shape = __NAMESPACE__ . '\\Row';
- }
- }
-
- /**
- * Set default query vars based on columns
- *
- * @since 1.0.0
- */
- protected function set_query_var_defaults() {
-
- // Default query variable value
- $this->query_var_default_value = function_exists( 'random_bytes' )
- ? $this->apply_prefix( bin2hex( random_bytes( 18 ) ) )
- : $this->apply_prefix( uniqid( '_', true ) );
-
- // Default query variables
- $this->query_var_defaults = array(
- 'fields' => '',
- 'number' => 100,
- 'offset' => '',
- 'orderby' => 'id',
- 'order' => 'DESC',
- 'groupby' => '',
- 'search' => '',
- 'search_columns' => array(),
- 'count' => false,
- 'meta_query' => null, // See Queries\Meta
- 'date_query' => null, // See Queries\Date
- 'compare_query' => null, // See Queries\Compare
- 'no_found_rows' => true,
-
- // Caching
- 'update_item_cache' => true,
- 'update_meta_cache' => true
- );
-
- // Bail if no columns
- if ( empty( $this->columns ) ) {
- return;
- }
-
- // Direct column names
- $names = wp_list_pluck( $this->columns, 'name' );
- foreach ( $names as $name ) {
- $this->query_var_defaults[ $name ] = $this->query_var_default_value;
- }
-
- // Possible ins
- $possible_ins = $this->get_columns( array( 'in' => true ), 'and', 'name' );
- foreach ( $possible_ins as $in ) {
- $key = "{$in}__in";
- $this->query_var_defaults[ $key ] = false;
- }
-
- // Possible not ins
- $possible_not_ins = $this->get_columns( array( 'not_in' => true ), 'and', 'name' );
- foreach ( $possible_not_ins as $in ) {
- $key = "{$in}__not_in";
- $this->query_var_defaults[ $key ] = false;
- }
-
- // Possible dates
- $possible_dates = $this->get_columns( array( 'date_query' => true ), 'and', 'name' );
- foreach ( $possible_dates as $date ) {
- $key = "{$date}_query";
- $this->query_var_defaults[ $key ] = false;
- }
- }
-
- /**
- * Set the request clauses
- *
- * @since 1.0.0
- *
- * @param array $clauses
- */
- protected function set_request_clauses( $clauses = array() ) {
-
- // Found rows
- $found_rows = empty( $this->query_vars['no_found_rows'] )
- ? 'SQL_CALC_FOUND_ROWS'
- : '';
-
- // Fields
- $fields = ! empty( $clauses['fields'] )
- ? $clauses['fields']
- : '';
-
- // Join
- $join = ! empty( $clauses['join'] )
- ? $clauses['join']
- : '';
-
- // Where
- $where = ! empty( $clauses['where'] )
- ? "WHERE {$clauses['where']}"
- : '';
-
- // Group by
- $groupby = ! empty( $clauses['groupby'] )
- ? "GROUP BY {$clauses['groupby']}"
- : '';
-
- // Order by
- $orderby = ! empty( $clauses['orderby'] )
- ? "ORDER BY {$clauses['orderby']}"
- : '';
-
- // Limits
- $limits = ! empty( $clauses['limits'] )
- ? $clauses['limits']
- : '';
-
- // Select & From
- $table = $this->get_table_name();
- $select = "SELECT {$found_rows} {$fields}";
- $from = "FROM {$table} {$this->table_alias} {$join}";
-
- // Put query into clauses array
- $this->request_clauses['select'] = $select;
- $this->request_clauses['from'] = $from;
- $this->request_clauses['where'] = $where;
- $this->request_clauses['groupby'] = $groupby;
- $this->request_clauses['orderby'] = $orderby;
- $this->request_clauses['limits'] = $limits;
- }
-
- /**
- * Set the request
- *
- * @since 1.0.0
- */
- protected function set_request() {
- $filtered = array_filter( $this->request_clauses );
- $clauses = array_map( 'trim', $filtered );
- $this->request = implode( ' ', $clauses );
- }
-
- /**
- * Set items by mapping them through the single item callback.
- *
- * @since 1.0.0
- * @param array $item_ids
- */
- protected function set_items( $item_ids = array() ) {
-
- // Bail if counting, to avoid shaping items
- if ( ! empty( $this->query_vars['count'] ) ) {
- $this->items = $item_ids;
- return;
- }
-
- // Cast to integers
- $item_ids = array_map( 'intval', $item_ids );
-
- // Prime item caches
- $this->prime_item_caches( $item_ids );
-
- // Shape the items
- $this->items = $this->shape_items( $item_ids );
- }
-
- /**
- * Populates found_items and max_num_pages properties for the current query
- * if the limit clause was used.
- *
- * @since 1.0.0
- *
- * @param array $item_ids Optional array of item IDs
- */
- protected function set_found_items( $item_ids = array() ) {
-
- // Items were not found
- if ( empty( $item_ids ) ) {
- return;
- }
-
- // Default to number of item IDs
- $this->found_items = count( (array) $item_ids );
-
- // Count query
- if ( ! empty( $this->query_vars['count'] ) ) {
-
- // Not grouped
- if ( is_numeric( $item_ids ) && empty( $this->query_vars['groupby'] ) ) {
- $this->found_items = intval( $item_ids );
- }
-
- // Not a count query
- } elseif ( is_array( $item_ids ) && ( ! empty( $this->query_vars['number'] ) && empty( $this->query_vars['no_found_rows'] ) ) ) {
-
- /**
- * Filters the query used to retrieve found item count.
- *
- * @since 1.0.0
- *
- * @param string $found_items_query SQL query. Default 'SELECT FOUND_ROWS()'.
- * @param object $item_query The object instance.
- */
- $found_items_query = (string) apply_filters_ref_array( $this->apply_prefix( "found_{$this->item_name_plural}_query" ), array( 'SELECT FOUND_ROWS()', &$this ) );
-
- // Maybe query for found items
- if ( ! empty( $found_items_query ) ) {
- $this->found_items = (int) $this->get_db()->get_var( $found_items_query );
- }
- }
- }
-
- /** Public Setters ********************************************************/
-
- /**
- * Set a query var, to both defaults and request arrays.
- *
- * This method is used to expose the private query_vars array to hooks,
- * allowing them to manipulate query vars just-in-time.
- *
- * @since 1.0.0
- *
- * @param string $key
- * @param string $value
- */
- public function set_query_var( $key = '', $value = '' ) {
- $this->query_var_defaults[ $key ] = $value;
- $this->query_vars[ $key ] = $value;
- }
-
- /**
- * Check whether a query variable strictly equals the unique default
- * starting value.
- *
- * @since 1.1.0
- * @param string $key
- * @return bool
- */
- public function is_query_var_default( $key = '' ) {
- return (bool) ( $this->query_vars[ $key ] === $this->query_var_default_value );
- }
-
- /** Private Getters *******************************************************/
-
- /**
- * Pass-through method to return a new Meta object.
- *
- * @since 1.0.0
- *
- * @param array $args See Queries\Meta
- *
- * @return Queries\Meta
- */
- private function get_meta_query( $args = array() ) {
- return new Queries\Meta( $args );
- }
-
- /**
- * Pass-through method to return a new Compare object.
- *
- * @since 1.0.0
- *
- * @param array $args See Queries\Compare
- *
- * @return Queries\Compare
- */
- private function get_compare_query( $args = array() ) {
- return new Queries\Compare( $args );
- }
-
- /**
- * Pass-through method to return a new Queries\Date object.
- *
- * @since 1.0.0
- *
- * @param array $args See Queries\Date
- *
- * @return Queries\Date
- */
- private function get_date_query( $args = array() ) {
- return new Queries\Date( $args );
- }
-
- /**
- * Return the current time as a UTC timestamp
- *
- * This is used by add_item() and update_item()
- *
- * @since 1.0.0
- *
- * @return string
- */
- protected function get_current_time() {
- return gmdate( "Y-m-d\TH:i:s\Z" );
- }
-
- /**
- * Return the literal table name (with prefix) from the database interface.
- *
- * @since 1.0.0
- *
- * @return string
- */
- protected function get_table_name() {
- return $this->get_db()->{$this->table_name};
- }
-
- /**
- * Return array of column names
- *
- * @since 1.0.0
- *
- * @return array
- */
- protected function get_column_names() {
- return array_flip( $this->get_columns( array(), 'and', 'name' ) );
- }
-
- /**
- * Return the primary database column name
- *
- * @since 1.0.0
- *
- * @return string Default "id", Primary column name if not empty
- */
- protected function get_primary_column_name() {
- return $this->get_column_field( array( 'primary' => true ), 'name', 'id' );
- }
-
- /**
- * Get a column from an array of arguments
- *
- * @since 1.0.0
- *
- * @return mixed Column object, or false
- */
- protected function get_column_field( $args = array(), $field = '', $default = false ) {
-
- // Get column
- $column = $this->get_column_by( $args );
-
- // Return field, or default
- return isset( $column->{$field} )
- ? $column->{$field}
- : $default;
- }
-
- /**
- * Get a column from an array of arguments
- *
- * @since 1.0.0
- *
- * @return mixed Column object, or false
- */
- protected function get_column_by( $args = array() ) {
-
- // Filter columns
- $filter = $this->get_columns( $args );
-
- // Return column or false
- return ! empty( $filter )
- ? reset( $filter )
- : false;
- }
-
- /**
- * Get columns from an array of arguments
- *
- * @since 1.0.0
- */
- protected function get_columns( $args = array(), $operator = 'and', $field = false ) {
-
- // Filter columns
- $filter = wp_filter_object_list( $this->columns, $args, $operator, $field );
-
- // Return column or false
- return ! empty( $filter )
- ? array_values( $filter )
- : array();
- }
-
- /**
- * Get a single database row by any column and value, skipping cache.
- *
- * @since 1.0.0
- *
- * @param string $column_name Name of database column
- * @param string $column_value Value to query for
- * @return object|false False if empty/error, Object if successful
- */
- protected function get_item_raw( $column_name = '', $column_value = '' ) {
-
- // Bail if no name or value
- if ( empty( $column_name ) || empty( $column_value ) ) {
- return false;
- }
-
- // Bail if values aren't query'able
- if ( ! is_string( $column_name ) || ! is_scalar( $column_value ) ) {
- return false;
- }
-
- // Query database for row
- $pattern = $this->get_column_field( array( 'name' => $column_name ), 'pattern', '%s' );
- $table = $this->get_table_name();
- $select = $this->get_db()->prepare( "SELECT * FROM {$table} WHERE {$column_name} = {$pattern}", $column_value );
- $result = $this->get_db()->get_row( $select );
-
- // Bail on failure
- if ( ! $this->is_success( $result ) ) {
- return false;
- }
-
- // Return row
- return $result;
- }
-
- /**
- * Retrieves a list of items matching the query vars.
- *
- * @since 1.0.0
- *
- * @return array|int List of items, or number of items when 'count' is passed as a query var.
- */
- protected function get_items() {
-
- /**
- * Fires before object items are retrieved.
- *
- * @since 1.0.0
- *
- * @param Query &$this Current instance of Query, passed by reference.
- */
- do_action_ref_array( $this->apply_prefix( "pre_get_{$this->item_name_plural}" ), array( &$this ) );
-
- // Never limit, never update item/meta caches when counting
- if ( ! empty( $this->query_vars['count'] ) ) {
- $this->query_vars['number'] = false;
- $this->query_vars['no_found_rows'] = true;
- $this->query_vars['update_item_cache'] = false;
- $this->query_vars['update_meta_cache'] = false;
- }
-
- // Check the cache
- $cache_key = $this->get_cache_key();
- $cache_value = $this->cache_get( $cache_key, $this->cache_group );
-
- // No cache value
- if ( false === $cache_value ) {
- $item_ids = $this->get_item_ids();
-
- // Set the number of found items
- $this->set_found_items( $item_ids );
-
- // Format the cached value
- $cache_value = array(
- 'item_ids' => $item_ids,
- 'found_items' => intval( $this->found_items ),
- );
-
- // Add value to the cache
- $this->cache_add( $cache_key, $cache_value, $this->cache_group );
-
- // Value exists in cache
- } else {
- $item_ids = $cache_value['item_ids'];
- $this->found_items = intval( $cache_value['found_items'] );
- }
-
- // Pagination
- if ( ! empty( $this->found_items ) && ! empty( $this->query_vars['number'] ) ) {
- $this->max_num_pages = ceil( $this->found_items / $this->query_vars['number'] );
- }
-
- // Cast to int if not grouping counts
- if ( ! empty( $this->query_vars['count'] ) && empty( $this->query_vars['groupby'] ) ) {
- $item_ids = intval( $item_ids );
- }
-
- // Set items from IDs
- $this->set_items( $item_ids );
-
- // Return array of items
- return $this->items;
- }
-
- /**
- * Used internally to get a list of item IDs matching the query vars.
- *
- * @since 1.0.0
- *
- * @return int|array A single count of item IDs if a count query. An array of item IDs if a full query.
- */
- protected function get_item_ids() {
-
- // Setup primary column, and parse the where clause
- $this->parse_where();
-
- // Order & Order By
- $order = $this->parse_order( $this->query_vars['order'] );
- $orderby = $this->get_order_by( $order );
-
- // Limit & Offset
- $limit = absint( $this->query_vars['number'] );
- $offset = absint( $this->query_vars['offset'] );
-
- // Limits
- if ( ! empty( $limit ) ) {
- $limits = ! empty( $offset )
- ? "LIMIT {$offset}, {$limit}"
- : "LIMIT {$limit}";
- } else {
- $limits = '';
- }
-
- // Where & Join
- $where = implode( ' AND ', $this->query_clauses['where'] );
- $join = implode( ', ', $this->query_clauses['join'] );
-
- // Group by
- $groupby = $this->parse_groupby( $this->query_vars['groupby'] );
-
- // Fields
- $fields = $this->parse_fields( $this->query_vars['fields'] );
-
- // Setup the query array (compact() is too opaque here)
- $query = array(
- 'fields' => $fields,
- 'join' => $join,
- 'where' => $where,
- 'orderby' => $orderby,
- 'limits' => $limits,
- 'groupby' => $groupby
- );
-
- /**
- * Filters the item query clauses.
- *
- * @since 1.0.0
- *
- * @param array $pieces A compacted array of item query clauses.
- * @param Query &$this Current instance passed by reference.
- */
- $clauses = (array) apply_filters_ref_array( $this->apply_prefix( "{$this->item_name_plural}_query_clauses" ), array( $query, &$this ) );
-
- // Setup request
- $this->set_request_clauses( $clauses );
- $this->set_request();
-
- // Return count
- if ( ! empty( $this->query_vars['count'] ) ) {
-
- // Get vars or results
- $retval = empty( $this->query_vars['groupby'] )
- ? $this->get_db()->get_var( $this->request )
- : $this->get_db()->get_results( $this->request, ARRAY_A );
-
- // Return vars or results
- return $retval;
- }
-
- // Get IDs
- $item_ids = $this->get_db()->get_col( $this->request );
-
- // Return parsed IDs
- return wp_parse_id_list( $item_ids );
- }
-
- /**
- * Get the ORDERBY clause.
- *
- * @since 1.0.0
- *
- * @param string $order
- * @return string
- */
- protected function get_order_by( $order = '' ) {
-
- // Default orderby primary column
- $orderby = "{$this->parse_orderby()} {$order}";
-
- // Disable ORDER BY if counting, or: 'none', an empty array, or false.
- if ( ! empty( $this->query_vars['count'] ) || in_array( $this->query_vars['orderby'], array( 'none', array(), false ), true ) ) {
- $orderby = '';
-
- // Ordering by something, so figure it out
- } elseif ( ! empty( $this->query_vars['orderby'] ) ) {
-
- // Array of keys, or comma separated
- $ordersby = is_array( $this->query_vars['orderby'] )
- ? $this->query_vars['orderby']
- : preg_split( '/[,\s]/', $this->query_vars['orderby'] );
-
- $orderby_array = array();
- $possible_ins = $this->get_columns( array( 'in' => true ), 'and', 'name' );
- $sortables = $this->get_columns( array( 'sortable' => true ), 'and', 'name' );
-
- // Loop through possible order by's
- foreach ( $ordersby as $_key => $_value ) {
-
- // Skip if empty
- if ( empty( $_value ) ) {
- continue;
- }
-
- // Key is numeric
- if ( is_int( $_key ) ) {
- $_orderby = $_value;
- $_item = $order;
-
- // Key is string
- } else {
- $_orderby = $_key;
- $_item = $_value;
- }
-
- // Skip if not sortable
- if ( ! in_array( $_value, $sortables, true ) ) {
- continue;
- }
-
- // Parse orderby
- $parsed = $this->parse_orderby( $_orderby );
-
- // Skip if empty
- if ( empty( $parsed ) ) {
- continue;
- }
-
- // Set if __in
- if ( in_array( $_orderby, $possible_ins, true ) ) {
- $orderby_array[] = "{$parsed} {$order}";
- continue;
- }
-
- // Append parsed orderby to array
- $orderby_array[] = $parsed . ' ' . $this->parse_order( $_item );
- }
-
- // Only set if valid orderby
- if ( ! empty( $orderby_array ) ) {
- $orderby = implode( ', ', $orderby_array );
- }
- }
-
- // Return parsed orderby
- return $orderby;
- }
-
- /**
- * Used internally to generate an SQL string for searching across multiple columns.
- *
- * @since 1.0.0
- *
- * @param string $string Search string.
- * @param array $columns Columns to search.
- * @return string Search SQL.
- */
- protected function get_search_sql( $string = '', $columns = array() ) {
-
- // Array or String
- $like = ( false !== strpos( $string, '*' ) )
- ? '%' . implode( '%', array_map( array( $this->get_db(), 'esc_like' ), explode( '*', $string ) ) ) . '%'
- : '%' . $this->get_db()->esc_like( $string ) . '%';
-
- // Default array
- $searches = array();
-
- // Build search SQL
- foreach ( $columns as $column ) {
- $searches[] = $this->get_db()->prepare( "{$column} LIKE %s", $like );
- }
-
- // Return the clause
- return '(' . implode( ' OR ', $searches ) . ')';
- }
-
- /** Private Parsers *******************************************************/
-
- /**
- * Parses arguments passed to the item query with default query parameters.
- *
- * @since 1.0.0
- *
- * @see Query::__construct()
- *
- * @param string|array $query Array or string of Query arguments.
- */
- private function parse_query( $query = array() ) {
-
- // Setup the query_vars_original var
- $this->query_var_originals = wp_parse_args( $query );
-
- // Setup the query_vars parsed var
- $this->query_vars = wp_parse_args(
- $this->query_var_originals,
- $this->query_var_defaults
- );
-
- /**
- * Fires after the item query vars have been parsed.
- *
- * @since 1.0.0
- *
- * @param Query &$this The Query instance (passed by reference).
- */
- do_action_ref_array( $this->apply_prefix( "parse_{$this->item_name_plural}_query" ), array( &$this ) );
- }
-
- /**
- * Parse the where clauses for all known columns
- *
- * @since 1.0.0
- */
- private function parse_where() {
-
- // Defaults
- $where = $join = $searchable = $date_query = array();
-
- // Loop through columns
- foreach ( $this->columns as $column ) {
-
- // Maybe add name to searchable array
- if ( true === $column->searchable ) {
- $searchable[] = $column->name;
- }
-
- // Literal column comparison
- if ( ! $this->is_query_var_default( $column->name ) ) {
-
- // Array (unprepared)
- if ( is_array( $this->query_vars[ $column->name ] ) ) {
- $where_id = "'" . implode( "', '", $this->get_db()->_escape( $this->query_vars[ $column->name ] ) ) . "'";
- $statement = "{$this->table_alias}.{$column->name} IN ({$where_id})";
-
- // Add to where array
- $where[ $column->name ] = $statement;
-
- // Numeric/String/Float (prepared)
- } else {
- $pattern = $this->get_column_field( array( 'name' => $column->name ), 'pattern', '%s' );
- $where_id = $this->query_vars[ $column->name ];
- $statement = "{$this->table_alias}.{$column->name} = {$pattern}";
-
- // Add to where array
- $where[ $column->name ] = $this->get_db()->prepare( $statement, $where_id );
- }
- }
-
- // __in
- if ( true === $column->in ) {
- $where_id = "{$column->name}__in";
-
- // Parse item for an IN clause.
- if ( isset( $this->query_vars[ $where_id ] ) && is_array( $this->query_vars[ $where_id ] ) ) {
-
- // Convert single item arrays to literal column comparisons
- if ( 1 === count( $this->query_vars[ $where_id ] ) ) {
- $column_value = reset( $this->query_vars[ $where_id ] );
- $statement = "{$this->table_alias}.{$column->name} = %s";
-
- $where[ $column->name ] = $this->get_db()->prepare( $statement, $column_value );
-
- // Implode
- } else {
- $where[ $where_id ] = "{$this->table_alias}.{$column->name} IN ( '" . implode( "', '", $this->get_db()->_escape( $this->query_vars[ $where_id ] ) ) . "' )";
- }
- }
- }
-
- // __not_in
- if ( true === $column->not_in ) {
- $where_id = "{$column->name}__not_in";
-
- // Parse item for a NOT IN clause.
- if ( isset( $this->query_vars[ $where_id ] ) && is_array( $this->query_vars[ $where_id ] ) ) {
-
- // Convert single item arrays to literal column comparisons
- if ( 1 === count( $this->query_vars[ $where_id ] ) ) {
- $column_value = reset( $this->query_vars[ $where_id ] );
- $statement = "{$this->table_alias}.{$column->name} != %s";
-
- $where[ $column->name ] = $this->get_db()->prepare( $statement, $column_value );
-
- // Implode
- } else {
- $where[ $where_id ] = "{$this->table_alias}.{$column->name} NOT IN ( '" . implode( "', '", $this->get_db()->_escape( $this->query_vars[ $where_id ] ) ) . "' )";
- }
- }
- }
-
- // date_query
- if ( true === $column->date_query ) {
- $where_id = "{$column->name}_query";
- $column_date = $this->query_vars[ $where_id ];
-
- // Parse item
- if ( ! empty( $column_date ) ) {
-
- // Default arguments
- $defaults = array(
- 'column' => "{$this->table_alias}.{$column->name}",
- 'before' => $column_date,
- 'inclusive' => true
- );
-
- // Default date query
- if ( is_string( $column_date ) ) {
- $date_query[] = $defaults;
-
- // Array query var
- } elseif ( is_array( $column_date ) ) {
-
- // Auto-fill column if empty
- if ( empty( $column_date['column'] ) ) {
- $column_date['column'] = $defaults['column'];
- }
-
- // Add clause to date query
- $date_query[] = $column_date;
- }
- }
- }
- }
-
- // Maybe search if columns are searchable.
- if ( ! empty( $searchable ) && strlen( $this->query_vars['search'] ) ) {
- $search_columns = array();
-
- // Intersect against known searchable columns
- if ( ! empty( $this->query_vars['search_columns'] ) ) {
- $search_columns = array_intersect(
- $this->query_vars['search_columns'],
- $searchable
- );
- }
-
- // Default to all searchable columns
- if ( empty( $search_columns ) ) {
- $search_columns = $searchable;
- }
-
- /**
- * Filters the columns to search in a Query search.
- *
- * @since 1.0.0
- *
- * @param array $search_columns Array of column names to be searched.
- * @param string $search Text being searched.
- * @param object $this The current Query instance.
- */
- $search_columns = (array) apply_filters( $this->apply_prefix( "{$this->item_name_plural}_search_columns" ), $search_columns, $this->query_vars['search'], $this );
-
- // Add search query clause
- $where['search'] = $this->get_search_sql( $this->query_vars['search'], $search_columns );
- }
-
- // Get the primary column & table
- $primary = $this->get_primary_column_name();
- $table = $this->get_meta_type();
- $and = '/^\s*AND\s*/';
-
- // Maybe perform a meta query.
- $meta_query = $this->query_vars['meta_query'];
- if ( ! empty( $meta_query ) && is_array( $meta_query ) ) {
- $this->meta_query = $this->get_meta_query( $meta_query );
- $clauses = $this->meta_query->get_sql( $table, $this->table_alias, $primary, $this );
-
- // Not all objects have meta, so make sure this one exists
- if ( false !== $clauses ) {
-
- // Set join
- if ( ! empty( $clauses['join'] ) ) {
- $join['meta_query'] = $clauses['join'];
- }
-
- // Remove " AND " from meta_query query where clause
- if ( ! empty( $clauses['where'] ) ) {
- $where['meta_query'] = preg_replace( $and, '', $clauses['where'] );
- }
- }
- }
-
- // Maybe perform a compare query.
- $compare_query = $this->query_vars['compare_query'];
- if ( ! empty( $compare_query ) && is_array( $compare_query ) ) {
- $this->compare_query = $this->get_compare_query( $compare_query );
- $clauses = $this->compare_query->get_sql( $table, $this->table_alias, $primary, $this );
-
- // Not all objects can compare, so make sure this one exists
- if ( false !== $clauses ) {
-
- // Set join
- if ( ! empty( $clauses['join'] ) ) {
- $join['compare_query'] = $clauses['join'];
- }
-
- // Remove " AND " from query where clause.
- $where['compare_query'] = preg_replace( $and, '', $clauses['where'] );
- }
- }
-
- // Only do a date query with an array
- $date_query = ! empty( $date_query )
- ? $date_query
- : $this->query_vars['date_query'];
-
- // Maybe perform a date query
- if ( ! empty( $date_query ) && is_array( $date_query ) ) {
- $this->date_query = $this->get_date_query( $date_query );
- $clauses = $this->date_query->get_sql( $this->table_name, $this->table_alias, $primary, $this );
-
- // Not all objects are dates, so make sure this one exists
- if ( false !== $clauses ) {
-
- // Set join
- if ( ! empty( $clauses['join'] ) ) {
- $join['date_query'] = $clauses['join'];
- }
-
- // Remove " AND " from query where clause.
- $where['date_query'] = preg_replace( $and, '', $clauses['where'] );
- }
- }
-
- // Set where and join clauses
- $this->query_clauses['where'] = $where;
- $this->query_clauses['join'] = $join;
- }
-
- /**
- * Parse which fields to query for
- *
- * @since 1.0.0
- *
- * @param string $fields
- * @param bool $alias
- * @return string
- */
- private function parse_fields( $fields = '', $alias = true ) {
-
- // Default return value
- $primary = $this->get_primary_column_name();
- $retval = ( true === $alias )
- ? "{$this->table_alias}.{$primary}"
- : $primary;
-
- // No fields
- if ( empty( $fields ) && ! empty( $this->query_vars['count'] ) ) {
-
- // Possible fields to group by
- $groupby_names = $this->parse_groupby( $this->query_vars['groupby'], $alias );
- $groupby_names = ! empty( $groupby_names )
- ? "{$groupby_names}"
- : '';
-
- // Group by or total count
- $retval = ! empty( $groupby_names )
- ? "{$groupby_names}, COUNT(*) as count"
- : 'COUNT(*)';
- }
-
- // Return fields (or COUNT)
- return $retval;
- }
-
- /**
- * Parses and sanitizes the 'groupby' keys passed into the item query
- *
- * @since 1.0.0
- *
- * @param string $groupby
- * @param bool $alias
- * @return string
- */
- private function parse_groupby( $groupby = '', $alias = true ) {
-
- // Bail if empty
- if ( empty( $groupby ) ) {
- return '';
- }
-
- // Sanitize groupby columns
- $groupby = (array) array_map( 'sanitize_key', (array) $groupby );
-
- // Re'flip column names back around
- $columns = array_flip( $this->get_column_names() );
-
- // Get the intersection of allowed column names to groupby columns
- $intersect = array_intersect( $columns, $groupby );
-
- // Bail if invalid column
- if ( empty( $intersect ) ) {
- return '';
- }
-
- // Default return value
- $retval = array();
-
- // Maybe prepend table alias to key
- foreach ( $intersect as $key ) {
- $retval[] = ( true === $alias )
- ? "{$this->table_alias}.{$key}"
- : $key;
- }
-
- // Separate sanitized columns
- return implode( ',', array_values( $retval ) );
- }
-
- /**
- * Parses and sanitizes 'orderby' keys passed to the item query.
- *
- * @since 1.0.0
- *
- * @param string $orderby Field for the items to be ordered by.
- * @return string|false Value to used in the ORDER clause. False otherwise.
- */
- private function parse_orderby( $orderby = 'id' ) {
-
- // Default value
- $parsed = "{$this->table_alias}.{$this->get_primary_column_name()}";
-
- // __in
- if ( false !== strstr( $orderby, '__in' ) ) {
- $column_name = str_replace( '__in', '', $orderby );
- $column = $this->get_column_by( array( 'name' => $column_name ) );
- $item_in = $column->is_numeric()
- ? implode( ',', array_map( 'absint', $this->query_vars[ $orderby ] ) )
- : implode( ',', $this->query_vars[ $orderby ] );
-
- $parsed = "FIELD( {$this->table_alias}.{$column->name}, {$item_in} )";
-
- // Specific column
- } else {
-
- // Orderby is a literal, sortable column name
- $sortables = $this->get_columns( array( 'sortable' => true ), 'and', 'name' );
- if ( in_array( $orderby, $sortables, true ) ) {
- $parsed = "{$this->table_alias}.{$orderby}";
- }
- }
-
- // Return parsed value
- return $parsed;
- }
-
- /**
- * Parses an 'order' query variable and cast it to 'ASC' or 'DESC' as necessary.
- *
- * @since 1.0.0
- *
- * @param string $order The 'order' query variable.
- * @return string The sanitized 'order' query variable.
- */
- private function parse_order( $order = '' ) {
-
- // Bail if malformed
- if ( empty( $order ) || ! is_string( $order ) ) {
- return 'DESC';
- }
-
- // Ascending or Descending
- return ( 'ASC' === strtoupper( $order ) )
- ? 'ASC'
- : 'DESC';
- }
-
- /** Private Shapers *******************************************************/
-
- /**
- * Shape items into their most relevant objects.
- *
- * This will try to use item_shape, but will fallback to a private
- * method for querying and caching items.
- *
- * If using the `fields` parameter, results will have unique shapes based on
- * exactly what was requested.
- *
- * @since 1.0.0
- *
- * @param array $items
- * @return array
- */
- private function shape_items( $items = array() ) {
-
- // Force to stdClass if querying for fields
- if ( ! empty( $this->query_vars['fields'] ) ) {
- $this->item_shape = 'stdClass';
- }
-
- // Default return value
- $retval = array();
-
- // Use foreach because it's faster than array_map()
- if ( ! empty( $items ) ) {
- foreach ( $items as $item ) {
- $retval[] = $this->get_item( $item );
- }
- }
-
- /**
- * Filters the object query results.
- *
- * Looks like `edd_get_customers`
- *
- * @since 1.0.0
- *
- * @param array $retval An array of items.
- * @param object &$this Current instance of Query, passed by reference.
- */
- $retval = (array) apply_filters_ref_array( $this->apply_prefix( "the_{$this->item_name_plural}" ), array( $retval, &$this ) );
-
- // Return filtered results
- return ! empty( $this->query_vars['fields'] )
- ? $this->get_item_fields( $retval )
- : $retval;
- }
-
- /**
- * Get specific item fields based on query_vars['fields'].
- *
- * @since 1.0.0
- *
- * @param array $items
- * @return array
- */
- private function get_item_fields( $items = array() ) {
-
- // Get the primary column
- $primary = $this->get_primary_column_name();
- $fields = $this->query_vars['fields'];
-
- // Strings need to be single columns
- if ( is_string( $fields ) ) {
- $field = sanitize_key( $fields );
- $items = ( 'ids' === $fields )
- ? wp_list_pluck( $items, $primary )
- : wp_list_pluck( $items, $field, $primary );
-
- // Arrays could be anything
- } elseif ( is_array( $fields ) ) {
- $new_items = array();
- $fields = array_flip( $fields );
-
- // Loop through items and pluck out the fields
- foreach ( $items as $item_id => $item ) {
- $new_items[ $item_id ] = (object) array_intersect_key( (array) $item, $fields );
- }
-
- // Set the items and unset the new items
- $items = $new_items;
- unset( $new_items );
- }
-
- // Return the item, possibly reduced
- return $items;
- }
-
- /**
- * Shape an item ID from an object, array, or numeric value
- *
- * @since 1.0.0
- *
- * @param mixed $item
- * @return int
- */
- private function shape_item_id( $item = 0 ) {
-
- // Default return value
- $retval = 0;
-
- // Get the primary column name
- $primary = $this->get_primary_column_name();
-
- // Numeric item ID
- if ( is_numeric( $item ) ) {
- $retval = $item;
-
- // Object item
- } elseif ( is_object( $item ) && isset( $item->{$primary} ) ) {
- $retval = $item->{$primary};
-
- // Array item
- } elseif ( is_array( $item ) && isset( $item[ $primary ] ) ) {
- $retval = $item[ $primary ];
- }
-
- // Return the item ID
- return absint( $retval );
- }
-
- /** Queries ***************************************************************/
-
- /**
- * Get a single database row by the primary column ID, possibly from cache.
- *
- * Accepts an integer, object, or array, and attempts to get the ID from it,
- * then attempts to retrieve that item fresh from the database or cache.
- *
- * @since 1.0.0
- *
- * @param int|array|object $item_id The ID of the item
- * @return object|false False if empty/error, Object if successful
- */
- public function get_item( $item_id = 0 ) {
-
- // Shape the item ID
- $item_id = $this->shape_item_id( $item_id );
-
- // Bail if no item to get by
- if ( empty( $item_id ) ) {
- return false;
- }
-
- // Get the primary column name
- $column_name = $this->get_primary_column_name();
-
- // Get item by ID
- return $this->get_item_by( $column_name, $item_id );
- }
-
- /**
- * Get a single database row by any column and value, possibly from cache.
- *
- * Take care to only use this method on columns with unique values,
- * preferably with a cache group for that column. See: get_item().
- *
- * @since 1.0.0
- *
- * @param string $column_name Name of database column
- * @param int|string $column_value Value to query for
- * @return object|false False if empty/error, Object if successful
- */
- public function get_item_by( $column_name = '', $column_value = '' ) {
-
- // Default return value
- $retval = false;
-
- // Bail if no key or value
- if ( empty( $column_name ) || empty( $column_value ) ) {
- return $retval;
- }
-
- // Bail if name is not a string
- if ( ! is_string( $column_name ) ) {
- return $retval;
- }
-
- // Bail if value is not scalar (null values also not allowed)
- if ( ! is_scalar( $column_value ) ) {
- return $retval;
- }
-
- // Get column names
- $columns = $this->get_column_names();
-
- // Bail if column does not exist
- if ( ! isset( $columns[ $column_name ] ) ) {
- return $retval;
- }
-
- // Cache groups
- $groups = $this->get_cache_groups();
-
- // Check cache
- if ( ! empty( $groups[ $column_name ] ) ) {
- $retval = $this->cache_get( $column_value, $groups[ $column_name ] );
- }
-
- // Item not cached
- if ( false === $retval ) {
-
- // Try to get item directly from DB
- $retval = $this->get_item_raw( $column_name, $column_value );
-
- // Bail on failure
- if ( ! $this->is_success( $retval ) ) {
- return false;
- }
-
- // Cache
- $this->update_item_cache( $retval );
- }
-
- // Reduce the item
- $retval = $this->reduce_item( 'select', $retval );
-
- // Return result
- return $this->shape_item( $retval );
- }
-
- /**
- * Add an item to the database
- *
- * @since 1.0.0
- *
- * @param array $data
- * @return false|int Returns the item ID on success; false on failure.
- */
- public function add_item( $data = array() ) {
-
- // Get primary column
- $primary = $this->get_primary_column_name();
-
- // If data includes primary column, check if item already exists
- if ( ! empty( $data[ $primary ] ) ) {
-
- // Shape the primary item ID
- $item_id = $this->shape_item_id( $data[ $primary ] );
-
- // Get item by ID (from database, not cache)
- $item = $this->get_item_raw( $primary, $item_id );
-
- // Bail if item already exists
- if ( ! empty( $item ) ) {
- return false;
- }
-
- // Set data primary ID to newly shaped ID
- $data[ $primary ] = $item_id;
- }
-
- // Get default values for item (from columns)
- $item = $this->default_item();
-
- // Unset the primary key if not part of data array (auto-incremented)
- if ( empty( $data[ $primary ] ) ) {
- unset( $item[ $primary ] );
- }
-
- // Cut out non-keys for meta
- $columns = $this->get_column_names();
- $data = array_merge( $item, $data );
- $meta = array_diff_key( $data, $columns );
- $save = array_intersect_key( $data, $columns );
-
- // Get the current time (maybe used by created/modified)
- $time = $this->get_current_time();
-
- // If date-created exists, but is empty or default, use the current time
- $created = $this->get_column_by( array( 'created' => true ) );
- if ( ! empty( $created ) && ( empty( $save[ $created->name ] ) || ( $save[ $created->name ] === $created->default ) ) ) {
- $save[ $created->name ] = $time;
- }
-
- // If date-modified exists, but is empty or default, use the current time
- $modified = $this->get_column_by( array( 'modified' => true ) );
- if ( ! empty( $modified ) && ( empty( $save[ $modified->name ] ) || ( $save[ $modified->name ] === $modified->default ) ) ) {
- $save[ $modified->name ] = $time;
- }
-
- // Try to add
- $table = $this->get_table_name();
- $reduce = $this->reduce_item( 'insert', $save );
- $save = $this->validate_item( $reduce );
- $result = ! empty( $save )
- ? $this->get_db()->insert( $table, $save )
- : false;
-
- // Bail on failure
- if ( ! $this->is_success( $result ) ) {
- return false;
- }
-
- // Get the new item ID
- $item_id = $this->get_db()->insert_id;
-
- // Maybe save meta keys
- if ( ! empty( $meta ) ) {
- $this->save_extra_item_meta( $item_id, $meta );
- }
-
- // Use get item to prime caches
- $this->update_item_cache( $item_id );
-
- // Transition item data
- $this->transition_item( $save, $item_id );
-
- /**
- * Adds a hook for a successfully added item.
- * Custom for EDD.
- *
- * @since 3.1.1.4
- * @param int $item_id The item id.
- * @param array $data The array of data for the update.
- */
- do_action( $this->apply_prefix( "{$this->item_name}_added" ), $item_id, $data );
-
- // Return result
- return $item_id;
- }
-
- /**
- * Update an item in the database
- *
- * @since 1.0.0
- *
- * @param int $item_id
- * @param array $data
- * @return bool
- */
- public function update_item( $item_id = 0, $data = array() ) {
-
- // Bail if no item ID
- $item_id = $this->shape_item_id( $item_id );
- if ( empty( $item_id ) ) {
- return false;
- }
-
- // Get primary column
- $primary = $this->get_primary_column_name();
-
- // Get item to update (from database, not cache)
- $item_raw = $this->get_item_raw( $primary, $item_id );
-
- // Bail if item does not exist to update
- if ( empty( $item_raw ) ) {
- return false;
- }
-
- // Cast as an array for easier manipulation
- $item = (array) $item_raw;
-
- // Unset the primary key from data to parse
- unset( $data[ $primary ] );
-
- // Splice new data into item, and cut out non-keys for meta
- $columns = $this->get_column_names();
- $data = array_merge( $item, $data );
- $meta = array_diff_key( $data, $columns );
- $save = array_intersect_key( $data, $columns );
-
- // Maybe save meta keys
- if ( ! empty( $meta ) ) {
- $this->save_extra_item_meta( $item_id, $meta );
- }
-
- // Bail if no change
- if ( (array) $save === (array) $item ) {
- return true;
- }
-
- // Unset the primary key from data to save
- unset( $save[ $primary ] );
-
- // If date-modified is empty, use the current time
- $modified = $this->get_column_by( array( 'modified' => true ) );
- if ( ! empty( $modified ) ) {
- $save[ $modified->name ] = $this->get_current_time();
- }
-
- // Try to update
- $where = array( $primary => $item_id );
- $table = $this->get_table_name();
- $reduce = $this->reduce_item( 'update', $save );
- $save = $this->validate_item( $reduce );
- $result = ! empty( $save )
- ? $this->get_db()->update( $table, $save, $where )
- : false;
-
- // Bail on failure
- if ( ! $this->is_success( $result ) ) {
- return false;
- }
-
- // Use get item to prime caches
- $this->update_item_cache( $item_id );
-
- // Transition item data
- $this->transition_item( $save, $item );
-
- /**
- * Adds a hook for a successfully updated item.
- * Custom for EDD.
- *
- * @since 3.1.1.4
- * @param int $item_id The item id.
- * @param array $data The array of data for the update.
- * @param object $item_raw The original item.
- */
- do_action( $this->apply_prefix( "{$this->item_name}_updated" ), $item_id, $data, $item_raw );
-
- // Return result
- return $result;
- }
-
- /**
- * Delete an item from the database
- *
- * @since 1.0.0
- *
- * @param int $item_id
- * @return bool
- */
- public function delete_item( $item_id = 0 ) {
-
- // Bail if no item ID
- $item_id = $this->shape_item_id( $item_id );
- if ( empty( $item_id ) ) {
- return false;
- }
-
- // Get vars
- $primary = $this->get_primary_column_name();
-
- // Get item (before it's deleted)
- $item = $this->get_item_raw( $primary, $item_id );
-
- // Bail if item does not exist to delete
- if ( empty( $item ) ) {
- return false;
- }
-
- // Attempt to reduce this item
- $item = $this->reduce_item( 'delete', $item );
-
- // Bail if item was reduced to nothing
- if ( empty( $item ) ) {
- return false;
- }
-
- // Try to delete
- $table = $this->get_table_name();
- $where = array( $primary => $item_id );
- $result = $this->get_db()->delete( $table, $where );
-
- // Bail on failure
- if ( ! $this->is_success( $result ) ) {
- return false;
- }
-
- // Clean caches on successful delete
- $this->delete_all_item_meta( $item_id );
- $this->clean_item_cache( $item );
-
- /**
- * Adds a hook for a successfully deleted item.
- * Custom for EDD.
- *
- * @since 3.1.1.4
- * @param int $item_id The item id.
- */
- do_action( $this->apply_prefix( "{$this->item_name}_deleted" ), $item_id );
-
- // Return result
- return $result;
- }
-
- /**
- * Filter an item before it is inserted of updated in the database.
- *
- * This method is public to allow subclasses to perform JIT manipulation
- * of the parameters passed into it.
- *
- * @since 1.0.0
- *
- * @param array $item
- * @return array
- */
- public function filter_item( $item = array() ) {
- return (array) apply_filters_ref_array( $this->apply_prefix( "filter_{$this->item_name}_item" ), array( $item, &$this ) );
- }
-
- /**
- * Shape an item from the database into the type of object it always wanted
- * to be when it grew up.
- *
- * @since 1.0.0
- *
- * @param mixed ID of item, or row from database
- * @return mixed False on error, Object of single-object class type on success
- */
- private function shape_item( $item = 0 ) {
-
- // Get the item from an ID
- if ( is_numeric( $item ) ) {
- $item = $this->get_item( $item );
- }
-
- // Return the item if it's already shaped
- if ( $item instanceof $this->item_shape ) {
- return $item;
- }
-
- // Shape the item as needed
- $item = ! empty( $this->item_shape )
- ? new $this->item_shape( $item )
- : (object) $item;
-
- // Return the item object
- return $item;
- }
-
- /**
- * Validate an item before it is updated in or added to the database.
- *
- * @since 1.0.0
- *
- * @param array $item
- * @return array|false False on error, Array of validated values on success
- */
- private function validate_item( $item = array() ) {
-
- // Bail if item is empty or not an array
- if ( empty( $item ) || ! is_array( $item ) ) {
- return $item;
- }
-
- // Loop through item attributes
- foreach ( $item as $key => $value ) {
-
- // Strip slashes from all strings
- if ( is_string( $value ) ) {
- $value = stripslashes( $value );
- }
-
- // Get column
- $column = $this->get_column_by( array( 'name' => $key ) );
-
- // Null value is special for all item keys
- if ( is_null( $value ) ) {
-
- // Bail if null is not allowed
- if ( false === $column->allow_null ) {
- return false;
- }
-
- // Attempt to validate
- } elseif ( ! empty( $column->validate ) && is_callable( $column->validate ) ) {
- $validated = call_user_func( $column->validate, $value );
-
- // Bail if error
- if ( is_wp_error( $validated ) ) {
- return false;
- }
-
- // Update the value
- $item[ $key ] = $validated;
-
- /**
- * Fallback to using the raw value.
- *
- * Note: This may change at a later date, so do not rely on this.
- * Please always validate all data.
- */
- } else {
- $item[ $key ] = $value;
- }
- }
-
- // Return the validated item
- return $this->filter_item( $item );
- }
-
- /**
- * Reduce an item down to the keys and values the current user has the
- * appropriate capabilities to select|insert|update|delete.
- *
- * Note that internally, this method works with both arrays and objects of
- * any type, and also resets the key values. It looks weird, but is
- * currently by design to protect the integrity of the return value.
- *
- * @since 1.0.0
- *
- * @param string $method select|insert|update|delete
- * @param array|object $item Object|Array of keys/values to reduce
- *
- * @return mixed Object|Array without keys the current user does not have caps for
- */
- private function reduce_item( $method = 'update', $item = array() ) {
-
- // Bail if item is empty
- if ( empty( $item ) ) {
- return $item;
- }
-
- // Loop through item attributes
- foreach ( $item as $key => $value ) {
-
- // Get callback for column
- $caps = $this->get_column_field( array( 'name' => $key ), 'caps' );
-
- // Unset if not explicitly allowed
- if ( empty( $caps[ $method ] ) || ! current_user_can( $caps[ $method ] ) ) {
- if ( is_array( $item ) ) {
- unset( $item[ $key ] );
- } elseif ( is_object( $item ) ) {
- $item->{$key} = null;
- }
-
- // Set if explicitly allowed
- } elseif ( is_array( $item ) ) {
- $item[ $key ] = $value;
- } elseif ( is_object( $item ) ) {
- $item->{$key} = $value;
- }
- }
-
- // Return the reduced item
- return $item;
- }
-
- /**
- * Return an item comprised of all default values
- *
- * This is used by `add_item()` to populate known default values, to ensure
- * new item data is always what we expect it to be.
- *
- * @since 1.0.0
- *
- * @return array
- */
- private function default_item() {
-
- // Default return value
- $retval = array();
-
- // Get column names and defaults
- $names = $this->get_columns( array(), 'and', 'name' );
- $defaults = $this->get_columns( array(), 'and', 'default' );
-
- // Put together an item using default values
- foreach ( $names as $key => $name ) {
- $retval[ $name ] = $defaults[ $key ];
- }
-
- // Return
- return $retval;
- }
-
- /**
- * Transition an item when adding or updating.
- *
- * This method takes the data being saved, looks for any columns that are
- * known to transition between values, and fires actions on them.
- *
- * @since 1.0.0
- *
- * @param array $item
- * @return array
- */
- private function transition_item( $new_data = array(), $old_data = array() ) {
-
- // Look for transition columns
- $columns = $this->get_columns( array( 'transition' => true ), 'and', 'name' );
-
- // Bail if no columns to transition
- if ( empty( $columns ) ) {
- return;
- }
-
- // Get the item ID
- $item_id = $this->shape_item_id( $old_data );
-
- // Bail if item ID cannot be retrieved
- if ( empty( $item_id ) ) {
- return;
- }
-
- // If no old value(s), it's new
- if ( ! is_array( $old_data ) ) {
- $old_data = $new_data;
-
- // Set all old values to "new"
- foreach ( $old_data as $key => $value ) {
- $value = 'new';
- $old_data[ $key ] = $value;
- }
- }
-
- // Compare
- $keys = array_flip( $columns );
- $new = array_intersect_key( $new_data, $keys );
- $old = array_intersect_key( $old_data, $keys );
-
- // Get the difference
- $diff = array_diff( $new, $old );
-
- // Bail if nothing is changing
- if ( empty( $diff ) ) {
- return;
- }
-
- // Do the actions
- foreach ( $diff as $key => $value ) {
- $old_value = $old_data[ $key ];
- $new_value = $new_data[ $key ];
- $key_action = $this->apply_prefix( "transition_{$this->item_name}_{$key}" );
-
- /**
- * Fires after an object value has transitioned.
- *
- * @since 1.0.0
- *
- * @param mixed $old_value The value being transitioned FROM.
- * @param mixed $new_value The value being transitioned TO.
- * @param int $item_id The ID of the item that is transitioning.
- */
- do_action( $key_action, $old_value, $new_value, $item_id );
- }
- }
-
- /** Meta ******************************************************************/
-
- /**
- * Add meta data to an item
- *
- * @since 1.0.0
- *
- * @param int $item_id
- * @param string $meta_key
- * @param string $meta_value
- * @param string $unique
- * @return int|false The meta ID on success, false on failure.
- */
- protected function add_item_meta( $item_id = 0, $meta_key = '', $meta_value = '', $unique = false ) {
-
- // Bail if no meta was returned
- $item_id = $this->shape_item_id( $item_id );
- if ( empty( $item_id ) || empty( $meta_key ) ) {
- return false;
- }
-
- // Bail if no meta table exists
- if ( false === $this->get_meta_table_name() ) {
- return false;
- }
-
- // Return results of get meta data
- return add_metadata( $table, $item_id, $meta_key, $meta_value, $unique );
- }
-
- /**
- * Get meta data for an item
- *
- * @since 1.0.0
- *
- * @param int $item_id
- * @param string $meta_key
- * @param bool $single
- * @return mixed Single metadata value, or array of values
- */
- protected function get_item_meta( $item_id = 0, $meta_key = '', $single = false ) {
-
- // Bail if no meta was returned
- $item_id = $this->shape_item_id( $item_id );
- if ( empty( $item_id ) || empty( $meta_key ) ) {
- return false;
- }
-
- // Bail if no meta table exists
- if ( false === $this->get_meta_table_name() ) {
- return false;
- }
-
- // Get meta type
- $meta_type = $this->get_meta_type();
-
- // Return results of getting meta data
- return get_metadata( $meta_type, $item_id, $meta_key, $single );
- }
-
- /**
- * Update meta data for an item
- *
- * @since 1.0.0
- *
- * @param int $item_id
- * @param string $meta_key
- * @param string $meta_value
- * @param string $prev_value
- * @return bool True on successful update, false on failure.
- */
- protected function update_item_meta( $item_id = 0, $meta_key = '', $meta_value = '', $prev_value = '' ) {
-
- // Bail if no meta was returned
- $item_id = $this->shape_item_id( $item_id );
- if ( empty( $item_id ) || empty( $meta_key ) ) {
- return false;
- }
-
- // Bail if no meta table exists
- if ( false === $this->get_meta_table_name() ) {
- return false;
- }
-
- // Get meta type
- $meta_type = $this->get_meta_type();
-
- // Return results of updating meta data
- return update_metadata( $meta_type, $item_id, $meta_key, $meta_value, $prev_value );
- }
-
- /**
- * Delete meta data for an item
- *
- * @since 1.0.0
- *
- * @param int $item_id
- * @param string $meta_key
- * @param string $meta_value
- * @param string $delete_all
- * @return bool True on successful delete, false on failure.
- */
- protected function delete_item_meta( $item_id = 0, $meta_key = '', $meta_value = '', $delete_all = false ) {
-
- // Bail if no meta was returned
- $item_id = $this->shape_item_id( $item_id );
- if ( empty( $item_id ) || empty( $meta_key ) ) {
- return false;
- }
-
- // Bail if no meta table exists
- if ( false === $this->get_meta_table_name() ) {
- return false;
- }
-
- // Get meta type
- $meta_type = $this->get_meta_type();
-
- // Return results of deleting meta data
- return delete_metadata( $meta_type, $item_id, $meta_key, $meta_value, $delete_all );
- }
-
- /**
- * Get registered meta data keys
- *
- * @since 1.0.0
- *
- * @param string $object_subtype The sub-type of meta keys
- *
- * @return array
- */
- private function get_registered_meta_keys( $object_subtype = '' ) {
-
- // Get the object type
- $object_type = $this->get_meta_type();
-
- // Return the keys
- return get_registered_meta_keys( $object_type, $object_subtype );
- }
-
- /**
- * Maybe update meta values on item update/save
- *
- * @since 1.0.0
- *
- * @param array $meta
- */
- private function save_extra_item_meta( $item_id = 0, $meta = array() ) {
-
- // Bail if there is no bulk meta to save
- $item_id = $this->shape_item_id( $item_id );
- if ( empty( $item_id ) || empty( $meta ) ) {
- return;
- }
-
- // Bail if no meta table exists
- if ( false === $this->get_meta_table_name() ) {
- return;
- }
-
- // Only save registered keys
- $keys = $this->get_registered_meta_keys();
- $meta = array_intersect_key( $meta, $keys );
-
- // Bail if no registered meta keys
- if ( empty( $meta ) ) {
- return;
- }
-
- // Save or delete meta data
- foreach ( $meta as $key => $value ) {
- ! empty( $value )
- ? $this->update_item_meta( $item_id, $key, $value )
- : $this->delete_item_meta( $item_id, $key );
- }
- }
-
- /**
- * Delete all meta data for an item
- *
- * @since 1.0.0
- *
- * @param int $item_id
- */
- private function delete_all_item_meta( $item_id = 0 ) {
-
- // Bail if no meta was returned
- $item_id = $this->shape_item_id( $item_id );
- if ( empty( $item_id ) ) {
- return;
- }
-
- // Get the meta table name
- $table = $this->get_meta_table_name();
-
- // Bail if no meta table exists
- if ( empty( $table ) ) {
- return;
- }
-
- // Guess the item ID column for the meta table
- $primary_id = $this->get_primary_column_name();
- $item_id_column = $this->apply_prefix( "{$this->item_name}_{$primary_id}" );
-
- // Get meta IDs
- $query = "SELECT meta_id FROM {$table} WHERE {$item_id_column} = %d";
- $prepared = $this->get_db()->prepare( $query, $item_id );
- $meta_ids = $this->get_db()->get_col( $prepared );
-
- // Bail if no meta IDs to delete
- if ( empty( $meta_ids ) ) {
- return;
- }
-
- // Get the meta type
- $meta_type = $this->get_meta_type();
-
- // Delete all meta data for this item ID
- foreach ( $meta_ids as $mid ) {
- delete_metadata_by_mid( $meta_type, $mid );
- }
- }
-
- /**
- * Get the meta table for this query
- *
- * Forked from WordPress\_get_meta_table() so it can be more accurately
- * predicted in a future iteration and default to returning false.
- *
- * @since 1.0.0
- *
- * @return mixed Table name if exists, False if not
- */
- private function get_meta_table_name() {
-
- // Get the meta-type
- $type = $this->get_meta_type();
-
- // Append "meta" to end of meta-type
- $table_name = "{$type}meta";
-
- // Variable'ize the database interface, to use inside empty()
- $db = $this->get_db();
-
- // If not empty, return table name
- if ( ! empty( $db->{$table_name} ) ) {
- return $db->{$table_name};
- }
-
- // Default return false
- return false;
- }
-
- /**
- * Get the meta type for this query
- *
- * This method exists to reduce some duplication for now. Future iterations
- * will likely use Column::relationships to
- *
- * @since 1.1.0
- *
- * @return string
- */
- private function get_meta_type() {
- return $this->apply_prefix( $this->item_name );
- }
-
- /** Cache *****************************************************************/
-
- /**
- * Get cache key from query_vars and query_var_defaults.
- *
- * @since 1.0.0
- *
- * @return string
- */
- private function get_cache_key( $group = '' ) {
-
- // Slice query vars
- $slice = wp_array_slice_assoc( $this->query_vars, array_keys( $this->query_var_defaults ) );
-
- // Unset `fields` so it does not effect the cache key
- unset( $slice['fields'] );
-
- // Setup key & last_changed
- $key = md5( serialize( $slice ) );
- $last_changed = $this->get_last_changed_cache( $group );
-
- // Concatenate and return cache key
- return "get_{$this->item_name_plural}:{$key}:{$last_changed}";
- }
-
- /**
- * Get the cache group, or fallback to the primary one.
- *
- * @since 1.0.0
- *
- * @param string $group
- * @return string
- */
- private function get_cache_group( $group = '' ) {
-
- // Get the primary column
- $primary = $this->get_primary_column_name();
-
- // Default return value
- $retval = $this->cache_group;
-
- // Only allow non-primary groups
- if ( ! empty( $group ) && ( $group !== $primary ) ) {
- $retval = $group;
- }
-
- // Return the group
- return $retval;
- }
-
- /**
- * Get array of which database columns have uniquely cached groups
- *
- * @since 1.0.0
- *
- * @return array
- */
- private function get_cache_groups() {
-
- // Return value
- $cache_groups = array();
-
- // Get cache groups
- $groups = $this->get_columns( array( 'cache_key' => true ), 'and', 'name' );
-
- if ( ! empty( $groups ) ) {
-
- // Get the primary column
- $primary = $this->get_primary_column_name();
-
- // Setup return values
- foreach ( $groups as $name ) {
- if ( $primary !== $name ) {
- $cache_groups[ $name ] = "{$this->cache_group}-by-{$name}";
- } else {
- $cache_groups[ $name ] = $this->cache_group;
- }
- }
- }
-
- // Return cache groups array
- return $cache_groups;
- }
-
- /**
- * Maybe prime item & item-meta caches by querying 1 time for all un-cached
- * items.
- *
- * Accepts a single ID, or an array of IDs.
- *
- * The reason this accepts only IDs is because it gets called immediately
- * after an item is inserted in the database, but before items have been
- * "shaped" into proper objects, so object properties may not be set yet.
- *
- * @since 1.0.0
- *
- * @param array $item_ids
- * @param bool $force
- *
- * @return bool False if empty
- */
- private function prime_item_caches( $item_ids = array(), $force = false ) {
-
- // Bail if no items to cache
- if ( empty( $item_ids ) ) {
- return false;
- }
-
- // Accepts single values, so cast to array
- $item_ids = (array) $item_ids;
-
- // Update item caches
- if ( ! empty( $force ) || ! empty( $this->query_vars['update_item_cache'] ) ) {
-
- // Look for non-cached IDs
- $ids = $this->get_non_cached_ids( $item_ids, $this->cache_group );
-
- // Bail if IDs are cached
- if ( empty( $ids ) ) {
- return false;
- }
-
- // Query
- $table = $this->get_table_name();
- $primary = $this->get_primary_column_name();
- $query = "SELECT * FROM {$table} WHERE {$primary} IN (%s)";
- $ids = join( ',', array_map( 'absint', $ids ) );
- $prepare = sprintf( $query, $ids );
- $results = $this->get_db()->get_results( $prepare );
-
- // Update item caches
- $this->update_item_cache( $results );
- }
-
- // Update meta data caches
- if ( ! empty( $this->query_vars['update_meta_cache'] ) ) {
- $singular = rtrim( $this->table_name, 's' ); // sic
- update_meta_cache( $singular, $item_ids );
- }
- }
-
- /**
- * Update the cache for an item. Does not update item-meta cache.
- *
- * Accepts a single object, or an array of objects.
- *
- * The reason this does not accept ID's is because this gets called
- * after an item is already updated in the database, so we want to avoid
- * querying for it again. It's just safer this way.
- *
- * @since 1.0.0
- *
- * @param array $items
- */
- private function update_item_cache( $items = array() ) {
-
- // Maybe query for single item
- if ( is_numeric( $items ) ) {
- $primary = $this->get_primary_column_name();
- $items = $this->get_item_raw( $primary, $items );
- }
-
- // Bail if no items to cache
- if ( empty( $items ) ) {
- return false;
- }
-
- // Make sure items are an array (without casting objects to arrays)
- if ( ! is_array( $items ) ) {
- $items = array( $items );
- }
-
- // Get cache groups
- $groups = $this->get_cache_groups();
-
- // Loop through all items and cache them
- foreach ( $items as $item ) {
-
- // Skip if item is not an object
- if ( ! is_object( $item ) ) {
- continue;
- }
-
- // Loop through groups and set cache
- if ( ! empty( $groups ) ) {
- foreach ( $groups as $key => $group ) {
- $this->cache_set( $item->{$key}, $item, $group );
- }
- }
- }
-
- // Update last changed
- $this->update_last_changed_cache();
- }
-
- /**
- * Clean the cache for an item. Does not clean item-meta.
- *
- * Accepts a single object, or an array of objects.
- *
- * The reason this does not accept ID's is because this gets called
- * after an item is already deleted from the database, so it cannot be
- * queried and may not exist in the cache. It's just safer this way.
- *
- * @since 1.0.0
- *
- * @param mixed $items Single object item, or Array of object items
- *
- * @return bool
- */
- private function clean_item_cache( $items = array() ) {
-
- // Bail if no items to clean
- if ( empty( $items ) ) {
- return false;
- }
-
- // Make sure items are an array
- if ( ! is_array( $items ) ) {
- $items = array( $items );
- }
-
- // Get all cache groups
- $groups = $this->get_cache_groups();
-
- // Loop through all items and clean them
- foreach ( $items as $item ) {
-
- // Skip if item is not an object
- if ( ! is_object( $item ) ) {
- continue;
- }
-
- // Loop through groups and delete cache
- if ( ! empty( $groups ) ) {
- foreach ( $groups as $key => $group ) {
- $this->cache_delete( $item->{$key}, $group );
- }
- }
- }
-
- // Update last changed
- $this->update_last_changed_cache();
- }
-
- /**
- * Update the last_changed key for the cache group
- *
- * @since 1.0.0
- */
- private function update_last_changed_cache( $group = '' ) {
-
- // Fallback to microtime
- if ( empty( $this->last_changed ) ) {
- $this->set_last_changed();
- }
-
- // Set the last changed time for this cache group
- $this->cache_set( 'last_changed', $this->last_changed, $group );
-
- // Return the last changed time
- return $this->last_changed;
- }
-
- /**
- * Get the last_changed key for a cache group
- *
- * @since 1.0.0
- *
- * @param string $group Cache group. Defaults to $this->cache_group
- *
- * @return int The last time a cache group was changed
- */
- private function get_last_changed_cache( $group = '' ) {
-
- // Get the last changed cache value
- $last_changed = $this->cache_get( 'last_changed', $group );
-
- // Maybe update the last changed value
- if ( false === $last_changed ) {
- $last_changed = $this->update_last_changed_cache( $group );
- }
-
- // Return the last changed value for the cache group
- return $last_changed;
- }
-
- /**
- * Get array of non-cached item IDs.
- *
- * @since 1.0.0
- *
- * @param array $item_ids Array of item IDs
- * @param string $group Cache group. Defaults to $this->cache_group
- *
- * @return array
- */
- private function get_non_cached_ids( $item_ids = array(), $group = '' ) {
- $retval = array();
-
- // Bail if no item IDs
- if ( empty( $item_ids ) ) {
- return $retval;
- }
-
- // Loop through item IDs
- foreach ( $item_ids as $id ) {
- $id = $this->shape_item_id( $id );
-
- if ( false === $this->cache_get( $id, $group ) ) {
- $retval[] = $id;
- }
- }
-
- // Return array of IDs
- return $retval;
- }
-
- /**
- * Add a cache value for a key and group.
- *
- * @since 1.0.0
- *
- * @param string $key Cache key.
- * @param mixed $value Cache value.
- * @param string $group Cache group. Defaults to $this->cache_group
- * @param int $expire Expiration.
- */
- private function cache_add( $key = '', $value = '', $group = '', $expire = 0 ) {
-
- // Bail if cache invalidation is suspended
- if ( wp_suspend_cache_addition() ) {
- return;
- }
-
- // Bail if no cache key
- if ( empty( $key ) ) {
- return;
- }
-
- // Get the cache group
- $group = $this->get_cache_group( $group );
-
- // Add to the cache
- wp_cache_add( $key, $value, $group, $expire );
- }
-
- /**
- * Get a cache value for a key and group.
- *
- * @since 1.0.0
- *
- * @param string $key Cache key.
- * @param string $group Cache group. Defaults to $this->cache_group
- * @param bool $force
- */
- private function cache_get( $key = '', $group = '', $force = false ) {
-
- // Bail if no cache key
- if ( empty( $key ) ) {
- return;
- }
-
- // Get the cache group
- $group = $this->get_cache_group( $group );
-
- // Get from the cache
- return wp_cache_get( $key, $group, $force );
- }
-
- /**
- * Set a cache value for a key and group.
- *
- * @since 1.0.0
- *
- * @param string $key Cache key.
- * @param mixed $value Cache value.
- * @param string $group Cache group. Defaults to $this->cache_group
- * @param int $expire Expiration.
- */
- private function cache_set( $key = '', $value = '', $group = '', $expire = 0 ) {
-
- // Bail if cache invalidation is suspended
- if ( wp_suspend_cache_addition() ) {
- return;
- }
-
- // Bail if no cache key
- if ( empty( $key ) ) {
- return;
- }
-
- // Get the cache group
- $group = $this->get_cache_group( $group );
-
- // Update the cache
- wp_cache_set( $key, $value, $group, $expire );
- }
-
- /**
- * Delete a cache key for a group.
- *
- * @since 1.0.0
- *
- * @global bool $_wp_suspend_cache_invalidation
- *
- * @param string $key Cache key.
- * @param string $group Cache group. Defaults to $this->cache_group
- */
- private function cache_delete( $key = '', $group = '' ) {
- global $_wp_suspend_cache_invalidation;
-
- // Bail if cache invalidation is suspended
- if ( ! empty( $_wp_suspend_cache_invalidation ) ) {
- return;
- }
-
- // Bail if no cache key
- if ( empty( $key ) ) {
- return;
- }
-
- // Get the cache group
- $group = $this->get_cache_group( $group );
-
- // Delete the cache
- wp_cache_delete( $key, $group );
- }
-
- /**
- * Fetch raw results directly from the database.
- *
- * @since 1.0.0
- *
- * @param array $cols Columns for `SELECT`.
- * @param array $where_cols Where clauses. Each key-value pair in the array
- * represents a column and a comparison.
- * @param int $limit Optional. LIMIT value. Default 25.
- * @param null $offset Optional. OFFSET value. Default null.
- * @param string $output Optional. Any of ARRAY_A | ARRAY_N | OBJECT | OBJECT_K constants.
- * Default OBJECT.
- * With one of the first three, return an array of
- * rows indexed from 0 by SQL result row number.
- * Each row is an associative array (column => value, ...),
- * a numerically indexed array (0 => value, ...),
- * or an object. ( ->column = value ), respectively.
- * With OBJECT_K, return an associative array of
- * row objects keyed by the value of each row's
- * first column's value.
- *
- * @return array|object|null Database query results.
- */
- public function get_results( $cols = array(), $where_cols = array(), $limit = 25, $offset = null, $output = OBJECT ) {
-
- // Bail if no columns have been passed.
- if ( empty( $cols ) ) {
- return null;
- }
-
- // Fetch all the columns for the table being queried.
- $column_names = $this->get_column_names();
-
- // Ensure valid column names have been passed for the `SELECT` clause.
- foreach ( $cols as $index => $column ) {
- if ( ! array_key_exists( $column, $column_names ) ) {
- unset( $cols[ $index ] );
- }
- }
-
- // Setup base SQL query.
- $query = "SELECT ";
- $query .= implode( ',', $cols );
- $query .= " FROM {$this->get_table_name()} {$this->table_alias} ";
- $query .= " WHERE 1=1 ";
-
- // Ensure valid columns have been passed for the `WHERE` clause.
- if ( ! empty( $where_cols ) ) {
-
- // Get keys from where columns
- $columns = array_keys( $where_cols );
-
- // Loop through columns and unset any invalid names
- foreach ( $columns as $index => $column ) {
- if ( ! array_key_exists( $column, $column_names ) ) {
- unset( $where_cols[ $index ] );
- }
- }
-
- // Parse WHERE clauses.
- foreach ( $where_cols as $column => $compare ) {
-
- // Basic WHERE clause.
- if ( ! is_array( $compare ) ) {
- $pattern = $this->get_column_field( array( 'name' => $column ), 'pattern', '%s' );
- $statement = " AND {$this->table_alias}.{$column} = {$pattern} ";
- $query .= $this->get_db()->prepare( $statement, $compare );
-
- // More complex WHERE clause.
- } else {
- $value = isset( $compare['value'] )
- ? $compare['value']
- : false;
-
- // Skip if a value was not provided.
- if ( false === $value ) {
- continue;
- }
-
- // Default compare clause to equals.
- $compare_clause = isset( $compare['compare_query'] )
- ? trim( strtoupper( $compare['compare_query'] ) )
- : '=';
-
- // Array (unprepared)
- if ( is_array( $compare['value'] ) ) {
-
- // Default to IN if clause not specified.
- if ( ! in_array( $compare_clause, array( 'IN', 'NOT IN', 'BETWEEN' ), true ) ) {
- $compare_clause = 'IN';
- }
-
- // Parse & escape for IN and NOT IN.
- if ( 'IN' === $compare_clause || 'NOT IN' === $compare_clause ) {
- $value = "('" . implode( "','", $this->get_db()->_escape( $compare['value'] ) ) . "')";
-
- // Parse & escape for BETWEEN.
- } elseif ( is_array( $value ) && 2 === count( $value ) && 'BETWEEN' === $compare_clause ) {
- $_this = $this->get_db()->_escape( $value[0] );
- $_that = $this->get_db()->_escape( $value[1] );
- $value = " {$_this} AND {$_that} ";
- }
- }
-
- // Add WHERE clause.
- $query .= " AND {$this->table_alias}.{$column} {$compare_clause} {$value} ";
- }
- }
- }
-
- // Maybe set an offset.
- if ( ! empty( $offset ) ) {
- $values = explode( ',', $offset );
- $values = array_filter( $values, 'intval' );
- $offset = implode( ',', $values );
- $query .= " OFFSET {$offset} ";
- }
-
- // Maybe set a limit.
- if ( ! empty( $limit ) && ( $limit > 0 ) ) {
- $limit = intval( $limit );
- $query .= " LIMIT {$limit} ";
- }
-
- // Execute query.
- $results = $this->get_db()->get_results( $query, $output );
-
- // Return results.
- return $results;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-row.php b/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-row.php
deleted file mode 100644
index 853757e7..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-row.php
+++ /dev/null
@@ -1,65 +0,0 @@
-init( $item );
- }
- }
-
- /**
- * Initialize class properties based on data array.
- *
- * @since 1.0.0
- *
- * @param array $data
- */
- private function init( $data = array() ) {
- $this->set_vars( $data );
- }
-
- /**
- * Determines whether the current row exists.
- *
- * @since 1.0.0
- *
- * @return bool
- */
- public function exists() {
- return ! empty( $this->id );
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-schema.php b/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-schema.php
deleted file mode 100644
index 19228991..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-schema.php
+++ /dev/null
@@ -1,88 +0,0 @@
-columns ) || ! is_array( $this->columns ) ) {
- return;
- }
-
- // Juggle original columns array
- $columns = $this->columns;
- $this->columns = array();
-
- // Loop through columns and create objects from them
- foreach ( $columns as $column ) {
- if ( is_array( $column ) ) {
- $this->columns[] = new Column( $column );
- } elseif ( $column instanceof Column ) {
- $this->columns[] = $column;
- }
- }
- }
-
- /**
- * Return the schema in string form.
- *
- * @since 1.0.0
- *
- * @return string Calls get_create_string() on every column.
- */
- protected function to_string() {
-
- // Default return value
- $retval = '';
-
- // Bail if no columns to convert
- if ( empty( $this->columns ) ) {
- return $retval;
- }
-
- // Loop through columns...
- foreach ( $this->columns as $column_info ) {
- if ( method_exists( $column_info, 'get_create_string' ) ) {
- $retval .= '\n' . $column_info->get_create_string() . ', ';
- }
- }
-
- // Return the string
- return $retval;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-table.php b/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-table.php
deleted file mode 100644
index 0fc88c20..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/engine/class-table.php
+++ /dev/null
@@ -1,933 +0,0 @@
- value array of versions => methods.
- *
- * @since 1.0.0
- * @var array
- */
- protected $upgrades = array();
-
- /** Methods ***************************************************************/
-
- /**
- * Hook into queries, admin screens, and more!
- *
- * @since 1.0.0
- */
- public function __construct() {
-
- // Setup the database table
- $this->setup();
-
- // Bail if setup failed
- if ( empty( $this->name ) || empty( $this->db_version_key ) ) {
- return;
- }
-
- // Add the table to the database interface
- $this->set_db_interface();
-
- // Set the database schema
- $this->set_schema();
-
- // Add hooks
- $this->add_hooks();
-
- // Maybe force upgrade if testing
- if ( $this->is_testing() ) {
- $this->maybe_upgrade();
- }
- }
-
- /** Abstract **************************************************************/
-
- /**
- * Setup this database table.
- *
- * @since 1.0.0
- */
- protected abstract function set_schema();
-
- /** Multisite *************************************************************/
-
- /**
- * Update table version & references.
- *
- * Hooked to the "switch_blog" action.
- *
- * @since 1.0.0
- *
- * @param int $site_id The site being switched to
- */
- public function switch_blog( $site_id = 0 ) {
-
- // Update DB version based on the current site
- if ( ! $this->is_global() ) {
- $this->db_version = get_blog_option( $site_id, $this->db_version_key, false );
- }
-
- // Update interface for switched site
- $this->set_db_interface();
- }
-
- /** Public Helpers ********************************************************/
-
- /**
- * Maybe upgrade the database table. Handles creation & schema changes.
- *
- * Hooked to the `admin_init` action.
- *
- * @since 1.0.0
- */
- public function maybe_upgrade() {
-
- // Bail if not upgradeable
- if ( ! $this->is_upgradeable() ) {
- return;
- }
-
- // Bail if upgrade not needed
- if ( ! $this->needs_upgrade() ) {
- return;
- }
-
- // Upgrade
- if ( $this->exists() ) {
- $this->upgrade();
-
- // Install
- } else {
- $this->install();
- }
- }
-
- /**
- * Return whether this table needs an upgrade.
- *
- * @since 1.0.0
- *
- * @param mixed $version Database version to check if upgrade is needed
- *
- * @return bool True if table needs upgrading. False if not.
- */
- public function needs_upgrade( $version = false ) {
-
- // Use the current table version if none was passed
- if ( empty( $version ) ) {
- $version = $this->version;
- }
-
- // Get the current database version
- $this->get_db_version();
-
- // Is the database table up to date?
- $is_current = version_compare( $this->db_version, $version, '>=' );
-
- // Return false if current, true if out of date
- return ( true === $is_current )
- ? false
- : true;
- }
-
- /**
- * Return whether this table can be upgraded.
- *
- * @since 1.0.0
- *
- * @return bool True if table can be upgraded. False if not.
- */
- public function is_upgradeable() {
-
- // Bail if global and upgrading global tables is not allowed
- if ( $this->is_global() && ! wp_should_upgrade_global_tables() ) {
- return false;
- }
-
- // Kinda weird, but assume it is
- return true;
- }
-
- /**
- * Return the current table version from the database.
- *
- * This is public method for accessing a private variable so that it cannot
- * be externally modified.
- *
- * @since 1.0.0
- *
- * @return string
- */
- public function get_version() {
- $this->get_db_version();
-
- return $this->db_version;
- }
-
- /**
- * Install a database table by creating the table and setting the version.
- *
- * @since 1.0.0
- */
- public function install() {
- $created = $this->create();
-
- // Set the DB version if create was successful
- if ( true === $created ) {
- $this->set_db_version();
- }
- }
-
- /**
- * Destroy a database table by dropping the table and deleting the version.
- *
- * @since 1.0.0
- */
- public function uninstall() {
- $dropped = $this->drop();
-
- // Delete the DB version if drop was successful
- if ( true === $dropped ) {
- $this->delete_db_version();
- }
- }
-
- /** Public Management *****************************************************/
-
- /**
- * Check if table already exists.
- *
- * @since 1.0.0
- *
- * @return bool
- */
- public function exists() {
-
- // Get the database interface
- $db = $this->get_db();
-
- // Bail if no database interface is available
- if ( empty( $db ) ) {
- return false;
- }
-
- // Query statement
- $query = "SHOW TABLES LIKE %s";
- $like = $db->esc_like( $this->table_name );
- $prepared = $db->prepare( $query, $like );
- $result = $db->get_var( $prepared );
-
- // Does the table exist?
- return $this->is_success( $result );
- }
-
- /**
- * Create the table.
- *
- * @since 1.0.0
- *
- * @return bool
- */
- public function create() {
-
- // Get the database interface
- $db = $this->get_db();
-
- // Bail if no database interface is available
- if ( empty( $db ) ) {
- return false;
- }
-
- // Query statement
- $query = "CREATE TABLE {$this->table_name} ( {$this->schema} ) {$this->charset_collation}";
- $result = $db->query( $query );
-
- // Was the table created?
- return $this->is_success( $result );
- }
-
- /**
- * Drop the database table.
- *
- * @since 1.0.0
- *
- * @return bool
- */
- public function drop() {
-
- // Get the database interface
- $db = $this->get_db();
-
- // Bail if no database interface is available
- if ( empty( $db ) ) {
- return false;
- }
-
- // Query statement
- $query = "DROP TABLE {$this->table_name}";
- $result = $db->query( $query );
-
- // Did the table get dropped?
- return $this->is_success( $result );
- }
-
- /**
- * Truncate the database table.
- *
- * @since 1.0.0
- *
- * @return bool
- */
- public function truncate() {
-
- // Get the database interface
- $db = $this->get_db();
-
- // Bail if no database interface is available
- if ( empty( $db ) ) {
- return false;
- }
-
- // Query statement
- $query = "TRUNCATE TABLE {$this->table_name}";
- $result = $db->query( $query );
-
- // Did the table get truncated?
- return $this->is_success( $result );
- }
-
- /**
- * Delete all items from the database table.
- *
- * @since 1.0.0
- *
- * @return bool
- */
- public function delete_all() {
-
- // Get the database interface
- $db = $this->get_db();
-
- // Bail if no database interface is available
- if ( empty( $db ) ) {
- return false;
- }
-
- // Query statement
- $query = "DELETE FROM {$this->table_name}";
- $deleted = $db->query( $query );
-
- // Did the table get emptied?
- return $deleted;
- }
-
- /**
- * Clone this database table.
- *
- * Pair with copy().
- *
- * @since 1.1.0
- *
- * @param string $new_table_name The name of the new table, without prefix
- *
- * @return bool
- */
- public function _clone( $new_table_name = '' ) {
-
- // Get the database interface
- $db = $this->get_db();
-
- // Bail if no database interface is available
- if ( empty( $db ) ) {
- return false;
- }
-
- // Sanitize the new table name
- $table_name = $this->sanitize_table_name( $new_table_name );
-
- // Bail if new table name is invalid
- if ( empty( $table_name ) ) {
- return false;
- }
-
- // Query statement
- $table = $this->apply_prefix( $table_name );
- $query = "CREATE TABLE {$table} LIKE {$this->table_name}";
- $result = $db->query( $query );
-
- // Did the table get cloned?
- return $this->is_success( $result );
- }
-
- /**
- * Copy the contents of this table to a new table.
- *
- * Pair with clone().
- *
- * @since 1.1.0
- *
- * @param string $new_table_name The name of the new table, without prefix
- *
- * @return bool
- */
- public function copy( $new_table_name = '' ) {
-
- // Get the database interface
- $db = $this->get_db();
-
- // Bail if no database interface is available
- if ( empty( $db ) ) {
- return false;
- }
-
- // Sanitize the new table name
- $table_name = $this->sanitize_table_name( $new_table_name );
-
- // Bail if new table name is invalid
- if ( empty( $table_name ) ) {
- return false;
- }
-
- // Query statement
- $table = $this->apply_prefix( $table_name );
- $query = "INSERT INTO {$table} SELECT * FROM {$this->table_name}";
- $result = $db->query( $query );
-
- // Did the table get copied?
- return $this->is_success( $result );
- }
-
- /**
- * Count the number of items in the database table.
- *
- * @since 1.0.0
- *
- * @return int
- */
- public function count() {
-
- // Get the database interface
- $db = $this->get_db();
-
- // Bail if no database interface is available
- if ( empty( $db ) ) {
- return 0;
- }
-
- // Query statement
- $query = "SELECT COUNT(*) FROM {$this->table_name}";
- $count = $db->get_var( $query );
-
- // Query success/fail
- return intval( $count );
- }
-
- /**
- * Check if column already exists.
- *
- * @since 1.0.0
- *
- * @param string $name Value
- *
- * @return bool
- */
- public function column_exists( $name = '' ) {
-
- // Get the database interface
- $db = $this->get_db();
-
- // Bail if no database interface is available
- if ( empty( $db ) ) {
- return false;
- }
-
- // Query statement
- $query = "SHOW COLUMNS FROM {$this->table_name} LIKE %s";
- $like = $db->esc_like( $name );
- $prepared = $db->prepare( $query, $like );
- $result = $db->query( $prepared );
-
- // Does the column exist?
- return $this->is_success( $result );
- }
-
- /**
- * Check if index already exists.
- *
- * @since 1.0.0
- *
- * @param string $name Value
- * @param string $column Column name
- *
- * @return bool
- */
- public function index_exists( $name = '', $column = 'Key_name' ) {
-
- // Get the database interface
- $db = $this->get_db();
-
- // Bail if no database interface is available
- if ( empty( $db ) ) {
- return false;
- }
-
- $column = esc_sql( $column );
-
- // Query statement
- $query = "SHOW INDEXES FROM {$this->table_name} WHERE {$column} LIKE %s";
- $like = $db->esc_like( $name );
- $prepared = $db->prepare( $query, $like );
- $result = $db->query( $prepared );
-
- // Does the index exist?
- return $this->is_success( $result );
- }
-
- /** Upgrades **************************************************************/
-
- /**
- * Upgrade this database table.
- *
- * @since 1.0.0
- *
- * @return bool
- */
- public function upgrade() {
-
- // Get pending upgrades
- $upgrades = $this->get_pending_upgrades();
-
- // Bail if no upgrades
- if ( empty( $upgrades ) ) {
- $this->set_db_version();
-
- // Return, without failure
- return true;
- }
-
- // Default result
- $result = false;
-
- // Try to do the upgrades
- foreach ( $upgrades as $version => $callback ) {
-
- // Do the upgrade
- $result = $this->upgrade_to( $version, $callback );
-
- // Bail if an error occurs, to avoid skipping upgrades
- if ( ! $this->is_success( $result ) ) {
- return false;
- }
- }
-
- // Success/fail
- return $this->is_success( $result );
- }
-
- /**
- * Return array of upgrades that still need to run.
- *
- * @since 1.1.0
- *
- * @return array Array of upgrade callbacks, keyed by their db version.
- */
- public function get_pending_upgrades() {
-
- // Default return value
- $upgrades = array();
-
- // Bail if no upgrades, or no database version to compare to
- if ( empty( $this->upgrades ) || empty( $this->db_version ) ) {
- return $upgrades;
- }
-
- // Loop through all upgrades, and pick out the ones that need doing
- foreach ( $this->upgrades as $version => $callback ) {
- if ( true === version_compare( $version, $this->db_version, '>' ) ) {
- $upgrades[ $version ] = $callback;
- }
- }
-
- // Return
- return $upgrades;
- }
-
- /**
- * Upgrade to a specific database version.
- *
- * @since 1.0.0
- *
- * @param mixed $version Database version to check if upgrade is needed
- * @param string $callback Callback function or class method to call
- *
- * @return bool
- */
- public function upgrade_to( $version = '', $callback = '' ) {
-
- // Bail if no upgrade is needed
- if ( ! $this->needs_upgrade( $version ) ) {
- return false;
- }
-
- // Allow self-named upgrade callbacks
- if ( empty( $callback ) ) {
- $callback = $version;
- }
-
- // Is the callback... callable?
- $callable = $this->get_callable( $callback );
-
- // Bail if no callable upgrade was found
- if ( empty( $callable ) ) {
- return false;
- }
-
- // Do the upgrade
- $result = call_user_func( $callable );
- $success = $this->is_success( $result );
-
- // Bail if upgrade failed
- if ( true !== $success ) {
- return false;
- }
-
- // Set the database version to this successful version
- $this->set_db_version( $version );
-
- // Return success
- return true;
- }
-
- /** Private ***************************************************************/
-
- /**
- * Setup the necessary table variables.
- *
- * @since 1.0.0
- */
- private function setup() {
-
- // Bail if no database interface is available
- if ( ! $this->get_db() ) {
- return;
- }
-
- // Sanitize the database table name
- $this->name = $this->sanitize_table_name( $this->name );
-
- // Bail if database table name was garbage
- if ( false === $this->name ) {
- return;
- }
-
- // Separator
- $glue = '_';
-
- // Setup the prefixed name
- $this->prefixed_name = $this->apply_prefix( $this->name, $glue );
-
- // Maybe create database key
- if ( empty( $this->db_version_key ) ) {
- $this->db_version_key = implode(
- $glue,
- array(
- sanitize_key( $this->db_global ),
- $this->prefixed_name,
- 'version'
- )
- );
- }
- }
-
- /**
- * Set this table up in the database interface.
- *
- * This must be done directly because the database interface does not
- * have a common mechanism for manipulating them safely.
- *
- * @since 1.0.0
- */
- private function set_db_interface() {
-
- // Get the database once, to avoid duplicate function calls
- $db = $this->get_db();
-
- // Bail if no database
- if ( empty( $db ) ) {
- return;
- }
-
- // Set variables for global tables
- if ( $this->is_global() ) {
- $site_id = 0;
- $tables = 'ms_global_tables';
-
- // Set variables for per-site tables
- } else {
- $site_id = null;
- $tables = 'tables';
- }
-
- // Set the table prefix and prefix the table name
- $this->table_prefix = $db->get_blog_prefix( $site_id );
-
- // Get the prefixed table name
- $prefixed_table_name = "{$this->table_prefix}{$this->prefixed_name}";
-
- // Set the database interface
- $db->{$this->prefixed_name} = $this->table_name = $prefixed_table_name;
-
- // Create the array if it does not exist
- if ( ! isset( $db->{$tables} ) ) {
- $db->{$tables} = array();
- }
-
- // Add the table to the global table array
- $db->{$tables}[] = $this->prefixed_name;
-
- // Charset
- if ( ! empty( $db->charset ) ) {
- $this->charset_collation = "DEFAULT CHARACTER SET {$db->charset}";
- }
-
- // Collation
- if ( ! empty( $db->collate ) ) {
- $this->charset_collation .= " COLLATE {$db->collate}";
- }
- }
-
- /**
- * Set the database version for the table.
- *
- * @since 1.0.0
- *
- * @param mixed $version Database version to set when upgrading/creating
- */
- private function set_db_version( $version = '' ) {
-
- // If no version is passed during an upgrade, use the current version
- if ( empty( $version ) ) {
- $version = $this->version;
- }
-
- // Update the DB version
- $this->is_global()
- ? update_network_option( get_main_network_id(), $this->db_version_key, $version )
- : update_option( $this->db_version_key, $version );
-
- // Set the DB version
- $this->db_version = $version;
- }
-
- /**
- * Get the table version from the database.
- *
- * @since 1.0.0
- */
- private function get_db_version() {
- $this->db_version = $this->is_global()
- ? get_network_option( get_main_network_id(), $this->db_version_key, 1 )
- : get_option( $this->db_version_key, 1 );
- }
-
- /**
- * Delete the table version from the database.
- *
- * @since 1.0.0
- */
- private function delete_db_version() {
- $this->db_version = $this->is_global()
- ? delete_network_option( get_main_network_id(), $this->db_version_key )
- : delete_option( $this->db_version_key );
- }
-
- /**
- * Add class hooks to the parent application actions.
- *
- * @since 1.0.0
- */
- private function add_hooks() {
-
- // Add table to the global database object
- add_action( 'switch_blog', array( $this, 'switch_blog' ) );
- add_action( 'admin_init', array( $this, 'maybe_upgrade' ) );
- }
-
- /**
- * Check if the current request is from some kind of test.
- *
- * This is primarily used to skip 'admin_init' and force-install tables.
- *
- * @since 1.0.0
- *
- * @return bool
- */
- private function is_testing() {
- return edd_is_doing_unit_tests();
- }
-
- /**
- * Check if table is global.
- *
- * @since 1.0.0
- *
- * @return bool
- */
- private function is_global() {
- return ( true === $this->global );
- }
-
- /**
- * Try to get a callable upgrade, with some magic to avoid needing to
- * do this dance repeatedly inside subclasses.
- *
- * @since 1.0.0
- *
- * @param string $callback
- *
- * @return mixed Callable string, or false if not callable
- */
- private function get_callable( $callback = '' ) {
-
- // Default return value
- $callable = $callback;
-
- // Look for global function
- if ( ! is_callable( $callable ) ) {
-
- // Fallback to local class method
- $callable = array( $this, $callback );
- if ( ! is_callable( $callable ) ) {
-
- // Fallback to class method prefixed with "__"
- $callable = array( $this, "__{$callback}" );
- if ( ! is_callable( $callable ) ) {
- $callable = false;
- }
- }
- }
-
- // Return callable string, or false if not callable
- return $callable;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/queries/class-adjustment.php b/wp-content/plugins/easy-digital-downloads/includes/database/queries/class-adjustment.php
deleted file mode 100644
index b354afab..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/queries/class-adjustment.php
+++ /dev/null
@@ -1,170 +0,0 @@
-parse_query_for_emails( $query );
-
- return parent::query( $query );
- }
-
- /**
- * If we are querying for an email, this queries the email addresses table first,
- * then updates the queries with the matching customer IDs.
- *
- * @since 3.1.1
- * @param array $query
- * @return array
- */
- private function parse_query_for_emails( $query ) {
- if ( empty( $query['email'] ) && empty( $query['email__in'] ) && empty( $query['email__not_in'] ) ) {
- return $query;
- }
- $operator = 'id__in';
- $args = array(
- 'fields' => array( 'customer_id' ),
- );
- if ( ! empty( $query['email'] ) ) {
- $args['email'] = $query['email'];
- unset( $query['email'] );
- } elseif ( ! empty( $query['email__in'] ) ) {
- $args['email__in'] = $query['email__in'];
- unset( $query['email__in'] );
- } elseif ( ! empty( $query['email__not_in'] ) ) {
- /**
- * Speical treatment for email__not_in
- *
- * When we are searching for email__not_in, we want to actually find any email
- * addresses in the customer email addresses table that match the email__not_in parameter
- * find the customer IDs for these excluded email addresses, and pass them back in as id__not_in
- * to the main query, so that we can ensure we're excluding them even if their main email value is
- * one of the excluded ones.
- */
- $operator = 'id__not_in';
- $args['email__in'] = $query['email__not_in'];
- }
-
- $customer_ids = edd_get_customer_email_addresses( $args );
- $query[ $operator ] = array_map( 'absint', wp_list_pluck( $customer_ids, 'customer_id' ) );
-
- return $query;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/queries/class-log-api-request.php b/wp-content/plugins/easy-digital-downloads/includes/database/queries/class-log-api-request.php
deleted file mode 100644
index 94832f0d..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/queries/class-log-api-request.php
+++ /dev/null
@@ -1,156 +0,0 @@
- $status ) {
- if ( 'publish' === $status ) {
- unset( $query['status'][ $key ] );
- }
- }
-
- $query['status'][] = 'complete';
- } elseif ( 'publish' === $query['status'] ) {
- $query['status'] = 'complete';
- }
- }
-
- parent::__construct( $query );
- }
-
- /**
- * Set up the filter callback to add the country and region from the order addresses table.
- *
- * @since 3.0
- * @access public
- *
- * @param string|array $query See Order::__construct() for accepted arguments.
- *
- * @see Order::__construct()
- */
- public function query( $query = array() ) {
- $query_clauses_filters = $this->get_query_clauses_filters( $query );
- foreach ( $query_clauses_filters as $filter ) {
- if ( $filter['condition'] ) {
- add_filter( 'edd_orders_query_clauses', array( $this, $filter['callback'] ) );
- }
- }
-
- $result = parent::query( $query );
-
- foreach ( $query_clauses_filters as $filter ) {
- if ( $filter['condition'] ) {
- remove_filter( 'edd_orders_query_clauses', array( $this, $filter['callback'] ) );
- }
- }
-
- return $result;
- }
-
- /**
- * Filter the query clause to add the country and region from the order addresses table.
- *
- * @since 3.0
- * @access public
- *
- * @param string|array $clauses The clauses which will generate the final SQL query.
- */
- public function query_by_country( $clauses ) {
-
- if ( empty( $this->query_vars['country'] ) || 'all' === $this->query_vars['country'] ) {
- return $clauses;
- }
-
- global $wpdb;
-
- $primary_alias = $this->table_alias;
- $primary_column = parent::get_primary_column_name();
-
- $order_addresses_query = new \EDD\Database\Queries\Order_Address();
- $join_alias = $order_addresses_query->table_alias;
-
- // Filter by the order address's region (state/province/etc)..
- if ( ! empty( $this->query_vars['region'] ) && 'all' !== $this->query_vars['region'] ) {
- $location_join = $wpdb->prepare(
- " INNER JOIN {$order_addresses_query->table_name} {$join_alias} ON ({$primary_alias}.{$primary_column} = {$join_alias}.order_id AND {$join_alias}.country = %s AND {$join_alias}.region = %s)",
- $this->query_vars['country'],
- $this->query_vars['region']
- );
-
- // Add the region to the query var defaults.
- $this->query_var_defaults['region'] = $this->query_vars['region'];
-
- // Filter only by the country, not by region.
- } else {
- $location_join = $wpdb->prepare(
- " INNER JOIN {$order_addresses_query->table_name} {$join_alias} ON ({$primary_alias}.{$primary_column} = {$join_alias}.order_id AND {$join_alias}.country = %s)",
- $this->query_vars['country']
- );
-
- // Add the country to the query var defaults.
- $this->query_var_defaults['country'] = $this->query_vars['country'];
- }
-
- // Add the customized join to the query.
- $clauses['join'] .= ' ' . $location_join;
-
- return $clauses;
- }
-
- /**
- * Filter the query clause to filter by product ID.
- *
- * @since 3.0
- * @access public
- *
- * @param string|array $clauses The clauses which will generate the final SQL query.
- */
- public function query_by_product( $clauses ) {
- if (
- empty( $this->query_vars['product_id'] ) &&
- ( ! isset( $this->query_vars['product_price_id'] ) || ! is_numeric( $this->query_vars['product_price_id'] ) )
- ) {
- return $clauses;
- }
-
- global $wpdb;
-
- $primary_column = parent::get_primary_column_name();
- $order_items_query = new Order_Item();
-
- // Build up our conditions.
- $conditions = array();
- foreach ( array( 'product_id' => 'product_id', 'product_price_id' => 'price_id' ) as $query_var => $db_col ) {
- if ( isset( $this->query_vars[ $query_var ] ) && is_numeric( $this->query_vars[ $query_var ] ) ) {
- $conditions[] = $wpdb->prepare(
- "AND {$order_items_query->table_alias}.{$db_col} = %d",
- absint( $this->query_vars[ $query_var ] )
- );
- }
- }
-
- $conditions = implode( ' ', $conditions );
-
- $clauses['join'] .= " INNER JOIN {$order_items_query->table_name} {$order_items_query->table_alias} ON(
- {$this->table_alias}.{$primary_column} = {$order_items_query->table_alias}.order_id
- {$conditions}
- )";
-
- return $clauses;
- }
-
- /**
- * Filter the query clause to filter by transaction ID.
- *
- * @since 3.0.2
- * @param string $clauses
- * @return string
- */
- public function query_by_txn( $clauses ) {
- if ( empty( $this->query_vars['txn'] ) ) {
- return $clauses;
- }
-
- global $wpdb;
-
- $primary_column = parent::get_primary_column_name();
- $order_transaction_query = new Order_Transaction();
-
- $clauses['join'] .= $wpdb->prepare(
- " INNER JOIN {$order_transaction_query->table_name} {$order_transaction_query->table_alias}
- ON( {$this->table_alias}.{$primary_column} = {$order_transaction_query->table_alias}.object_id
- AND {$order_transaction_query->table_alias}.transaction_id = %s )",
- sanitize_text_field( $this->query_vars['txn'] )
- );
-
- return $clauses;
- }
-
- /**
- * Filter the query clause to filter by discount ID.
- *
- * @since 3.0.2
- * @param string $clauses
- * @return string
- */
- public function query_by_discount_id( $clauses ) {
- if ( empty( $this->query_vars['discount_id'] ) ) {
- return $clauses;
- }
-
- global $wpdb;
-
- $primary_column = parent::get_primary_column_name();
- $order_adjustment_query = new Order_Adjustment();
-
- $clauses['join'] .= $wpdb->prepare(
- " INNER JOIN {$order_adjustment_query->table_name} {$order_adjustment_query->table_alias}
- ON( {$this->table_alias}.{$primary_column} = {$order_adjustment_query->table_alias}.object_id
- AND {$order_adjustment_query->table_alias}.type_id = %d )",
- absint( $this->query_vars['discount_id'] )
- );
-
- return $clauses;
- }
-
- /**
- * When searching by a numeric order number, we need to override the default where clause
- * to return orders matching either the ID or order number.
- *
- * @since 3.1.1.4
- * @param array $clauses
- * @return array
- */
- public function query_by_order_search( $clauses ) {
- global $wpdb;
- $clauses['where'] = $wpdb->prepare(
- "{$this->table_alias}.id = %d OR {$this->table_alias}.order_number = %d",
- absint( $this->query_vars['id'] ),
- absint( $this->query_vars['order_number'] )
- );
-
- return $clauses;
- }
-
- /**
- * Set the query var defaults for country and region.
- *
- * @since 3.0
- * @access public
- */
- protected function set_query_var_defaults() {
- parent::set_query_var_defaults();
-
- $this->query_var_defaults['country'] = false;
- $this->query_var_defaults['region'] = false;
- $this->query_var_defaults['product_id'] = false;
- $this->query_var_defaults['product_product_id'] = false;
- }
-
- /**
- * Adds an item to the database
- *
- * @since 3.0
- *
- * @param array $data
- * @return false|int Returns the item ID on success; false on failure.
- */
- public function add_item( $data = array() ) {
- // Every order should have a currency assigned.
- if ( empty( $data['currency'] ) ) {
- $data['currency'] = edd_get_currency();
- }
-
- // If the payment key isn't already created, generate it.
- if ( empty( $data['payment_key'] ) ) {
- $email = ! empty( $data['email'] ) ? $data['email'] : '';
- $data['payment_key'] = edd_generate_order_payment_key( $email );
- }
-
- // Add the IP address if it hasn't been already.
- if ( empty( $data['ip'] ) ) {
- $data['ip'] = edd_get_ip();
- }
-
- return parent::add_item( $data );
- }
-
- /**
- * Get the array of possible query clause filters.
- *
- * @since 3.0.2
- * @param array $query
- * @return array
- */
- private function get_query_clauses_filters( $query ) {
- return array(
- array(
- 'condition' => ! empty( $query['country'] ),
- 'callback' => 'query_by_country',
- ),
- array(
- 'condition' => ! empty( $query['product_id'] ) || ( isset( $query['product_price_id'] ) && is_numeric( $query['product_price_id'] ) ),
- 'callback' => 'query_by_product',
- ),
- array(
- 'condition' => ! empty( $query['txn'] ),
- 'callback' => 'query_by_txn',
- ),
- array(
- 'condition' => ! empty( $query['discount_id'] ),
- 'callback' => 'query_by_discount_id',
- ),
- array(
- 'condition' => ! empty( $query['id'] ) && ! empty( $query['order_number'] ) && $query['id'] === $query['order_number'],
- 'callback' => 'query_by_order_search',
- ),
- );
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/rows/class-adjustment.php b/wp-content/plugins/easy-digital-downloads/includes/database/rows/class-adjustment.php
deleted file mode 100644
index 44fc9b1b..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/rows/class-adjustment.php
+++ /dev/null
@@ -1,33 +0,0 @@
- 'id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'extra' => 'auto_increment',
- 'primary' => true,
- 'sortable' => true,
- ),
-
- // parent.
- array(
- 'name' => 'parent',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true,
- 'transition' => true,
- ),
-
- // name.
- array(
- 'name' => 'name',
- 'type' => 'varchar',
- 'length' => '200',
- 'searchable' => true,
- 'sortable' => true,
- ),
-
- // code.
- array(
- 'name' => 'code',
- 'type' => 'varchar',
- 'length' => '50',
- 'searchable' => true,
- 'sortable' => true,
- 'cache_key' => true,
- ),
-
- // status.
- array(
- 'name' => 'status',
- 'type' => 'varchar',
- 'length' => '20',
- 'default' => 'draft',
- 'sortable' => true,
- 'transition' => true,
- ),
-
- // type
- array(
- 'name' => 'type',
- 'type' => 'varchar',
- 'length' => '20',
- 'default' => '',
- 'sortable' => true,
- 'transition' => true,
- ),
-
- // scope.
- array(
- 'name' => 'scope',
- 'type' => 'varchar',
- 'length' => '20',
- 'default' => '',
- 'sortable' => true,
- 'transition' => true,
- ),
-
- // amount_type.
- array(
- 'name' => 'amount_type',
- 'type' => 'varchar',
- 'length' => '20',
- 'default' => '',
- 'sortable' => true,
- 'transition' => true,
- ),
-
- // amount.
- array(
- 'name' => 'amount',
- 'type' => 'decimal',
- 'length' => '18,9',
- 'default' => '0',
- 'sortable' => true,
- ),
-
- // description.
- array(
- 'name' => 'description',
- 'type' => 'longtext',
- 'default' => '',
- 'searchable' => true,
- ),
-
- // max_uses.
- array(
- 'name' => 'max_uses',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- ),
-
- // use_count.
- array(
- 'name' => 'use_count',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true,
- ),
-
- // once_per_customer.
- array(
- 'name' => 'once_per_customer',
- 'type' => 'int',
- 'length' => '1',
- 'default' => '0',
- ),
-
- // min_charge_amount.
- array(
- 'name' => 'min_charge_amount',
- 'type' => 'decimal',
- 'length' => '18,9',
- 'default' => '0',
- ),
-
- // start_date.
- array(
- 'name' => 'start_date',
- 'type' => 'datetime',
- 'default' => null,
- 'allow_null' => true,
- 'date_query' => true,
- 'sortable' => true,
- ),
-
- // end_date.
- array(
- 'name' => 'end_date',
- 'type' => 'datetime',
- 'default' => null,
- 'allow_null' => true,
- 'date_query' => true,
- 'sortable' => true,
- ),
-
- // date_created.
- array(
- 'name' => 'date_created',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class.
- 'created' => true,
- 'date_query' => true,
- 'sortable' => true,
- ),
-
- // date_modified.
- array(
- 'name' => 'date_modified',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class.
- 'modified' => true,
- 'date_query' => true,
- 'sortable' => true,
- ),
-
- // uuid.
- array(
- 'uuid' => true,
- ),
- );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-customer-addresses.php b/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-customer-addresses.php
deleted file mode 100644
index 34ae3707..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-customer-addresses.php
+++ /dev/null
@@ -1,169 +0,0 @@
- 'id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'extra' => 'auto_increment',
- 'primary' => true,
- 'sortable' => true
- ),
-
- // customer_id
- array(
- 'name' => 'customer_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0'
- ),
-
- // is_primary
- array(
- 'name' => 'is_primary',
- 'type' => 'tinyint',
- 'length' => '1',
- 'unsigned' => false,
- 'default' => '0',
- 'sortable' => true,
- 'transition' => true,
- ),
-
- // type
- array(
- 'name' => 'type',
- 'type' => 'varchar',
- 'length' => '20',
- 'default' => 'billing',
- 'sortable' => true,
- 'transition' => true
- ),
-
- // status
- array(
- 'name' => 'status',
- 'type' => 'varchar',
- 'length' => '20',
- 'default' => 'active',
- 'sortable' => true,
- 'transition' => true
- ),
-
- // name
- array(
- 'name' => 'name',
- 'type' => 'mediumtext',
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // address
- array(
- 'name' => 'address',
- 'type' => 'mediumtext',
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // address2
- array(
- 'name' => 'address2',
- 'type' => 'mediumtext',
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // city
- array(
- 'name' => 'city',
- 'type' => 'mediumtext',
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // region
- array(
- 'name' => 'region',
- 'type' => 'mediumtext',
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // postal_code
- array(
- 'name' => 'postal_code',
- 'type' => 'varchar',
- 'length' => '32',
- 'default' => '',
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // country
- array(
- 'name' => 'country',
- 'type' => 'mediumtext',
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // date_created
- array(
- 'name' => 'date_created',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'created' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // date_modified
- array(
- 'name' => 'date_modified',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'modified' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // uuid
- array(
- 'uuid' => true,
- )
- );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-customer-email-addresses.php b/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-customer-email-addresses.php
deleted file mode 100644
index 76747d57..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-customer-email-addresses.php
+++ /dev/null
@@ -1,112 +0,0 @@
- 'id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'extra' => 'auto_increment',
- 'primary' => true,
- 'sortable' => true
- ),
-
- // customer_id
- array(
- 'name' => 'customer_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'cache_key' => true
- ),
-
- // type
- array(
- 'name' => 'type',
- 'type' => 'varchar',
- 'length' => '20',
- 'default' => 'secondary',
- 'sortable' => true,
- 'transition' => true
- ),
-
- // status
- array(
- 'name' => 'status',
- 'type' => 'varchar',
- 'length' => '20',
- 'default' => 'active',
- 'sortable' => true,
- 'transition' => true
- ),
-
- // email
- array(
- 'name' => 'email',
- 'type' => 'varchar',
- 'length' => '100',
- 'default' => '',
- 'cache_key' => true,
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // date_created
- array(
- 'name' => 'date_created',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'created' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // date_modified
- array(
- 'name' => 'date_modified',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'modified' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // uuid
- array(
- 'uuid' => true,
- )
- );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-customers.php b/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-customers.php
deleted file mode 100644
index a0224819..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-customers.php
+++ /dev/null
@@ -1,128 +0,0 @@
- 'id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'extra' => 'auto_increment',
- 'primary' => true,
- 'sortable' => true
- ),
-
- // user_id
- array(
- 'name' => 'user_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'cache_key' => true
- ),
-
- // email
- array(
- 'name' => 'email',
- 'type' => 'varchar',
- 'length' => '100',
- 'cache_key' => true,
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // name
- array(
- 'name' => 'name',
- 'type' => 'varchar',
- 'length' => '255',
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // status
- array(
- 'name' => 'status',
- 'type' => 'varchar',
- 'length' => '20',
- 'default' => 'active',
- 'sortable' => true,
- 'transition' => true
- ),
-
- // purchase_value
- array(
- 'name' => 'purchase_value',
- 'type' => 'decimal',
- 'length' => '18,9',
- 'default' => '0',
- 'sortable' => true
- ),
-
- // purchase_count
- array(
- 'name' => 'purchase_count',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true
- ),
-
- // date_created
- array(
- 'name' => 'date_created',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'created' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // date_modified
- array(
- 'name' => 'date_modified',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'modified' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // uuid
- array(
- 'uuid' => true,
- )
- );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-logs-api-requests.php b/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-logs-api-requests.php
deleted file mode 100644
index 87284cfb..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-logs-api-requests.php
+++ /dev/null
@@ -1,148 +0,0 @@
- 'id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'extra' => 'auto_increment',
- 'primary' => true,
- 'sortable' => true
- ),
-
- // user_id
- array(
- 'name' => 'user_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true
- ),
-
- // api_key
- array(
- 'name' => 'api_key',
- 'type' => 'varchar',
- 'length' => '32',
- 'default' => 'public',
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // token
- array(
- 'name' => 'token',
- 'type' => 'varchar',
- 'length' => '32',
- 'default' => '',
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // version
- array(
- 'name' => 'version',
- 'type' => 'varchar',
- 'length' => '32',
- 'default' => '',
- 'sortable' => true
- ),
-
- // request
- array(
- 'name' => 'request',
- 'type' => 'longtext',
- 'default' => '',
- 'searchable' => true,
- 'in' => false,
- 'not_in' => false
- ),
-
- // error
- array(
- 'name' => 'error',
- 'type' => 'longtext',
- 'default' => '',
- 'searchable' => true,
- 'in' => false,
- 'not_in' => false
- ),
-
- // ip
- array(
- 'name' => 'ip',
- 'type' => 'varchar',
- 'length' => '60',
- 'default' => '',
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // time
- array(
- 'name' => 'time',
- 'type' => 'varchar',
- 'length' => '60',
- 'default' => '',
- 'sortable' => true
- ),
-
- // date_created
- array(
- 'name' => 'date_created',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'created' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // date_modified
- array(
- 'name' => 'date_modified',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'modified' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // uuid
- array(
- 'uuid' => true,
- )
- );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-logs-file-downloads.php b/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-logs-file-downloads.php
deleted file mode 100644
index 38ea17c3..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-logs-file-downloads.php
+++ /dev/null
@@ -1,139 +0,0 @@
- 'id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'extra' => 'auto_increment',
- 'primary' => true,
- 'sortable' => true
- ),
-
- // product_id
- array(
- 'name' => 'product_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true
- ),
-
- // file_id
- array(
- 'name' => 'file_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true
- ),
-
- // order_id
- array(
- 'name' => 'order_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true
- ),
-
- // price_id
- array(
- 'name' => 'price_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0'
- ),
-
- // customer_id
- array(
- 'name' => 'customer_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true
- ),
-
- // ip
- array(
- 'name' => 'ip',
- 'type' => 'varchar',
- 'length' => '60',
- 'default' => '',
- 'sortable' => true,
- 'searchable' => true
- ),
-
- // user_agent
- array(
- 'name' => 'user_agent',
- 'type' => 'varchar',
- 'length' => '200',
- 'default' => '',
- 'sortable' => true,
- 'searchable' => true,
- ),
-
- // date_created
- array(
- 'name' => 'date_created',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'created' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // date_modified
- array(
- 'name' => 'date_modified',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'modified' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // uuid
- array(
- 'uuid' => true,
- )
- );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-logs.php b/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-logs.php
deleted file mode 100644
index ba156c4d..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-logs.php
+++ /dev/null
@@ -1,134 +0,0 @@
- 'id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'extra' => 'auto_increment',
- 'primary' => true,
- 'sortable' => true
- ),
-
- // object_id
- array(
- 'name' => 'object_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true,
- 'cache_key' => true,
- ),
-
- // object_type
- array(
- 'name' => 'object_type',
- 'type' => 'varchar',
- 'length' => '20',
- 'default' => '',
- 'sortable' => true,
- 'cache_key' => true,
- 'allow_null' => true
- ),
-
- // user_id
- array(
- 'name' => 'user_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true,
- 'cache_key' => true,
- ),
-
- // type
- array(
- 'name' => 'type',
- 'type' => 'varchar',
- 'length' => '20',
- 'default' => '',
- 'sortable' => true
- ),
-
- // title
- array(
- 'name' => 'title',
- 'type' => 'varchar',
- 'length' => '200',
- 'default' => '',
- 'searchable' => true,
- 'sortable' => true,
- 'in' => false,
- 'not_in' => false
- ),
-
- // content
- array(
- 'name' => 'content',
- 'type' => 'longtext',
- 'default' => '',
- 'searchable' => true,
- 'in' => false,
- 'not_in' => false
- ),
-
- // date_created
- array(
- 'name' => 'date_created',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'created' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // date_modified
- array(
- 'name' => 'date_modified',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'modified' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // uuid
- array(
- 'uuid' => true,
- )
- );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-notes.php b/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-notes.php
deleted file mode 100644
index c74208ba..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-notes.php
+++ /dev/null
@@ -1,109 +0,0 @@
- 'id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'extra' => 'auto_increment',
- 'primary' => true,
- 'sortable' => true
- ),
-
- // object_id
- array(
- 'name' => 'object_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true
- ),
-
- // object_type
- array(
- 'name' => 'object_type',
- 'type' => 'varchar',
- 'length' => '20',
- 'default' => '',
- 'sortable' => true
- ),
-
- // user_id
- array(
- 'name' => 'user_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true
- ),
-
- // content
- array(
- 'name' => 'content',
- 'type' => 'longtext',
- 'default' => '',
- 'searchable' => true,
- 'in' => false,
- 'not_in' => false
- ),
-
- // date_created
- array(
- 'name' => 'date_created',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'created' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // date_modified
- array(
- 'name' => 'date_modified',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'modified' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // uuid
- array(
- 'uuid' => true,
- )
- );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-order-addresses.php b/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-order-addresses.php
deleted file mode 100644
index 0347dda3..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-order-addresses.php
+++ /dev/null
@@ -1,148 +0,0 @@
- 'id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'extra' => 'auto_increment',
- 'primary' => true,
- 'sortable' => true
- ),
-
- // order_id
- array(
- 'name' => 'order_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0'
- ),
-
- // type.
- array(
- 'name' => 'type',
- 'type' => 'varchar',
- 'length' => '20',
- 'default' => 'billing',
- 'sortable' => true,
- 'transition' => true,
- ),
-
- // name
- array(
- 'name' => 'name',
- 'type' => 'mediumtext',
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // address
- array(
- 'name' => 'address',
- 'type' => 'mediumtext',
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // address2
- array(
- 'name' => 'address2',
- 'type' => 'mediumtext',
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // city
- array(
- 'name' => 'city',
- 'type' => 'mediumtext',
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // region
- array(
- 'name' => 'region',
- 'type' => 'mediumtext',
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // postal_code
- array(
- 'name' => 'postal_code',
- 'type' => 'varchar',
- 'length' => '32',
- 'default' => '',
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // country
- array(
- 'name' => 'country',
- 'type' => 'mediumtext',
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // date_created
- array(
- 'name' => 'date_created',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'created' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // date_modified
- array(
- 'name' => 'date_modified',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'modified' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // uuid
- array(
- 'uuid' => true,
- )
- );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-order-adjustments.php b/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-order-adjustments.php
deleted file mode 100644
index 587c3b62..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-order-adjustments.php
+++ /dev/null
@@ -1,178 +0,0 @@
- 'id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'extra' => 'auto_increment',
- 'primary' => true,
- 'sortable' => true
- ),
-
- // parent
- array(
- 'name' => 'parent',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true
- ),
-
- // object_id
- array(
- 'name' => 'object_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true
- ),
-
- // object_type
- array(
- 'name' => 'object_type',
- 'type' => 'varchar',
- 'length' => '20',
- 'default' => '',
- 'sortable' => true
- ),
-
- // type_id
- array(
- 'name' => 'type_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => null,
- 'sortable' => true,
- 'allow_null' => true,
- ),
-
- // type
- array(
- 'name' => 'type',
- 'type' => 'varchar',
- 'length' => '20',
- 'default' => '',
- 'sortable' => true,
- 'transition' => true
- ),
-
- // type key
- array(
- 'name' => 'type_key',
- 'type' => 'varchar',
- 'length' => '255',
- 'default' => null,
- 'allow_null' => true,
- 'sortable' => true,
- ),
-
- // description
- array(
- 'name' => 'description',
- 'type' => 'varchar',
- 'length' => '100',
- 'default' => '',
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // subtotal
- array(
- 'name' => 'subtotal',
- 'type' => 'decimal',
- 'length' => '18,9',
- 'default' => '0',
- 'sortable' => true,
- 'validate' => 'edd_sanitize_amount'
- ),
-
- // tax
- array(
- 'name' => 'tax',
- 'type' => 'decimal',
- 'length' => '18,9',
- 'default' => '0',
- 'sortable' => true,
- 'validate' => 'edd_sanitize_amount'
- ),
-
- // total
- array(
- 'name' => 'total',
- 'type' => 'decimal',
- 'length' => '18,9',
- 'default' => '0',
- 'sortable' => true,
- 'validate' => 'edd_sanitize_amount'
- ),
-
- // rate
- array(
- 'name' => 'rate',
- 'type' => 'decimal',
- 'length' => '10,5',
- 'default' => '1.00000',
- ),
-
- // date_created
- array(
- 'name' => 'date_created',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'created' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // date_modified
- array(
- 'name' => 'date_modified',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'modified' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // uuid
- array(
- 'uuid' => true,
- )
- );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-order-items.php b/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-order-items.php
deleted file mode 100644
index 5b34d50e..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-order-items.php
+++ /dev/null
@@ -1,219 +0,0 @@
- 'id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'extra' => 'auto_increment',
- 'primary' => true,
- 'sortable' => true
- ),
-
- // parent
- array(
- 'name' => 'parent',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true
- ),
-
- // order_id
- array(
- 'name' => 'order_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true
- ),
-
- // product_id
- array(
- 'name' => 'product_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true
- ),
-
- // product_name
- array(
- 'name' => 'product_name',
- 'type' => 'text',
- 'default' => '',
- 'searchable' => true,
- 'in' => false,
- 'not_in' => false
- ),
-
- // price_id
- array(
- 'name' => 'price_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => null,
- 'sortable' => true,
- 'allow_null' => true,
- ),
-
- // cart_index
- array(
- 'name' => 'cart_index',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true
- ),
-
- // type
- array(
- 'name' => 'type',
- 'type' => 'varchar',
- 'length' => '20',
- 'default' => 'download',
- 'sortable' => true,
- 'transition' => true
- ),
-
- // status
- array(
- 'name' => 'status',
- 'type' => 'varchar',
- 'length' => '20',
- 'default' => 'pending',
- 'sortable' => true,
- 'transition' => true
- ),
-
- // quantity
- array(
- 'name' => 'quantity',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true
- ),
-
- // amount
- array(
- 'name' => 'amount',
- 'type' => 'decimal',
- 'length' => '18,9',
- 'default' => '0',
- 'sortable' => true,
- 'validate' => 'edd_sanitize_amount'
- ),
-
- // subtotal
- array(
- 'name' => 'subtotal',
- 'type' => 'decimal',
- 'length' => '18,9',
- 'default' => '0',
- 'sortable' => true,
- 'validate' => 'edd_sanitize_amount'
- ),
-
- // discount
- array(
- 'name' => 'discount',
- 'type' => 'decimal',
- 'length' => '18,9',
- 'default' => '0',
- 'sortable' => true,
- 'validate' => 'edd_sanitize_amount'
- ),
-
- // tax
- array(
- 'name' => 'tax',
- 'type' => 'decimal',
- 'length' => '18,9',
- 'default' => '0',
- 'sortable' => true,
- 'validate' => 'edd_sanitize_amount'
- ),
-
- // total
- array(
- 'name' => 'total',
- 'type' => 'decimal',
- 'length' => '18,9',
- 'default' => '0',
- 'sortable' => true,
- 'validate' => 'edd_sanitize_amount'
- ),
-
- // rate
- array(
- 'name' => 'rate',
- 'type' => 'decimal',
- 'length' => '10,5',
- 'default' => '1.00000',
- ),
-
- // date_created
- array(
- 'name' => 'date_created',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'created' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // date_modified
- array(
- 'name' => 'date_modified',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'modified' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // uuid
- array(
- 'uuid' => true,
- )
- );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-order-transactions.php b/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-order-transactions.php
deleted file mode 100644
index 4119d087..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-order-transactions.php
+++ /dev/null
@@ -1,134 +0,0 @@
- 'id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'extra' => 'auto_increment',
- 'primary' => true,
- 'sortable' => true
- ),
-
- // object_id
- array(
- 'name' => 'object_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true
- ),
-
- // object_type
- array(
- 'name' => 'object_type',
- 'type' => 'varchar',
- 'length' => '20',
- 'default' => '',
- 'sortable' => true
- ),
-
- // transaction_id
- array(
- 'name' => 'transaction_id',
- 'type' => 'varchar',
- 'length' => '256',
- 'cache_key' => true,
- 'searchable' => true,
- 'sortable' => true
- ),
-
- // gateway
- array(
- 'name' => 'gateway',
- 'type' => 'varchar',
- 'length' => '20',
- 'sortable' => true,
- ),
-
- // status
- array(
- 'name' => 'status',
- 'type' => 'varchar',
- 'length' => '20',
- 'default' => 'pending',
- 'sortable' => true,
- 'transition' => true
- ),
-
- // total
- array(
- 'name' => 'total',
- 'type' => 'decimal',
- 'length' => '18,9',
- 'default' => '0',
- 'sortable' => true
- ),
-
- // rate
- array(
- 'name' => 'rate',
- 'type' => 'decimal',
- 'length' => '10,5',
- 'default' => '1.00000',
- ),
-
- // date_created
- array(
- 'name' => 'date_created',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'created' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // date_modified
- array(
- 'name' => 'date_modified',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class
- 'modified' => true,
- 'date_query' => true,
- 'sortable' => true
- ),
-
- // uuid
- array(
- 'uuid' => true,
- )
- );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-orders.php b/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-orders.php
deleted file mode 100644
index e0cfbc23..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/schemas/class-orders.php
+++ /dev/null
@@ -1,256 +0,0 @@
- 'id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'extra' => 'auto_increment',
- 'primary' => true,
- 'sortable' => true,
- ),
-
- // parent.
- array(
- 'name' => 'parent',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true,
- ),
-
- // order_number.
- array(
- 'name' => 'order_number',
- 'type' => 'varchar',
- 'length' => '255',
- 'searchable' => true,
- 'sortable' => true,
- ),
-
- // status.
- array(
- 'name' => 'status',
- 'type' => 'varchar',
- 'length' => '20',
- 'default' => 'pending',
- 'sortable' => true,
- 'transition' => true,
- ),
-
- // type.
- array(
- 'name' => 'type',
- 'type' => 'varchar',
- 'length' => '20',
- 'default' => 'sale',
- 'sortable' => true,
- ),
-
- // user_id.
- array(
- 'name' => 'user_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true,
- ),
-
- // customer_id.
- array(
- 'name' => 'customer_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => '0',
- 'sortable' => true,
- ),
-
- // email.
- array(
- 'name' => 'email',
- 'type' => 'varchar',
- 'length' => '100',
- 'searchable' => true,
- 'sortable' => true,
- ),
-
- // ip.
- array(
- 'name' => 'ip',
- 'type' => 'varchar',
- 'length' => '60',
- 'sortable' => true,
- ),
-
- // gateway.
- array(
- 'name' => 'gateway',
- 'type' => 'varchar',
- 'length' => '100',
- 'sortable' => true,
- 'default' => 'manual',
- ),
-
- // mode.
- array(
- 'name' => 'mode',
- 'type' => 'varchar',
- 'length' => '20',
- ),
-
- // currency.
- array(
- 'name' => 'currency',
- 'type' => 'varchar',
- 'length' => '20',
- 'validate' => 'strtoupper',
- ),
-
- // payment_key.
- array(
- 'name' => 'payment_key',
- 'type' => 'varchar',
- 'length' => '64',
- 'searchable' => true,
- ),
-
- // tax_rate_id.
- array(
- 'name' => 'tax_rate_id',
- 'type' => 'bigint',
- 'length' => '20',
- 'unsigned' => true,
- 'default' => null,
- 'allow_null' => true,
- 'sortable' => true,
- ),
-
- // subtotal.
- array(
- 'name' => 'subtotal',
- 'type' => 'decimal',
- 'length' => '18,9',
- 'default' => '0',
- 'sortable' => true,
- 'validate' => 'edd_sanitize_amount',
- ),
-
- // discount.
- array(
- 'name' => 'discount',
- 'type' => 'decimal',
- 'length' => '18,9',
- 'default' => '0',
- 'sortable' => true,
- 'validate' => 'edd_sanitize_amount',
- ),
-
- // tax.
- array(
- 'name' => 'tax',
- 'type' => 'decimal',
- 'length' => '18,9',
- 'default' => '0',
- 'sortable' => true,
- 'validate' => 'edd_sanitize_amount',
- ),
-
- // total.
- array(
- 'name' => 'total',
- 'type' => 'decimal',
- 'length' => '18,9',
- 'default' => '0',
- 'sortable' => true,
- 'validate' => 'edd_sanitize_amount',
- ),
-
- // rate.
- array(
- 'name' => 'rate',
- 'type' => 'decimal',
- 'length' => '10,5',
- 'default' => '1.00000',
- ),
-
- // date_created.
- array(
- 'name' => 'date_created',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class.
- 'created' => true,
- 'date_query' => true,
- 'sortable' => true,
- ),
-
- // date_modified.
- array(
- 'name' => 'date_modified',
- 'type' => 'datetime',
- 'default' => '', // Defaults to current time in query class.
- 'modified' => true,
- 'date_query' => true,
- 'sortable' => true,
- ),
-
- // date_completed.
- array(
- 'name' => 'date_completed',
- 'type' => 'datetime',
- 'default' => null,
- 'allow_null' => true,
- 'date_query' => true,
- 'sortable' => true,
- ),
-
- // date_refundable.
- array(
- 'name' => 'date_refundable',
- 'type' => 'datetime',
- 'default' => null,
- 'allow_null' => true,
- 'date_query' => true,
- 'sortable' => true,
- ),
-
- // uuid.
- array(
- 'uuid' => true,
- ),
- );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-adjustment-meta.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-adjustment-meta.php
deleted file mode 100644
index 095507af..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-adjustment-meta.php
+++ /dev/null
@@ -1,68 +0,0 @@
-schema = "meta_id bigint(20) unsigned NOT NULL auto_increment,
- edd_adjustment_id bigint(20) unsigned NOT NULL default '0',
- meta_key varchar(255) DEFAULT NULL,
- meta_value longtext DEFAULT NULL,
- PRIMARY KEY (meta_id),
- KEY edd_adjustment_id (edd_adjustment_id),
- KEY meta_key (meta_key({$max_index_length}))";
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-adjustments.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-adjustments.php
deleted file mode 100644
index 24f05d14..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-adjustments.php
+++ /dev/null
@@ -1,206 +0,0 @@
- 201906031,
- '202002121' => 202002121,
- '202102161' => 202102161
- );
-
- /**
- * Setup the database schema.
- *
- * @access protected
- * @since 3.0
- */
- protected function set_schema() {
- $this->schema = "id bigint(20) unsigned NOT NULL auto_increment,
- parent bigint(20) unsigned NOT NULL default '0',
- name varchar(200) NOT NULL default '',
- code varchar(50) NOT NULL default '',
- status varchar(20) NOT NULL default '',
- type varchar(20) NOT NULL default '',
- scope varchar(20) NOT NULL default 'all',
- amount_type varchar(20) NOT NULL default '',
- amount decimal(18,9) NOT NULL default '0',
- description longtext NOT NULL default '',
- max_uses bigint(20) unsigned NOT NULL default '0',
- use_count bigint(20) unsigned NOT NULL default '0',
- once_per_customer int(1) NOT NULL default '0',
- min_charge_amount decimal(18,9) NOT NULL default '0',
- start_date datetime default null,
- end_date datetime default null,
- date_created datetime NOT NULL default CURRENT_TIMESTAMP,
- date_modified datetime NOT NULL default CURRENT_TIMESTAMP,
- uuid varchar(100) NOT NULL default '',
- PRIMARY KEY (id),
- KEY type_status (type(20), status(20)),
- KEY code (code),
- KEY date_created (date_created),
- KEY date_start_end (start_date,end_date)";
- }
-
- /**
- * Create the table
- *
- * @since 3.0
- *
- * @return bool
- */
- public function create() {
-
- $created = parent::create();
-
- // After successful creation, we need to set the auto_increment for legacy orders.
- if ( ! empty( $created ) ) {
-
- $result = $this->get_db()->get_var( "SELECT ID FROM {$this->get_db()->prefix}posts WHERE post_type = 'edd_discount' ORDER BY ID DESC LIMIT 1;" );
-
- if ( ! empty( $result ) ) {
- $auto_increment = $result + 1;
- $this->get_db()->query( "ALTER TABLE {$this->table_name} AUTO_INCREMENT = {$auto_increment};" );
- }
-
- }
-
- return $created;
-
- }
-
- /**
- * Upgrade to version 201906031
- * - Drop the `product_condition` column.
- *
- * @since 3.0
- *
- * @return boolean True if upgrade was successful, false otherwise.
- */
- protected function __201906031() {
-
- // Look for column
- $result = $this->column_exists( 'product_condition' );
-
- // Maybe remove column
- if ( true === $result ) {
-
- // Try to remove it
- $result = ! $this->get_db()->query( "
- ALTER TABLE {$this->table_name} DROP COLUMN `product_condition`
- " );
-
- // Return success/fail
- return $this->is_success( $result );
-
- // Return true because column is already gone
- } else {
- return $this->is_success( true );
- }
- }
-
- /**
- * Upgrade to version 202002121
- * - Change default value to `null` for columns `start_date` and `end_date`.
- * - Change default value to `CURRENT_TIMESTAMP` for columns `date_created` and `date_modified`.
- *
- * @return bool
- */
- protected function __202002121() {
-
- // Update `start_date`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `start_date` datetime default null;
- " );
-
- if ( $this->is_success( $result ) ) {
- $this->get_db()->query( "UPDATE {$this->table_name} SET `start_date` = NULL WHERE `start_date` = '0000-00-00 00:00:00'" );
- }
-
- // Update `end_date`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `end_date` datetime default null;
- " );
-
- if ( $this->is_success( $result ) ) {
- $this->get_db()->query( "UPDATE {$this->table_name} SET `end_date` = NULL WHERE `end_date` = '0000-00-00 00:00:00'" );
- }
-
- // Update `date_created`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_created` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- // Update `date_modified`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_modified` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- return $this->is_success( $result );
-
- }
-
- /**
- * Upgrade to version 202102161
- * - Drop old `code_status_type_scope_amount` index
- * - Create new `status_type` index
- * - Create new `code` index
- *
- * @since 3.0
- * @return bool
- */
- protected function __202102161() {
- if ( $this->index_exists( 'code_status_type_scope_amount' ) ) {
- $this->get_db()->query( "ALTER TABLE {$this->table_name} DROP INDEX code_status_type_scope_amount" );
- }
-
- $this->get_db()->query( "ALTER TABLE {$this->table_name} ADD INDEX type_status (type(20), status(20))" );
- $this->get_db()->query( "ALTER TABLE {$this->table_name} ADD INDEX code (code)" );
-
- return true;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-customer-addresses.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-customer-addresses.php
deleted file mode 100644
index 68b0e57f..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-customer-addresses.php
+++ /dev/null
@@ -1,149 +0,0 @@
- 201906251,
- '202002141' => 202002141,
- '202004051' => 202004051,
- );
-
- /**
- * Setup the database schema
- *
- * @access protected
- * @since 3.0
- * @return void
- */
- protected function set_schema() {
- $this->schema = "id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
- customer_id bigint(20) unsigned NOT NULL default '0',
- is_primary tinyint(1) signed NOT NULL default '0',
- type varchar(20) NOT NULL default 'billing',
- status varchar(20) NOT NULL default 'active',
- name mediumtext NOT NULL,
- address mediumtext NOT NULL,
- address2 mediumtext NOT NULL,
- city mediumtext NOT NULL,
- region mediumtext NOT NULL,
- postal_code varchar(32) NOT NULL default '',
- country mediumtext NOT NULL,
- date_created datetime NOT NULL default CURRENT_TIMESTAMP,
- date_modified datetime NOT NULL default CURRENT_TIMESTAMP,
- uuid varchar(100) NOT NULL default '',
- PRIMARY KEY (id),
- KEY customer_is_primary (customer_id, is_primary),
- KEY type (type(20)),
- KEY status (status(20)),
- KEY date_created (date_created)";
- }
-
- /**
- * Upgrade to version 201906251
- * - Add the `name` mediumtext column
- *
- * @since 3.0
- *
- * @return boolean
- */
- protected function __201906251() {
-
- $result = $this->column_exists( 'name' );
-
- if ( false === $result ) {
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} ADD COLUMN `name` mediumtext AFTER `status`;
- " );
- }
-
- return $this->is_success( $result );
- }
-
- /**
- * Upgrade to version 202002141
- * - Change default value to `CURRENT_TIMESTAMP` for columns `date_created` and `date_modified`.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202002141() {
-
- // Update `date_created`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_created` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- // Update `date_modified`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_modified` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- return $this->is_success( $result );
-
- }
-
- /**
- * Upgrade to version 202004051
- * - Update the customer physical address table to have `is_primary`
- *
- * @since 3.0
- * @return bool
- */
- protected function __202004051() {
-
- $result = $this->column_exists( 'is_primary' );
- if ( false === $result ) {
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} ADD COLUMN `is_primary` tinyint SIGNED NOT NULL default '0' AFTER `customer_id`;
- " );
- }
-
- return $this->is_success( $result );
- }
-
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-customer-email-addresses.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-customer-email-addresses.php
deleted file mode 100644
index 7e87081e..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-customer-email-addresses.php
+++ /dev/null
@@ -1,101 +0,0 @@
- 202002141,
- );
-
- /**
- * Setup the database schema
- *
- * @access protected
- * @since 3.0
- * @return void
- */
- protected function set_schema() {
- $this->schema = "id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
- customer_id bigint(20) unsigned NOT NULL default '0',
- type varchar(20) NOT NULL default 'secondary',
- status varchar(20) NOT NULL default 'active',
- email varchar(100) NOT NULL default '',
- date_created datetime NOT NULL default CURRENT_TIMESTAMP,
- date_modified datetime NOT NULL default CURRENT_TIMESTAMP,
- uuid varchar(100) NOT NULL default '',
- PRIMARY KEY (id),
- KEY customer (customer_id),
- KEY email (email),
- KEY type (type(20)),
- KEY status (status(20)),
- KEY date_created (date_created)";
- }
-
- /**
- * Upgrade to version 202002141
- * - Change default value to `CURRENT_TIMESTAMP` for columns `date_created` and `date_modified`.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202002141() {
-
- // Update `date_created`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_created` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- // Update `date_modified`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_modified` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- return $this->is_success( $result );
-
- }
-
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-customer-meta.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-customer-meta.php
deleted file mode 100644
index a46c2b74..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-customer-meta.php
+++ /dev/null
@@ -1,131 +0,0 @@
- 201807111
- );
-
- /**
- * Setup the database schema
- *
- * @access protected
- * @since 3.0
- * @return void
- */
- protected function set_schema() {
- $max_index_length = 191;
- $this->schema = "meta_id bigint(20) unsigned NOT NULL auto_increment,
- edd_customer_id bigint(20) unsigned NOT NULL default '0',
- meta_key varchar(255) DEFAULT NULL,
- meta_value longtext DEFAULT NULL,
- PRIMARY KEY (meta_id),
- KEY edd_customer_id (edd_customer_id),
- KEY meta_key (meta_key({$max_index_length}))";
- }
-
- /**
- * Override the Base class `maybe_upgrade()` routine to do a very unique and
- * special check against the old option.
- *
- * Maybe upgrades the database table from 2.x to 3.x standards. This method
- * should be kept up-to-date with schema changes in `set_schema()` above.
- *
- * - Hooked to the "admin_init" action.
- * - Calls the parent class `maybe_upgrade()` method
- *
- * @since 3.0
- */
- public function maybe_upgrade() {
-
- if ( $this->needs_initial_upgrade() ) {
-
- // Delete old/irrelevant database options.
- delete_option( $this->table_prefix . 'edd_customermeta_db_version' );
- delete_option( 'wp_edd_customermeta_db_version' );
-
- $this->get_db()->query( "ALTER TABLE {$this->table_name} CHANGE `customer_id` `edd_customer_id` bigint(20) unsigned NOT NULL default '0';" );
- $this->get_db()->query( "ALTER TABLE {$this->table_name} DROP INDEX customer_id" );
- $this->get_db()->query( "ALTER TABLE {$this->table_name} ADD INDEX edd_customer_id (edd_customer_id)" );
- }
-
- parent::maybe_upgrade();
- }
-
- /**
- * Whether the initial upgrade from the 1.0 database needs to be run.
- *
- * @since 3.0.3
- * @return bool
- */
- private function needs_initial_upgrade() {
- return $this->exists() && $this->column_exists( 'customer_id' ) && ! $this->column_exists( 'edd_customer_id' );
- }
-
- /**
- * Upgrade to version 201807111
- * - Rename `customer_id` column to `edd_customer_id`
- * - Add `status` column.
- *
- * @since 3.0
- *
- * @return bool
- */
- protected function __201807111() {
-
- // Alter the database with separate queries so indexes succeed
- if ( $this->column_exists( 'customer_id' ) && ! $this->column_exists( 'edd_customer_id' ) ) {
- $this->get_db()->query( "ALTER TABLE {$this->table_name} CHANGE `customer_id` `edd_customer_id` bigint(20) unsigned NOT NULL default '0'" );
- $this->get_db()->query( "ALTER TABLE {$this->table_name} DROP INDEX customer_id" );
- $this->get_db()->query( "ALTER TABLE {$this->table_name} ADD INDEX edd_customer_id (edd_customer_id)" );
- }
-
- // Return success/fail
- return $this->is_success( true );
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-customers.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-customers.php
deleted file mode 100644
index 672db177..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-customers.php
+++ /dev/null
@@ -1,265 +0,0 @@
- 202006101,
- '202301021' => 202301021,
- '202303220' => 202303220,
- );
-
- /**
- * Setup the database schema
- *
- * @access protected
- * @since 3.0
- * @return void
- */
- protected function set_schema() {
- $this->schema = "id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
- user_id bigint(20) unsigned NOT NULL default '0',
- email varchar(100) NOT NULL default '',
- name varchar(255) NOT NULL default '',
- status varchar(20) NOT NULL default '',
- purchase_value decimal(18,9) NOT NULL default '0',
- purchase_count bigint(20) unsigned NOT NULL default '0',
- date_created datetime NOT NULL default CURRENT_TIMESTAMP,
- date_modified datetime NOT NULL default CURRENT_TIMESTAMP,
- uuid varchar(100) NOT NULL default '',
- PRIMARY KEY (id),
- UNIQUE KEY email (email),
- KEY user (user_id),
- KEY status (status(20)),
- KEY date_created (date_created)";
- }
-
- /**
- * Whether the initial upgrade from the 1.0 database needs to be run.
- *
- * @since 3.0.3
- * @since 3.1.1 Explicitly checks each of these cases to ensure a non-fully updated table is updated, but not currently used.
- * @return bool
- */
- private function needs_initial_upgrade() {
- if ( $this->exists() && ! $this->column_exists( 'status' ) ) {
- return true;
- }
-
- if ( $this->exists() && ! $this->column_exists( 'uuid' ) ) {
- return true;
- }
-
- if ( $this->exists() && ! $this->column_exists( 'date_modified' ) ) {
- return true;
- }
-
- return false;
- }
-
- /**
- * Upgrade to version 202002141
- * - Change default value to `CURRENT_TIMESTAMP` for columns `date_created` and `date_modified`.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202002141() {
-
- // Update `date_created`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_created` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- // Update `date_modified`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_modified` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- return $this->is_success( $result );
-
- }
-
- /**
- * Upgrade to version 202006101
- * - Remove the payment_ids column if it still exists.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202006101() {
-
- $result = true;
-
- // Remove the column.
- if ( $this->column_exists( 'payment_ids' ) ) {
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} DROP `payment_ids`
- " );
- }
-
- return $this->is_success( $result );
- }
-
- /**
- * Checks the status of the edd_customers table for health and state and performs
- * any necessary changes that haven't been prevoiusly made.
- *
- * @since 3.1.1
- * @return bool
- */
- protected function __202301021() {
- // Verify that columns that existed prior to 3.0 get the proper changes made.
- $columns = $this->get_db()->get_results( "SHOW COLUMNS FROM {$this->table_name}" );
- $existing_column_updates = array();
-
- // Set an array to hold the result of each query run.
- $query_results = array();
-
- foreach ( $columns as $column ) {
- switch ( $column->Field ) {
- case 'email':
- if ( 'varchar(100)' !== $column->Type ) {
- $existing_column_updates['alter-email-type'] = "ALTER TABLE {$this->table_name} MODIFY `email` varchar(100) NOT NULL default ''";
- }
- break;
-
- case 'name':
- if ( 'varchar(255)' !== $column->Type ) {
- $existing_column_updates['alter-name-type'] = "ALTER TABLE {$this->table_name} MODIFY `name` varchar(255) NOT NULL default ''";
- }
- break;
-
- case 'user_id':
- if ( 'bigint(20)' !== $column->Type ) {
- $existing_column_updates['alter-user_id-type'] = "ALTER TABLE {$this->table_name} MODIFY `user_id` bigint(20) unsigned NOT NULL default '0'";
- }
- break;
-
- case 'purchase_value':
- if ( 'decimal(18,9)' !== $column->Type ) {
- $existing_column_updates['alter-purchase_value-type'] = "ALTER TABLE {$this->table_name} MODIFY `purchase_value` decimal(18,9) NOT NULL default '0'";
- }
- break;
-
- case 'purchase_count':
- if ( 'bigint(20)' !== $column->Type ) {
- $existing_column_updates['alter-purchase_count-type'] = "ALTER TABLE {$this->table_name} MODIFY `purchase_count` bigint(20) unsigned NOT NULL default '0'";
- }
- break;
-
- case 'date_created':
- if ( 'datetime' !== $column->Type ) {
- $existing_column_updates['alter-date_created-type'] = "ALTER TABLE {$this->table_name} MODIFY `date_created` datetime NOT NULL default CURRENT_TIMESTAMP";
- }
- break;
-
- case 'payment_ids':
- $existing_column_updates['drop-payment_ids'] = "ALTER TABLE {$this->table_name} DROP COLUMN `payment_ids`";
- break;
-
- case 'notes':
- // Only remove the customer notes column if they've already run the customer notes migration.
- if ( edd_has_upgrade_completed( 'v30_legacy_data_removed' ) ) {
- $existing_column_updates['drop-notes'] = "ALTER TABLE {$this->table_name} DROP COLUMN `notes`";
- }
- break;
- }
- }
-
- if ( ! empty( $existing_column_updates ) ) {
- foreach ( $existing_column_updates as $query_key => $update_sql ) {
- $query_results[ $query_key ] = $this->is_success( $this->get_db()->query( $update_sql ) );
- }
- }
-
- // Now verify that new columns are created and exist.
- if ( ! $this->column_exists( 'status' ) ) {
- $query_results['add-status-column'] = $this->is_success( $this->get_db()->query( "ALTER TABLE {$this->table_name} ADD COLUMN `status` varchar(20) NOT NULL default 'active' AFTER `name`;" ) );
- $query_results['index-status'] = $this->is_success( $this->get_db()->query( "ALTER TABLE {$this->table_name} ADD INDEX status (status(20))" ) );
- }
-
- if ( ! $this->column_exists( 'date_modified' ) ) {
- $query_results['add-date_modified-column'] = $this->is_success( $this->get_db()->query( "ALTER TABLE {$this->table_name} ADD COLUMN `date_modified` datetime DEFAULT CURRENT_TIMESTAMP AFTER `date_created`" ) );
- $query_results['update-modified-with-created'] = $this->is_success( $this->get_db()->query( "UPDATE {$this->table_name} SET `date_modified` = `date_created`" ) );
- $query_results['index-date_created'] = $this->is_success( $this->get_db()->query( "ALTER TABLE {$this->table_name} ADD INDEX date_created (date_created)" ) );
- }
-
- if ( ! $this->column_exists( 'uuid' ) ) {
- $query_results['add-uuid-column'] = $this->is_success( $this->get_db()->query( "ALTER TABLE {$this->table_name} ADD COLUMN `uuid` varchar(100) default '' AFTER `date_modified`;" ) );
- }
-
- $return_result = true;
-
- // Loop through each of the query results and force a debug log for any failures.
- foreach ( $query_results as $query_key => $query_result ) {
- if ( false === $query_result ) {
- $return_result = false;
- edd_debug_log( 'Customer\'s table version ' . $this->version . ' update failed for: ' . $query_key, true );
- }
- }
-
- delete_option( $this->table_prefix . 'edd_customers_db_version' );
- delete_option( 'wp_edd_customers_db_version' );
-
- return $this->is_success( $return_result );
- }
-
- /**
- * Upgrades the customer database for sites which got into a bit of a snarl with the database versions.
- *
- * @since 3.1.1.3
- * @return bool
- */
- protected function __202303220() {
- if ( $this->needs_initial_upgrade() ) {
- return $this->__202301021();
- }
-
- return true;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-log-meta.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-log-meta.php
deleted file mode 100644
index 926300a9..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-log-meta.php
+++ /dev/null
@@ -1,60 +0,0 @@
-schema = "meta_id bigint(20) unsigned NOT NULL auto_increment,
- edd_log_id bigint(20) unsigned NOT NULL default '0',
- meta_key varchar(255) DEFAULT NULL,
- meta_value longtext DEFAULT NULL,
- PRIMARY KEY (meta_id),
- KEY edd_log_id (edd_log_id),
- KEY meta_key (meta_key({$max_index_length}))";
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-logs-api-request-meta.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-logs-api-request-meta.php
deleted file mode 100644
index 7a1fd204..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-logs-api-request-meta.php
+++ /dev/null
@@ -1,60 +0,0 @@
-schema = "meta_id bigint(20) unsigned NOT NULL auto_increment,
- edd_logs_api_request_id bigint(20) unsigned NOT NULL default '0',
- meta_key varchar(255) DEFAULT NULL,
- meta_value longtext DEFAULT NULL,
- PRIMARY KEY (meta_id),
- KEY edd_logs_api_request_id (edd_logs_api_request_id),
- KEY meta_key (meta_key({$max_index_length}))";
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-logs-api-requests.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-logs-api-requests.php
deleted file mode 100644
index 0b40bf0a..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-logs-api-requests.php
+++ /dev/null
@@ -1,102 +0,0 @@
- 202002141,
- );
-
- /**
- * Setup the database schema
- *
- * @access protected
- * @since 3.0
- * @return void
- */
- protected function set_schema() {
- $this->schema = "id bigint(20) unsigned NOT NULL auto_increment,
- user_id bigint(20) unsigned NOT NULL default '0',
- api_key varchar(32) NOT NULL default 'public',
- token varchar(32) NOT NULL default '',
- version varchar(32) NOT NULL default '',
- request longtext NOT NULL default '',
- error longtext NOT NULL default '',
- ip varchar(60) NOT NULL default '',
- time varchar(60) NOT NULL default '',
- date_created datetime NOT NULL default CURRENT_TIMESTAMP,
- date_modified datetime NOT NULL default CURRENT_TIMESTAMP,
- uuid varchar(100) NOT NULL default '',
- PRIMARY KEY (id),
- KEY user_id (user_id),
- KEY date_created (date_created)";
- }
-
- /**
- * Upgrade to version 202002141
- * - Change default value to `CURRENT_TIMESTAMP` for columns `date_created` and `date_modified`.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202002141() {
-
- // Update `date_created`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_created` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- // Update `date_modified`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_modified` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- return $this->is_success( $result );
-
- }
-
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-logs-file-download-meta.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-logs-file-download-meta.php
deleted file mode 100644
index 011fce67..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-logs-file-download-meta.php
+++ /dev/null
@@ -1,60 +0,0 @@
-schema = "meta_id bigint(20) unsigned NOT NULL auto_increment,
- edd_logs_file_download_id bigint(20) unsigned NOT NULL default '0',
- meta_key varchar(255) DEFAULT NULL,
- meta_value longtext DEFAULT NULL,
- PRIMARY KEY (meta_id),
- KEY edd_logs_file_download_id (edd_logs_file_download_id),
- KEY meta_key (meta_key({$max_index_length}))";
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-logs-file-downloads.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-logs-file-downloads.php
deleted file mode 100644
index 2c26ed9d..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-logs-file-downloads.php
+++ /dev/null
@@ -1,102 +0,0 @@
- 202002141,
- );
-
- /**
- * Setup the database schema
- *
- * @access protected
- * @since 3.0
- * @return void
- */
- protected function set_schema() {
- $this->schema = "id bigint(20) unsigned NOT NULL auto_increment,
- product_id bigint(20) unsigned NOT NULL default '0',
- file_id bigint(20) unsigned NOT NULL default '0',
- order_id bigint(20) unsigned NOT NULL default '0',
- price_id bigint(20) unsigned NOT NULL default '0',
- customer_id bigint(20) unsigned NOT NULL default '0',
- ip varchar(60) NOT NULL default '',
- user_agent varchar(200) NOT NULL default '',
- date_created datetime NOT NULL default CURRENT_TIMESTAMP,
- date_modified datetime NOT NULL default CURRENT_TIMESTAMP,
- uuid varchar(100) NOT NULL default '',
- PRIMARY KEY (id),
- KEY customer_id (customer_id),
- KEY product_id (product_id),
- KEY date_created (date_created)";
- }
-
- /**
- * Upgrade to version 202002141
- * - Change default value to `CURRENT_TIMESTAMP` for columns `date_created` and `date_modified`.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202002141() {
-
- // Update `date_created`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_created` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- // Update `date_modified`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_modified` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- return $this->is_success( $result );
-
- }
-
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-logs.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-logs.php
deleted file mode 100644
index faf06487..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-logs.php
+++ /dev/null
@@ -1,101 +0,0 @@
- 202002141,
- );
-
- /**
- * Setup the database schema.
- *
- * @access protected
- * @since 3.0
- * @return void
- */
- protected function set_schema() {
- $this->schema = "id bigint(20) unsigned NOT NULL auto_increment,
- object_id bigint(20) unsigned NOT NULL default '0',
- object_type varchar(20) DEFAULT NULL,
- user_id bigint(20) unsigned NOT NULL default '0',
- type varchar(20) DEFAULT NULL,
- title varchar(200) DEFAULT NULL,
- content longtext DEFAULT NULL,
- date_created datetime NOT NULL default CURRENT_TIMESTAMP,
- date_modified datetime NOT NULL default CURRENT_TIMESTAMP,
- uuid varchar(100) NOT NULL default '',
- PRIMARY KEY (id),
- KEY object_id_type (object_id,object_type(20)),
- KEY user_id (user_id),
- KEY type (type(20)),
- KEY date_created (date_created)";
- }
-
- /**
- * Upgrade to version 202002141
- * - Change default value to `CURRENT_TIMESTAMP` for columns `date_created` and `date_modified`.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202002141() {
-
- // Update `date_created`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_created` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- // Update `date_modified`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_modified` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- return $this->is_success( $result );
-
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-note-meta.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-note-meta.php
deleted file mode 100644
index aca2ecc1..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-note-meta.php
+++ /dev/null
@@ -1,60 +0,0 @@
-schema = "meta_id bigint(20) unsigned NOT NULL auto_increment,
- edd_note_id bigint(20) unsigned NOT NULL default '0',
- meta_key varchar(255) DEFAULT NULL,
- meta_value longtext DEFAULT NULL,
- PRIMARY KEY (meta_id),
- KEY edd_note_id (edd_note_id),
- KEY meta_key (meta_key({$max_index_length}))";
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-notes.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-notes.php
deleted file mode 100644
index 9ecbdbbf..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-notes.php
+++ /dev/null
@@ -1,99 +0,0 @@
- 202002141,
- );
-
- /**
- * Setup the database schema
- *
- * @access protected
- * @since 3.0
- * @return void
- */
- protected function set_schema() {
- $this->schema = "id bigint(20) unsigned NOT NULL auto_increment,
- object_id bigint(20) unsigned NOT NULL default '0',
- object_type varchar(20) NOT NULL default '',
- user_id bigint(20) unsigned NOT NULL default '0',
- content longtext NOT NULL default '',
- date_created datetime NOT NULL default CURRENT_TIMESTAMP,
- date_modified datetime NOT NULL default CURRENT_TIMESTAMP,
- uuid varchar(100) NOT NULL default '',
- PRIMARY KEY (id),
- KEY object_id_type (object_id,object_type(20)),
- KEY user_id (user_id),
- KEY date_created (date_created)";
- }
-
- /**
- * Upgrade to version 202002141
- * - Change default value to `CURRENT_TIMESTAMP` for columns `date_created` and `date_modified`.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202002141() {
-
- // Update `date_created`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_created` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- // Update `date_modified`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_modified` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- return $this->is_success( $result );
-
- }
-
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-order-addresses.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-order-addresses.php
deleted file mode 100644
index a32036d1..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-order-addresses.php
+++ /dev/null
@@ -1,174 +0,0 @@
- 201906251,
- '201906281' => 201906281,
- '202002141' => 202002141,
- );
-
- /**
- * Setup the database schema
- *
- * @access protected
- * @since 3.0
- * @return void
- */
- protected function set_schema() {
- $max_index_length = 191;
- $this->schema = "id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
- order_id bigint(20) unsigned NOT NULL default '0',
- type varchar(20) NOT NULL default 'billing',
- name mediumtext NOT NULL,
- address mediumtext NOT NULL,
- address2 mediumtext NOT NULL,
- city mediumtext NOT NULL,
- region mediumtext NOT NULL,
- postal_code varchar(32) NOT NULL default '',
- country mediumtext NOT NULL,
- date_created datetime NOT NULL default CURRENT_TIMESTAMP,
- date_modified datetime NOT NULL default CURRENT_TIMESTAMP,
- uuid varchar(100) NOT NULL default '',
- PRIMARY KEY (id),
- KEY order_id (order_id),
- KEY city (city({$max_index_length})),
- KEY region (region({$max_index_length})),
- KEY postal_code (postal_code(32)),
- KEY country (country({$max_index_length})),
- KEY date_created (date_created)";
- }
-
- /**
- * Upgrade to version 201906251
- * - Adds the 'name' column
- * - Combines the `first_name` and `last_name` columns to the `name` column.
- * - Removes the `first_name` and `last_name` columns.
- *
- * @since 3.0
- *
- * @return boolean
- */
- protected function __201906251() {
-
- $success = true;
-
- $column_exists = $this->column_exists( 'name' );
-
- // Don't take any action if the column already exists.
- if ( false === $column_exists ) {
- $column_exists = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} ADD COLUMN `name` mediumtext NOT NULL AFTER `last_name`;
- " );
-
- }
-
- $deprecated_columns_exist = ( $this->column_exists( 'first_name' ) && $this->column_exists( 'last_name' ) );
- if ( $column_exists && $deprecated_columns_exist ) {
- $data_merged = $this->get_db()->query( "
- UPDATE {$this->table_name} SET name = CONCAT(first_name, ' ', last_name);
- " );
-
- if ( $data_merged ) {
- $success = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} DROP first_name, DROP last_name;
- " );
- }
- }
-
- return $this->is_success( $success );
- }
-
- /**
- * Upgrade to version 201906281
- * - Add the `type` varchar column
- *
- * @since 3.0
- *
- * @return boolean
- */
- protected function __201906281() {
-
- // Look for column.
- $result = $this->column_exists( 'type' );
-
- // Maybe add column.
- if ( false === $result ) {
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} ADD COLUMN `type` varchar(20) default 'billing' AFTER `order_id`;
- " );
- }
-
- // Return success/fail.
- return $this->is_success( $result );
- }
-
- /**
- * Upgrade to version 202002141
- * - Change default value to `CURRENT_TIMESTAMP` for columns `date_created` and `date_modified`.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202002141() {
-
- // Update `date_created`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_created` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- // Update `date_modified`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_modified` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- return $this->is_success( $result );
-
- }
-
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-order-adjustment-meta.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-order-adjustment-meta.php
deleted file mode 100644
index 149c30e6..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-order-adjustment-meta.php
+++ /dev/null
@@ -1,60 +0,0 @@
-schema = "meta_id bigint(20) unsigned NOT NULL auto_increment,
- edd_order_adjustment_id bigint(20) unsigned NOT NULL default '0',
- meta_key varchar(255) DEFAULT NULL,
- meta_value longtext DEFAULT NULL,
- PRIMARY KEY (meta_id),
- KEY edd_order_adjustment_id (edd_order_adjustment_id),
- KEY meta_key (meta_key({$max_index_length}))";
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-order-adjustments.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-order-adjustments.php
deleted file mode 100644
index 18224bdf..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-order-adjustments.php
+++ /dev/null
@@ -1,187 +0,0 @@
- 202002141,
- '202011122' => 202011122,
- '202103151' => 202103151,
- '202105221' => 202105221,
- );
-
- /**
- * Setup the database schema
- *
- * @access protected
- * @since 3.0
- * @return void
- */
- protected function set_schema() {
- $this->schema = "id bigint(20) unsigned NOT NULL auto_increment,
- parent bigint(20) unsigned NOT NULL default '0',
- object_id bigint(20) unsigned NOT NULL default '0',
- object_type varchar(20) DEFAULT NULL,
- type_id bigint(20) unsigned DEFAULT NULL,
- type varchar(20) DEFAULT NULL,
- type_key varchar(255) DEFAULT NULL,
- description varchar(100) DEFAULT NULL,
- subtotal decimal(18,9) NOT NULL default '0',
- tax decimal(18,9) NOT NULL default '0',
- total decimal(18,9) NOT NULL default '0',
- rate decimal(10,5) NOT NULL DEFAULT 1.00000,
- date_created datetime NOT NULL default CURRENT_TIMESTAMP,
- date_modified datetime NOT NULL default CURRENT_TIMESTAMP,
- uuid varchar(100) NOT NULL default '',
- PRIMARY KEY (id),
- KEY object_id_type (object_id,object_type(20)),
- KEY date_created (date_created),
- KEY parent (parent)";
- }
-
- /**
- * Upgrade to version 202002141
- * - Change default value to `CURRENT_TIMESTAMP` for columns `date_created` and `date_modified`.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202002141() {
-
- // Update `date_created`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_created` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- // Update `date_modified`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_modified` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- return $this->is_success( $result );
-
- }
-
- /**
- * Upgrade to version 202011122
- * - Change default value to `NULL` for `type_id` column.
- * - Add `type_key` column.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202011122() {
-
- // Update `type_id`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `type_id` bigint(20) default NULL;
- " );
-
- // Add `type_key`.
- $column_exists = $this->column_exists( 'type_key' );
- if ( false === $column_exists ) {
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} ADD COLUMN `type_key` varchar(255) default NULL AFTER `type`;
- " );
- } else {
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY `type_key` varchar(255) default NULL AFTER `type`
- " );
- }
-
- // Change `type_id` with `0` value to `null` to support new default.
- $this->get_db()->query( "UPDATE {$this->table_name} SET type_id = null WHERE type_id = 0;" );
-
- return $this->is_success( $result );
- }
-
- /**
- * Upgrade to version 202103151
- * - Add column `parent`
- * - Add index on `parent` column.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202103151() {
- // Look for column
- $result = $this->column_exists( 'parent' );
-
- // Maybe add column
- if ( false === $result ) {
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} ADD COLUMN parent bigint(20) unsigned NOT NULL default '0' AFTER id;
- " );
- }
-
- if ( ! $this->index_exists( 'parent' ) ) {
- $this->get_db()->query( "ALTER TABLE {$this->table_name} ADD INDEX parent (parent)" );
- }
-
- // Return success/fail.
- return $this->is_success( $result );
- }
-
- /**
- * Upgrade to version 202105221
- * - Add `rate` column.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202105221() {
- if ( ! $this->column_exists( 'rate' ) ) {
- return $this->is_success(
- $this->get_db()->query(
- "ALTER TABLE {$this->table_name} ADD COLUMN rate decimal(10,5) NOT NULL DEFAULT 1.00000 AFTER total"
- )
- );
- }
-
- return true;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-order-item-meta.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-order-item-meta.php
deleted file mode 100644
index 4d4358d4..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-order-item-meta.php
+++ /dev/null
@@ -1,60 +0,0 @@
-schema = "meta_id bigint(20) unsigned NOT NULL auto_increment,
- edd_order_item_id bigint(20) unsigned NOT NULL default '0',
- meta_key varchar(255) DEFAULT NULL,
- meta_value longtext DEFAULT NULL,
- PRIMARY KEY (meta_id),
- KEY edd_order_item_id (edd_order_item_id),
- KEY meta_key (meta_key({$max_index_length}))";
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-order-items.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-order-items.php
deleted file mode 100644
index 4d128454..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-order-items.php
+++ /dev/null
@@ -1,209 +0,0 @@
- 201906241,
- '202002141' => 202002141,
- '202102010' => 202102010,
- '202103151' => 202103151,
- '202105221' => 202105221,
- '202110141' => 202110141,
- );
-
- /**
- * Setup the database schema
- *
- * @access protected
- * @since 3.0
- * @return void
- */
- protected function set_schema() {
- $this->schema = "id bigint(20) unsigned NOT NULL auto_increment,
- parent bigint(20) unsigned NOT NULL default '0',
- order_id bigint(20) unsigned NOT NULL default '0',
- product_id bigint(20) unsigned NOT NULL default '0',
- product_name text NOT NULL default '',
- price_id bigint(20) unsigned default null,
- cart_index bigint(20) unsigned NOT NULL default '0',
- type varchar(20) NOT NULL default 'download',
- status varchar(20) NOT NULL default 'pending',
- quantity int signed NOT NULL default '0',
- amount decimal(18,9) NOT NULL default '0',
- subtotal decimal(18,9) NOT NULL default '0',
- discount decimal(18,9) NOT NULL default '0',
- tax decimal(18,9) NOT NULL default '0',
- total decimal(18,9) NOT NULL default '0',
- rate decimal(10,5) NOT NULL DEFAULT 1.00000,
- date_created datetime NOT NULL default CURRENT_TIMESTAMP,
- date_modified datetime NOT NULL default CURRENT_TIMESTAMP,
- uuid varchar(100) NOT NULL default '',
- PRIMARY KEY (id),
- KEY order_product_price_id (order_id,product_id,price_id),
- KEY type_status (type(20),status(20)),
- KEY parent (parent)";
- }
-
- /**
- * Upgrade to version 201906241
- * - Make the quantity column signed so it can contain negative numbers.
- * - Switch the quantity column from bigint to int for storage optimization.
- *
- * @since 3.0
- *
- * @return bool
- */
- protected function __201906241() {
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY `quantity` int signed NOT NULL default '0';
- " );
-
- // Return success/fail
- return $this->is_success( $result );
- }
-
- /**
- * Upgrade to version 202002141
- * - Change default value to `CURRENT_TIMESTAMP` for columns `date_created` and `date_modified`.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202002141() {
-
- // Update `date_created`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_created` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- // Update `date_modified`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_modified` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- return $this->is_success( $result );
-
- }
-
- /**
- * Upgrade to version 202102010.
- * - Change default value for `status` column to 'pending'.
- *
- * @return bool
- */
- protected function __202102010() {
- // Update `status`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `status` varchar(20) NOT NULL default 'pending';
- " );
-
- return $this->is_success( $result );
- }
-
- /**
- * Upgrade to version 202103151
- * - Add column `parent`
- * - Add index on `parent` column.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202103151() {
- // Look for column
- $result = $this->column_exists( 'parent' );
-
- // Maybe add column
- if ( false === $result ) {
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} ADD COLUMN parent bigint(20) unsigned NOT NULL default '0' AFTER id;
- " );
- }
-
- if ( ! $this->index_exists( 'parent' ) ) {
- $this->get_db()->query( "ALTER TABLE {$this->table_name} ADD INDEX parent (parent)" );
- }
-
- // Return success/fail.
- return $this->is_success( $result );
- }
-
- /**
- * Upgrade to version 202105221
- * - Add `rate` column.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202105221() {
- if ( ! $this->column_exists( 'rate' ) ) {
- return $this->is_success(
- $this->get_db()->query(
- "ALTER TABLE {$this->table_name} ADD COLUMN rate decimal(10,5) NOT NULL DEFAULT 1.00000 AFTER total"
- )
- );
- }
-
- return true;
- }
-
- /**
- * Upgrade to version 202110141
- * - Change default value for `price_id` to `null`.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202110141() {
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN price_id bigint(20) unsigned default null;
- " );
-
- return $this->is_success( $result );
- }
-
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-order-meta.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-order-meta.php
deleted file mode 100644
index 58b9aaa1..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-order-meta.php
+++ /dev/null
@@ -1,60 +0,0 @@
-schema = "meta_id bigint(20) unsigned NOT NULL auto_increment,
- edd_order_id bigint(20) unsigned NOT NULL default '0',
- meta_key varchar(255) DEFAULT NULL,
- meta_value longtext DEFAULT NULL,
- PRIMARY KEY (meta_id),
- KEY edd_order_id (edd_order_id),
- KEY meta_key (meta_key({$max_index_length}))";
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-order-transactions.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-order-transactions.php
deleted file mode 100644
index 3ba4d8a2..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-order-transactions.php
+++ /dev/null
@@ -1,161 +0,0 @@
- 202002141,
- '202005261' => 202005261,
- '202105291' => 202105291,
- '202205241' => 202205241,
- );
-
- /**
- * Setup the database schema
- *
- * @access protected
- * @since 3.0
- * @return void
- */
- protected function set_schema() {
- $this->schema = "id bigint(20) unsigned NOT NULL auto_increment,
- object_id bigint(20) unsigned NOT NULL default '0',
- object_type varchar(20) NOT NULL default '',
- transaction_id varchar(256) NOT NULL default '',
- gateway varchar(20) NOT NULL default '',
- status varchar(20) NOT NULL default '',
- total decimal(18,9) NOT NULL default '0',
- rate decimal(10,5) NOT NULL DEFAULT 1.00000,
- date_created datetime NOT NULL default CURRENT_TIMESTAMP,
- date_modified datetime NOT NULL default CURRENT_TIMESTAMP,
- uuid varchar(100) NOT NULL default '',
- PRIMARY KEY (id),
- KEY transaction_id (transaction_id(64)),
- KEY gateway (gateway(20)),
- KEY status (status(20)),
- KEY date_created (date_created),
- KEY object_type_object_id (object_type, object_id)";
- }
-
- /**
- * Upgrade to version 202002141
- * - Change default value to `CURRENT_TIMESTAMP` for columns `date_created` and `date_modified`.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202002141() {
-
- // Update `date_created`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_created` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- // Update `date_modified`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_modified` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- return $this->is_success( $result );
-
- }
-
- /**
- * Upgrade to version 202005261
- * - Changed the column length from 64 to 256 in order to account for future updates to gateway data.
- *
- * @since 3.0
- *
- * @return bool
- */
- protected function __202005261() {
-
- // Increase the transaction_id column.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `transaction_id` varchar(256) NOT NULL default '';
- " );
-
- return $this->is_success( $result );
- }
-
- /**
- * Upgrade to version 202105291
- * - Add `rate` column.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202105291() {
- if ( ! $this->column_exists( 'rate' ) ) {
- return $this->is_success(
- $this->get_db()->query(
- "ALTER TABLE {$this->table_name} ADD COLUMN rate decimal(10,5) NOT NULL DEFAULT 1.00000 AFTER total"
- )
- );
- }
-
- return true;
- }
-
- /**
- * Upgrade to version 202205241
- * - Add combined index for object_type, object_id.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202205241() {
- if ( $this->index_exists( 'object_type_object_id' ) ) {
- return true;
- }
-
- $this->get_db()->query( "ALTER TABLE {$this->table_name} ADD INDEX object_type_object_id (object_type, object_id)" );
-
- return true;
- }
-
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-orders.php b/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-orders.php
deleted file mode 100644
index 9b83940f..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/database/tables/class-orders.php
+++ /dev/null
@@ -1,304 +0,0 @@
- 201901111,
- '202002141' => 202002141,
- '202012041' => 202012041,
- '202102161' => 202102161,
- '202103261' => 202103261,
- '202105221' => 202105221,
- '202108041' => 202108041,
- '202302241' => 202302241,
- );
-
- /**
- * Setup the database schema.
- *
- * @access protected
- * @since 3.0
- */
- protected function set_schema() {
- $max_index_length = 191;
- $this->schema = "id bigint(20) unsigned NOT NULL auto_increment,
- parent bigint(20) unsigned NOT NULL default '0',
- order_number varchar(255) NOT NULL default '',
- status varchar(20) NOT NULL default 'pending',
- type varchar(20) NOT NULL default 'sale',
- user_id bigint(20) unsigned NOT NULL default '0',
- customer_id bigint(20) unsigned NOT NULL default '0',
- email varchar(100) NOT NULL default '',
- ip varchar(60) NOT NULL default '',
- gateway varchar(100) NOT NULL default 'manual',
- mode varchar(20) NOT NULL default '',
- currency varchar(20) NOT NULL default '',
- payment_key varchar(64) NOT NULL default '',
- tax_rate_id bigint(20) DEFAULT NULL,
- subtotal decimal(18,9) NOT NULL default '0',
- discount decimal(18,9) NOT NULL default '0',
- tax decimal(18,9) NOT NULL default '0',
- total decimal(18,9) NOT NULL default '0',
- rate decimal(10,5) NOT NULL DEFAULT 1.00000,
- date_created datetime NOT NULL default CURRENT_TIMESTAMP,
- date_modified datetime NOT NULL default CURRENT_TIMESTAMP,
- date_completed datetime default null,
- date_refundable datetime default null,
- uuid varchar(100) NOT NULL default '',
- PRIMARY KEY (id),
- KEY order_number (order_number({$max_index_length})),
- KEY status_type (status, type),
- KEY user_id (user_id),
- KEY customer_id (customer_id),
- KEY email (email(100)),
- KEY payment_key (payment_key(64)),
- KEY date_created_completed (date_created,date_completed),
- KEY currency (currency)";
- }
-
- /**
- * Create the table
- *
- * @since 3.0
- *
- * @return bool
- */
- public function create() {
-
- $created = parent::create();
-
- // After successful creation, we need to set the auto_increment for legacy orders.
- if ( ! empty( $created ) ) {
-
- $last_payment_id = $this->get_db()->get_var( "SELECT ID FROM {$this->get_db()->prefix}posts WHERE post_type = 'edd_payment' ORDER BY ID DESC LIMIT 1;" );
-
- if ( ! empty( $last_payment_id ) ) {
- update_option( 'edd_v3_migration_pending', $last_payment_id, false );
- $auto_increment = $last_payment_id + 1;
- $this->get_db()->query( "ALTER TABLE {$this->table_name} AUTO_INCREMENT = {$auto_increment};" );
- }
-
- }
-
- return $created;
-
- }
-
- /**
- * Upgrade to version 201901111
- * - Set any 'publish' status items to 'complete'.
- *
- * @since 3.0
- *
- * @return boolean
- */
- protected function __201901111() {
- $this->get_db()->query( "
- UPDATE {$this->table_name} set `status` = 'complete' WHERE `status` = 'publish';
- " );
-
- return $this->is_success( true );
- }
-
- /**
- * Upgrade to version 202002141
- * - Change default value to `CURRENT_TIMESTAMP` for columns `date_created` and `date_modified`.
- * - Change default value to `null` for columns `date_completed` and `date_refundable`.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202002141() {
-
- // Update `date_created`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_created` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- // Update `date_modified`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_modified` datetime NOT NULL default CURRENT_TIMESTAMP;
- " );
-
- // Update `date_completed`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_completed` datetime default null;
- " );
-
- if ( $this->is_success( $result ) ) {
- $this->get_db()->query( "UPDATE {$this->table_name} SET `date_completed` = NULL WHERE `date_completed` = '0000-00-00 00:00:00'" );
- }
-
- // Update `date_refundable`.
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `date_refundable` datetime default null;
- " );
-
- if ( $this->is_success( $result ) ) {
- $this->get_db()->query( "UPDATE {$this->table_name} SET `date_refundable` = NULL WHERE `date_refundable` = '0000-00-00 00:00:00'" );
- }
-
- return $this->is_success( $result );
-
- }
-
- /**
- * Upgrade to version 202012041
- * - Add column `tax_rate_id`
- *
- * @since 3.0
- * @return bool
- */
- protected function __202012041() {
- // Look for column
- $result = $this->column_exists( 'tax_rate_id' );
-
- // Maybe add column
- if ( false === $result ) {
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} ADD COLUMN tax_rate_id bigint(20) DEFAULT NULL AFTER payment_key;
- " );
- }
-
- // Return success/fail.
- return $this->is_success( $result );
- }
-
- /**
- * Upgrade to version 202102161
- * - Drop `status` index
- * - Create new `status_type` index
- *
- * @since 3.0
- * @return bool
- */
- protected function __202102161() {
- if ( $this->index_exists( 'status' ) ) {
- $this->get_db()->query( "ALTER TABLE {$this->table_name} DROP INDEX status" );
- }
-
- if ( ! $this->index_exists( 'status_type' ) ) {
- $this->get_db()->query( "ALTER TABLE {$this->table_name} ADD INDEX status_type (status, type)" );
- }
-
- return true;
- }
-
- /**
- * Upgrade to version 202103261
- * - Change length of `gateway` column to `100`.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202103261() {
- $result = $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `gateway` varchar(100) NOT NULL default '';
- " );
-
- return $this->is_success( $result );
- }
-
- /**
- * Upgrade to version 202105221
- * - Add `rate` column.
- *
- * @since 3.0
- * @return bool
- */
- protected function __202105221() {
- if ( ! $this->column_exists( 'rate' ) ) {
- return $this->is_success(
- $this->get_db()->query(
- "ALTER TABLE {$this->table_name} ADD COLUMN rate decimal(10,5) NOT NULL DEFAULT 1.00000 AFTER total"
- )
- );
- }
-
- return true;
- }
-
- /**
- * Upgrade to version 202108041
- * - Set any empty gateway items to 'manual'.
- *
- * @since 3.0
- *
- * @return boolean
- */
- protected function __202108041() {
- $this->get_db()->query( "
- UPDATE {$this->table_name} set `gateway` = 'manual' WHERE `gateway` = '';
- " );
-
- $this->get_db()->query( "
- ALTER TABLE {$this->table_name} MODIFY COLUMN `gateway` varchar(100) NOT NULL default 'manual';
- " );
-
- return true;
- }
-
- /**
- * Upgrade to version 202302241
- * - Set an index for the 'currency' column as we use that in the admin frequenly.
- *
- * @since 3.1.1
- *
- * @return boolean
- */
- protected function __202302241() {
-
- if ( ! $this->index_exists( 'currency' ) ) {
- $success = $this->get_db()->query( "ALTER TABLE {$this->table_name} ADD INDEX currency (currency)" );
- } else {
- $success = true;
- }
-
- return $this->is_success( $success );
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/date-functions.php b/wp-content/plugins/easy-digital-downloads/includes/date-functions.php
deleted file mode 100644
index 7703467c..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/date-functions.php
+++ /dev/null
@@ -1,297 +0,0 @@
-utils->date( 'now', edd_get_timezone_id(), false );
-
- return date_i18n( $format, (int) $timestamp + $date->getOffset() );
-}
-
-/**
- * Retrieve timezone ID
- *
- * @since 1.6
- * @return string $timezone The timezone ID
- */
-function edd_get_timezone_id() {
- return EDD()->utils->get_time_zone( true );
-}
-
-/**
- * Accept an EDD date object and get the UTC equivalent version of it.
- * The EDD date object passed-in can be in any timezone. The one you'll get back will be the UTC equivalent of that time.
- * This is useful when querying data from the tables by a user-defined date range, like "today".
- *
- * @since 3.0
- * @param EDD\Utils\Date $edd_date_object The EDD Date object for which you wish to get the UTC equiavalent.
- * @return EDD\Utils\Date The EDD date object set at the UTC equivalent time.
- */
-function edd_get_utc_equivalent_date( $edd_date_object ) {
-
- $instance_check = 'EDD\Utils\Date';
- if ( ! $edd_date_object instanceof $instance_check ) {
- return false;
- }
-
- // Convert the timezone (and thus, also the time) from the WP/EDD Timezone to the UTC equivalent.
- $utc_timezone = new DateTimeZone( 'utc' );
- $edd_date_object->setTimezone( $utc_timezone );
-
- return $edd_date_object;
-}
-
-/**
- * Accept an EDD date object set in UTC, and get the WP/EDD Timezone equivalent version of it.
- * The EDD date object must be in UTC. The one you'll get back will be the WP timezone equivalent of that time.
- * This is useful when showing date information to the user, so that they see it in the proper timezone, instead of UTC.
- *
- * @since 3.0
- * @param EDD\Utils\Date $edd_date_object The EDD Date object for which you wish to get the UTC equiavalent.
- * @return EDD\Utils\Date The EDD date object set at the UTC equivalent time.
- */
-function edd_get_edd_timezone_equivalent_date_from_utc( $edd_date_object ) {
-
- $instance_check = 'EDD\Utils\Date';
- if ( ! $edd_date_object instanceof $instance_check ) {
- return false;
- }
-
- // If you passed a date object to this function that isn't set to UTC, that is incorrect usage.
- if ( 'UTC' !== $edd_date_object->format( 'T' ) ) {
- return false;
- }
-
- // Convert the timezone (and thus, also the time) from UTC to the WP/EDD Timezone.
- $edd_timezone = new DateTimeZone( edd_get_timezone_id() );
- $edd_date_object->setTimezone( $edd_timezone );
-
- return $edd_date_object;
-}
-
-/**
- * Get the timezone abbreviation for the WordPress timezone setting.
- *
- * @since 3.0
- *
- * @return string The abreviation for the current WordPress timezone setting.
- */
-function edd_get_timezone_abbr() {
- $edd_timezone = edd_get_timezone_id();
- $edd_date_object = EDD()->utils->date( 'now', $edd_timezone, true );
- return $edd_date_object->format( 'T' );
-}
-
-/**
- * Retrieves a date format string based on a given short-hand format.
- *
- * @since 3.0
- *
- * @see \EDD_Utilities::get_date_format_string()
- *
- * @param string $format Shorthand date format string. Accepts 'date', 'time', 'mysql', or
- * 'datetime'. If none of the accepted values, the original value will
- * simply be returned. Default 'date' represents the value of the
- * 'date_format' option.
- *
- * @return string date_format()-compatible date format string.
- */
-function edd_get_date_format( $format = 'date' ) {
- return EDD()->utils->get_date_format_string( $format );
-}
-
-/**
- * Get the format used by jQuery UI Datepickers.
- *
- * Use this if you need to use placeholder or format attributes in input fields.
- *
- * This is a bit different than `edd_get_date_format()` because these formats
- * are exposed to users as hints and also used by jQuery UI so the Datepicker
- * knows what format it returns into it's connected input value.
- *
- * Previous to this function existing, all values were hard-coded, causing some
- * inconsistencies across admin-area screens.
- *
- * @see https://github.com/easydigitaldownloads/easy-digital-downloads/commit/e9855762892b6eec578b0a402f7950f22bd19632
- *
- * @since 3.0
- *
- * @param string $context The context we are getting the format for. Accepts 'display' or 'js'.
- * Use 'js' for use with jQuery UI Datepicker. Use 'display' for HTML attributes.
- * @return string
- */
-function edd_get_date_picker_format( $context = 'display' ) {
-
- // What is the context that we are getting the picker format for?
- switch ( $context ) {
-
- // jQuery UI Datepicker does its own thing
- case 'js' :
- case 'javascript' :
- $retval = EDD()->utils->get_date_format_string( 'date-js' );
- break;
-
- // Used to display in an attribute, placeholder, etc...
- case 'display' :
- default :
- $retval = EDD()->utils->get_date_format_string( 'date-attribute' );
- break;
- }
-
- /**
- * Filter the date picker format, allowing for custom overrides
- *
- * @since 3.0
- *
- * @param string $retval Date format for date picker
- * @param string $context The context this format is for
- */
- return apply_filters( 'edd_get_date_picker_format', $retval, $context );
-}
-
-/**
- * Return an array of values used to populate an hour dropdown
- *
- * @since 3.0
- *
- * @return array
- */
-function edd_get_hour_values() {
- return (array) apply_filters( 'edd_get_hour_values', array(
- '00' => '00',
- '01' => '01',
- '02' => '02',
- '03' => '03',
- '04' => '04',
- '05' => '05',
- '06' => '06',
- '07' => '07',
- '08' => '08',
- '09' => '09',
- '10' => '10',
- '11' => '11',
- '12' => '12',
- '13' => '13',
- '14' => '14',
- '15' => '15',
- '16' => '16',
- '17' => '17',
- '18' => '18',
- '19' => '19',
- '20' => '20',
- '21' => '21',
- '22' => '22',
- '23' => '23',
- '24' => '24'
- ) );
-}
-
-/**
- * Return an array of values used to populate a minute dropdown
- *
- * @since 3.0
- *
- * @return array
- */
-function edd_get_minute_values() {
- return (array) apply_filters( 'edd_get_minute_values', array(
- '00' => '00',
- '01' => '01',
- '02' => '02',
- '03' => '03',
- '04' => '04',
- '05' => '05',
- '06' => '06',
- '07' => '07',
- '08' => '08',
- '09' => '09',
- '10' => '10',
- '11' => '11',
- '12' => '12',
- '13' => '13',
- '14' => '14',
- '15' => '15',
- '16' => '16',
- '17' => '17',
- '18' => '18',
- '19' => '19',
- '20' => '20',
- '21' => '21',
- '22' => '22',
- '23' => '23',
- '24' => '24',
- '25' => '25',
- '26' => '26',
- '27' => '27',
- '28' => '28',
- '29' => '29',
- '30' => '30',
- '31' => '31',
- '32' => '32',
- '33' => '33',
- '34' => '34',
- '35' => '35',
- '36' => '36',
- '37' => '37',
- '38' => '38',
- '39' => '39',
- '40' => '40',
- '41' => '41',
- '42' => '42',
- '43' => '43',
- '44' => '44',
- '45' => '45',
- '46' => '46',
- '47' => '47',
- '48' => '48',
- '49' => '49',
- '50' => '50',
- '51' => '51',
- '52' => '52',
- '53' => '53',
- '54' => '54',
- '55' => '55',
- '56' => '56',
- '57' => '57',
- '58' => '58',
- '59' => '59'
- ) );
-}
-
-/**
- * Gets the UTC equivalent of a date in the local timezone.
- *
- * @since 3.1.4
- * @param string $date_string The date string to convert.
- * @param string $format The format to return the date in.
- * @return string
- */
-function edd_get_utc_date_string( $date_string = 'now', $format = 'Y-m-d H:i:s' ) {
- return EDD()->utils->date( $date_string, edd_get_timezone_id(), false )->get_utc_from_local( $format );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/deprecated-functions.php b/wp-content/plugins/easy-digital-downloads/includes/deprecated-functions.php
deleted file mode 100644
index 01b82a60..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/deprecated-functions.php
+++ /dev/null
@@ -1,2154 +0,0 @@
-session->get( 'edd_local_tax_opt_in' );
- return ! empty( $opted_in );
-}
-
-/**
- * Show taxes on individual prices?
- *
- * @since 1.4
- * @deprecated 1.9
- * @global $edd_options
- * @return bool Whether or not to show taxes on prices
- */
-function edd_taxes_on_prices() {
- global $edd_options;
-
- $backtrace = debug_backtrace();
-
- _edd_deprecated_function( __FUNCTION__, '1.9', 'no alternatives', $backtrace );
-
- return apply_filters( 'edd_taxes_on_prices', isset( $edd_options['taxes_on_prices'] ) );
-}
-
-/**
- * Show Has Purchased Item Message
- *
- * Prints a notice when user has already purchased the item.
- *
- * @since 1.0
- * @deprecated 1.8
- * @global $user_ID
- */
-function edd_show_has_purchased_item_message() {
-
- $backtrace = debug_backtrace();
-
- _edd_deprecated_function( __FUNCTION__, '1.8', 'no alternatives', $backtrace );
-
- global $user_ID, $post;
-
- if ( !isset( $post->ID ) ) {
- return;
- }
-
- if ( edd_has_user_purchased( $user_ID, $post->ID ) ) {
- $alert = '
' . __( 'You have already purchased this item, but you may purchase it again.', 'easy-digital-downloads' ) . '
';
- echo apply_filters( 'edd_show_has_purchased_item_message', $alert );
- }
-}
-
-/**
- * Flushes the total earning cache when a new payment is created
- *
- * @since 1.2
- * @deprecated 1.8.4
- * @param int $payment Payment ID
- * @param array $payment_data Payment Data
- * @return void
- */
-function edd_clear_earnings_cache( $payment, $payment_data ) {
-
- $backtrace = debug_backtrace();
-
- _edd_deprecated_function( __FUNCTION__, '1.8.4', 'no alternatives', $backtrace );
-
- delete_transient( 'edd_total_earnings' );
-}
-//add_action( 'edd_insert_payment', 'edd_clear_earnings_cache', 10, 2 );
-
-/**
- * Get Cart Amount
- *
- * @since 1.0
- * @deprecated 1.9
- * @param bool $add_taxes Whether to apply taxes (if enabled) (default: true)
- * @param bool $local_override Force the local opt-in param - used for when not reading $_POST (default: false)
- * @return float Total amount
-*/
-function edd_get_cart_amount( $add_taxes = true, $local_override = false ) {
-
- $backtrace = debug_backtrace();
-
- _edd_deprecated_function( __FUNCTION__, '1.9', 'edd_get_cart_subtotal() or edd_get_cart_total()', $backtrace );
-
- $amount = edd_get_cart_subtotal( );
- if ( ! empty( $_POST['edd-discount'] ) || edd_get_cart_discounts() !== false ) {
- // Retrieve the discount stored in cookies
- $discounts = edd_get_cart_discounts();
-
- // Check for a posted discount
- $posted_discount = isset( $_POST['edd-discount'] ) ? trim( $_POST['edd-discount'] ) : '';
-
- if ( $posted_discount && ! in_array( $posted_discount, $discounts ) ) {
- // This discount hasn't been applied, so apply it
- $amount = edd_get_discounted_amount( $posted_discount, $amount );
- }
-
- if ( ! empty( $discounts ) ) {
- // Apply the discounted amount from discounts already applied
- $amount -= edd_get_cart_discounted_amount();
- }
- }
-
- if ( edd_use_taxes() && edd_is_cart_taxed() && $add_taxes ) {
- $tax = edd_get_cart_tax();
- $amount += $tax;
- }
-
- if ( $amount < 0 ) {
- $amount = 0.00;
- }
-
- return apply_filters( 'edd_get_cart_amount', $amount, $add_taxes, $local_override );
-}
-
-/**
- * Get Purchase Receipt Template Tags
- *
- * Displays all available template tags for the purchase receipt.
- *
- * @since 1.6
- * @deprecated 1.9
- * @author Daniel J Griffiths
- * @return string $tags
- */
-function edd_get_purchase_receipt_template_tags() {
- $tags = __('Enter the email that is sent to users after completing a successful purchase. HTML is accepted. Available template tags:','easy-digital-downloads' ) . ' ' .
- '{download_list} - ' . __('A list of download links for each download purchased','easy-digital-downloads' ) . ' ' .
- '{file_urls} - ' . __('A plain-text list of download URLs for each download purchased','easy-digital-downloads' ) . ' ' .
- '{name} - ' . __('The buyer\'s first name','easy-digital-downloads' ) . ' ' .
- '{fullname} - ' . __('The buyer\'s full name, first and last','easy-digital-downloads' ) . ' ' .
- '{username} - ' . __('The buyer\'s user name on the site, if they registered an account','easy-digital-downloads' ) . ' ' .
- '{user_email} - ' . __('The buyer\'s email address','easy-digital-downloads' ) . ' ' .
- '{billing_address} - ' . __('The buyer\'s billing address','easy-digital-downloads' ) . ' ' .
- '{date} - ' . __('The date of the purchase','easy-digital-downloads' ) . ' ' .
- '{subtotal} - ' . __('The price of the purchase before taxes','easy-digital-downloads' ) . ' ' .
- '{tax} - ' . __('The taxed amount of the purchase','easy-digital-downloads' ) . ' ' .
- '{price} - ' . __('The total price of the purchase','easy-digital-downloads' ) . ' ' .
- '{payment_id} - ' . __('The unique ID number for this purchase','easy-digital-downloads' ) . ' ' .
- '{receipt_id} - ' . __('The unique ID number for this purchase receipt','easy-digital-downloads' ) . ' ' .
- '{payment_method} - ' . __('The method of payment used for this purchase','easy-digital-downloads' ) . ' ' .
- '{sitename} - ' . __('Your site name','easy-digital-downloads' ) . ' ' .
- '{receipt_link} - ' . __( 'Adds a link so users can view their receipt directly on your website if they are unable to view it in the browser correctly.', 'easy-digital-downloads' );
-
- return apply_filters( 'edd_purchase_receipt_template_tags_description', $tags );
-}
-
-
-/**
- * Get Sale Notification Template Tags
- *
- * Displays all available template tags for the sale notification email
- *
- * @since 1.7
- * @deprecated 1.9
- * @author Daniel J Griffiths
- * @return string $tags
- */
-function edd_get_sale_notification_template_tags() {
- $tags = __( 'Enter the email that is sent to sale notification emails after completion of a purchase. HTML is accepted. Available template tags:', 'easy-digital-downloads' ) . ' ' .
- '{download_list} - ' . __('A list of download links for each download purchased','easy-digital-downloads' ) . ' ' .
- '{file_urls} - ' . __('A plain-text list of download URLs for each download purchased','easy-digital-downloads' ) . ' ' .
- '{name} - ' . __('The buyer\'s first name','easy-digital-downloads' ) . ' ' .
- '{fullname} - ' . __('The buyer\'s full name, first and last','easy-digital-downloads' ) . ' ' .
- '{username} - ' . __('The buyer\'s user name on the site, if they registered an account','easy-digital-downloads' ) . ' ' .
- '{user_email} - ' . __('The buyer\'s email address','easy-digital-downloads' ) . ' ' .
- '{billing_address} - ' . __('The buyer\'s billing address','easy-digital-downloads' ) . ' ' .
- '{date} - ' . __('The date of the purchase','easy-digital-downloads' ) . ' ' .
- '{subtotal} - ' . __('The price of the purchase before taxes','easy-digital-downloads' ) . ' ' .
- '{tax} - ' . __('The taxed amount of the purchase','easy-digital-downloads' ) . ' ' .
- '{price} - ' . __('The total price of the purchase','easy-digital-downloads' ) . ' ' .
- '{payment_id} - ' . __('The unique ID number for this purchase','easy-digital-downloads' ) . ' ' .
- '{receipt_id} - ' . __('The unique ID number for this purchase receipt','easy-digital-downloads' ) . ' ' .
- '{payment_method} - ' . __('The method of payment used for this purchase','easy-digital-downloads' ) . ' ' .
- '{sitename} - ' . __('Your site name','easy-digital-downloads' );
-
- return apply_filters( 'edd_sale_notification_template_tags_description', $tags );
-}
-
-/**
- * Email Template Header
- *
- * @access private
- * @since 1.0.8.2
- * @deprecated 2.0
- * @return string Email template header
- */
-function edd_get_email_body_header() {
- $backtrace = debug_backtrace();
-
- _edd_deprecated_function( __FUNCTION__, '2.0', '', $backtrace );
-
- ob_start();
- ?>
-
-
-
-
-
-
-
-
- 'AND',
- array(
- 'key' => '_edd_payment_purchase_key',
- 'value' => $key
- ),
- array(
- 'key' => '_edd_payment_user_email',
- 'value' => $email
- )
- );
-
- $accepted_stati = apply_filters( 'edd_allowed_download_stati', array( 'publish', 'complete' ) );
-
- $payments = get_posts( array( 'meta_query' => $meta_query, 'post_type' => 'edd_payment', 'post_status' => $accepted_stati ) );
-
- if ( $payments ) {
- foreach ( $payments as $payment ) {
-
- $cart_details = edd_get_payment_meta_cart_details( $payment->ID, true );
-
- if ( ! empty( $cart_details ) ) {
- foreach ( $cart_details as $cart_key => $cart_item ) {
-
- if ( $cart_item['id'] != $download_id ) {
- continue;
- }
-
- $price_options = isset( $cart_item['item_number']['options'] ) ? $cart_item['item_number']['options'] : false;
- $price_id = isset( $price_options['price_id'] ) ? $price_options['price_id'] : false;
-
- $file_condition = edd_get_file_price_condition( $cart_item['id'], $file_key );
-
- // Check to see if the file download limit has been reached
- if ( edd_is_file_at_download_limit( $cart_item['id'], $payment->ID, $file_key, $price_id ) ) {
- wp_die( apply_filters( 'edd_download_limit_reached_text', __( 'Sorry but you have hit your download limit for this file.', 'easy-digital-downloads' ) ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) );
- }
-
- // If this download has variable prices, we have to confirm that this file was included in their purchase
- if ( ! empty( $price_options ) && $file_condition != 'all' && edd_has_variable_prices( $cart_item['id'] ) ) {
- if ( $file_condition == $price_options['price_id'] ) {
- return $payment->ID;
- }
- }
-
- // Make sure the link hasn't expired
-
- if ( base64_encode( base64_decode( $expire, true ) ) === $expire ) {
- $expire = base64_decode( $expire ); // If it is a base64 string, decode it. Old expiration dates were in base64
- }
-
- if ( current_time( 'timestamp' ) > $expire ) {
- wp_die( apply_filters( 'edd_download_link_expired_text', __( 'Sorry but your download link has expired.', 'easy-digital-downloads' ) ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) );
- }
- return $payment->ID; // Payment has been verified and link is still valid
- }
- }
- }
-
- } else {
- wp_die( __( 'No payments matching your request were found.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) );
- }
- // Payment not verified
- return false;
-}
-
-/**
- * Get Success Page URL
- *
- * @param string $query_string
- * @since 1.0
- * @deprecated 2.6 Please avoid usage of this function in favor of edd_get_success_page_uri()
- * @return string
-*/
-function edd_get_success_page_url( $query_string = null ) {
-
- $backtrace = debug_backtrace();
-
- _edd_deprecated_function( __FUNCTION__, '2.6', 'edd_get_success_page_uri()', $backtrace );
-
- return apply_filters( 'edd_success_page_url', edd_get_success_page_uri( $query_string ) );
-}
-
-/**
- * Reduces earnings and sales stats when a purchase is refunded
- *
- * @since 1.8.2
- * @param int $payment_id the ID number of the payment
- * @param string $new_status the status of the payment, probably "publish"
- * @param string $old_status the status of the payment prior to being marked as "complete", probably "pending"
- * @deprecated 2.5.7 Please avoid usage of this function in favor of refund() in EDD_Payment
- * @internal param Arguments $data passed
- */
-function edd_undo_purchase_on_refund( $payment_id, $new_status, $old_status ) {
-
- $backtrace = debug_backtrace();
- _edd_deprecated_function( 'edd_undo_purchase_on_refund', '2.5.7', 'EDD_Payment->refund()', $backtrace );
-
- $payment = new EDD_Payment( $payment_id );
- $payment->refund();
-}
-
-/**
- * Get Earnings By Date
- *
- * @since 1.0
- * @deprecated 2.7
- * @param int $day Day number
- * @param int $month_num Month number
- * @param int $year Year
- * @param int $hour Hour
- * @return int $earnings Earnings
- */
-function edd_get_earnings_by_date( $day, $month_num = null, $year = null, $hour = null, $include_taxes = true ) {
- $backtrace = debug_backtrace();
-
- _edd_deprecated_function( __FUNCTION__, '2.7', 'EDD_Payment_Stats()->get_earnings()', $backtrace );
-
- global $wpdb;
-
- $args = array(
- 'post_type' => 'edd_payment',
- 'nopaging' => true,
- 'year' => $year,
- 'monthnum' => $month_num,
- 'post_status' => array( 'publish', 'revoked' ),
- 'fields' => 'ids',
- 'include_taxes' => $include_taxes,
- 'update_post_term_cache' => false,
- );
-
- if ( ! empty( $day ) ) {
- $args['day'] = $day;
- }
-
- if ( ! empty( $hour ) || $hour == 0 ) {
- $args['hour'] = $hour;
- }
-
- $args = apply_filters( 'edd_get_earnings_by_date_args', $args );
- $cached = get_transient( 'edd_stats_earnings' );
- $key = md5( json_encode( $args ) );
-
- if ( ! isset( $cached[ $key ] ) ) {
- $sales = get_posts( $args );
- $earnings = 0;
- if ( $sales ) {
- $sales = implode( ',', $sales );
-
- $total_earnings = $wpdb->get_var( "SELECT SUM(meta_value) FROM $wpdb->postmeta WHERE meta_key = '_edd_payment_total' AND post_id IN ({$sales})" );
- $total_tax = 0;
-
- if ( ! $include_taxes ) {
- $total_tax = $wpdb->get_var( "SELECT SUM(meta_value) FROM $wpdb->postmeta WHERE meta_key = '_edd_payment_tax' AND post_id IN ({$sales})" );
- }
-
- $earnings += ( $total_earnings - $total_tax );
- }
- // Cache the results for one hour
- $cached[ $key ] = $earnings;
- set_transient( 'edd_stats_earnings', $cached, HOUR_IN_SECONDS );
- }
-
- $result = $cached[ $key ];
-
- return round( $result, 2 );
-}
-
-/**
- * Get Sales By Date
- *
- * @since 1.1.4.0
- * @deprecated 2.7
- * @author Sunny Ratilal
- * @param int $day Day number
- * @param int $month_num Month number
- * @param int $year Year
- * @param int $hour Hour
- * @return int $count Sales
- */
-function edd_get_sales_by_date( $day = null, $month_num = null, $year = null, $hour = null ) {
- $backtrace = debug_backtrace();
-
- _edd_deprecated_function( __FUNCTION__, '2.7', 'EDD_Payment_Stats()->get_sales()', $backtrace );
-
- $args = array(
- 'post_type' => 'edd_payment',
- 'nopaging' => true,
- 'year' => $year,
- 'fields' => 'ids',
- 'post_status' => array( 'publish', 'revoked' ),
- 'update_post_meta_cache' => false,
- 'update_post_term_cache' => false
- );
-
- $show_free = apply_filters( 'edd_sales_by_date_show_free', true, $args );
-
- if ( false === $show_free ) {
- $args['meta_query'] = array(
- array(
- 'key' => '_edd_payment_total',
- 'value' => 0,
- 'compare' => '>',
- 'type' => 'NUMERIC',
- ),
- );
- }
-
- if ( ! empty( $month_num ) ) {
- $args['monthnum'] = $month_num;
- }
-
- if ( ! empty( $day ) ) {
- $args['day'] = $day;
- }
-
- if ( ! empty( $hour ) ) {
- $args['hour'] = $hour;
- }
-
- $args = apply_filters( 'edd_get_sales_by_date_args', $args );
-
- $cached = get_transient( 'edd_stats_sales' );
- $key = md5( json_encode( $args ) );
-
- if ( ! isset( $cached[ $key ] ) ) {
- $sales = new WP_Query( $args );
- $count = (int) $sales->post_count;
-
- // Cache the results for one hour
- $cached[ $key ] = $count;
- set_transient( 'edd_stats_sales', $cached, HOUR_IN_SECONDS );
- }
-
- $result = $cached[ $key ];
-
- return $result;
-}
-
-/**
- * Set the Page Style for PayPal Purchase page
- *
- * @since 1.4.1
- * @deprecated 2.8
- * @return string
- */
-function edd_get_paypal_page_style() {
-
- $backtrace = debug_backtrace();
-
- _edd_deprecated_function( __FUNCTION__, '2.8', 'edd_get_paypal_image_url', $backtrace );
-
- $page_style = trim( edd_get_option( 'paypal_page_style', 'PayPal' ) );
- return apply_filters( 'edd_paypal_page_style', $page_style );
-}
-
-/**
- * Should we add schema.org microdata?
- *
- * @since 1.7
- * @since 3.0 - Deprecated as the switch was made to JSON-LD.
- * @see https://github.com/easydigitaldownloads/easy-digital-downloads/issues/5240
- *
- * @return bool
- */
-function edd_add_schema_microdata() {
- $backtrace = debug_backtrace();
-
- _edd_deprecated_function( __FUNCTION__, '3.0', 'EDD_Structured_Data', $backtrace );
-
- // Don't modify anything until after wp_head() is called
- $ret = (bool)did_action( 'wp_head' );
- return apply_filters( 'edd_add_schema_microdata', $ret );
-}
-
-/**
- * Add Microdata to download titles
- *
- * @since 1.5
- * @since 3.0 - Deprecated as the switch was made to JSON-LD.
- * @see https://github.com/easydigitaldownloads/easy-digital-downloads/issues/5240
- *
- * @param string $title Post Title
- * @param int $id Post ID
- * @return string $title New title
- */
-function edd_microdata_title( $title, $id = 0 ) {
- $backtrace = debug_backtrace();
-
- _edd_deprecated_function( __FUNCTION__, '3.0', 'EDD_Structured_Data', $backtrace );
-
- global $post;
-
- if ( ! edd_add_schema_microdata() || ! is_object( $post ) ) {
- return $title;
- }
-
- if ( $post->ID == $id && is_singular( 'download' ) && 'download' == get_post_type( intval( $id ) ) ) {
- $title = '' . $title . '';
- }
-
- return $title;
-}
-
-/**
- * Start Microdata to wrapper download
- *
- * @since 2.3
- * @since 3.0 - Deprecated as the switch was made to JSON-LD.
- * @see https://github.com/easydigitaldownloads/easy-digital-downloads/issues/5240
- *
- * @return void
- */
-function edd_microdata_wrapper_open( $query ) {
- $backtrace = debug_backtrace();
-
- _edd_deprecated_function( __FUNCTION__, '3.0', 'EDD_Structured_Data', $backtrace );
-
- static $microdata_open = NULL;
-
- if ( ! edd_add_schema_microdata() || true === $microdata_open || ! is_object( $query ) ) {
- return;
- }
-
- if ( $query && ! empty( $query->query['post_type'] ) && $query->query['post_type'] == 'download' && is_singular( 'download' ) && $query->is_main_query() ) {
- $microdata_open = true;
- echo '
-
- is_setup() ) {
- return false;
- }
-
- if ( empty( $_POST['reference_id'] ) ) {
- die( '-2' );
- }
-
- $request = $this->client->getOrderReferenceDetails( array(
- 'merchant_id' => edd_get_option( 'amazon_seller_id', '' ),
- 'amazon_order_reference_id' => $_POST['reference_id'],
- 'address_consent_token' => EDD()->session->get( 'amazon_access_token' )
- ) );
-
- $address = array();
- $data = new ResponseParser( $request->response );
- $data = $data->toArray();
-
- if ( isset( $data['GetOrderReferenceDetailsResult']['OrderReferenceDetails']['Destination']['PhysicalDestination'] ) ) {
-
- $address = $data['GetOrderReferenceDetailsResult']['OrderReferenceDetails']['Destination']['PhysicalDestination'];
- $address = wp_parse_args( $address, array( 'City', 'CountryCode', 'StateOrRegion', 'PostalCode', 'AddressLine1', 'AddressLine2' ) );
-
- }
-
- echo json_encode( $address ); exit;
- }
-
- /**
- * Check for errors during checkout
- *
- * @since 2.4
- * @param $valid_data Customer / product data from checkout
- * @param $post_data $_POST
- * @return void
- */
- public function checkout_errors( $valid_data, $post_data ) {
-
- // should validate that we have a reference ID here, perhaps even fire the API call here
- if ( empty( $post_data['edd_amazon_reference_id'] ) ) {
- edd_set_error( 'missing_reference_id', __( 'Missing Reference ID, please try again.', 'easy-digital-downloads' ) );
- }
- }
-
- /**
- * Process the purchase and create the charge in Amazon
- *
- * @since 2.4
- * @param $purchase_data array Cart details
- * @return void
- */
- public function process_purchase( $purchase_data ) {
-
- if ( empty( $purchase_data['post_data']['edd_amazon_reference_id'] ) ) {
- edd_set_error( 'missing_reference_id', __( 'Missing Reference ID, please try again.', 'easy-digital-downloads' ) );
- }
-
- $errors = edd_get_errors();
- if ( ! empty( $errors ) ) {
- edd_send_back_to_checkout( '?payment-mode=amazon' );
- }
-
- $args = apply_filters( 'edd_amazon_charge_args', array(
- 'merchant_id' => edd_get_option( 'amazon_seller_id', '' ),
- 'amazon_reference_id' => $purchase_data['post_data']['edd_amazon_reference_id'],
- 'authorization_reference_id' => $purchase_data['purchase_key'],
- 'charge_amount' => $purchase_data['price'],
- 'currency_code' => edd_get_currency(),
- 'charge_note' => html_entity_decode( edd_get_purchase_summary( $purchase_data, false ) ),
- 'charge_order_id' => $purchase_data['purchase_key'],
- 'store_name' => remove_accents( wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ) ),
- 'transaction_timeout' => 0
- ), $purchase_data );
-
- $args['platform_id'] = 'A3JST9YM1SX7LB';
-
- $charge = $this->client->charge( $args );
-
- if ( 200 == $charge->response['Status'] ) {
- $charge = new ResponseParser( $charge->response );
- $charge = $charge->toArray();
-
- $status = $charge['AuthorizeResult']['AuthorizationDetails']['AuthorizationStatus']['State'];
-
- if ( 'Declined' === $status ) {
-
- $reason = $charge['AuthorizeResult']['AuthorizationDetails']['AuthorizationStatus']['ReasonCode'];
- edd_set_error( 'payment_declined', sprintf( __( 'Your payment could not be authorized, please try a different payment method. Reason: %s', 'easy-digital-downloads' ), $reason ) );
- edd_send_back_to_checkout( '?payment-mode=amazon&amazon_reference_id=' . $purchase_data['post_data']['edd_amazon_reference_id'] );
- }
-
- // Setup payment data to be recorded
- $payment_data = array(
- 'price' => $purchase_data['price'],
- 'date' => $purchase_data['date'],
- 'user_email' => $purchase_data['user_email'],
- 'purchase_key' => $purchase_data['purchase_key'],
- 'currency' => edd_get_currency(),
- 'downloads' => $purchase_data['downloads'],
- 'user_info' => $purchase_data['user_info'],
- 'cart_details' => $purchase_data['cart_details'],
- 'gateway' => $this->gateway_id,
- 'status' => 'pending',
- );
-
- $payment_id = edd_insert_payment( $payment_data );
-
- $authorization_id = $charge['AuthorizeResult']['AuthorizationDetails']['AmazonAuthorizationId'];
- $capture_id = str_replace( '-A', '-C', $authorization_id );
- $reference_id = sanitize_text_field( $_POST['edd_amazon_reference_id'] );
-
- // Confirm the capture was completed
- $capture = $this->client->getCaptureDetails( array(
- 'merchant_id' => edd_get_option( 'amazon_seller_id', '' ),
- 'amazon_capture_id' => $capture_id
- ) );
-
- $capture = new ResponseParser( $capture->response );
- $capture = $capture->toArray();
-
- edd_update_payment_meta( $payment_id, '_edd_amazon_authorization_id', $authorization_id );
- edd_update_payment_meta( $payment_id, '_edd_amazon_capture_id', $capture_id );
-
- edd_set_payment_transaction_id( $payment_id, $reference_id, $purchase_data['price'] );
-
- edd_update_payment_status( $payment_id, 'complete' );
-
- // Empty the shopping cart
- edd_empty_cart();
- edd_send_to_success_page();
-
- // Set an error
- } else {
- edd_set_error( 'amazon_error',sprintf( __( 'There was an issue processing your payment. Amazon error: %s', 'easy-digital-downloads' ), print_r( $charge, true ) ) );
- edd_send_back_to_checkout( '?payment-mode=amazon&amazon_reference_id=' . $purchase_data['post_data']['edd_amazon_reference_id'] );
- }
- }
-
- /**
- * Retrieve the checkout URL for Amazon after authentication is complete
- *
- * @since 2.4
- * @return string
- */
- private function get_amazon_checkout_uri() {
- if ( is_null( $this->checkout_uri ) ) {
- $this->checkout_uri = esc_url_raw( add_query_arg( array( 'payment-mode' => 'amazon' ), edd_get_checkout_uri() ) );
- }
-
- return $this->checkout_uri;
- }
-
- /**
- * Retrieve the return URL for Amazon after authentication on Amazon is complete
- *
- * @since 2.4
- * @return string
- */
- private function get_amazon_authenticate_redirect() {
- if ( is_null( $this->redirect_uri ) ) {
- $this->redirect_uri = esc_url_raw( add_query_arg( array( 'edd-listener' => 'amazon', 'state' => 'return_auth' ), edd_get_checkout_uri() ) );
- }
-
- return $this->redirect_uri;
- }
-
- /**
- * Retrieve the URL to send customers too once sign-in is complete
- *
- * @since 2.4
- * @return string
- */
- private function get_amazon_signin_redirect() {
- if ( is_null( $this->signin_redirect ) ) {
- $this->signin_redirect = esc_url_raw( add_query_arg( array( 'edd-listener' => 'amazon', 'state' => 'signed-in' ), home_url() ) );
- }
-
- return $this->signin_redirect;
- }
-
- /**
- * Retrieve the IPN URL for Amazon
- *
- * @since 2.4
- * @return string
- */
- private function get_amazon_ipn_url() {
- return esc_url_raw( add_query_arg( array( 'edd-listener' => 'amazon' ), home_url( 'index.php' ) ) );
- }
-
- /**
- * Removes the requirement for entering the billing address
- *
- * Address is pulled directly from Amazon
- *
- * @since 2.4
- * @return void
- */
- public function disable_address_requirement() {
- if ( ! empty( $_POST['edd-gateway'] ) && $this->gateway_id == $_REQUEST['edd-gateway'] ) {
- add_filter( 'edd_require_billing_address', '__return_false', 9999 );
- }
- }
-
- /**
- * Given a transaction ID, generate a link to the Amazon transaction ID details
- *
- * @since 2.4
- * @param string $transaction_id The Transaction ID
- * @param int $payment_id The payment ID for this transaction
- * @return string A link to the PayPal transaction details
- */
- public function link_transaction_id( $transaction_id, $payment_id ) {
- $base_url = 'https://sellercentral.amazon.com/hz/me/pmd/payment-details?orderReferenceId=';
- $transaction_url = '' . esc_html( $transaction_id ) . '';
-
- return apply_filters( 'edd_' . $this->gateway_id . '_link_payment_details_transaction_id', $transaction_url );
- }
-
- /**
- * Process IPN messages from Amazon
- *
- * @since 2.4
- * @return void
- */
- public function process_ipn() {
-
- if ( ! isset( $_GET['edd-listener'] ) || $_GET['edd-listener'] !== 'amazon' ) {
- return;
- }
-
- if ( isset( $_GET['state'] ) ) {
- return;
- }
-
- // Get the IPN headers and Message body
- $headers = getallheaders();
- $body = file_get_contents( 'php://input' );
-
- $this->doing_ipn = true;
-
- try {
- $ipn = new IpnHandler( $headers, $body );
- $data = $ipn->toArray();
- $seller_id = $data['SellerId'];
-
- if ( $seller_id != edd_get_option( 'amazon_seller_id', '' ) ) {
- wp_die( __( 'Invalid Amazon seller ID', 'easy-digital-downloads' ), __( 'IPN Error', 'easy-digital-downloads' ), array( 'response' => 401 ) );
- }
-
- switch( $data['NotificationType'] ) {
- case 'OrderReferenceNotification' :
- break;
-
- case 'PaymentAuthorize' :
- break;
-
- case 'PaymentCapture' :
- $key = $data['CaptureDetails']['CaptureReferenceId'];
- $status = $data['CaptureDetails']['CaptureStatus']['State'];
-
- if ( 'Declined' === $status ) {
- $payment_id = edd_get_purchase_id_by_key( $key );
-
- edd_update_payment_status( $payment_id, 'failed' );
-
- edd_insert_payment_note( $payment_id, __( 'Capture declined in Amazon', 'easy-digital-downloads' ) );
- }
-
- break;
-
- case 'PaymentRefund' :
- $trans_id = substr( $data['RefundDetails']['AmazonRefundId'], 0, 19 );
- $status = $data['RefundDetails']['RefundStatus']['State'];
-
- if ( 'Completed' === $status ) {
- $payment_id = edd_get_purchase_id_by_transaction_id( $trans_id );
-
- edd_update_payment_status( $payment_id, 'refunded' );
-
- edd_insert_payment_note( $payment_id, sprintf( __( 'Refund completed in Amazon. Refund ID: %s', 'easy-digital-downloads' ), $data['RefundDetails']['AmazonRefundId'] ) );
- }
-
- break;
- }
-
- } catch( Exception $e ) {
- wp_die( $e->getErrorMessage(), __( 'IPN Error', 'easy-digital-downloads' ), array( 'response' => 401 ) );
- }
- }
-
- /**
- * Detect a refund action from EDD
- *
- * @deprecated 3.0 Due to issues with Amazon, refunds must be processed at the gateway.
- * @since 2.4
- * @param $payment_id int The ID number of the payment being refunded
- * @param $new_status string The new status assigned to the payment
- * @param $old_status string The previous status of the payment
- * @return void
- */
- public function process_refund( $payment_id, $new_status, $old_status ) {
- _edd_deprecated_function( __METHOD__, '3.0' );
-
- if ( 'complete' !== $old_status && 'revoked' !== $old_status ) {
- return;
- }
-
- if ( 'refunded' !== $new_status ) {
- return;
- }
-
- if ( ! empty( $this->doing_ipn ) ) {
- return;
- }
-
- if ( 'amazon' !== edd_get_payment_gateway( $payment_id ) ) {
- return;
- }
-
- $this->refund( $payment_id );
-
- }
-
- /**
- * Refund a charge in Amazon
- *
- * @since 2.4
- * @param $payment_id int The ID number of the payment being refunded
- * @return string
- */
- private function refund( $payment_id = 0 ) {
-
- $refund = $this->client->refund( array(
- 'merchant_id' => edd_get_option( 'amazon_seller_id', '' ),
- 'amazon_capture_id' => edd_get_payment_meta( $payment_id, '_edd_amazon_capture_id', true ),
- 'refund_reference_id' => md5( edd_get_payment_key( $payment_id ) . '-refund' ),
- 'refund_amount' => edd_get_payment_amount( $payment_id ),
- 'currency_code' => edd_get_payment_currency_code( $payment_id ),
- ) );
-
- if ( 200 == $refund->response['Status'] ) {
- $refund = new ResponseParser( $refund->response );
- $refund = $refund->toArray();
-
- $reference_id = $refund['RefundResult']['RefundDetails']['RefundReferenceId'];
- $status = $refund['RefundResult']['RefundDetails']['RefundStatus']['State'];
-
- switch( $status ) {
- case 'Declined' :
- $note = __( 'Refund declined in Amazon. Refund ID: %s', 'easy-digital-downloads' );
- break;
-
- case 'Completed' :
- $refund_id = $refund['RefundResult']['RefundDetails']['AmazonRefundId'];
- $note = sprintf( __( 'Refund completed in Amazon. Refund ID: %s', 'easy-digital-downloads' ), $refund_id );
- break;
-
- case 'Pending' :
- $note = sprintf( __( 'Refund initiated in Amazon. Reference ID: %s', 'easy-digital-downloads' ), $reference_id );
- break;
- }
- edd_insert_payment_note( $payment_id, $note );
-
- } else {
- edd_insert_payment_note( $payment_id, __( 'Refund request failed in Amazon.', 'easy-digital-downloads' ) );
- }
- }
-
- /**
- * Retrieve the URL for connecting Amazon account to EDD
- *
- * @since 2.4
- * @since 2.9.8 - Updated registration URL per Amazon Reps
- * @return string
- */
- private function get_registration_url() {
-
- switch ( edd_get_shop_country() ) {
- case 'GB':
- $base_url = 'https://payments.amazon.co.uk/preregistration/lpa';
- break;
- case 'DE':
- $base_url = 'https://payments.amazon.de/preregistration/lpa';
- break;
- default:
- $base_url = 'https://sellercentral.amazon.com/hz/me/sp/signup';
- break;
- }
-
- $query_args = array(
- 'registration_source' => 'SPPD',
- 'spId' => 'A3JST9YM1SX7LB',
- );
-
- return add_query_arg( $query_args, $base_url );
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/functions.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/functions.php
deleted file mode 100644
index b48649c8..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/functions.php
+++ /dev/null
@@ -1,619 +0,0 @@
- array(
- 'admin_label' => __( 'Live', 'easy-digital-downloads' )
- ),
- 'test' => array(
- 'admin_label' => __( 'Test', 'easy-digital-downloads' )
- )
- );
- }
-
- return (array) apply_filters( 'edd_payment_modes', $modes );
-}
-
-/**
- * Returns a list of all available gateways.
- *
- * @since 1.0
- *
- * @return array $gateways All the available gateways.
- */
-function edd_get_payment_gateways() {
- static $gateways = null;
-
- // Default, built-in gateways
- if ( is_null( $gateways ) ) {
- $gateways = array(
- 'paypal_commerce' => array(
- 'admin_label' => __( 'PayPal', 'easy-digital-downloads' ),
- 'checkout_label' => __( 'PayPal', 'easy-digital-downloads' ),
- 'supports' => array(
- 'buy_now',
- ),
- 'icons' => array(
- 'paypal',
- ),
- ),
- /**
- * PayPal Standard is available only if it was used prior to 2.11 and the store owner hasn't
- * yet been onboarded to PayPal Commerce.
- *
- * @see \EDD\Gateways\PayPal\maybe_remove_paypal_standard()
- */
- 'paypal' => array(
- 'admin_label' => __( 'PayPal Standard', 'easy-digital-downloads' ),
- 'checkout_label' => __( 'PayPal', 'easy-digital-downloads' ),
- 'supports' => array(
- 'buy_now',
- ),
- 'icons' => array(
- 'paypal',
- ),
- ),
- 'manual' => array(
- 'admin_label' => __( 'Store Gateway', 'easy-digital-downloads' ),
- 'checkout_label' => __( 'Store Gateway', 'easy-digital-downloads' ),
- ),
- );
- }
-
- $gateways = apply_filters( 'edd_payment_gateways', $gateways );
-
- // Since Stripe is added via a filter still, move to the top.
- if ( array_key_exists( 'stripe', $gateways ) ) {
- $stripe_attributes = $gateways['stripe'];
- unset( $gateways['stripe'] );
-
- $gateways = array_merge( array( 'stripe' => $stripe_attributes ), $gateways );
- }
-
- return (array) apply_filters( 'edd_payment_gateways', $gateways );
-}
-
-/**
- * Enforce the gateway order (from the sortable admin area UI).
- *
- * @since 3.0
- *
- * @param array $gateways
- * @return array
- */
-function edd_order_gateways( $gateways = array() ) {
-
- // Get the order option
- $order = edd_get_option( 'gateways_order', '' );
-
- // If order is set, enforce it
- if ( ! empty( $order ) ) {
- $order = array_flip( explode( ',', $order ) );
- $order = array_intersect_key( $order, $gateways );
- $gateways = array_merge( $order, $gateways );
- }
-
- // Return ordered gateways
- return $gateways;
-}
-add_filter( 'edd_payment_gateways', 'edd_order_gateways', 99 );
-add_filter( 'edd_enabled_payment_gateways_before_sort', 'edd_order_gateways', 99 );
-
-/**
- * Returns a list of all enabled gateways.
- *
- * @since 1.0
- * @param bool $sort If true, the default gateway will be first
- * @return array $gateway_list All the available gateways
-*/
-function edd_get_enabled_payment_gateways( $sort = false ) {
- $gateways = edd_get_payment_gateways();
- $enabled = (array) edd_get_option( 'gateways', false );
-
- $gateway_list = array();
-
- foreach ( $gateways as $key => $gateway ) {
- if ( isset( $enabled[ $key ] ) && 1 === (int) $enabled[ $key ] ) {
- $gateway_list[ $key ] = $gateway;
- }
- }
-
- /**
- * Filter the enabled payment gateways before the default is bumped to the
- * front of the array.
- *
- * @since 3.0
- *
- * @param array $gateway_list List of enabled payment gateways
- * @return array Array of sorted gateways
- */
- $gateway_list = apply_filters( 'edd_enabled_payment_gateways_before_sort', $gateway_list );
-
- // Reorder our gateways so the default is first
- if ( true === $sort ) {
- $default_gateway_id = edd_get_default_gateway();
-
- // Only put default on top if it's active
- if ( edd_is_gateway_active( $default_gateway_id ) ) {
- $default_gateway = array( $default_gateway_id => $gateway_list[ $default_gateway_id ] );
- unset( $gateway_list[ $default_gateway_id ] );
-
- $gateway_list = array_merge( $default_gateway, $gateway_list );
- }
- }
-
- return apply_filters( 'edd_enabled_payment_gateways', $gateway_list );
-}
-
-/**
- * Checks whether a specified gateway is activated.
- *
- * @since 1.0
- *
- * @param string $gateway Name of the gateway to check for.
- * @return boolean true if enabled, false otherwise.
-*/
-function edd_is_gateway_active( $gateway ) {
- $gateways = edd_get_enabled_payment_gateways();
- $retval = array_key_exists( $gateway, $gateways );
-
- return apply_filters( 'edd_is_gateway_active', $retval, $gateway, $gateways );
-}
-
-/**
- * Gets the default payment gateway selected from the EDD Settings.
- *
- * @since 1.5
- *
- * @return string $default Default gateway ID.
- */
-function edd_get_default_gateway() {
- $default = edd_get_option( 'default_gateway', 'paypal' );
-
- // Use the first enabled one
- if ( ! edd_is_gateway_active( $default ) ) {
- $gateways = edd_get_enabled_payment_gateways();
- $gateways = array_keys( $gateways );
- $default = reset( $gateways );
- }
-
- return apply_filters( 'edd_default_gateway', $default );
-}
-
-/**
- * Returns the admin label for the specified gateway
- *
- * @since 1.0.8.3
- *
- * @param string $gateway Name of the gateway to retrieve a label for
- * @return string Gateway admin label
- */
-function edd_get_gateway_admin_label( $gateway ) {
- $gateways = edd_get_payment_gateways();
-
- $label = isset( $gateways[ $gateway ] )
- ? $gateways[ $gateway ]['admin_label']
- : ucwords( $gateway );
-
- return apply_filters( 'edd_gateway_admin_label', $label, $gateway );
-}
-
-/**
- * Returns the checkout label for the specified gateway.
- *
- * @since 1.0.8.5
- *
- * @param string $gateway Name of the gateway to retrieve a label for.
- * @return string Checkout label for the gateway.
- */
-function edd_get_gateway_checkout_label( $gateway ) {
- $gateways = edd_get_payment_gateways();
- $label = isset( $gateways[ $gateway ] ) ? $gateways[ $gateway ]['checkout_label'] : $gateway;
-
- return apply_filters( 'edd_gateway_checkout_label', $label, $gateway );
-}
-
-/**
- * Returns the options a gateway supports.
- *
- * @since 1.8
- *
- * @param string $gateway ID of the gateway to retrieve a label for.
- * @return array Options the gateway supports.
- */
-function edd_get_gateway_supports( $gateway ) {
- $gateways = edd_get_enabled_payment_gateways();
- $supports = isset( $gateways[ $gateway ]['supports'] ) ? $gateways[ $gateway ]['supports'] : array();
-
- return apply_filters( 'edd_gateway_supports', $supports, $gateway );
-}
-
-/**
- * Checks if a gateway supports buy now.
- *
- * @since 1.8
- *
- * @param string $gateway ID of the gateway to retrieve a label for.
- * @return bool True if the gateway supports buy now, false otherwise.
- */
-function edd_gateway_supports_buy_now( $gateway ) {
- $supports = edd_get_gateway_supports( $gateway );
- $ret = in_array( 'buy_now', $supports, true );
-
- return apply_filters( 'edd_gateway_supports_buy_now', $ret, $gateway );
-}
-
-/**
- * Checks if an enabled gateway supports buy now.
- *
- * @since 1.8
- *
- * @return bool True if the shop supports buy now, false otherwise.
- */
-function edd_shop_supports_buy_now() {
- $gateways = edd_get_enabled_payment_gateways();
- $ret = false;
-
- if ( ! edd_use_taxes() && $gateways && 1 === count( $gateways ) ) {
- foreach ( $gateways as $gateway_id => $gateway ) {
- if ( edd_gateway_supports_buy_now( $gateway_id ) ) {
- $ret = true;
- break;
- }
- }
- }
-
- return apply_filters( 'edd_shop_supports_buy_now', $ret );
-}
-
-/**
- * Build the purchase data for a straight-to-gateway purchase button
- *
- * @since 1.7
- *
- * @param int $download_id
- * @param array $options
- * @param int $quantity
- *
- * @return mixed|void
- */
-function edd_build_straight_to_gateway_data( $download_id = 0, $options = array(), $quantity = 1 ) {
- $price_options = array();
-
- if ( empty( $options ) || ! edd_has_variable_prices( $download_id ) ) {
- $price = edd_get_download_price( $download_id );
- } else {
-
- if ( is_array( $options['price_id'] ) ) {
- $price_id = $options['price_id'][0];
- } else {
- $price_id = $options['price_id'];
- }
-
- $prices = edd_get_variable_prices( $download_id );
-
- // Make sure a valid price ID was supplied
- if ( ! isset( $prices[ $price_id ] ) ) {
- wp_die( __( 'The requested price ID does not exist.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 404 ) );
- }
-
- $price_options = array(
- 'price_id' => $price_id,
- 'amount' => $prices[ $price_id ]['amount']
- );
- $price = $prices[ $price_id ]['amount'];
- }
-
- // Set up Downloads array
- $downloads = array(
- array(
- 'id' => $download_id,
- 'options' => $price_options
- )
- );
-
- // Set up Cart Details array
- $cart_details = array(
- array(
- 'name' => get_the_title( $download_id ),
- 'id' => $download_id,
- 'item_number' => array(
- 'id' => $download_id,
- 'options' => $price_options
- ),
- 'tax' => 0,
- 'discount' => 0,
- 'item_price' => $price,
- 'subtotal' => ( $price * $quantity ),
- 'price' => ( $price * $quantity ),
- 'quantity' => $quantity,
- )
- );
-
- if ( is_user_logged_in() ) {
- $current_user = wp_get_current_user();
- }
-
- // Setup user information
- $user_info = array(
- 'id' => is_user_logged_in() ? get_current_user_id() : -1,
- 'email' => is_user_logged_in() ? $current_user->user_email : '',
- 'first_name' => is_user_logged_in() ? $current_user->user_firstname : '',
- 'last_name' => is_user_logged_in() ? $current_user->user_lastname : '',
- 'discount' => 'none',
- 'address' => array()
- );
-
- // Setup purchase information
- $purchase_data = array(
- 'downloads' => $downloads,
- 'fees' => edd_get_cart_fees(),
- 'subtotal' => $price * $quantity,
- 'discount' => 0,
- 'tax' => 0,
- 'price' => $price * $quantity,
- 'purchase_key' => strtolower( md5( uniqid() ) ),
- 'user_email' => $user_info['email'],
- 'date' => date( 'Y-m-d H:i:s', current_time( 'timestamp' ) ),
- 'user_info' => $user_info,
- 'post_data' => array(),
- 'cart_details' => $cart_details,
- 'gateway' => \EDD\Gateways\PayPal\paypal_standard_enabled() ? 'paypal' : 'paypal_commerce',
- 'buy_now' => true,
- 'card_info' => array()
- );
-
- return apply_filters( 'edd_straight_to_gateway_purchase_data', $purchase_data );
-}
-
-/**
- * Sends all the payment data to the specified gateway
- *
- * @since 1.0
- *
- * @param string $gateway Name of the gateway.
- * @param array $payment_data All the payment data to be sent to the gateway.
-*/
-function edd_send_to_gateway( $gateway, $payment_data ) {
- $payment_data['gateway_nonce'] = wp_create_nonce( 'edd-gateway' );
-
- // $gateway must match the ID used when registering the gateway
- do_action( 'edd_gateway_' . $gateway, $payment_data );
-}
-
-/**
- * Determines if the gateway menu should be shown
- *
- * If the cart amount is zero, no option is shown and the cart uses the manual gateway
- * to emulate a no-gateway-setup for a free download
- *
- * @since 1.3.2
- *
- * @return bool $show_gateways Whether or not to show the gateways
- */
-function edd_show_gateways() {
- $gateways = edd_get_enabled_payment_gateways();
- $show_gateways = false;
-
- if ( count( $gateways ) > 1 ) {
- $show_gateways = true;
-
- if ( edd_get_cart_total() <= 0 ) {
- $show_gateways = false;
- }
- }
-
- return apply_filters( 'edd_show_gateways', $show_gateways );
-}
-
-/**
- * Determines what the currently selected gateway is
- *
- * If the cart amount is zero, no option is shown and the cart uses the manual
- * gateway to emulate a no-gateway-setup for a free download
- *
- * @since 1.3.2
- * @return string $chosen_gateway The slug of the gateway
- */
-function edd_get_chosen_gateway() {
-
- // Use the default gateway by default
- $retval = edd_get_default_gateway();
-
- // Get the chosen gateway
- $chosen = isset( $_REQUEST['payment-mode'] )
- ? $_REQUEST['payment-mode']
- : false;
-
- // Sanitize the gateway
- if ( false !== $chosen ) {
- $chosen = preg_replace( '/[^a-zA-Z0-9-_]+/', '', $chosen );
- $chosen = urldecode( $chosen );
-
- // Set return value if gateway is active
- if ( ! empty( $chosen ) && edd_is_gateway_active( $chosen ) ) {
- $retval = $chosen;
- }
- }
-
- // Override to manual if no price
- if ( edd_get_cart_subtotal() <= 0 ) {
- $retval = 'manual';
- }
-
- return apply_filters( 'edd_chosen_gateway', $retval, $chosen );
-}
-
-/**
- * Record a gateway error
- *
- * A simple wrapper function for edd_record_log()
- *
- * @since 1.3.3
- *
- * @param string $title Title of the log entry (default: empty)
- * @param string $message Message to store in the log entry (default: empty)
- * @param int $parent Parent log entry (default: 0)
- *
- * @return int ID of the new log entry.
- */
-function edd_record_gateway_error( $title = '', $message = '', $parent = 0 ) {
- return edd_record_log( $title, $message, $parent, 'gateway_error' );
-}
-
-/**
- * Counts the number of orders made with a specific gateway.
- *
- * @since 1.6
- * @since 3.0 Use edd_count_orders().
- *
- * @param string $gateway_label Gateway label.
- * @param string $status Order status.
- *
- * @return int Number of orders placed based on the gateway.
- */
-function edd_count_sales_by_gateway( $gateway_label = 'paypal', $status = 'complete' ) {
- return edd_count_orders( array(
- 'gateway' => $gateway_label,
- 'status' => $status,
- ) );
-}
-
-/**
- * Determines if a gateway is setup.
- *
- * @since 3.1.2
- *
- * @param string $gateway The gateway to check.
- *
- * @return bool True if the gateway is setup, false otherwise.
- */
-function edd_is_gateway_setup( $gateway = '' ) {
- // Return false if no gateway is passed.
- if ( empty( $gateway ) ) {
- return false;
- }
-
- $gateways = edd_get_payment_gateways();
-
- // If the gateway is not registered, return false.
- if ( ! array_key_exists( $gateway, $gateways ) ) {
- return false;
- }
-
- // Some core gateways, we can just determine here, otherwise we'll use the default case to run the filter.
- switch ( $gateway ) {
- case 'stripe':
- $api_key = edd_is_test_mode()
- ? edd_get_option( 'test_publishable_key' )
- : edd_get_option( 'live_publishable_key' );
-
- $is_setup = ! empty( $api_key );
- break;
-
- case 'paypal_commerce':
- $is_setup = EDD\Gateways\PayPal\ready_to_accept_payments();
- break;
-
- default:
- /**
- * Run a filter to determine if a gateway is setup.
- *
- * This defaults to 'true' so that gateways that do not have a setup check to
- * continue to work.
- *
- * This hook would fire on the gateway slug, prefixed with `edd_is_gateway_setup_`.
- * Example: edd_is_gateway_setup_paypal_express
- *
- * @since 3.1.2
- *
- * @param bool $is_setup Whether or not the gateway is setup.
- */
- $is_setup = apply_filters( 'edd_is_gateway_setup_' . $gateway, true );
- break;
- }
-
- return $is_setup;
-}
-
-/**
- * Gets the URL to the gateway settings page.
- *
- * @since 3.1.2
- *
- * @param string $gateway The gateway to get the settings URL for.
- *
- * @return string The URL to the gateway settings page.
- */
-function edd_get_gateway_settings_url( $gateway = '' ) {
- // Return false if no gateway is passed.
- if ( empty( $gateway ) ) {
- return '';
- }
-
- $gateways = edd_get_payment_gateways();
-
- // If the gateway is not registered, return false.
- if ( ! array_key_exists( $gateway, $gateways ) ) {
- return '';
- }
-
- // Some core gateways, we can just determine here, otherwise we'll use the default case to run the filter.
- switch ( $gateway ) {
- case 'stripe':
- $gateway_settings_url = edd_get_admin_url(
- array(
- 'page' => 'edd-settings',
- 'tab' => 'gateways',
- 'section' => 'edd-stripe',
- )
- );
- break;
-
- case 'paypal_commerce':
- $gateway_settings_url = EDD\Gateways\PayPal\Admin\get_settings_url();
- break;
-
- default:
- /**
- * Run a filter to assign a settings URL for the gateway.
- *
- * This defaults to an empty string so that gateways that do not have
- * a setup check to continue to work.
- *
- * This hook would fire on the gateway slug, prefixed with `edd_gateway_settings_url_`.
- * Example: edd_gateway_settings_url_paypal_express
- *
- * @since 3.1.2
- *
- * @param string $gateway_settings_url The URL to the gateway settings.
- */
- $gateway_settings_url = apply_filters( 'edd_gateway_settings_url_' . $gateway, '' );
- break;
- }
-
- return $gateway_settings_url;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/libs/amazon/Client.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/libs/amazon/Client.php
deleted file mode 100644
index 62897f7e..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/libs/amazon/Client.php
+++ /dev/null
@@ -1,1582 +0,0 @@
- null,
- 'secret_key' => null,
- 'access_key' => null,
- 'region' => null,
- 'currency_code' => null,
- 'sandbox' => false,
- 'platform_id' => null,
- 'cabundle_file' => null,
- 'application_name' => null,
- 'application_version' => null,
- 'proxy_host' => null,
- 'proxy_port' => -1,
- 'proxy_username' => null,
- 'proxy_password' => null,
- 'client_id' => null,
- 'handle_throttle' => true
- );
-
- private $modePath = null;
-
- // Final URL to where the API parameters POST done, based off the config['region'] and respective $mwsServiceUrls
- private $mwsServiceUrl = null;
-
- private $mwsServiceUrls = array('eu' => 'mws-eu.amazonservices.com',
- 'na' => 'mws.amazonservices.com',
- 'jp' => 'mws.amazonservices.jp');
-
- // Production profile end points to get the user information
- private $liveProfileEndpoint = array('uk' => 'https://api.amazon.co.uk',
- 'us' => 'https://api.amazon.com',
- 'de' => 'https://api.amazon.de',
- 'jp' => 'https://api.amazon.co.jp');
-
- // Sandbox profile end points to get the user information
- private $sandboxProfileEndpoint = array('uk' => 'https://api.sandbox.amazon.co.uk',
- 'us' => 'https://api.sandbox.amazon.com',
- 'de' => 'https://api.sandbox.amazon.de',
- 'jp' => 'https://api.sandbox.amazon.co.jp');
-
- private $regionMappings = array('de' => 'eu',
- 'uk' => 'eu',
- 'us' => 'na',
- 'jp' => 'jp');
-
- // Boolean variable to check if the API call was a success
- public $success = false;
-
- /* Takes user configuration array from the user as input
- * Takes JSON file path with configuration information as input
- * Validates the user configuration array against existing config array
- */
-
- public function __construct($config = null)
- {
- if (!is_null($config)) {
-
- if (is_array($config)) {
- $configArray = $config;
- } elseif (!is_array($config)) {
- $configArray = $this->checkIfFileExists($config);
- }
-
- if (is_array($configArray)) {
- $this->checkConfigKeys($configArray);
- } else {
- throw new \Exception('$config is of the incorrect type ' . gettype($configArray) . ' and should be of the type array');
- }
- } else {
- throw new \Exception('$config cannot be null.');
- }
- }
-
- /* checkIfFileExists - check if the JSON file exists in the path provided */
-
- private function checkIfFileExists($config)
- {
- if(file_exists($config))
- {
- $jsonString = file_get_contents($config);
- $configArray = json_decode($jsonString, true);
-
- $jsonError = json_last_error();
-
- if ($jsonError != 0) {
- $errorMsg = "Error with message - content is not in json format" . $this->getErrorMessageForJsonError($jsonError) . " " . $configArray;
- throw new \Exception($errorMsg);
- }
- } else {
- $errorMsg ='$config is not a Json File path or the Json File was not found in the path provided';
- throw new \Exception($errorMsg);
- }
- return $configArray;
- }
-
- /* Checks if the keys of the input configuration matches the keys in the config array
- * if they match the values are taken else throws exception
- * strict case match is not performed
- */
-
- private function checkConfigKeys($config)
- {
- $config = array_change_key_case($config, CASE_LOWER);
- $config = $this->trimArray($config);
-
- foreach ($config as $key => $value) {
- if (array_key_exists($key, $this->config)) {
- $this->config[$key] = $value;
- } else {
- throw new \Exception('Key ' . $key . ' is either not part of the configuration or has incorrect Key name.
- check the config array key names to match your key names of your config array', 1);
- }
- }
- }
-
- /* Convert a json error code to a descriptive error message
- *
- * @param int $jsonError message code
- *
- * @return string error message
- */
-
- private function getErrorMessageForJsonError($jsonError)
- {
- switch ($jsonError) {
- case JSON_ERROR_DEPTH:
- return " - maximum stack depth exceeded.";
- break;
- case JSON_ERROR_STATE_MISMATCH:
- return " - invalid or malformed JSON.";
- break;
- case JSON_ERROR_CTRL_CHAR:
- return " - control character error.";
- break;
- case JSON_ERROR_SYNTAX:
- return " - syntax error.";
- break;
- default:
- return ".";
- break;
- }
- }
-
- /* Setter for sandbox
- * Sets the Boolean value for config['sandbox'] variable
- */
-
- public function setSandbox($value)
- {
- if (is_bool($value)) {
- $this->config['sandbox'] = $value;
- } else {
- throw new \Exception($value . ' is of type ' . gettype($value) . ' and should be a boolean value');
- }
- }
-
- /* Setter for config['client_id']
- * Sets the value for config['client_id'] variable
- */
-
- public function setClientId($value)
- {
- if (!empty($value)) {
- $this->config['client_id'] = $value;
- } else {
- throw new \Exception('setter value for client ID provided is empty');
- }
- }
-
- /* Setter for Proxy
- * input $proxy [array]
- * @param $proxy['proxy_user_host'] - hostname for the proxy
- * @param $proxy['proxy_user_port'] - hostname for the proxy
- * @param $proxy['proxy_user_name'] - if your proxy required a username
- * @param $proxy['proxy_user_password'] - if your proxy required a password
- */
-
- public function setProxy($proxy)
- {
- $proxy = $this->trimArray($proxy);
-
- if (!empty($proxy['proxy_user_host']))
- $this->config['proxy_user_host'] = $proxy['proxy_user_host'];
-
- if (!empty($proxy['proxy_user_port']))
- $this->config['proxy_user_port'] = $proxy['proxy_user_port'];
-
- if (!empty($proxy['proxy_user_name']))
- $this->config['proxy_user_name'] = $proxy['proxy_user_name'];
-
- if (!empty($proxy['proxy_user_password']))
- $this->config['proxy_user_password'] = $proxy['proxy_user_password'];
- }
-
- /* Setter for $mwsServiceUrl
- * Set the URL to which the post request has to be made for unit testing
- */
-
- public function setMwsServiceUrl($url)
- {
- $this->mwsServiceUrl = $url;
- }
-
- /* Getter
- * Gets the value for the key if the key exists in config
- */
-
- public function __get($name)
- {
- if (array_key_exists(strtolower($name), $this->config)) {
- return $this->config[strtolower($name)];
- } else {
- throw new \Exception('Key ' . $name . ' is either not a part of the configuration array config or the' . $name . 'does not match the key name in the config array', 1);
- }
- }
-
- /* Getter for parameters string
- * Gets the value for the parameters string for unit testing
- */
-
- public function getParameters()
- {
- return trim($this->parameters);
- }
-
- /* Trim the input Array key values */
-
- private function trimArray($array)
- {
- foreach ($array as $key => $value)
- {
- $array[$key] = trim($value);
- }
- return $array;
- }
-
- /* GetUserInfo convenience function - Returns user's profile information from Amazon using the access token returned by the Button widget.
- *
- * @see http://login.amazon.com/website Step 4
- * @param $accessToken [String]
- */
-
- public function getUserInfo($accessToken)
- {
- // Get the correct Profile Endpoint URL based off the country/region provided in the config['region']
- $this->profileEndpointUrl();
-
- if (empty($accessToken)) {
- throw new \InvalidArgumentException('Access Token is a required parameter and is not set');
- }
-
- // To make sure double encoding doesn't occur decode first and encode again.
- $accessToken = urldecode($accessToken);
- $url = $this->profileEndpoint . '/auth/o2/tokeninfo?access_token=' . urlEncode($accessToken);
-
- $httpCurlRequest = new HttpCurl();
-
- $response = $httpCurlRequest->httpGet($url);
- $data = json_decode($response);
-
- if ($data->aud != $this->config['client_id']) {
- // The access token does not belong to us
- throw new \Exception('The Access token entered is incorrect');
- }
-
- // Exchange the access token for user profile
- $url = $this->profileEndpoint . '/user/profile';
- $httpCurlRequest = new HttpCurl();
-
- $httpCurlRequest->setAccessToken($accessToken);
- $httpCurlRequest->setHttpHeader(true);
- $response = $httpCurlRequest->httpGet($url);
-
- $userInfo = json_decode($response, true);
- return $userInfo;
- }
-
- /* setParametersAndPost - sets the parameters array with non empty values from the requestParameters array sent to API calls.
- * If Provider Credit Details is present, values are set by setProviderCreditDetails
- * If Provider Credit Reversal Details is present, values are set by setProviderCreditDetails
- */
-
- private function setParametersAndPost($parameters, $fieldMappings, $requestParameters)
- {
- /* For loop to take all the non empty parameters in the $requestParameters and add it into the $parameters array,
- * if the keys are matched from $requestParameters array with the $fieldMappings array
- */
- foreach ($requestParameters as $param => $value) {
-
- if(!is_array($value)) {
- $value = trim($value);
- }
-
- if (array_key_exists($param, $fieldMappings) && $value!='') {
-
- if(is_array($value)) {
- // If the parameter is a provider_credit_details or provider_credit_reversal_details, call the respective functions to set the values
- if($param === 'provider_credit_details') {
- $parameters = $this->setProviderCreditDetails($parameters,$value);
- } elseif ($param === 'provider_credit_reversal_details') {
- $parameters = $this->setProviderCreditReversalDetails($parameters,$value);
- }
-
- } else{
- // For variables that are boolean values, strtolower them
- if($this->checkIfBool($value))
- {
- $value = strtolower($value);
- }
-
- $parameters[$fieldMappings[$param]] = $value;
- }
- }
- }
-
- $parameters = $this->setDefaultValues($parameters, $fieldMappings, $requestParameters);
- $responseObject = $this->calculateSignatureAndPost($parameters);
-
- return $responseObject;
- }
-
- /* checkIfBool - checks if the input is a boolean */
-
- private function checkIfBool($string)
- {
- $string = strtolower($string);
- return in_array($string, array('true', 'false'));
- }
-
- /* calculateSignatureAndPost - convert the Parameters array to string and curl POST the parameters to MWS */
-
- private function calculateSignatureAndPost($parameters)
- {
- // Call the signature and Post function to perform the actions. Returns XML in array format
- $parametersString = $this->calculateSignatureAndParametersToString($parameters);
-
- // POST using curl the String converted Parameters
- $response = $this->invokePost($parametersString);
-
- // Send this response as args to ResponseParser class which will return the object of the class.
- $responseObject = new ResponseParser($response);
- return $responseObject;
- }
-
- /* If merchant_id is not set via the requestParameters array then it's taken from the config array
- *
- * Set the platform_id if set in the config['platform_id'] array
- *
- * If currency_code is set in the $requestParameters and it exists in the $fieldMappings array, strtoupper it
- * else take the value from config array if set
- */
-
- private function setDefaultValues($parameters, $fieldMappings, $requestParameters)
- {
- if (empty($requestParameters['merchant_id']))
- $parameters['SellerId'] = $this->config['merchant_id'];
-
- if (array_key_exists('platform_id', $fieldMappings)) {
- if (empty($requestParameters['platform_id']) && !empty($this->config['platform_id']))
- $parameters[$fieldMappings['platform_id']] = $this->config['platform_id'];
- }
-
- if (array_key_exists('currency_code', $fieldMappings)) {
- if (!empty($requestParameters['currency_code'])) {
- $parameters[$fieldMappings['currency_code']] = strtoupper($requestParameters['currency_code']);
- } else {
- $parameters[$fieldMappings['currency_code']] = strtoupper($this->config['currency_code']);
- }
- }
-
- return $parameters;
- }
-
- /* setProviderCreditDetails - sets the provider credit details sent via the Capture or Authorize API calls
- * @param provider_id - [String]
- * @param credit_amount - [String]
- * @optional currency_code - [String]
- */
-
- private function setProviderCreditDetails($parameters, $providerCreditInfo)
- {
- $providerIndex = 0;
- $providerString = 'ProviderCreditList.member.';
-
- $fieldMappings = array(
- 'provider_id' => 'ProviderId',
- 'credit_amount' => 'CreditAmount.Amount',
- 'currency_code' => 'CreditAmount.CurrencyCode'
- );
-
- foreach ($providerCreditInfo as $key => $value)
- {
- $value = array_change_key_case($value, CASE_LOWER);
- $providerIndex = $providerIndex + 1;
-
- foreach ($value as $param => $val)
- {
- if (array_key_exists($param, $fieldMappings) && trim($val)!='') {
- $parameters[$providerString.$providerIndex. '.' .$fieldMappings[$param]] = $val;
- }
- }
-
- // If currency code is not entered take it from the config array
- if(empty($parameters[$providerString.$providerIndex. '.' .$fieldMappings['currency_code']]))
- {
- $parameters[$providerString.$providerIndex. '.' .$fieldMappings['currency_code']] = strtoupper($this->config['currency_code']);
- }
- }
-
- return $parameters;
- }
-
- /* setProviderCreditReversalDetails - sets the reverse provider credit details sent via the Refund API call.
- * @param provider_id - [String]
- * @param credit_amount - [String]
- * @optional currency_code - [String]
- */
-
- private function setProviderCreditReversalDetails($parameters, $providerCreditInfo)
- {
- $providerIndex = 0;
- $providerString = 'ProviderCreditReversalList.member.';
-
- $fieldMappings = array(
- 'provider_id' => 'ProviderId',
- 'credit_reversal_amount' => 'CreditReversalAmount.Amount',
- 'currency_code' => 'CreditReversalAmount.CurrencyCode'
- );
-
- foreach ($providerCreditInfo as $key => $value)
- {
- $value = array_change_key_case($value, CASE_LOWER);
- $providerIndex = $providerIndex + 1;
-
- foreach ($value as $param => $val)
- {
- if (array_key_exists($param, $fieldMappings) && trim($val)!='') {
- $parameters[$providerString.$providerIndex. '.' .$fieldMappings[$param]] = $val;
- }
- }
-
- // If currency code is not entered take it from the config array
- if(empty($parameters[$providerString.$providerIndex. '.' .$fieldMappings['currency_code']]))
- {
- $parameters[$providerString.$providerIndex. '.' .$fieldMappings['currency_code']] = strtoupper($this->config['currency_code']);
- }
- }
-
- return $parameters;
- }
-
- /* GetOrderReferenceDetails API call - Returns details about the Order Reference object and its current state.
- * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_GetOrderReferenceDetails.html
- *
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['amazon_order_reference_id'] - [String]
- * @optional requestParameters['address_consent_token'] - [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function getOrderReferenceDetails($requestParameters = array())
- {
-
- $parameters['Action'] = 'GetOrderReferenceDetails';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'amazon_order_reference_id' => 'AmazonOrderReferenceId',
- 'address_consent_token' => 'AddressConsentToken',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
- return ($responseObject);
- }
-
- /* SetOrderReferenceDetails API call - Sets order reference details such as the order total and a description for the order.
- * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_SetOrderReferenceDetails.html
- *
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['amazon_order_reference_id'] - [String]
- * @param requestParameters['amount'] - [String]
- * @param requestParameters['currency_code'] - [String]
- * @optional requestParameters['platform_id'] - [String]
- * @optional requestParameters['seller_note'] - [String]
- * @optional requestParameters['seller_order_id'] - [String]
- * @optional requestParameters['store_name'] - [String]
- * @optional requestParameters['custom_information'] - [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function setOrderReferenceDetails($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'SetOrderReferenceDetails';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'amazon_order_reference_id' => 'AmazonOrderReferenceId',
- 'amount' => 'OrderReferenceAttributes.OrderTotal.Amount',
- 'currency_code' => 'OrderReferenceAttributes.OrderTotal.CurrencyCode',
- 'platform_id' => 'OrderReferenceAttributes.PlatformId',
- 'seller_note' => 'OrderReferenceAttributes.SellerNote',
- 'seller_order_id' => 'OrderReferenceAttributes.SellerOrderAttributes.SellerOrderId',
- 'store_name' => 'OrderReferenceAttributes.SellerOrderAttributes.StoreName',
- 'custom_information' => 'OrderReferenceAttributes.SellerOrderAttributes.CustomInformation',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* ConfirmOrderReferenceDetails API call - Confirms that the order reference is free of constraints and all required information has been set on the order reference.
- * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_ConfirmOrderReference.html
-
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['amazon_order_reference_id'] - [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function confirmOrderReference($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'ConfirmOrderReference';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'amazon_order_reference_id' => 'AmazonOrderReferenceId',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* CancelOrderReferenceDetails API call - Cancels a previously confirmed order reference.
- * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_CancelOrderReference.html
- *
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['amazon_order_reference_id'] - [String]
- * @optional requestParameters['cancelation_reason'] [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function cancelOrderReference($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'CancelOrderReference';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'amazon_order_reference_id' => 'AmazonOrderReferenceId',
- 'cancelation_reason' => 'CancelationReason',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* CloseOrderReferenceDetails API call - Confirms that an order reference has been fulfilled (fully or partially)
- * and that you do not expect to create any new authorizations on this order reference.
- * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_CloseOrderReference.html
- *
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['amazon_order_reference_id'] - [String]
- * @optional requestParameters['closure_reason'] [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function closeOrderReference($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'CloseOrderReference';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'amazon_order_reference_id' => 'AmazonOrderReferenceId',
- 'closure_reason' => 'ClosureReason',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* CloseAuthorization API call - Closes an authorization.
- * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_CloseOrderReference.html
- *
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['amazon_authorization_id'] - [String]
- * @optional requestParameters['closure_reason'] [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function closeAuthorization($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'CloseAuthorization';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'amazon_authorization_id' => 'AmazonAuthorizationId',
- 'closure_reason' => 'ClosureReason',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* Authorize API call - Reserves a specified amount against the payment method(s) stored in the order reference.
- * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_Authorize.html
- *
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['amazon_order_reference_id'] - [String]
- * @param requestParameters['authorization_amount'] [String]
- * @param requestParameters['currency_code'] - [String]
- * @param requestParameters['authorization_reference_id'] [String]
- * @optional requestParameters['capture_now'] [String]
- * @optional requestParameters['provider_credit_details'] - [array (array())]
- * @optional requestParameters['seller_authorization_note'] [String]
- * @optional requestParameters['transaction_timeout'] [String] - Defaults to 1440 minutes
- * @optional requestParameters['soft_descriptor'] - [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function authorize($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'Authorize';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'amazon_order_reference_id' => 'AmazonOrderReferenceId',
- 'authorization_amount' => 'AuthorizationAmount.Amount',
- 'currency_code' => 'AuthorizationAmount.CurrencyCode',
- 'authorization_reference_id' => 'AuthorizationReferenceId',
- 'capture_now' => 'CaptureNow',
- 'provider_credit_details' => array(),
- 'seller_authorization_note' => 'SellerAuthorizationNote',
- 'transaction_timeout' => 'TransactionTimeout',
- 'soft_descriptor' => 'SoftDescriptor',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* GetAuthorizationDetails API call - Returns the status of a particular authorization and the total amount captured on the authorization.
- * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_GetAuthorizationDetails.html
- *
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['amazon_authorization_id'] [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function getAuthorizationDetails($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'GetAuthorizationDetails';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'amazon_authorization_id' => 'AmazonAuthorizationId',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* Capture API call - Captures funds from an authorized payment instrument.
- * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_Capture.html
- *
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['amazon_authorization_id'] - [String]
- * @param requestParameters['capture_amount'] - [String]
- * @param requestParameters['currency_code'] - [String]
- * @param requestParameters['capture_reference_id'] - [String]
- * @optional requestParameters['provider_credit_details'] - [array (array())]
- * @optional requestParameters['seller_capture_note'] - [String]
- * @optional requestParameters['soft_descriptor'] - [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function capture($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'Capture';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'amazon_authorization_id' => 'AmazonAuthorizationId',
- 'capture_amount' => 'CaptureAmount.Amount',
- 'currency_code' => 'CaptureAmount.CurrencyCode',
- 'capture_reference_id' => 'CaptureReferenceId',
- 'provider_credit_details' => array(),
- 'seller_capture_note' => 'SellerCaptureNote',
- 'soft_descriptor' => 'SoftDescriptor',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* GetCaptureDetails API call - Returns the status of a particular capture and the total amount refunded on the capture.
- * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_GetCaptureDetails.html
- *
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['amazon_capture_id'] - [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function getCaptureDetails($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'GetCaptureDetails';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'amazon_capture_id' => 'AmazonCaptureId',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* Refund API call - Refunds a previously captured amount.
- * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_Refund.html
- *
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['amazon_capture_id'] - [String]
- * @param requestParameters['refund_reference_id'] - [String]
- * @param requestParameters['refund_amount'] - [String]
- * @param requestParameters['currency_code'] - [String]
- * @optional requestParameters['provider_credit_reversal_details'] - [array(array())]
- * @optional requestParameters['seller_refund_note'] [String]
- * @optional requestParameters['soft_descriptor'] - [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function refund($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'Refund';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'amazon_capture_id' => 'AmazonCaptureId',
- 'refund_reference_id' => 'RefundReferenceId',
- 'refund_amount' => 'RefundAmount.Amount',
- 'currency_code' => 'RefundAmount.CurrencyCode',
- 'provider_credit_reversal_details' => array(),
- 'seller_refund_note' => 'SellerRefundNote',
- 'soft_descriptor' => 'SoftDescriptor',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* GetRefundDetails API call - Returns the status of a particular refund.
- * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_GetRefundDetails.html
- *
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['amazon_refund_id'] - [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function getRefundDetails($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'GetRefundDetails';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'amazon_refund_id' => 'AmazonRefundId',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* GetServiceStatus API Call - Returns the operational status of the Off-Amazon Payments API section
- * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_GetServiceStatus.html
- *
- * The GetServiceStatus operation returns the operational status of the Off-Amazon Payments API
- * section of Amazon Marketplace Web Service (Amazon MWS).
- * Status values are GREEN, GREEN_I, YELLOW, and RED.
- *
- * @param requestParameters['merchant_id'] - [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function getServiceStatus($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'GetServiceStatus';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* CreateOrderReferenceForId API Call - Creates an order reference for the given object
- * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_CreateOrderReferenceForId.html
- *
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['Id'] - [String]
- * @optional requestParameters['inherit_shipping_address'] [Boolean]
- * @optional requestParameters['ConfirmNow'] - [Boolean]
- * @optional Amount (required when confirm_now is set to true) [String]
- * @optional requestParameters['currency_code'] - [String]
- * @optional requestParameters['seller_note'] - [String]
- * @optional requestParameters['seller_order_id'] - [String]
- * @optional requestParameters['store_name'] - [String]
- * @optional requestParameters['custom_information'] - [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function createOrderReferenceForId($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'CreateOrderReferenceForId';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'id' => 'Id',
- 'id_type' => 'IdType',
- 'inherit_shipping_address' => 'InheritShippingAddress',
- 'confirm_now' => 'ConfirmNow',
- 'amount' => 'OrderReferenceAttributes.OrderTotal.Amount',
- 'currency_code' => 'OrderReferenceAttributes.OrderTotal.CurrencyCode',
- 'platform_id' => 'OrderReferenceAttributes.PlatformId',
- 'seller_note' => 'OrderReferenceAttributes.SellerNote',
- 'seller_order_id' => 'OrderReferenceAttributes.SellerOrderAttributes.SellerOrderId',
- 'store_name' => 'OrderReferenceAttributes.SellerOrderAttributes.StoreName',
- 'custom_information' => 'OrderReferenceAttributes.SellerOrderAttributes.CustomInformation',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* GetBillingAgreementDetails API Call - Returns details about the Billing Agreement object and its current state.
- * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_GetBillingAgreementDetails.html
- *
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['amazon_billing_agreement_id'] - [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function getBillingAgreementDetails($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'GetBillingAgreementDetails';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'amazon_billing_agreement_id' => 'AmazonBillingAgreementId',
- 'address_consent_token' => 'AddressConsentToken',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* SetBillingAgreementDetails API call - Sets Billing Agreement details such as a description of the agreement and other information about the seller.
- * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_SetBillingAgreementDetails.html
- *
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['amazon_billing_agreement_id'] - [String]
- * @param requestParameters['amount'] - [String]
- * @param requestParameters['currency_code'] - [String]
- * @optional requestParameters['platform_id'] - [String]
- * @optional requestParameters['seller_note'] - [String]
- * @optional requestParameters['seller_billing_agreement_id'] - [String]
- * @optional requestParameters['store_name'] - [String]
- * @optional requestParameters['custom_information'] - [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function setBillingAgreementDetails($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'SetBillingAgreementDetails';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'amazon_billing_agreement_id' => 'AmazonBillingAgreementId',
- 'platform_id' => 'BillingAgreementAttributes.PlatformId',
- 'seller_note' => 'BillingAgreementAttributes.SellerNote',
- 'seller_billing_agreement_id' => 'BillingAgreementAttributes.SellerBillingAgreementAttributes.SellerBillingAgreementId',
- 'custom_information' => 'BillingAgreementAttributes.SellerBillingAgreementAttributes.CustomInformation',
- 'store_name' => 'BillingAgreementAttributes.SellerBillingAgreementAttributes.StoreName',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* ConfirmBillingAgreement API Call - Confirms that the Billing Agreement is free of constraints and all required information has been set on the Billing Agreement.
- * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_ConfirmBillingAgreement.html
- *
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['amazon_billing_agreement_id'] - [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function confirmBillingAgreement($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'ConfirmBillingAgreement';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'amazon_billing_agreement_id' => 'AmazonBillingAgreementId',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* ValidateBillignAgreement API Call - Validates the status of the Billing Agreement object and the payment method associated with it.
- * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_ValidateBillingAgreement.html
- *
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['amazon_billing_agreement_id'] - [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function validateBillingAgreement($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'ValidateBillingAgreement';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'amazon_billing_agreement_id' => 'AmazonBillingAgreementId',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* AuthorizeOnBillingAgreement API call - Reserves a specified amount against the payment method(s) stored in the Billing Agreement.
- * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_AuthorizeOnBillingAgreement.html
- *
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['amazon_billing_agreement_id'] - [String]
- * @param requestParameters['authorization_reference_id'] [String]
- * @param requestParameters['authorization_amount'] [String]
- * @param requestParameters['currency_code'] - [String]
- * @optional requestParameters['seller_authorization_note'] [String]
- * @optional requestParameters['transaction_timeout'] - Defaults to 1440 minutes
- * @optional requestParameters['capture_now'] [String]
- * @optional requestParameters['soft_descriptor'] - - [String]
- * @optional requestParameters['seller_note'] - [String]
- * @optional requestParameters['platform_id'] - [String]
- * @optional requestParameters['custom_information'] - [String]
- * @optional requestParameters['seller_order_id'] - [String]
- * @optional requestParameters['store_name'] - [String]
- * @optional requestParameters['inherit_shipping_address'] [Boolean] - Defaults to true
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function authorizeOnBillingAgreement($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'AuthorizeOnBillingAgreement';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'amazon_billing_agreement_id' => 'AmazonBillingAgreementId',
- 'authorization_reference_id' => 'AuthorizationReferenceId',
- 'authorization_amount' => 'AuthorizationAmount.Amount',
- 'currency_code' => 'AuthorizationAmount.CurrencyCode',
- 'seller_authorization_note' => 'SellerAuthorizationNote',
- 'transaction_timeout' => 'TransactionTimeout',
- 'capture_now' => 'CaptureNow',
- 'soft_descriptor' => 'SoftDescriptor',
- 'seller_note' => 'SellerNote',
- 'platform_id' => 'PlatformId',
- 'custom_information' => 'SellerOrderAttributes.CustomInformation',
- 'seller_order_id' => 'SellerOrderAttributes.SellerOrderId',
- 'store_name' => 'SellerOrderAttributes.StoreName',
- 'inherit_shipping_address' => 'InheritShippingAddress',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* CloseBillingAgreement API Call - Returns details about the Billing Agreement object and its current state.
- * @see http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_CloseBillingAgreement.html
- *
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['amazon_billing_agreement_id'] - [String]
- * @optional requestParameters['closure_reason'] [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function closeBillingAgreement($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'CloseBillingAgreement';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'amazon_billing_agreement_id' => 'AmazonBillingAgreementId',
- 'closure_reason' => 'ClosureReason',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* charge convenience method
- * Performs the API calls
- * 1. SetOrderReferenceDetails / SetBillingAgreementDetails
- * 2. ConfirmOrderReference / ConfirmBillingAgreement
- * 3. Authorize (with Capture) / AuthorizeOnBillingAgreeemnt (with Capture)
- *
- * @param requestParameters['merchant_id'] - [String]
- *
- * @param requestParameters['amazon_reference_id'] - [String] : Order Reference ID /Billing Agreement ID
- * If requestParameters['amazon_reference_id'] is empty then the following is required,
- * @param requestParameters['amazon_order_reference_id'] - [String] : Order Reference ID
- * or,
- * @param requestParameters['amazon_billing_agreement_id'] - [String] : Billing Agreement ID
- *
- * @param $requestParameters['charge_amount'] - [String] : Amount value to be captured
- * @param requestParameters['currency_code'] - [String] : Currency Code for the Amount
- * @param requestParameters['authorization_reference_id'] - [String]- Any unique string that needs to be passed
- * @optional requestParameters['charge_note'] - [String] : Seller Note sent to the buyer
- * @optional requestParameters['transaction_timeout'] - [String] : Defaults to 1440 minutes
- * @optional requestParameters['charge_order_id'] - [String] : Custom Order ID provided
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function charge($requestParameters = array()) {
-
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
- $requestParameters= $this->trimArray($requestParameters);
-
- $setParameters = $authorizeParameters = $confirmParameters = $requestParameters;
-
- $chargeType = '';
-
- if (!empty($requestParameters['amazon_order_reference_id']))
- {
- $chargeType = 'OrderReference';
-
- } elseif(!empty($requestParameters['amazon_billing_agreement_id'])) {
- $chargeType = 'BillingAgreement';
-
- } elseif (!empty($requestParameters['amazon_reference_id'])) {
- switch (substr(strtoupper($requestParameters['amazon_reference_id']), 0, 1)) {
- case 'P':
- case 'S':
- $chargeType = 'OrderReference';
- $setParameters['amazon_order_reference_id'] = $requestParameters['amazon_reference_id'];
- $authorizeParameters['amazon_order_reference_id'] = $requestParameters['amazon_reference_id'];
- $confirmParameters['amazon_order_reference_id'] = $requestParameters['amazon_reference_id'];
- break;
- case 'B':
- case 'C':
- $chargeType = 'BillingAgreement';
- $setParameters['amazon_billing_agreement_id'] = $requestParameters['amazon_reference_id'];
- $authorizeParameters['amazon_billing_agreement_id'] = $requestParameters['amazon_reference_id'];
- $confirmParameters['amazon_billing_agreement_id'] = $requestParameters['amazon_reference_id'];
- break;
- default:
- throw new \Exception('Invalid Amazon Reference ID');
- }
- } else {
- throw new \Exception('key amazon_order_reference_id or amazon_billing_agreement_id is null and is a required parameter');
- }
-
- // Set the other parameters if the values are present
- $setParameters['amount'] = !empty($requestParameters['charge_amount']) ? $requestParameters['charge_amount'] : '';
- $authorizeParameters['authorization_amount'] = !empty($requestParameters['charge_amount']) ? $requestParameters['charge_amount'] : '';
-
- $setParameters['seller_note'] = !empty($requestParameters['charge_note']) ? $requestParameters['charge_note'] : '';
- $authorizeParameters['seller_authorization_note'] = !empty($requestParameters['charge_note']) ? $requestParameters['charge_note'] : '';
- $authorizeParameters['seller_note'] = !empty($requestParameters['charge_note']) ? $requestParameters['charge_note'] : '';
-
- $setParameters['seller_order_id'] = !empty($requestParameters['charge_order_id']) ? $requestParameters['charge_order_id'] : '';
- $setParameters['seller_billing_agreement_id'] = !empty($requestParameters['charge_order_id']) ? $requestParameters['charge_order_id'] : '';
- $authorizeParameters['seller_order_id'] = !empty($requestParameters['charge_order_id']) ? $requestParameters['charge_order_id'] : '';
-
- $authorizeParameters['capture_now'] = 'true';
-
- $response = $this->makeChargeCalls($chargeType, $setParameters, $confirmParameters, $authorizeParameters);
- return $response;
- }
-
- /* makeChargeCalls - makes API calls based off the charge type (OrderReference or BillingAgreement) */
-
- private function makeChargeCalls($chargeType, $setParameters, $confirmParameters, $authorizeParameters)
- {
- switch ($chargeType) {
- case 'OrderReference':
- $response = $this->setOrderReferenceDetails($setParameters);
- if ($this->success) {
- $this->confirmOrderReference($confirmParameters);
- }
- if ($this->success) {
- $response = $this->Authorize($authorizeParameters);
- }
- return $response;
- case 'BillingAgreement':
- // Get the Billing Agreement details and feed the response object to the ResponseParser
- $responseObj = $this->getBillingAgreementDetails($setParameters);
- // Call the function GetBillingAgreementDetailsStatus in ResponseParser.php providing it the XML response
- // $baStatus is an aray containing the State of the Billing Agreement
- $baStatus = $responseObj->getBillingAgreementDetailsStatus($responseObj->toXml());
- if ($baStatus['State'] != 'Open') {
- $response = $this->SetBillingAgreementDetails($setParameters);
- if ($this->success) {
- $response = $this->ConfirmBillingAgreement($confirmParameters);
- }
- }
- // Check the Billing Agreement status again before making the Authorization.
- $responseObj = $this->getBillingAgreementDetails($setParameters);
- $baStatus = $responseObj->GetBillingAgreementDetailsStatus($responseObj->toXml());
- if ($this->success && $baStatus['State'] === 'Open') {
- $response = $this->AuthorizeOnBillingAgreement($authorizeParameters);
- }
- return $response;
- }
- }
-
- /* GetProviderCreditDetails API Call - Get the details of the Provider Credit.
- *
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['amazon_provider_credit_id'] - [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function getProviderCreditDetails($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'GetProviderCreditDetails';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'amazon_provider_credit_id' => 'AmazonProviderCreditId',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* GetProviderCreditReversalDetails API Call - Get details of the Provider Credit Reversal.
- *
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['amazon_provider_credit_reversal_id'] - [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function getProviderCreditReversalDetails($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'GetProviderCreditReversalDetails';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'amazon_provider_credit_reversal_id' => 'AmazonProviderCreditReversalId',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* ReverseProviderCredit API Call - Reverse the Provider Credit.
- *
- * @param requestParameters['merchant_id'] - [String]
- * @param requestParameters['amazon_provider_credit_id'] - [String]
- * @optional requestParameters['credit_reversal_reference_id'] - [String]
- * @param requestParameters['credit_reversal_amount'] - [String]
- * @optional requestParameters['currency_code'] - [String]
- * @optional requestParameters['credit_reversal_note'] - [String]
- * @optional requestParameters['mws_auth_token'] - [String]
- */
-
- public function reverseProviderCredit($requestParameters = array())
- {
- $parameters = array();
- $parameters['Action'] = 'ReverseProviderCredit';
- $requestParameters = array_change_key_case($requestParameters, CASE_LOWER);
-
- $fieldMappings = array(
- 'merchant_id' => 'SellerId',
- 'amazon_provider_credit_id' => 'AmazonProviderCreditId',
- 'credit_reversal_reference_id' => 'CreditReversalReferenceId',
- 'credit_reversal_amount' => 'CreditReversalAmount.Amount',
- 'currency_code' => 'CreditReversalAmount.CurrencyCode',
- 'credit_reversal_note' => 'CreditReversalNote',
- 'mws_auth_token' => 'MWSAuthToken'
- );
-
- $responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
-
- return ($responseObject);
- }
-
- /* Create an Array of required parameters, sort them
- * Calculate signature and invoke the POST to the MWS Service URL
- *
- * @param AWSAccessKeyId [String]
- * @param Version [String]
- * @param SignatureMethod [String]
- * @param Timestamp [String]
- * @param Signature [String]
- */
-
- private function calculateSignatureAndParametersToString($parameters = array())
- {
- $parameters['AWSAccessKeyId'] = $this->config['access_key'];
- $parameters['Version'] = self::SERVICE_VERSION;
- $parameters['SignatureMethod'] = 'HmacSHA256';
- $parameters['SignatureVersion'] = 2;
- $parameters['Timestamp'] = $this->getFormattedTimestamp();
- uksort($parameters, 'strcmp');
-
- $this->createServiceUrl();
-
- $parameters['Signature'] = $this->signParameters($parameters);
- $parameters = $this->getParametersAsString($parameters);
-
- // Save these parameters in the parameters variable so that it can be returned for unit testing.
- $this->parameters = $parameters;
- return $parameters;
- }
-
- /* Computes RFC 2104-compliant HMAC signature for request parameters
- * Implements AWS Signature, as per following spec:
- *
- * If Signature Version is 0, it signs concatenated Action and Timestamp
- *
- * If Signature Version is 1, it performs the following:
- *
- * Sorts all parameters (including SignatureVersion and excluding Signature,
- * the value of which is being created), ignoring case.
- *
- * Iterate over the sorted list and append the parameter name (in original case)
- * and then its value. It will not URL-encode the parameter values before
- * constructing this string. There are no separators.
- *
- * If Signature Version is 2, string to sign is based on following:
- *
- * 1. The HTTP Request Method followed by an ASCII newline (%0A)
- * 2. The HTTP Host header in the form of lowercase host, followed by an ASCII newline.
- * 3. The URL encoded HTTP absolute path component of the URI
- * (up to but not including the query string parameters);
- * if this is empty use a forward '/'. This parameter is followed by an ASCII newline.
- * 4. The concatenation of all query string components (names and values)
- * as UTF-8 characters which are URL encoded as per RFC 3986
- * (hex characters MUST be uppercase), sorted using lexicographic byte ordering.
- * Parameter names are separated from their values by the '=' character
- * (ASCII character 61), even if the value is empty.
- * Pairs of parameter and values are separated by the '&' character (ASCII code 38).
- *
- */
-
- private function signParameters(array $parameters)
- {
- $signatureVersion = $parameters['SignatureVersion'];
- $algorithm = "HmacSHA1";
- $stringToSign = null;
- if (2 === $signatureVersion) {
- $algorithm = "HmacSHA256";
- $parameters['SignatureMethod'] = $algorithm;
- $stringToSign = $this->calculateStringToSignV2($parameters);
- } else {
- throw new \Exception("Invalid Signature Version specified");
- }
-
- return $this->sign($stringToSign, $algorithm);
- }
-
- /* Calculate String to Sign for SignatureVersion 2
- * @param array $parameters request parameters
- * @return String to Sign
- */
-
- private function calculateStringToSignV2(array $parameters)
- {
- $data = 'POST';
- $data .= "\n";
- $data .= $this->mwsEndpointUrl;
- $data .= "\n";
- $data .= $this->mwsEndpointPath;
- $data .= "\n";
- $data .= $this->getParametersAsString($parameters);
- return $data;
- }
-
- /* Convert paremeters to Url encoded query string */
-
- private function getParametersAsString(array $parameters)
- {
- $queryParameters = array();
- foreach ($parameters as $key => $value) {
- $queryParameters[] = $key . '=' . $this->urlEncode($value);
- }
-
- return implode('&', $queryParameters);
- }
-
- private function urlEncode($value)
- {
- return str_replace('%7E', '~', rawurlencode($value));
- }
-
- /* Computes RFC 2104-compliant HMAC signature */
-
- private function sign($data, $algorithm)
- {
- if ($algorithm === 'HmacSHA1') {
- $hash = 'sha1';
- } else if ($algorithm === 'HmacSHA256') {
- $hash = 'sha256';
- } else {
- throw new \Exception("Non-supported signing method specified");
- }
-
- return base64_encode(hash_hmac($hash, $data, $this->config['secret_key'], true));
- }
-
- /* Formats date as ISO 8601 timestamp */
-
- private function getFormattedTimestamp()
- {
- return gmdate("Y-m-d\TH:i:s.\\0\\0\\0\\Z", time());
- }
-
- /* invokePost takes the parameters and invokes the httpPost function to POST the parameters
- * Exponential retries on error 500 and 503
- * The response from the POST is an XML which is converted to Array
- */
-
- private function invokePost($parameters)
- {
- $response = array();
- $statusCode = 200;
- $this->success = false;
-
- // Submit the request and read response body
- try {
- $shouldRetry = true;
- $retries = 0;
- do {
- try {
- $this->constructUserAgentHeader();
-
- $httpCurlRequest = new HttpCurl($this->config);
- $response = $httpCurlRequest->httpPost($this->mwsServiceUrl, $this->userAgent, $parameters);
-
- // Split the API response into Response Body and the other parts of the response into other
- list($other, $responseBody) = explode("\r\n\r\n", $response, 2);
- $other = preg_split("/\r\n|\n|\r/", $other);
-
- list($protocol, $code, $text) = explode(' ', trim(array_shift($other)), 3);
- $response = array(
- 'Status' => (int) $code,
- 'ResponseBody' => $responseBody
- );
-
- $statusCode = $response['Status'];
-
- if ($statusCode == 200) {
- $shouldRetry = false;
- $this->success = true;
- } elseif ($statusCode == 500 || $statusCode == 503) {
-
- $shouldRetry = true;
- if ($shouldRetry && strtolower($this->config['handle_throttle'])) {
- $this->pauseOnRetry(++$retries, $statusCode);
- }
- } else {
- $shouldRetry = false;
- }
- } catch (\Exception $e) {
- throw $e;
- }
- } while ($shouldRetry);
- } catch (\Exception $se) {
- throw $se;
- }
-
- return $response;
- }
-
- /* Exponential sleep on failed request
- * @param retries current retry
- * @throws Exception if maximum number of retries has been reached
- */
-
- private function pauseOnRetry($retries, $status)
- {
- if ($retries <= self::MAX_ERROR_RETRY) {
- $delay = (int) (pow(4, $retries) * 100000);
- usleep($delay);
- } else {
- throw new \Exception('Error Code: '. $status.PHP_EOL.'Maximum number of retry attempts - '. $retries .' reached');
- }
- }
-
- /* Create MWS service URL and the Endpoint path */
-
- private function createServiceUrl()
- {
- $this->modePath = strtolower($this->config['sandbox']) ? 'OffAmazonPayments_Sandbox' : 'OffAmazonPayments';
-
- if (!empty($this->config['region'])) {
- $region = strtolower($this->config['region']);
- if (array_key_exists($region, $this->regionMappings)) {
- $this->mwsEndpointUrl = $this->mwsServiceUrls[$this->regionMappings[$region]];
- $this->mwsServiceUrl = 'https://' . $this->mwsEndpointUrl . '/' . $this->modePath . '/' . self::SERVICE_VERSION;
- $this->mwsEndpointPath = '/' . $this->modePath . '/' . self::SERVICE_VERSION;
- } else {
- throw new \Exception($region . ' is not a valid region');
- }
- } else {
- throw new \Exception("config['region'] is a required parameter and is not set");
- }
- }
-
- /* Based on the config['region'] and config['sandbox'] values get the user profile URL */
-
- private function profileEndpointUrl()
- {
- if (!empty($this->config['region'])) {
- $region = strtolower($this->config['region']);
-
- if (array_key_exists($region, $this->sandboxProfileEndpoint) && $this->config['sandbox'] ) {
- $this->profileEndpoint = $this->sandboxProfileEndpoint[$region];
- } elseif (array_key_exists($region, $this->liveProfileEndpoint)) {
- $this->profileEndpoint = $this->liveProfileEndpoint[$region];
- } else{
- throw new \Exception($region . ' is not a valid region');
- }
- } else {
- throw new \Exception("config['region'] is a required parameter and is not set");
- }
- }
-
- /* Create the User Agent Header sent with the POST request */
-
- private function constructUserAgentHeader()
- {
- $this->userAgent = $this->quoteApplicationName($this->config['application_name']) . '/' . $this->quoteApplicationVersion($this->config['application_version']);
- $this->userAgent .= ' (';
- $this->userAgent .= 'Language=PHP/' . phpversion();
- $this->userAgent .= '; ';
- $this->userAgent .= 'Platform=' . php_uname('s') . '/' . php_uname('m') . '/' . php_uname('r');
- $this->userAgent .= '; ';
- $this->userAgent .= 'MWSClientVersion=' . self::MWS_CLIENT_VERSION;
- $this->userAgent .= ')';
- }
-
- /* Collapse multiple whitespace characters into a single ' ' and backslash escape '\',
- * and '/' characters from a string.
- * @param $s
- * @return string
- */
-
- private function quoteApplicationName($s)
- {
- $quotedString = preg_replace('/ {2,}|\s/', ' ', $s);
- $quotedString = preg_replace('/\\\\/', '\\\\\\\\', $quotedString);
- $quotedString = preg_replace('/\//', '\\/', $quotedString);
- return $quotedString;
- }
-
- /* Collapse multiple whitespace characters into a single ' ' and backslash escape '\',
- * and '(' characters from a string.
- *
- * @param $s
- * @return string
- */
-
- private function quoteApplicationVersion($s)
- {
- $quotedString = preg_replace('/ {2,}|\s/', ' ', $s);
- $quotedString = preg_replace('/\\\\/', '\\\\\\\\', $quotedString);
- $quotedString = preg_replace('/\\(/', '\\(', $quotedString);
- return $quotedString;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/libs/amazon/HttpCurl.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/libs/amazon/HttpCurl.php
deleted file mode 100644
index 937329a0..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/libs/amazon/HttpCurl.php
+++ /dev/null
@@ -1,129 +0,0 @@
-config = $config;
- }
-
- /* Setter for boolean header to get the user info */
-
- public function setHttpHeader()
- {
- $this->header = true;
- }
-
- /* Setter for Access token to get the user info */
-
- public function setAccessToken($accesstoken)
- {
- $this->accessToken = $accesstoken;
- }
-
- /* Add the common Curl Parameters to the curl handler $ch
- * Also checks for optional parameters if provided in the config
- * config['cabundle_file']
- * config['proxy_port']
- * config['proxy_host']
- * config['proxy_username']
- * config['proxy_password']
- */
-
- private function commonCurlParams($url,$userAgent)
- {
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_PORT, 443);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
-
- if (!is_null($this->config['cabundle_file'])) {
- curl_setopt($ch, CURLOPT_CAINFO, $this->config['cabundle_file']);
- }
-
- if (!empty($userAgent))
- curl_setopt($ch, CURLOPT_USERAGENT, $userAgent);
-
- if ($this->config['proxy_host'] != null && $this->config['proxy_port'] != -1) {
- curl_setopt($ch, CURLOPT_PROXY, $this->config['proxy_host'] . ':' . $this->config['proxy_port']);
- }
-
- if ($this->config['proxy_username'] != null && $this->config['proxy_password'] != null) {
- curl_setopt($ch, CURLOPT_PROXYUSERPWD, $this->config['proxy_username'] . ':' . $this->config['proxy_password']);
- }
-
- return $ch;
- }
-
- /* POST using curl for the following situations
- * 1. API calls
- * 2. IPN certificate retrieval
- * 3. Get User Info
- */
-
- public function httpPost($url, $userAgent = null, $parameters = null)
- {
- $ch = $this->commonCurlParams($url,$userAgent);
-
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $parameters);
- curl_setopt($ch, CURLOPT_HEADER, true);
-
- $response = $this->execute($ch);
- return $response;
- }
-
- /* GET using curl for the following situations
- * 1. IPN certificate retrieval
- * 2. Get User Info
- */
-
- public function httpGet($url, $userAgent = null)
- {
- $ch = $this->commonCurlParams($url,$userAgent);
-
- // Setting the HTTP header with the Access Token only for Getting user info
- if ($this->header) {
- curl_setopt($ch, CURLOPT_HTTPHEADER, array(
- 'Authorization: bearer ' . $this->accessToken
- ));
- }
-
- $response = $this->execute($ch);
- return $response;
- }
-
- /* Execute Curl request */
-
- private function execute($ch)
- {
- $response = '';
- if (!$response = curl_exec($ch)) {
- $error_msg = "Unable to post request, underlying exception of " . curl_error($ch);
- curl_close($ch);
- throw new \Exception($error_msg);
- }
- curl_close($ch);
- return $response;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/libs/amazon/Interface.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/libs/amazon/Interface.php
deleted file mode 100644
index 65a6bd63..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/libs/amazon/Interface.php
+++ /dev/null
@@ -1,482 +0,0 @@
-_response [XML]
- */
-
- public function toArray();
-
- /* Get the status of the BillingAgreement */
-
- public function getBillingAgreementDetailsStatus($response);
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/libs/amazon/IpnHandler.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/libs/amazon/IpnHandler.php
deleted file mode 100644
index 7de7f5c7..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/libs/amazon/IpnHandler.php
+++ /dev/null
@@ -1,421 +0,0 @@
- null,
- 'proxy_host' => null,
- 'proxy_port' => -1,
- 'proxy_username' => null,
- 'proxy_password' => null);
-
-
- public function __construct($headers, $body, $ipnConfig = null)
- {
- $this->headers = array_change_key_case($headers, CASE_LOWER);
- $this->body = $body;
-
- if ($ipnConfig != null) {
- $this->checkConfigKeys($ipnConfig);
- }
-
- // Get the list of fields that we are interested in
- $this->fields = array(
- "Timestamp" => true,
- "Message" => true,
- "MessageId" => true,
- "Subject" => false,
- "TopicArn" => true,
- "Type" => true
- );
-
- // Validate the IPN message header [x-amz-sns-message-type]
- $this->validateHeaders();
-
- // Converts the IPN [Message] to Notification object
- $this->getMessage();
-
- // Checks if the notification [Type] is Notification and constructs the signature fields
- $this->checkForCorrectMessageType();
-
- // Verifies the signature against the provided pem file in the IPN
- $this->constructAndVerifySignature();
- }
-
- private function checkConfigKeys($ipnConfig)
- {
- $ipnConfig = array_change_key_case($ipnConfig, CASE_LOWER);
- $ipnConfig = trimArray($ipnConfig);
-
- foreach ($ipnConfig as $key => $value) {
- if (array_key_exists($key, $this->ipnConfig)) {
- $this->ipnConfig[$key] = $value;
- } else {
- throw new \Exception('Key ' . $key . ' is either not part of the configuration or has incorrect Key name.
- check the ipnConfig array key names to match your key names of your config array ', 1);
- }
- }
- }
-
- /* Setter function
- * Sets the value for the key if the key exists in ipnConfig
- */
-
- public function __set($name, $value)
- {
- if (array_key_exists(strtolower($name), $this->ipnConfig)) {
- $this->ipnConfig[$name] = $value;
- } else {
- throw new \Exception("Key " . $name . " is not part of the configuration", 1);
- }
- }
-
- /* Getter function
- * Returns the value for the key if the key exists in ipnConfig
- */
-
- public function __get($name)
- {
- if (array_key_exists(strtolower($name), $this->ipnConfig)) {
- return $this->ipnConfig[$name];
- } else {
- throw new \Exception("Key " . $name . " was not found in the configuration", 1);
- }
- }
-
- /* Trim the input Array key values */
-
- private function trimArray($array)
- {
- foreach ($array as $key => $value)
- {
- $array[$key] = trim($value);
- }
- return $array;
- }
-
- private function validateHeaders()
- {
- // Quickly check that this is a sns message
- if (!array_key_exists('x-amz-sns-message-type', $this->headers)) {
- throw new \Exception("Error with message - header " . "does not contain x-amz-sns-message-type header");
- }
-
- if ($this->headers['x-amz-sns-message-type'] !== 'Notification') {
- throw new \Exception("Error with message - header x-amz-sns-message-type is not " . "Notification, is " . $this->headers['x-amz-sns-message-type']);
- }
- }
-
- private function getMessage()
- {
- $this->snsMessage = json_decode($this->body, true);
-
- $json_error = json_last_error();
-
- if ($json_error != 0) {
- $errorMsg = "Error with message - content is not in json format" . $this->getErrorMessageForJsonError($json_error) . " " . $this->snsMessage;
- throw new \Exception($errorMsg);
- }
- }
-
- /* Convert a json error code to a descriptive error message
- *
- * @param int $json_error message code
- *
- * @return string error message
- */
-
- private function getErrorMessageForJsonError($json_error)
- {
- switch ($json_error) {
- case JSON_ERROR_DEPTH:
- return " - maximum stack depth exceeded.";
- break;
- case JSON_ERROR_STATE_MISMATCH:
- return " - invalid or malformed JSON.";
- break;
- case JSON_ERROR_CTRL_CHAR:
- return " - control character error.";
- break;
- case JSON_ERROR_SYNTAX:
- return " - syntax error.";
- break;
- default:
- return ".";
- break;
- }
- }
-
- /* checkForCorrectMessageType()
- *
- * Checks if the Field [Type] is set to ['Notification']
- * Gets the value for the fields marked true in the fields array
- * Constructs the signature string
- */
-
- private function checkForCorrectMessageType()
- {
- $type = $this->getMandatoryField("Type");
- if (strcasecmp($type, "Notification") != 0) {
- throw new \Exception("Error with SNS Notification - unexpected message with Type of " . $type);
- }
-
- if (strcmp($this->getMandatoryField("Type"), "Notification") != 0) {
- throw new \Exception("Error with signature verification - unable to verify " . $this->getMandatoryField("Type") . " message");
- } else {
-
- // Sort the fields into byte order based on the key name(A-Za-z)
- ksort($this->fields);
-
- // Extract the key value pairs and sort in byte order
- $signatureFields = array();
- foreach ($this->fields as $fieldName => $mandatoryField) {
- if ($mandatoryField) {
- $value = $this->getMandatoryField($fieldName);
- } else {
- $value = $this->getField($fieldName);
- }
-
- if (!is_null($value)) {
- array_push($signatureFields, $fieldName);
- array_push($signatureFields, $value);
- }
- }
-
- /* Create the signature string - key / value in byte order
- * delimited by newline character + ending with a new line character
- */
- $this->signatureFields = implode("\n", $signatureFields) . "\n";
-
- }
- }
-
- /* Verify that the signature is correct for the given data and
- * public key
- *
- * @param string $data data to validate
- * @param string $signature decoded signature to compare against
- * @param string $certificatePath path to certificate, can be file or url
- *
- * @throws Exception if there is an error with the call
- *
- * @return bool true if valid
- */
-
- private function constructAndVerifySignature()
- {
- $signature = base64_decode($this->getMandatoryField("Signature"));
- $certificatePath = $this->getMandatoryField("SigningCertURL");
-
- $this->certificate = $this->getCertificate($certificatePath);
-
- $result = $this->verifySignatureIsCorrectFromCertificate($signature);
- if (!$result) {
- throw new \Exception("Unable to match signature from remote server: signature of " . $this->getCertificate($certificatePath) . " , SigningCertURL of " . $this->getMandatoryField("SigningCertURL") . " , SignatureOf " . $this->getMandatoryField("Signature"));
- }
- }
-
- /* getCertificate($certificatePath)
- *
- * gets the certificate from the $certificatePath using Curl
- */
-
- private function getCertificate($certificatePath)
- {
- $httpCurlRequest = new HttpCurl($this->ipnConfig);
-
- $response = $httpCurlRequest->httpGet($certificatePath);
-
- return $response;
- }
-
- /* Verify that the signature is correct for the given data and public key
- *
- * @param string $data data to validate
- * @param string $signature decoded signature to compare against
- * @param string $certificate certificate object defined in Certificate.php
- */
-
- public function verifySignatureIsCorrectFromCertificate($signature)
- {
- $certKey = openssl_get_publickey($this->certificate);
-
- if ($certKey === False) {
- throw new \Exception("Unable to extract public key from cert");
- }
-
- try {
- $certInfo = openssl_x509_parse($this->certificate, true);
- $certSubject = $certInfo["subject"];
-
- if (is_null($certSubject)) {
- throw new \Exception("Error with certificate - subject cannot be found");
- }
- } catch (\Exception $ex) {
- throw new \Exception("Unable to verify certificate - error with the certificate subject", null, $ex);
- }
-
- if (strcmp($certSubject["CN"], $this->expectedCnName)) {
- throw new \Exception("Unable to verify certificate issued by Amazon - error with certificate subject");
- }
-
- $result = -1;
- try {
- $result = openssl_verify($this->signatureFields, $signature, $certKey, OPENSSL_ALGO_SHA1);
- } catch (\Exception $ex) {
- throw new \Exception("Unable to verify signature - error with the verification algorithm", null, $ex);
- }
-
- return ($result > 0);
- }
-
-
- /* Extract the mandatory field from the message and return the contents
- *
- * @param string $fieldName name of the field to extract
- *
- * @throws Exception if not found
- *
- * @return string field contents if found
- */
-
- private function getMandatoryField($fieldName)
- {
- $value = $this->getField($fieldName);
- if (is_null($value)) {
- throw new \Exception("Error with json message - mandatory field " . $fieldName . " cannot be found");
- }
- return $value;
- }
-
- /* Extract the field if present, return null if not defined
- *
- * @param string $fieldName name of the field to extract
- *
- * @return string field contents if found, null otherwise
- */
-
- private function getField($fieldName)
- {
- if (array_key_exists($fieldName, $this->snsMessage)) {
- return $this->snsMessage[$fieldName];
- } else {
- return null;
- }
- }
-
- /* returnMessage() - JSON decode the raw [Message] portion of the IPN */
-
- public function returnMessage()
- {
- return json_decode($this->snsMessage['Message'], true);
- }
-
- /* toJson() - Converts IPN [Message] field to JSON
- *
- * Has child elements
- * ['NotificationData'] [XML] - API call XML notification data
- * @param remainingFields - consists of remaining IPN array fields that are merged
- * Type - Notification
- * MessageId - ID of the Notification
- * Topic ARN - Topic of the IPN
- * @return response in JSON format
- */
-
- public function toJson()
- {
- $response = $this->simpleXmlObject();
-
- // Merging the remaining fields with the response
- $remainingFields = $this->getRemainingIpnFields();
- $responseArray = array_merge($remainingFields,(array)$response);
-
- // Converting to JSON format
- $response = json_encode($responseArray);
-
- return $response;
- }
-
- /* toArray() - Converts IPN [Message] field to associative array
- * @return response in array format
- */
-
- public function toArray()
- {
- $response = $this->simpleXmlObject();
-
- // Converting the SimpleXMLElement Object to array()
- $response = json_encode($response);
- $response = json_decode($response, true);
-
- // Merging the remaining fields with the response array
- $remainingFields = $this->getRemainingIpnFields();
- $response = array_merge($remainingFields,$response);
-
- return $response;
- }
-
- /* addRemainingFields() - Add remaining fields to the datatype
- *
- * Has child elements
- * ['NotificationData'] [XML] - API call XML response data
- * Convert to SimpleXML element object
- * Type - Notification
- * MessageId - ID of the Notification
- * Topic ARN - Topic of the IPN
- * @return response in array format
- */
-
- private function simpleXmlObject()
- {
- $ipnMessage = $this->returnMessage();
-
- // Getting the Simple XML element object of the IPN XML Response Body
- $response = simplexml_load_string((string) $ipnMessage['NotificationData']);
-
- // Adding the Type, MessageId, TopicArn details of the IPN to the Simple XML element Object
- $response->addChild('Type', $this->snsMessage['Type']);
- $response->addChild('MessageId', $this->snsMessage['MessageId']);
- $response->addChild('TopicArn', $this->snsMessage['TopicArn']);
-
- return $response;
- }
-
- /* getRemainingIpnFields()
- * Gets the remaining fields of the IPN to be later appended to the return message
- */
-
- private function getRemainingIpnFields()
- {
- $ipnMessage = $this->returnMessage();
-
- $remainingFields = array(
- 'NotificationReferenceId' =>$ipnMessage['NotificationReferenceId'],
- 'NotificationType' =>$ipnMessage['NotificationType'],
- 'IsSample' =>$ipnMessage['IsSample'],
- 'SellerId' =>$ipnMessage['SellerId'],
- 'ReleaseEnvironment' =>$ipnMessage['ReleaseEnvironment'],
- 'Version' =>$ipnMessage['Version']);
-
- return $remainingFields;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/libs/amazon/ResponseParser.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/libs/amazon/ResponseParser.php
deleted file mode 100644
index 92a2e15a..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/libs/amazon/ResponseParser.php
+++ /dev/null
@@ -1,86 +0,0 @@
-response = $response;
- }
-
- /* Returns the XML portion of the response */
-
- public function toXml()
- {
- return $this->response['ResponseBody'];
- }
-
- /* toJson - converts XML into Json
- * @param $response [XML]
- */
-
- public function toJson()
- {
- $response = $this->simpleXmlObject();
-
- return (json_encode($response));
- }
-
- /* toArray - converts XML into associative array
- * @param $this->response [XML]
- */
-
- public function toArray()
- {
- $response = $this->simpleXmlObject();
-
- // Converting the SimpleXMLElement Object to array()
- $response = json_encode($response);
-
- return (json_decode($response, true));
- }
-
- private function simpleXmlObject()
- {
- $response = $this->response;
-
- // Getting the HttpResponse Status code to the output as a string
- $status = strval($response['Status']);
-
- // Getting the Simple XML element object of the XML Response Body
- $response = simplexml_load_string((string) $response['ResponseBody']);
-
- // Adding the HttpResponse Status code to the output as a string
- $response->addChild('ResponseStatus', $status);
-
- return $response;
- }
-
- /* Get the status of the BillingAgreement */
-
- public function getBillingAgreementDetailsStatus($response)
- {
- $data= new \SimpleXMLElement($response);
- $namespaces = $data->getNamespaces(true);
- foreach($namespaces as $key=>$value){
- $namespace = $value;
- }
- $data->registerXPathNamespace('GetBA', $namespace);
- foreach ($data->xpath('//GetBA:BillingAgreementStatus') as $value) {
- $baStatus = json_decode(json_encode((array)$value), TRUE);
- }
-
- return $baStatus ;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/manual.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/manual.php
deleted file mode 100644
index fcaa023e..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/manual.php
+++ /dev/null
@@ -1,78 +0,0 @@
- 403 ) );
- }
-
- /*
- * Purchase data comes in like this
- *
- $purchase_data = array(
- 'downloads' => array of download IDs,
- 'price' => total price of cart contents,
- 'purchase_key' => // Random key
- 'user_email' => $user_email,
- 'date' => date('Y-m-d H:i:s'),
- 'user_id' => $user_id,
- 'post_data' => $_POST,
- 'user_info' => array of user's information and used discount code
- 'cart_details' => array of cart details,
- );
- */
-
- $payment_data = array(
- 'price' => $purchase_data['price'],
- 'date' => $purchase_data['date'],
- 'user_email' => $purchase_data['user_email'],
- 'purchase_key' => $purchase_data['purchase_key'],
- 'currency' => edd_get_currency(),
- 'downloads' => $purchase_data['downloads'],
- 'user_info' => $purchase_data['user_info'],
- 'cart_details' => $purchase_data['cart_details'],
- 'status' => 'pending',
- );
-
- // Record the pending payment
- $payment = edd_insert_payment( $payment_data );
-
- if ( $payment ) {
- edd_update_payment_status( $payment, 'complete' );
- // Empty the shopping cart
- edd_empty_cart();
- edd_send_to_success_page();
- } else {
- edd_record_gateway_error( __( 'Payment Error', 'easy-digital-downloads' ), sprintf( __( 'Payment creation failed while processing a manual (free or test) purchase. Payment data: %s', 'easy-digital-downloads' ), json_encode( $payment_data ) ), $payment );
- // If errors are present, send the user back to the purchase page so they can be corrected
- edd_send_back_to_checkout( '?payment-mode=' . $purchase_data['post_data']['edd-gateway'] );
- }
-}
-add_action( 'edd_gateway_manual', 'edd_manual_payment' );
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/paypal-standard.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/paypal-standard.php
deleted file mode 100644
index aefe248b..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/paypal-standard.php
+++ /dev/null
@@ -1,1380 +0,0 @@
- array(
- 'id' => 'paypal_email',
- 'name' => __( 'PayPal Email', 'easy-digital-downloads' ),
- 'desc' => __( 'Enter your PayPal account\'s email', 'easy-digital-downloads' ),
- 'type' => 'text',
- 'size' => 'regular',
- ),
- 'paypal_image_url' => array(
- 'id' => 'paypal_image_url',
- 'name' => __( 'PayPal Image', 'easy-digital-downloads' ),
- 'desc' => __( 'Upload an image to display on the PayPal checkout page.', 'easy-digital-downloads' ),
- 'type' => 'upload',
- 'size' => 'regular',
- ),
- );
-
- $pdt_desc = sprintf(
- __( 'Enter your PayPal Identity Token in order to enable Payment Data Transfer (PDT). This allows payments to be verified without relying on the PayPal IPN. See our documentation for further information.', 'easy-digital-downloads' ),
- 'https://easydigitaldownloads.com/docs/paypal-legacy-gateways-standard-express-pro-advanced/'
- );
-
- $paypal_settings['paypal_identify_token'] = array(
- 'id' => 'paypal_identity_token',
- 'name' => __( 'PayPal Identity Token', 'easy-digital-downloads' ),
- 'type' => 'text',
- 'desc' => $pdt_desc,
- 'size' => 'regular',
- );
-
- $desc = sprintf(
- __( 'If you are unable to use Payment Data Transfer and payments are not getting marked as complete, then check this box. This forces the site to use a slightly less secure method of verifying purchases. See our FAQ for further information.', 'easy-digital-downloads' ),
- 'https://easydigitaldownloads.com/docs/paypal-payments-not-marked-as-complete/'
- );
-
- $paypal_settings['disable_paypal_verification'] = array(
- 'id' => 'disable_paypal_verification',
- 'name' => __( 'Disable PayPal IPN Verification', 'easy-digital-downloads' ),
- 'check' => __( 'Disabled', 'easy-digital-downloads' ),
- 'desc' => $desc,
- 'type' => 'checkbox_description',
- );
-
- $api_key_settings = array(
- 'paypal_api_keys_desc' => array(
- 'id' => 'paypal_api_keys_desc',
- 'name' => __( 'API Credentials', 'easy-digital-downloads' ),
- 'type' => 'descriptive_text',
- 'desc' => sprintf(
- __( 'API credentials are necessary to process PayPal refunds from inside WordPress. These can be obtained from your PayPal account.', 'easy-digital-downloads' ),
- 'https://developer.paypal.com/docs/classic/api/apiCredentials/#creating-an-api-signature'
- )
- ),
- 'paypal_live_api_username' => array(
- 'id' => 'paypal_live_api_username',
- 'name' => __( 'Live API Username', 'easy-digital-downloads' ),
- 'desc' => __( 'Your PayPal live API username. ', 'easy-digital-downloads' ),
- 'type' => 'text',
- 'size' => 'regular'
- ),
- 'paypal_live_api_password' => array(
- 'id' => 'paypal_live_api_password',
- 'name' => __( 'Live API Password', 'easy-digital-downloads' ),
- 'desc' => __( 'Your PayPal live API password.', 'easy-digital-downloads' ),
- 'type' => 'text',
- 'size' => 'regular'
- ),
- 'paypal_live_api_signature' => array(
- 'id' => 'paypal_live_api_signature',
- 'name' => __( 'Live API Signature', 'easy-digital-downloads' ),
- 'desc' => __( 'Your PayPal live API signature.', 'easy-digital-downloads' ),
- 'type' => 'text',
- 'size' => 'regular'
- ),
- 'paypal_test_api_username' => array(
- 'id' => 'paypal_test_api_username',
- 'name' => __( 'Test API Username', 'easy-digital-downloads' ),
- 'desc' => __( 'Your PayPal test API username.', 'easy-digital-downloads' ),
- 'type' => 'text',
- 'size' => 'regular'
- ),
- 'paypal_test_api_password' => array(
- 'id' => 'paypal_test_api_password',
- 'name' => __( 'Test API Password', 'easy-digital-downloads' ),
- 'desc' => __( 'Your PayPal test API password.', 'easy-digital-downloads' ),
- 'type' => 'text',
- 'size' => 'regular'
- ),
- 'paypal_test_api_signature' => array(
- 'id' => 'paypal_test_api_signature',
- 'name' => __( 'Test API Signature', 'easy-digital-downloads' ),
- 'desc' => __( 'Your PayPal test API signature.', 'easy-digital-downloads' ),
- 'type' => 'text',
- 'size' => 'regular'
- )
- );
-
- $paypal_settings = array_merge( $paypal_settings, $api_key_settings );
-
- $paypal_settings = apply_filters( 'edd_paypal_settings', $paypal_settings );
- $gateway_settings['paypal'] = $paypal_settings;
-
- return $gateway_settings;
-}
-add_filter( 'edd_settings_gateways', 'edd_register_paypal_gateway_settings', 1, 1 );
-
-/**
- * Process PayPal Purchase
- *
- * @since 1.0
- * @param array $purchase_data Purchase Data
- * @return void
- */
-function edd_process_paypal_purchase( $purchase_data ) {
- if ( ! wp_verify_nonce( $purchase_data['gateway_nonce'], 'edd-gateway' ) ) {
- wp_die( __( 'Nonce verification has failed', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) );
- }
-
- // Collect payment data
- $payment_data = array(
- 'price' => $purchase_data['price'],
- 'date' => $purchase_data['date'],
- 'user_email' => $purchase_data['user_email'],
- 'purchase_key' => $purchase_data['purchase_key'],
- 'currency' => edd_get_currency(),
- 'downloads' => $purchase_data['downloads'],
- 'user_info' => $purchase_data['user_info'],
- 'cart_details' => $purchase_data['cart_details'],
- 'gateway' => 'paypal',
- 'status' => ! empty( $purchase_data['buy_now'] ) ? 'private' : 'pending'
- );
-
- // Record the pending payment
- $payment = edd_insert_payment( $payment_data );
-
- // Check payment
- if ( ! $payment ) {
- // Record the error
- edd_record_gateway_error( __( 'Payment Error', 'easy-digital-downloads' ), sprintf( __( 'Payment creation failed before sending buyer to PayPal. Payment data: %s', 'easy-digital-downloads' ), json_encode( $payment_data ) ), $payment );
- // Problems? send back
- edd_send_back_to_checkout( '?payment-mode=' . $purchase_data['post_data']['edd-gateway'] );
- } else {
- // Only send to PayPal if the pending payment is created successfully
- $listener_url = add_query_arg( 'edd-listener', 'IPN', home_url( 'index.php' ) );
-
- // Set the session data to recover this payment in the event of abandonment or error.
- EDD()->session->set( 'edd_resume_payment', $payment );
-
- // Get the success url
- $return_url = add_query_arg(
- array(
- 'payment-confirmation' => 'paypal',
- 'payment-id' => urlencode( $payment ),
- ),
- get_permalink( edd_get_option( 'success_page', false ) )
- );
-
- // Get the PayPal redirect uri
- $paypal_redirect = trailingslashit( edd_get_paypal_redirect() ) . '?';
-
- // Setup PayPal arguments
- $paypal_args = array(
- 'business' => edd_get_option( 'paypal_email', false ),
- 'email' => $purchase_data['user_email'],
- 'first_name' => $purchase_data['user_info']['first_name'],
- 'last_name' => $purchase_data['user_info']['last_name'],
- 'invoice' => $purchase_data['purchase_key'],
- 'no_shipping' => '1',
- 'shipping' => '0',
- 'no_note' => '1',
- 'currency_code' => edd_get_currency(),
- 'charset' => get_bloginfo( 'charset' ),
- 'custom' => $payment,
- 'rm' => '2',
- 'return' => esc_url_raw( $return_url ),
- 'cancel_return' => esc_url_raw( edd_get_failed_transaction_uri( '?payment-id=' . sanitize_key( $payment ) ) ),
- 'notify_url' => esc_url_raw( $listener_url ),
- 'image_url' => esc_url_raw( edd_get_paypal_image_url() ),
- 'cbt' => get_bloginfo( 'name' ),
- 'bn' => 'EasyDigitalDownloads_SP'
- );
-
- if ( ! empty( $purchase_data['user_info']['address'] ) ) {
- $paypal_args['address1'] = $purchase_data['user_info']['address']['line1'];
- $paypal_args['address2'] = $purchase_data['user_info']['address']['line2'];
- $paypal_args['city'] = $purchase_data['user_info']['address']['city'];
- $paypal_args['country'] = $purchase_data['user_info']['address']['country'];
- }
-
- $paypal_extra_args = array(
- 'cmd' => '_cart',
- 'upload' => '1'
- );
-
- $paypal_args = array_merge( $paypal_extra_args, $paypal_args );
-
- // Add cart items
- $i = 1;
- $paypal_sum = 0;
- if ( is_array( $purchase_data['cart_details'] ) && ! empty( $purchase_data['cart_details'] ) ) {
- foreach ( $purchase_data['cart_details'] as $item ) {
-
- $item_amount = round( ( $item['subtotal'] / $item['quantity'] ) - ( $item['discount'] / $item['quantity'] ), 2 );
-
- if ( $item_amount <= 0 ) {
- $item_amount = 0;
- }
-
- $paypal_args['item_name_' . $i ] = stripslashes_deep( html_entity_decode( edd_get_cart_item_name( $item ), ENT_COMPAT, 'UTF-8' ) );
- $paypal_args['quantity_' . $i ] = $item['quantity'];
- $paypal_args['amount_' . $i ] = $item_amount;
-
- if ( edd_use_skus() ) {
- $paypal_args['item_number_' . $i ] = edd_get_download_sku( $item['id'] );
- }
-
- $paypal_sum += ( $item_amount * $item['quantity'] );
-
- $i++;
-
- }
- }
-
- // Calculate discount
- $discounted_amount = 0.00;
- if ( ! empty( $purchase_data['fees'] ) ) {
- $i = empty( $i ) ? 1 : $i;
- foreach ( $purchase_data['fees'] as $fee ) {
- if ( empty( $fee['download_id'] ) && floatval( $fee['amount'] ) > '0' ) {
- // this is a positive fee
- $paypal_args['item_name_' . $i ] = stripslashes_deep( html_entity_decode( wp_strip_all_tags( $fee['label'] ), ENT_COMPAT, 'UTF-8' ) );
- $paypal_args['quantity_' . $i ] = '1';
- $paypal_args['amount_' . $i ] = edd_sanitize_amount( $fee['amount'] );
- $i++;
- } else if ( empty( $fee['download_id'] ) ) {
-
- // This is a negative fee (discount) not assigned to a specific Download
- $discounted_amount += abs( $fee['amount'] );
- }
- }
- }
-
- $price_before_discount = $purchase_data['price'];
- if ( $discounted_amount > '0' ) {
- $paypal_args['discount_amount_cart'] = edd_sanitize_amount( $discounted_amount );
-
- /*
- * Add the discounted amount back onto the price to get the "price before discount". We do this
- * to avoid double applying any discounts below.
- * @link https://github.com/easydigitaldownloads/easy-digital-downloads/issues/6837
- */
- $price_before_discount += $paypal_args['discount_amount_cart'];
- }
-
- // Check if there are any additional discounts we need to add that we haven't already accounted for.
- if( $paypal_sum > $price_before_discount ) {
- $difference = round( $paypal_sum - $price_before_discount, 2 );
- if ( ! isset( $paypal_args['discount_amount_cart'] ) ) {
- $paypal_args['discount_amount_cart'] = 0;
- }
- $paypal_args['discount_amount_cart'] += $difference;
- }
-
- // Add taxes to the cart
- if ( edd_use_taxes() ) {
-
- $paypal_args['tax_cart'] = edd_sanitize_amount( $purchase_data['tax'] );
-
- }
-
- $paypal_args = apply_filters( 'edd_paypal_redirect_args', $paypal_args, $purchase_data );
-
- edd_debug_log( 'PayPal arguments: ' . print_r( $paypal_args, true ) );
-
- // Build query
- $paypal_redirect .= http_build_query( $paypal_args );
-
- // Fix for some sites that encode the entities
- $paypal_redirect = str_replace( '&', '&', $paypal_redirect );
-
- // Allow paypal as a redirect destination.
- add_filter( 'allowed_redirect_hosts', 'edd_allow_redirect_to_paypal', 10 );
-
- // Redirect to PayPal.
- edd_redirect( $paypal_redirect );
- }
-}
-add_action( 'edd_gateway_paypal', 'edd_process_paypal_purchase' );
-
-/**
- * Add paypal.com to the list of allowed hosts that wp_safe_redirect can redirect to.
- *
- * @since 3.0
- * @param array $redirects - The list of urls that wp_safe_redirect can redirect to.
- * @return array
- */
-function edd_allow_redirect_to_paypal( $redirects ) {
- $redirects[] = 'www.sandbox.paypal.com';
- $redirects[] = 'sandbox.paypal.com';
- $redirects[] = 'www.paypal.com';
- $redirects[] = 'paypal.com';
- return $redirects;
-}
-
-/**
- * Listens for a PayPal IPN requests and then sends to the processing function
- *
- * @since 1.0
- * @return void
- */
-function edd_listen_for_paypal_ipn() {
- // Regular PayPal IPN
- if ( isset( $_GET['edd-listener'] ) && 'ipn' === strtolower( $_GET['edd-listener'] ) ) {
-
- edd_debug_log( 'PayPal IPN endpoint loaded' );
-
- /**
- * This is necessary to delay execution of PayPal PDT and to avoid a race condition causing the order status
- * updates to be triggered twice.
- *
- * @since 2.9.4
- * @see https://github.com/easydigitaldownloads/easy-digital-downloads/issues/6605
- */
- $token = edd_get_option( 'paypal_identity_token' );
- if ( $token ) {
- sleep( 5 );
- }
-
- do_action( 'edd_verify_paypal_ipn' );
- }
-}
-add_action( 'init', 'edd_listen_for_paypal_ipn' );
-
-/**
- * Process PayPal IPN
- *
- * @since 1.0
- * @return void
- */
-function edd_process_paypal_ipn() {
- // Check the request method is POST
- if ( isset( $_SERVER['REQUEST_METHOD'] ) && $_SERVER['REQUEST_METHOD'] != 'POST' ) {
- return;
- }
-
- edd_debug_log( 'edd_process_paypal_ipn() running during PayPal IPN processing' );
-
- // Set initial post data to empty string
- $post_data = '';
-
- // Fallback just in case post_max_size is lower than needed
- if ( ini_get( 'allow_url_fopen' ) ) {
- $post_data = file_get_contents( 'php://input' );
- } else {
- // If allow_url_fopen is not enabled, then make sure that post_max_size is large enough
- ini_set( 'post_max_size', '12M' );
- }
- // Start the encoded data collection with notification command
- $encoded_data = 'cmd=_notify-validate';
-
- // Get current arg separator
- $arg_separator = edd_get_php_arg_separator_output();
-
- // Verify there is a post_data
- if ( $post_data || strlen( $post_data ) > 0 ) {
- // Append the data
- $encoded_data .= $arg_separator . $post_data;
- } else {
- // Check if POST is empty
- if ( empty( $_POST ) ) {
- // Nothing to do
- return;
- } else {
- // Loop through each POST
- foreach ( $_POST as $key => $value ) {
- // Encode the value and append the data
- $encoded_data .= $arg_separator . "$key=" . urlencode( $value );
- }
- }
- }
-
- // Convert collected post data to an array
- parse_str( $encoded_data, $encoded_data_array );
-
- foreach ( $encoded_data_array as $key => $value ) {
-
- if ( false !== strpos( $key, 'amp;' ) ) {
- $new_key = str_replace( '&', '&', $key );
- $new_key = str_replace( 'amp;', '&', $new_key );
-
- unset( $encoded_data_array[ $key ] );
- $encoded_data_array[ $new_key ] = $value;
- }
-
- }
-
- /**
- * PayPal Web IPN Verification
- *
- * Allows filtering the IPN Verification data that PayPal passes back in via IPN with PayPal Standard
- *
- * @since 2.8.13
- *
- * @param array $data The PayPal Web Accept Data
- */
- $encoded_data_array = apply_filters( 'edd_process_paypal_ipn_data', $encoded_data_array );
-
- edd_debug_log( 'encoded_data_array data array: ' . print_r( $encoded_data_array, true ) );
-
- if ( ! edd_get_option( 'disable_paypal_verification' ) ) {
-
- // Validate the IPN
-
- $remote_post_vars = array(
- 'method' => 'POST',
- 'timeout' => 45,
- 'redirection' => 5,
- 'httpversion' => '1.1',
- 'blocking' => true,
- 'headers' => array(
- 'host' => 'www.paypal.com',
- 'connection' => 'close',
- 'content-type' => 'application/x-www-form-urlencoded',
- 'post' => '/cgi-bin/webscr HTTP/1.1',
- 'user-agent' => 'EDD IPN Verification/' . EDD_VERSION . '; ' . get_bloginfo( 'url' )
-
- ),
- 'sslverify' => false,
- 'body' => $encoded_data_array
- );
-
- edd_debug_log( 'Attempting to verify PayPal IPN. Data sent for verification: ' . print_r( $remote_post_vars, true ) );
-
- // Get response
- $api_response = wp_remote_post( edd_get_paypal_redirect( true, true ), $remote_post_vars );
-
- if ( is_wp_error( $api_response ) ) {
- edd_record_gateway_error( __( 'IPN Error', 'easy-digital-downloads' ), sprintf( __( 'Invalid IPN verification response. IPN data: %s', 'easy-digital-downloads' ), json_encode( $api_response ) ) );
- edd_debug_log( 'Invalid IPN verification response. IPN data: ' . print_r( $api_response, true ) );
-
- return; // Something went wrong
- }
-
- if ( wp_remote_retrieve_body( $api_response ) !== 'VERIFIED' && edd_get_option( 'disable_paypal_verification', false ) ) {
- edd_record_gateway_error( __( 'IPN Error', 'easy-digital-downloads' ), sprintf( __( 'Invalid IPN verification response. IPN data: %s', 'easy-digital-downloads' ), json_encode( $api_response ) ) );
- edd_debug_log( 'Invalid IPN verification response. IPN data: ' . print_r( $api_response, true ) );
-
- return; // Response not okay
- }
-
- edd_debug_log( 'IPN verified successfully' );
- }
-
- // Check if $post_data_array has been populated
- if ( ! is_array( $encoded_data_array ) && ! empty( $encoded_data_array ) ) {
- return;
- }
-
- $defaults = array(
- 'txn_type' => '',
- 'payment_status' => ''
- );
-
- $encoded_data_array = wp_parse_args( $encoded_data_array, $defaults );
-
- $payment_id = 0;
-
- if ( ! empty( $encoded_data_array[ 'parent_txn_id' ] ) ) {
- $payment_id = edd_get_purchase_id_by_transaction_id( $encoded_data_array[ 'parent_txn_id' ] );
- } elseif ( ! empty( $encoded_data_array[ 'txn_id' ] ) ) {
- $payment_id = edd_get_purchase_id_by_transaction_id( $encoded_data_array[ 'txn_id' ] );
- }
-
- if ( empty( $payment_id ) ) {
- $payment_id = ! empty( $encoded_data_array[ 'custom' ] ) ? absint( $encoded_data_array[ 'custom' ] ) : 0;
- }
-
- if ( has_action( 'edd_paypal_' . $encoded_data_array['txn_type'] ) ) {
- // Allow PayPal IPN types to be processed separately
- do_action( 'edd_paypal_' . $encoded_data_array['txn_type'], $encoded_data_array, $payment_id );
- } else {
- // Fallback to web accept just in case the txn_type isn't present
- do_action( 'edd_paypal_web_accept', $encoded_data_array, $payment_id );
- }
- exit;
-}
-add_action( 'edd_verify_paypal_ipn', 'edd_process_paypal_ipn' );
-
-/**
- * Process web accept (one time) payment IPNs
- *
- * @since 1.3.4
- * @param array $data IPN Data
- * @param int $payment_id Payment ID
- * @return void
- */
-function edd_process_paypal_web_accept_and_cart( $data, $payment_id ) {
-
- /**
- * PayPal Web Accept Data
- *
- * Allows filtering the Web Accept data that PayPal passes back in via IPN with PayPal Standard
- *
- * @since 2.8.13
- *
- * @param array $data The PayPal Web Accept Data
- * @param int $payment_id The Payment ID associated with this IPN request
- */
- $data = apply_filters( 'edd_paypal_web_accept_and_cart_data', $data, $payment_id );
-
- if ( $data['txn_type'] != 'web_accept' && $data['txn_type'] != 'cart' && $data['payment_status'] != 'Refunded' ) {
- return;
- }
-
- if ( empty( $payment_id ) ) {
- return;
- }
-
- $payment = new EDD_Payment( $payment_id );
-
- // Collect payment details
- $purchase_key = isset( $data['invoice'] ) ? $data['invoice'] : false;
- if ( ! $purchase_key && ! empty( $data['item_number'] ) ) {
- $purchase_key = $data['item_number'];
- }
- $paypal_amount = $data['mc_gross'];
- $payment_status = strtolower( $data['payment_status'] );
- $currency_code = strtolower( $data['mc_currency'] );
- $business_email = isset( $data['business'] ) && is_email( $data['business'] ) ? trim( $data['business'] ) : trim( $data['receiver_email'] );
-
-
- if ( $payment->gateway != 'paypal' ) {
- return; // this isn't a PayPal standard IPN
- }
-
- // Verify payment recipient
- if ( strcasecmp( $business_email, trim( edd_get_option( 'paypal_email', false ) ) ) != 0 ) {
- edd_record_gateway_error( __( 'IPN Error', 'easy-digital-downloads' ), sprintf( __( 'Invalid business email in IPN response. IPN data: %s', 'easy-digital-downloads' ), json_encode( $data ) ), $payment_id );
- edd_debug_log( 'Invalid business email in IPN response. IPN data: ' . print_r( $data, true ) );
- edd_update_payment_status( $payment_id, 'failed' );
- edd_insert_payment_note( $payment_id, __( 'Payment failed due to invalid PayPal business email.', 'easy-digital-downloads' ) );
- return;
- }
-
- // Verify payment currency
- if ( $currency_code != strtolower( $payment->currency ) ) {
-
- edd_record_gateway_error( __( 'IPN Error', 'easy-digital-downloads' ), sprintf( __( 'Invalid currency in IPN response. IPN data: %s', 'easy-digital-downloads' ), json_encode( $data ) ), $payment_id );
- edd_debug_log( 'Invalid currency in IPN response. IPN data: ' . print_r( $data, true ) );
- edd_update_payment_status( $payment_id, 'failed' );
- edd_insert_payment_note( $payment_id, __( 'Payment failed due to invalid currency in PayPal IPN.', 'easy-digital-downloads' ) );
- return;
- }
-
- if ( empty( $payment->email ) ) {
-
- // This runs when a Buy Now purchase was made. It bypasses checkout so no personal info is collected until PayPal
-
- // Setup and store the customers's details
- $address = array();
- $address['line1'] = ! empty( $data['address_street'] ) ? sanitize_text_field( $data['address_street'] ) : false;
- $address['city'] = ! empty( $data['address_city'] ) ? sanitize_text_field( $data['address_city'] ) : false;
- $address['state'] = ! empty( $data['address_state'] ) ? sanitize_text_field( $data['address_state'] ) : false;
- $address['country'] = ! empty( $data['address_country_code'] ) ? sanitize_text_field( $data['address_country_code'] ) : false;
- $address['zip'] = ! empty( $data['address_zip'] ) ? sanitize_text_field( $data['address_zip'] ) : false;
-
- $payment->email = sanitize_text_field( $data['payer_email'] );
- $payment->first_name = sanitize_text_field( $data['first_name'] );
- $payment->last_name = sanitize_text_field( $data['last_name'] );
- $payment->address = $address;
-
- if ( empty( $payment->customer_id ) ) {
-
- $customer = new EDD_Customer( $payment->email );
- if ( ! $customer || $customer->id < 1 ) {
-
- $customer->create( array(
- 'email' => $payment->email,
- 'name' => $payment->first_name . ' ' . $payment->last_name,
- 'user_id' => $payment->user_id
- ) );
-
- }
-
- $payment->customer_id = $customer->id;
- }
-
- $payment->save();
-
- }
-
- if( empty( $customer ) ) {
-
- $customer = new EDD_Customer( $payment->customer_id );
-
- }
-
- // Record the payer email on the EDD_Customer record if it is different than the email entered on checkout
- if( ! empty( $data['payer_email'] ) && ! in_array( strtolower( $data['payer_email'] ), array_map( 'strtolower', $customer->emails ) ) ) {
-
- $customer->add_email( strtolower( $data['payer_email'] ) );
-
- }
-
- if ( $payment_status == 'refunded' || $payment_status == 'reversed' ) {
-
- // Process a refund
- edd_process_paypal_refund( $data, $payment_id );
-
- } else {
-
- if ( edd_get_payment_status( $payment_id ) == 'complete' ) {
- return; // Only complete payments once
- }
-
- // Retrieve the total purchase amount (before PayPal)
- $payment_amount = edd_get_payment_amount( $payment_id );
-
- if ( number_format( (float) $paypal_amount, 2 ) < number_format( (float) $payment_amount, 2 ) ) {
- // The prices don't match
- edd_record_gateway_error( __( 'IPN Error', 'easy-digital-downloads' ), sprintf( __( 'Invalid payment amount in IPN response. IPN data: %s', 'easy-digital-downloads' ), json_encode( $data ) ), $payment_id );
- edd_debug_log( 'Invalid payment amount in IPN response. IPN data: ' . printf( $data, true ) );
- edd_update_payment_status( $payment_id, 'failed' );
- edd_insert_payment_note( $payment_id, __( 'Payment failed due to invalid amount in PayPal IPN.', 'easy-digital-downloads' ) );
- return;
- }
- if ( $purchase_key != edd_get_payment_key( $payment_id ) ) {
- // Purchase keys don't match
- edd_debug_log( 'Invalid purchase key in IPN response. IPN data: ' . printf( $data, true ) );
- edd_record_gateway_error( __( 'IPN Error', 'easy-digital-downloads' ), sprintf( __( 'Invalid purchase key in IPN response. IPN data: %s', 'easy-digital-downloads' ), json_encode( $data ) ), $payment_id );
- edd_update_payment_status( $payment_id, 'failed' );
- edd_insert_payment_note( $payment_id, __( 'Payment failed due to invalid purchase key in PayPal IPN.', 'easy-digital-downloads' ) );
- return;
- }
-
- if ( 'completed' == $payment_status || edd_is_test_mode() ) {
-
- edd_insert_payment_note( $payment_id, sprintf( __( 'PayPal Transaction ID: %s', 'easy-digital-downloads' ) , $data['txn_id'] ) );
- edd_set_payment_transaction_id( $payment_id, $data['txn_id'], number_format( (float) $paypal_amount, 2 ) );
- edd_update_payment_status( $payment_id, 'complete' );
-
- } else if ( 'pending' == $payment_status && isset( $data['pending_reason'] ) ) {
-
- // Look for possible pending reasons, such as an echeck
-
- $note = '';
-
- switch( strtolower( $data['pending_reason'] ) ) {
-
- case 'echeck' :
-
- $note = __( 'Payment made via eCheck and will clear automatically in 5-8 days', 'easy-digital-downloads' );
- $payment->status = 'processing';
- $payment->save();
- break;
-
- case 'address' :
-
- $note = __( 'Payment requires a confirmed customer address and must be accepted manually through PayPal', 'easy-digital-downloads' );
-
- break;
-
- case 'intl' :
-
- $note = __( 'Payment must be accepted manually through PayPal due to international account regulations', 'easy-digital-downloads' );
-
- break;
-
- case 'multi-currency' :
-
- $note = __( 'Payment received in non-shop currency and must be accepted manually through PayPal', 'easy-digital-downloads' );
-
- break;
-
- case 'paymentreview' :
- case 'regulatory_review' :
-
- $note = __( 'Payment is being reviewed by PayPal staff as high-risk or in possible violation of government regulations', 'easy-digital-downloads' );
-
- break;
-
- case 'unilateral' :
-
- $note = __( 'Payment was sent to non-confirmed or non-registered email address.', 'easy-digital-downloads' );
-
- break;
-
- case 'upgrade' :
-
- $note = __( 'PayPal account must be upgraded before this payment can be accepted', 'easy-digital-downloads' );
-
- break;
-
- case 'verify' :
-
- $note = __( 'PayPal account is not verified. Verify account in order to accept this payment', 'easy-digital-downloads' );
-
- break;
-
- case 'other' :
-
- $note = __( 'Payment is pending for unknown reasons. Contact PayPal support for assistance', 'easy-digital-downloads' );
-
- break;
-
- }
-
- if ( ! empty( $note ) ) {
-
- edd_debug_log( 'Payment not marked as completed because: ' . $note );
- edd_insert_payment_note( $payment_id, $note );
-
- }
-
- }
- }
-}
-add_action( 'edd_paypal_web_accept', 'edd_process_paypal_web_accept_and_cart', 10, 2 );
-
-/**
- * Process PayPal IPN Refunds
- *
- * @since 1.3.4
- * @param array $data IPN Data
- * @return void
- */
-function edd_process_paypal_refund( $data, $payment_id = 0 ) {
-
- /**
- * PayPal Process Refund Data
- *
- * Allows filtering the Refund data that PayPal passes back in via IPN with PayPal Standard
- *
- * @since 2.8.13
- *
- * @param array $data The PayPal Refund data
- * @param int $payment_id The Payment ID associated with this IPN request
- */
- $data = apply_filters( 'edd_process_paypal_refund_data', $data, $payment_id );
-
- // Collect payment details
- if ( empty( $payment_id ) ) {
- return;
- }
-
- if ( get_post_status( $payment_id ) == 'refunded' ) {
- return; // Only refund payments once
- }
-
- $payment_amount = edd_get_payment_amount( $payment_id );
- $refund_amount = $data['mc_gross'] * -1;
-
- if ( number_format( (float) $refund_amount, 2 ) < number_format( (float) $payment_amount, 2 ) ) {
-
- edd_insert_payment_note( $payment_id, sprintf( __( 'Partial PayPal refund processed: %s', 'easy-digital-downloads' ), $data['parent_txn_id'] ) );
- return; // This is a partial refund
-
- }
-
- edd_insert_payment_note( $payment_id, sprintf( __( 'PayPal Payment #%s Refunded for reason: %s', 'easy-digital-downloads' ), $data['parent_txn_id'], $data['reason_code'] ) );
- edd_insert_payment_note( $payment_id, sprintf( __( 'PayPal Refund Transaction ID: %s', 'easy-digital-downloads' ), $data['txn_id'] ) );
- edd_update_payment_status( $payment_id, 'refunded' );
-}
-
-/**
- * Get PayPal Redirect
- *
- * @since 1.0.8.2
- * @param bool $ssl_check Is SSL?
- * @param bool $ipn Is this an IPN verification check?
- * @return string
- */
-function edd_get_paypal_redirect( $ssl_check = false, $ipn = false ) {
-
- $protocol = 'http://';
- if ( is_ssl() || ! $ssl_check ) {
- $protocol = 'https://';
- }
-
- // Check the current payment mode
- if ( edd_is_test_mode() ) {
-
- // Test mode
-
- if ( $ipn ) {
-
- $paypal_uri = 'https://ipnpb.sandbox.paypal.com/cgi-bin/webscr';
-
- } else {
-
- $paypal_uri = $protocol . 'www.sandbox.paypal.com/cgi-bin/webscr';
-
- }
-
- } else {
-
- // Live mode
-
- if ( $ipn ) {
-
- $paypal_uri = 'https://ipnpb.paypal.com/cgi-bin/webscr';
-
- } else {
-
- $paypal_uri = $protocol . 'www.paypal.com/cgi-bin/webscr';
-
- }
-
- }
-
- return apply_filters( 'edd_paypal_uri', $paypal_uri, $ssl_check, $ipn );
-}
-
-/**
- * Get the image for the PayPal purchase page.
- *
- * @since 2.8
- * @return string
- */
-function edd_get_paypal_image_url() {
- $image_url = trim( edd_get_option( 'paypal_image_url', '' ) );
- return apply_filters( 'edd_paypal_image_url', $image_url );
-}
-
-/**
- * Shows "Purchase Processing" message for PayPal payments are still pending on site return.
- *
- * This helps address the Race Condition, as detailed in issue #1839
- *
- * @since 1.9
- * @return string
- */
-function edd_paypal_success_page_content( $content ) {
-
- if ( ! isset( $_GET['payment-id'] ) && ! edd_get_purchase_session() ) {
- return $content;
- }
-
- edd_empty_cart();
-
- $payment_id = isset( $_GET['payment-id'] ) ? absint( $_GET['payment-id'] ) : false;
-
- if ( ! $payment_id ) {
- $session = edd_get_purchase_session();
- $payment_id = edd_get_purchase_id_by_key( $session['purchase_key'] );
- }
-
- $payment = new EDD_Payment( $payment_id );
-
- if ( $payment->ID > 0 && 'pending' == $payment->status ) {
-
- // Payment is still pending so show processing indicator to fix the Race Condition, issue #
- ob_start();
-
- edd_get_template_part( 'payment', 'processing' );
-
- $content = ob_get_clean();
-
- }
-
- return $content;
-
-}
-add_filter( 'edd_payment_confirm_paypal', 'edd_paypal_success_page_content' );
-
-/**
- * Mark payment as complete on return from PayPal if a PayPal Identity Token is present.
- *
- * See https://github.com/easydigitaldownloads/easy-digital-downloads/issues/6197
- *
- * @since 2.8.13
- * @return void
- */
-function edd_paypal_process_pdt_on_return() {
-
- if ( ! isset( $_GET['payment-id'] ) || ! isset( $_GET['tx'] ) ) {
- return;
- }
-
- $token = edd_get_option( 'paypal_identity_token' );
-
- if ( ! edd_is_success_page() || ! $token || ! edd_is_gateway_active( 'paypal' ) ) {
- return;
- }
-
- $payment_id = isset( $_GET['payment-id'] ) ? absint( $_GET['payment-id'] ) : false;
-
- if ( empty( $payment_id ) ) {
- return;
- }
-
- $purchase_session = edd_get_purchase_session();
- $payment = new EDD_Payment( $payment_id );
-
- // If there is no purchase session, don't try and fire PDT.
- if ( empty( $purchase_session ) ) {
- return;
- }
-
- // Do not fire a PDT verification if the purchase session does not match the payment-id PDT is asking to verify.
- if ( ! empty( $purchase_session['purchase_key'] ) && $payment->key !== $purchase_session['purchase_key'] ) {
- return;
- }
-
- if ( $token && ! empty( $_GET['tx'] ) && $payment->ID > 0 ) {
-
- // An identity token has been provided in settings so let's immediately verify the purchase
-
- $remote_post_vars = array(
- 'method' => 'POST',
- 'timeout' => 45,
- 'redirection' => 5,
- 'httpversion' => '1.1',
- 'blocking' => true,
- 'headers' => array(
- 'host' => 'www.paypal.com',
- 'connection' => 'close',
- 'content-type' => 'application/x-www-form-urlencoded',
- 'post' => '/cgi-bin/webscr HTTP/1.1',
- 'user-agent' => 'EDD PDT Verification/' . EDD_VERSION . '; ' . get_bloginfo( 'url' )
-
- ),
- 'sslverify' => false,
- 'body' => array(
- 'tx' => sanitize_text_field( $_GET['tx'] ),
- 'at' => $token,
- 'cmd' => '_notify-synch',
- )
- );
-
- // Sanitize the data for debug logging.
- $debug_args = $remote_post_vars;
- $debug_args['body']['at'] = str_pad( substr( $debug_args['body']['at'], -6 ), strlen( $debug_args['body']['at'] ), '*', STR_PAD_LEFT );
- edd_debug_log( 'Attempting to verify PayPal payment with PDT. Args: ' . print_r( $debug_args, true ) );
-
- edd_debug_log( 'Sending PDT Verification request to ' . edd_get_paypal_redirect() );
-
- $request = wp_remote_post( edd_get_paypal_redirect(), $remote_post_vars );
-
- if ( ! is_wp_error( $request ) ) {
-
- $body = wp_remote_retrieve_body( $request );
-
- // parse the data
- $lines = explode( "\n", trim( $body ) );
- $data = array();
- if ( strcmp ( $lines[0], "SUCCESS" ) == 0 ) {
-
- for ( $i = 1; $i < count( $lines ); $i++ ) {
- $parsed_line = explode( "=", $lines[ $i ],2 );
- $data[ urldecode( $parsed_line[0] ) ] = urldecode( $parsed_line[1] );
- }
-
- if ( isset( $data['mc_gross'] ) ) {
-
- $total = $data['mc_gross'];
-
- } else if ( isset( $data['payment_gross'] ) ) {
-
- $total = $data['payment_gross'];
-
- } else if ( isset( $_REQUEST['amt'] ) ) {
-
- $total = $_REQUEST['amt'];
-
- } else {
-
- $total = null;
-
- }
-
- if ( is_null( $total ) ) {
-
- edd_debug_log( 'Attempt to verify PayPal payment with PDT failed due to payment total missing' );
- $payment->add_note( __( 'Payment could not be verified while validating PayPal PDT. Missing payment total fields.', 'easy-digital-downloads' ) );
- $payment->status = 'pending';
-
- } elseif ( (float) $total < (float) $payment->total ) {
-
- /**
- * Here we account for payments that are less than the expected results only. There are times that
- * PayPal will sometimes round and have $0.01 more than the amount. The goal here is to protect store owners
- * from getting paid less than expected.
- */
- edd_debug_log( 'Attempt to verify PayPal payment with PDT failed due to payment total discrepancy' );
- $payment->add_note( sprintf( __( 'Payment failed while validating PayPal PDT. Amount expected: %f. Amount Received: %f', 'easy-digital-downloads' ), $payment->total, $data['payment_gross'] ) );
- $payment->status = 'failed';
-
- } else {
-
- // Verify the status
- switch( strtolower( $data['payment_status'] ) ) {
-
- case 'completed':
- $payment->status = 'complete';
- break;
-
- case 'failed':
- $payment->status = 'failed';
- break;
-
- default:
- $payment->status = 'pending';
- break;
-
- }
-
- }
-
- $payment->transaction_id = sanitize_text_field( $_GET['tx'] );
- $payment->save();
-
- } elseif ( strcmp ( $lines[0], "FAIL" ) == 0 ) {
-
- edd_debug_log( 'Attempt to verify PayPal payment with PDT failed due to PDT failure response: ' . print_r( $body, true ) );
- $payment->add_note( __( 'Payment failed while validating PayPal PDT.', 'easy-digital-downloads' ) );
- $payment->status = 'failed';
- $payment->save();
-
- } else {
-
- edd_debug_log( 'Attempt to verify PayPal payment with PDT met with an unexpected result: ' . print_r( $body, true ) );
- $payment->add_note( __( 'PayPal PDT encountered an unexpected result, payment set to pending', 'easy-digital-downloads' ) );
- $payment->status = 'pending';
- $payment->save();
-
- }
-
- } else {
-
- edd_debug_log( 'Attempt to verify PayPal payment with PDT failed. Request return: ' . print_r( $request, true ) );
-
- }
- }
-
-}
-add_action( 'template_redirect', 'edd_paypal_process_pdt_on_return' );
-
-/**
- * Given a Payment ID, extract the transaction ID
- *
- * @since 2.1
- * @since 3.0 Updated to use EDD_Note class.
- *
- * @param string $payment_id Payment ID.
- * @return string Transaction ID.
- */
-function edd_paypal_get_payment_transaction_id( $payment_id ) {
- $transaction_id = '';
- $notes = edd_get_payment_notes( $payment_id );
-
- foreach ( $notes as $note ) {
- if ( preg_match( '/^PayPal Transaction ID: ([^\s]+)/', $note->content, $match ) ) {
- $transaction_id = $match[1];
- continue;
- }
- }
-
- return apply_filters( 'edd_paypal_set_payment_transaction_id', $transaction_id, $payment_id );
-}
-add_filter( 'edd_get_payment_transaction_id-paypal', 'edd_paypal_get_payment_transaction_id', 10, 1 );
-
-/**
- * Given a transaction ID, generate a link to the PayPal transaction ID details
- *
- * @since 2.2
- * @param string $transaction_id The Transaction ID
- * @param int $payment_id The payment ID for this transaction
- * @return string A link to the PayPal transaction details
- */
-function edd_paypal_link_transaction_id( $transaction_id, $payment_id ) {
-
- $payment = new EDD_Payment( $payment_id );
- $sandbox = 'test' === $payment->mode ? 'sandbox.' : '';
- $paypal_base_url = 'https://' . $sandbox . 'paypal.com/activity/payment/';
- $transaction_url = '' . esc_html( $transaction_id ) . '';
-
- return apply_filters( 'edd_paypal_link_payment_details_transaction_id', $transaction_url );
-
-}
-add_filter( 'edd_payment_details_transaction_id-paypal', 'edd_paypal_link_transaction_id', 10, 2 );
-
-/**
- * Shows a checkbox to automatically refund payments in PayPal.
- *
- * @param Order $order
- *
- * @since 3.0
- * @return void
- */
-function edd_paypal_refund_checkbox( Order $order ) {
- if ( 'paypal' !== $order->gateway ) {
- return;
- }
-
- // If our credentials are not set, return early.
- $key = $order->mode;
- $username = edd_get_option( 'paypal_' . $key . '_api_username' );
- $password = edd_get_option( 'paypal_' . $key . '_api_password' );
- $signature = edd_get_option( 'paypal_' . $key . '_api_signature' );
-
- if ( empty( $username ) || empty( $password ) || empty( $signature ) ) {
- return;
- }
- ?>
-
-
-
-
-
-
- gateway ) || 'paypal' !== $order->gateway ) {
- return;
- }
-
- // Get our data out of the serialized string.
- parse_str( $_POST['data'], $form_data );
-
- if ( empty( $form_data['edd-paypal-refund'] ) ) {
- edd_add_note( array(
- 'object_id' => $order_id,
- 'object_type' => 'order',
- 'user_id' => is_admin() ? get_current_user_id() : 0,
- 'content' => __( 'Transaction not refunded in PayPal, as checkbox was not selected.', 'easy-digital-downloads' )
- ) );
-
- return;
- }
-
- $refund = edd_get_order( $refund_id );
- if ( empty( $refund->total ) ) {
- return;
- }
-
- edd_refund_paypal_purchase( $order, $refund );
-}
-add_action( 'edd_refund_order', 'edd_paypal_maybe_refund_transaction', 10, 3 );
-
-/**
- * Refunds a purchase made via PayPal.
- *
- * @since 2.6.0
- *
- * @param EDD_Payment|Order|int $payment_id_or_object The ID or object of the order to refund.
- * @param Order|null $refund_object Optional. The refund object associated with this
- * transaction refund. If provided, then the refund
- * amount is used as the transaction refund amount (used for
- * partial refunds), and an EDD transaction record will be
- * inserted.
- *
- * @return void
- */
-function edd_refund_paypal_purchase( $payment_id_or_object, $refund_object = null ) {
- /*
- * Internally we want to work with an Order object, but we also need
- * an EDD_Payment object for backwards compatibility in the hooks.
- */
- $order = $payment = false;
- if ( $payment_id_or_object instanceof Order ) {
- $order = $payment_id_or_object;
- $payment = edd_get_payment( $order->id );
- } elseif ( $payment_id_or_object instanceof EDD_Payment ) {
- $payment = $payment_id_or_object;
- $order = edd_get_order( $payment_id_or_object->ID );
- } elseif ( is_numeric( $payment_id_or_object ) ) {
- $order = edd_get_order( $payment_id_or_object );
- $payment = edd_get_payment( $payment_id_or_object );
- }
-
- if ( empty( $order ) || ! $order instanceof Order ) {
- return;
- }
-
- // Set PayPal API key credentials.
- $credentials = array(
- 'api_endpoint' => 'test' == $order->mode ? 'https://api-3t.sandbox.paypal.com/nvp' : 'https://api-3t.paypal.com/nvp',
- 'api_username' => edd_get_option( 'paypal_' . $order->mode . '_api_username' ),
- 'api_password' => edd_get_option( 'paypal_' . $order->mode . '_api_password' ),
- 'api_signature' => edd_get_option( 'paypal_' . $order->mode . '_api_signature' )
- );
-
- $credentials = apply_filters( 'edd_paypal_refund_api_credentials', $credentials, $payment );
-
- $body = array(
- 'USER' => $credentials['api_username'],
- 'PWD' => $credentials['api_password'],
- 'SIGNATURE' => $credentials['api_signature'],
- 'VERSION' => '124',
- 'METHOD' => 'RefundTransaction',
- 'TRANSACTIONID' => $order->get_transaction_id(),
- 'REFUNDTYPE' => 'Full'
- );
-
- // If a refund object is supplied, let's check if this should be a partial refund instead.
- if ( $refund_object instanceof Order && abs( $refund_object->total ) !== abs( $order->total ) ) {
- $body['REFUNDTYPE'] = 'Partial';
- $body['AMT'] = abs( $refund_object->total );
-
- /* Translators: %d - order ID number; %s - formatted refund amount */
- edd_debug_log( sprintf( 'Processing partial PayPal refund for order #%d. Amount: %s.', $order->id, edd_currency_filter( $refund_object->total, $refund_object->currency ) ) );
- } else {
- /* Translators: %d - order ID number */
- edd_debug_log( sprintf( 'Processing full PayPal refund for order #%d.', $order->id ) );
- }
-
- $body = apply_filters( 'edd_paypal_refund_body_args', $body, $payment );
-
- // Prepare the headers of the refund request.
- $headers = array(
- 'Content-Type' => 'application/x-www-form-urlencoded',
- 'Cache-Control' => 'no-cache'
- );
-
- $headers = apply_filters( 'edd_paypal_refund_header_args', $headers, $payment );
-
- // Prepare args of the refund request.
- $args = array(
- 'body' => $body,
- 'headers' => $headers,
- 'httpversion' => '1.1'
- );
-
- $args = apply_filters( 'edd_paypal_refund_request_args', $args, $payment );
-
- $error_msg = '';
- $request = wp_remote_post( $credentials['api_endpoint'], $args );
-
- if ( is_wp_error( $request ) ) {
-
- $success = false;
- $error_msg = $request->get_error_message();
-
- } else {
-
- $body = wp_remote_retrieve_body( $request );
- if ( is_string( $body ) ) {
- wp_parse_str( $body, $body );
- }
-
- if ( isset( $body['ACK'] ) && 'success' === strtolower( $body['ACK'] ) ) {
- $success = true;
- } else {
- $success = false;
- if ( isset( $body['L_LONGMESSAGE0'] ) ) {
- $error_msg = $body['L_LONGMESSAGE0'];
- } else {
- $error_msg = __( 'PayPal refund failed for unknown reason.', 'easy-digital-downloads' );
- }
- }
-
- }
-
- if ( $success ) {
-
- edd_update_order_meta( $order->id, '_edd_paypal_refunded', true );
-
- // Add a note to the original order, and, if provided, the new refund object.
- if ( isset( $body['GROSSREFUNDAMT'] ) ) {
- /* Translators: %1$s - amount refunded; %2$s - transaction ID. */
- $note_message = sprintf( __( '%1$s refunded in PayPal. Transaction ID: %2$s', 'easy-digital-downloads' ), edd_currency_filter( edd_format_amount( $body['GROSSREFUNDAMT'] ) ), esc_html( $body['REFUNDTRANSACTIONID'] ) );
- } else {
- /* Translators: %s - transaction ID. */
- $note_message = sprintf( __( 'PayPal refund transaction ID: %s', 'easy-digital-downloads' ), esc_html( $body['REFUNDTRANSACTIONID'] ) );
- }
- $note_object_ids = array( $order->id );
- if ( $refund_object instanceof Order ) {
- $note_object_ids[] = $refund_object->id;
- }
- foreach ( $note_object_ids as $note_object_id ) {
- edd_add_note( array(
- 'object_id' => $note_object_id,
- 'object_type' => 'order',
- 'user_id' => is_admin() ? get_current_user_id() : 0,
- 'content' => $note_message
- ) );
- }
-
- // Add a negative transaction.
- if ( $refund_object instanceof Order && isset( $body['REFUNDTRANSACTIONID'] ) && isset( $body['GROSSREFUNDAMT'] ) ) {
- edd_add_order_transaction( array(
- 'object_id' => $refund_object->id,
- 'object_type' => 'order',
- 'transaction_id' => sanitize_text_field( $body['REFUNDTRANSACTIONID'] ),
- 'gateway' => 'paypal',
- 'status' => 'complete',
- 'total' => edd_negate_amount( $body['GROSSREFUNDAMT'] )
- ) );
- }
-
- } else {
- edd_add_note( array(
- 'object_id' => $order->id,
- 'object_type' => 'order',
- 'user_id' => is_admin() ? get_current_user_id() : 0,
- 'content' => sprintf( __( 'PayPal refund failed: %s', 'easy-digital-downloads' ), $error_msg )
- ) );
- }
-
- // Run hook letting people know the payment has been refunded successfully.
- do_action( 'edd_paypal_refund_purchase', $payment );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/paypal/admin/connect.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/paypal/admin/connect.php
deleted file mode 100644
index ecf12457..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/paypal/admin/connect.php
+++ /dev/null
@@ -1,830 +0,0 @@
-signupLink ) ) {
- ?>
-
-
- tag; %2$s closing tag */
- __( '%1$sPayPal Communication Error:%2$s We are having trouble communicating with PayPal at the moment. Please try again later, and if the issue persists, reach out to our support team.', 'easy-digital-downloads' ),
- '',
- ''
- ), array( 'strong' => array() ) );
- ?>
-
- 7.4 if possible to receive the full speed and security benefits provided to more modern and fully supported versions of PHP. However, some plugins may not be fully compatible with PHP 7.4, so more testing may be required.', 'easy-digital-downloads' ),
- '' . $required_version . ''
- ),
- array(
- 'code' => true,
- )
- );
- ?>
-
' . sprintf(
- /* translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. */
- __( 'In order for Stripe to function completely, you must configure your Stripe webhooks. Visit your %1$saccount dashboard%2$s to configure them. Please add a webhook endpoint for the URL below.', 'easy-digital-downloads' ),
- '',
- ''
- ) .
- '
' .
- sprintf(
- /* translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. */
- __( 'See our %1$sdocumentation%2$s for more information.', 'easy-digital-downloads' ),
- '',
- ''
- ) .
- '
',
- ),
- 'stripe_billing_fields' => array(
- 'id' => 'stripe_billing_fields',
- 'name' => __( 'Billing Address Display', 'easy-digital-downloads' ),
- 'desc' => __( 'Select how you would like to display the billing address fields on the checkout form.
Notes:
If taxes are enabled, this option cannot be changed from "Full address".
If set to "No address fields", you must disable "zip code verification" in your Stripe account.
', 'easy-digital-downloads' ),
- 'type' => 'select',
- 'std' => 'full',
- 'options' => array(
- 'full' => __( 'Full address', 'easy-digital-downloads' ),
- 'zip_country' => __( 'Zip / Postal Code and Country only', 'easy-digital-downloads' ),
- 'none' => __( 'No address fields', 'easy-digital-downloads' ),
- ),
- ),
- 'stripe_statement_descriptor' => array(
- 'id' => 'stripe_statement_descriptor',
- 'name' => __( 'Statement Descriptor', 'easy-digital-downloads' ),
- 'desc' => __( 'Choose how charges will appear on customer\'s credit card statements. Max 22 characters', 'easy-digital-downloads' ),
- 'type' => 'text',
- ),
- 'stripe_restrict_assets' => array(
- 'id' => 'stripe_restrict_assets',
- 'name' => ( __( 'Restrict Stripe Assets', 'easy-digital-downloads' ) ),
- 'check' => ( __( 'Only load Stripe.com hosted assets on pages that specifically utilize Stripe functionality.', 'easy-digital-downloads' ) ),
- 'type' => 'checkbox_description',
- 'desc' => sprintf(
- /* translators: 1. opening link tag; 2. closing link tag */
- __( 'Stripe advises that their Javascript library be loaded on every page to take advantage of their advanced fraud detection rules. If you are not concerned with this, enable this setting to only load the Javascript when necessary. %1$sLearn more about Stripe\'s recommended setup.%2$s', 'easy-digital-downloads' ),
- '',
- ''
- ),
- ),
- );
-
- if ( _edds_legacy_elements_enabled() ) {
- $elements_mode = edds_get_elements_mode();
-
- if ( ! edds_stripe_connect_can_manage_keys() ) {
- $stripe_settings['stripe_elements_mode'] = array(
- 'id' => 'stripe_elements_mode',
- 'name' => __( 'Elements Mode', 'easy-digital-downloads' ),
- 'desc' => __( 'Toggle between using the legacy Card Elements Stripe integration and the new Payment Elements experience.', 'easy-digital-downloads' ),
- 'type' => 'select',
- 'options' => array(
- 'card-elements' => __( 'Card Element', 'easy-digital-downloads' ),
- 'payment-elements' => __( 'Payment Element', 'easy-digital-downloads' ),
- ),
- 'class' => 'stripe-elements-mode',
- 'tooltip_title' => __( 'Transitioning to Payment Elements', 'easy-digital-downloads' ),
- 'tooltip_desc' => __( 'You are seeing this option because your store has been using Card Elements prior to the EDD Stripe 2.9.0 update.
To ensure that we do not affect your current checkout experience, you can use this setting to toggle between the Card Elements (legacy) and Payment Elements (updated version) to ensure that any customizations or theming you have done still function properly.
Please be advised, that in a future version of the Stripe extension, we will deprecate the Card Elements, so take this time to update your store!', 'easy-digital-downloads' ),
- );
- }
-
- $stripe_settings['stripe_allow_prepaid'] = array(
- 'id' => 'stripe_allow_prepaid',
- 'name' => __( 'Prepaid Cards', 'easy-digital-downloads' ),
- 'desc' => __( 'Allow prepaid cards as valid payment method.', 'easy-digital-downloads' ),
- 'type' => 'checkbox',
- 'class' => 'payment-elements' === $elements_mode ? 'edd-hidden card-elements-feature' : 'card-elements-feature',
- );
-
- $radar_rules_url = sprintf(
- 'https://dashboard.stripe.com%s/settings/radar/rules',
- edd_is_test_mode() ? '/test' : ''
- );
-
- $stripe_settings['stripe_allow_prepaid_elements_note'] = array(
- 'id' => 'stripe_allow_prepaid_elements_note',
- 'name' => __( 'Prepaid Cards', 'easy-digital-downloads' ),
- 'desc' => sprintf(
- /* translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. */
- __( 'Prepaid card allowance can now be managed in your %1$sStripe Radar Rules%2$s.', 'easy-digital-downloads' ),
- '',
- ''
- ),
- 'type' => 'descriptive_text',
- 'class' => 'payment-elements' === $elements_mode ? 'payment-elements-feature' : 'edd-hidden payment-elements-feature',
- );
-
- $stripe_settings['stripe_split_payment_fields'] = array(
- 'id' => 'stripe_split_payment_fields',
- 'name' => __( 'Split Credit Card Form', 'easy-digital-downloads' ),
- 'desc' => __( 'Use separate card number, expiration, and CVC fields in payment forms.', 'easy-digital-downloads' ),
- 'type' => 'checkbox',
- 'class' => 'payment-elements' === $elements_mode ? 'edd-hidden card-elements-feature' : 'card-elements-feature',
- );
-
- $stripe_settings['stripe_use_existing_cards'] = array(
- 'id' => 'stripe_use_existing_cards',
- 'name' => __( 'Show Previously Used Cards', 'easy-digital-downloads' ),
- 'desc' => __( 'Provides logged in customers with a list of previous used payment methods for faster checkout.', 'easy-digital-downloads' ),
- 'type' => 'checkbox',
- 'class' => 'payment-elements' === $elements_mode ? 'edd-hidden card-elements-feature' : 'card-elements-feature',
- );
-
- $stripe_settings['stripe_use_existing_cards_elements_note'] = array(
- 'id' => 'stripe_use_existing_cards_elements_note',
- 'name' => __( 'Show Previously Used Cards', 'easy-digital-downloads' ),
- 'desc' => sprintf(
- /* translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. */
- __( 'Previously used cards are now managed by %1$sLink by Stripe%2$s, for even better conversions and security.', 'easy-digital-downloads' ),
- '',
- ''
- ),
- 'type' => 'descriptive_text',
- 'class' => 'payment-elements' === $elements_mode ? 'payment-elements-feature' : 'edd-hidden payment-elements-feature',
- );
- }
-
- $settings['edd-stripe'] = $stripe_settings;
-
- // If EDD is in Debug Mode, add some 'hidden' settings to the Stripe settings.
- if ( edd_is_debug_mode() ) {
- $card_elements_enabled = get_option( '_edds_legacy_elements_enabled', false );
-
- $debug_settings = array(
- 'stripe_debug' => array(
- 'id' => 'stripe_debug',
- 'name' => __( 'Debugging Settings', 'easy-digital-downloads' ),
- 'desc' => '
' .
- '
' . __( 'The following settings are available while Easy Digital Downloads is in debug mode. They are not designed to be primary settings and should be used only while debugging or when instructed to be used by the Easy Digital Downloads Team.', 'easy-digital-downloads' ) . '
' .
- '
' . __( 'There is no guarantee that these settings will remain available in future versions of Easy Digital Downloads. Easy Digital Downloads Debug Mode should be disabled once changes to these settings have been made.', 'easy-digital-downloads' ) . '
' .
- '
',
- 'type' => 'descriptive_text',
- ),
- );
-
- $card_elements_action = $card_elements_enabled ? 'disable-card-elements' : 'enable-card-elements';
- $card_elements_button_label = $card_elements_enabled ? __( 'Disable access to Card Elements', 'easy-digital-downloads' ) : __( 'Enable access to Card Elements', 'easy-digital-downloads' );
- $card_elements_state_label = $card_elements_enabled ? __( 'Access to Legacy Card Elements is Enabled', 'easy-digital-downloads' ) : __( 'Access to Legacy Card Elements is Disabled', 'easy-digital-downloads' );
-
- $link_class = $card_elements_enabled ? 'edd-button__toggle--enabled' : 'edd-button__toggle--disabled';
-
- $debug_settings['toggle_card_elements'] = array(
- 'id' => 'stripe_toggle_card_elements',
- 'name' => __( 'Toggle Card Elements', 'easy-digital-downloads' ),
- 'type' => 'descriptive_text',
- 'desc' => sprintf(
- '%1$s' . $card_elements_button_label . '%2$s',
- '',
- ''
- ) .'' . $card_elements_state_label . ' ' . __( 'Card Elements is the legacy Stripe integration. Easy Digital Downloads has updated to use the more secure and reliable Payment Elements feature of Stripe. This toggle allows sites without access to Card Elements to enable or disable it.', 'easy-digital-downloads' ),
- );
-
- $settings['edd-stripe'] = array_merge( $settings['edd-stripe'], $debug_settings );
- }
-
- // Set up the new setting field for the Test Mode toggle notice.
- $notice = array(
- 'stripe_connect_test_mode_toggle_notice' => array(
- 'id' => 'stripe_connect_test_mode_toggle_notice',
- 'desc' => '
' . __( 'You have disabled the "Test Mode" option. Once you have saved your changes, please verify your Stripe connection, especially if you have not previously connected in with "Test Mode" disabled.', 'easy-digital-downloads' ) . '
',
- 'type' => 'stripe_connect_notice',
- 'field_class' => 'edd-hidden',
- ),
- );
-
- // Insert the new setting after the Test Mode checkbox.
- $position = array_search( 'test_mode', array_keys( $settings['main'] ), true );
- $settings = array_merge(
- array_slice( $settings['main'], $position, 1, true ),
- $notice,
- $settings
- );
-
- return $settings;
-}
-add_filter( 'edd_settings_gateways', 'edds_add_settings' );
-
-/**
- * Force full billing address display when taxes are enabled
- *
- * @access public
- * @since 2.5
- *
- * @param string $value The value currently set for the Stripe billing fields setting.
- * @param string $key The Stripe setting key to detect, stripe_billing_fields.
- *
- * @return string
- */
-function edd_stripe_sanitize_stripe_billing_fields_save( $value, $key ) {
-
- if ( 'stripe_billing_fields' === $key && edd_use_taxes() ) {
-
- $value = 'full';
-
- }
-
- return $value;
-
-}
-add_filter( 'edd_settings_sanitize_select', 'edd_stripe_sanitize_stripe_billing_fields_save', 10, 2 );
-
-/**
- * Filter the output of the statement descriptor option to add a max length to the text string
- *
- * @since 2.6
- * @param string $html The full html for the setting output.
- * @param array $args The original arguments passed in to output the html.
- *
- * @return string
- */
-function edd_stripe_max_length_statement_descriptor( $html, $args ) {
- if ( 'stripe_statement_descriptor' !== $args['id'] ) {
- return $html;
- }
-
- $html = str_replace( '
-
-
-
- ' . wpautop( $value ) . '';
-
- echo $html;
-}
-
-/**
- * Outputs information when Stripe has been activated but application requirements are not met.
- *
- * @since 2.8.1
- */
-function edd_stripe_requirements_not_met_callback() {
- $required_version = 7.1;
- $current_version = phpversion();
-
- echo '
';
- echo '
';
- echo wp_kses(
- sprintf(
- /* translators: %1$s PHP version requirement. %2$s Current PHP version. %3$s Opening strong tag, do not translate. %4$s Closing strong tag, do not translate. */
- __(
- 'Processing credit cards with Stripe requires PHP version %1$s or higher. It looks like you\'re using version %2$s, which means you will need to %3$supgrade your version of PHP before acceping credit card payments%4$s.',
- 'easy-digital-downloads'
- ),
- '' . $required_version . '',
- '' . $current_version . '',
- '',
- ''
- ),
- array(
- 'code' => true,
- 'strong' => true,
- )
- );
- echo '
';
- echo '
';
-
- echo '';
- esc_html_e( 'Need help upgrading? Ask your web host!', 'easy-digital-downloads' );
- echo ' ';
-
- echo wp_kses(
- sprintf(
- /* translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. */
- __(
- 'Many web hosts can give you instructions on how/where to upgrade your version of PHP through their control panel, or may even be able to do it for you. If you need to change hosts, please see %1$sour hosting recommendations%2$s.',
- 'easy-digital-downloads'
- ),
- '',
- ''
- ),
- array(
- 'a' => array(
- 'href' => true,
- 'target' => true,
- 'rel' => true,
- ),
- )
- );
- echo '
' .
- wp_kses(
- sprintf(
- /* translators: %1$s PHP version requirement. %2$s Current PHP version. %3$s Opening strong tag, do not translate. %4$s Closing strong tag, do not translate. */
- __(
- 'Processing credit cards with Stripe requires PHP version %1$s or higher. It looks like you\'re using version %2$s, which means you will need to %3$supgrade your version of PHP before acceping credit card payments%4$s.',
- 'easy-digital-downloads'
- ),
- '' . $required_version . '',
- '' . $current_version . '',
- '',
- ''
- ),
- array(
- 'code' => true,
- 'strong' => true,
- )
- ) .
- '
' .
- esc_html__( 'Need help upgrading? Ask your web host!', 'easy-digital-downloads' ) .
- ' ' .
- wp_kses(
- sprintf(
- /* translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. */
- __(
- 'Many web hosts can give you instructions on how/where to upgrade your version of PHP through their control panel, or may even be able to do it for you. If you need to change hosts, please see %1$sour hosting recommendations%2$s.',
- 'easy-digital-downloads'
- ),
- '',
- ''
- ),
- array(
- 'a' => array(
- 'href' => true,
- 'target' => true,
- 'rel' => true,
- ),
- )
- ) . '
' . sprintf(
- /* translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. */
- __( 'There was an error getting your Stripe credentials. Please %1$stry again%2$s. If you continue to have this problem, please contact support.', 'easy-digital-downloads' ),
- '',
- ''
- ) . '
';
- wp_die( $message );
- }
-
- $data = json_decode( $response['body'], true );
- $data = $data['data'];
-
- if ( edd_is_test_mode() ) {
- edd_update_option( 'test_publishable_key', sanitize_text_field( $data['publishable_key'] ) );
- edd_update_option( 'test_secret_key', sanitize_text_field( $data['secret_key'] ) );
- } else {
- edd_update_option( 'live_publishable_key', sanitize_text_field( $data['publishable_key'] ) );
- edd_update_option( 'live_secret_key', sanitize_text_field( $data['secret_key'] ) );
- }
-
- edd_update_option( 'stripe_connect_account_id', sanitize_text_field( $data['stripe_user_id'] ) );
-
- $redirect_url = admin_url( 'edit.php?post_type=download&page=edd-settings&tab=gateways§ion=edd-stripe' );
-
- if ( ! empty( $redirect_screen ) && 'onboarding-wizard' === $redirect_screen ) {
- $redirect_url = edd_get_admin_url(
- array(
- 'page' => 'edd-onboarding-wizard',
- 'current_step' => 'payment_methods',
- )
- );
- $gateways = edd_get_option( 'gateways', array() );
- $gateways['stripe'] = true;
- edd_update_option( 'gateways', $gateways );
- }
-
- wp_safe_redirect( esc_url_raw( $redirect_url ) );
- exit;
-
-}
-add_action( 'admin_init', 'edds_process_gateway_connect_completion' );
-
-/**
- * Returns a URL to disconnect the current Stripe Connect account ID and keys.
- *
- * @since 2.8.0
- *
- * @return string $stripe_connect_disconnect_url URL to disconnect an account ID and keys.
- */
-function edds_stripe_connect_disconnect_url() {
- $stripe_connect_disconnect_url = add_query_arg(
- array(
- 'post_type' => 'download',
- 'page' => 'edd-settings',
- 'tab' => 'gateways',
- 'section' => 'edd-stripe',
- 'edds-stripe-disconnect' => true,
- ),
- admin_url( 'edit.php' )
- );
-
- /**
- * Filters the URL to "disconnect" the Stripe Account.
- *
- * @since 2.8.0
- *
- * @param $stripe_connect_disconnect_url URL to remove the associated Account ID.
- */
- $stripe_connect_disconnect_url = apply_filters(
- 'edds_stripe_connect_disconnect_url',
- $stripe_connect_disconnect_url
- );
-
- $stripe_connect_disconnect_url = wp_nonce_url( $stripe_connect_disconnect_url, 'edds-stripe-connect-disconnect' );
-
- return $stripe_connect_disconnect_url;
-}
-
-/**
- * Removes the associated Stripe Connect Account ID and keys.
- *
- * This does not revoke application permissions from the Stripe Dashboard,
- * it simply allows the "Connect with Stripe" flow to run again for a different account.
- *
- * @since 2.8.0
- */
-function edds_stripe_connect_process_disconnect() {
- // Do not need to handle this request, bail.
- if (
- ! ( isset( $_GET['page'] ) && ( 'edd-settings' === $_GET['page'] || 'edd-onboarding-wizard' === $_GET['page'] ) ) ||
- ! isset( $_GET['edds-stripe-disconnect'] )
- ) {
- return;
- }
-
- // Current user cannot handle this request, bail.
- if ( ! current_user_can( 'manage_options' ) ) {
- return;
- }
-
- // No nonce, bail.
- if ( ! isset( $_GET['_wpnonce'] ) ) {
- return;
- }
-
- // Invalid nonce, bail.
- if ( ! wp_verify_nonce( $_GET['_wpnonce'], 'edds-stripe-connect-disconnect' ) ) {
- return;
- }
-
- $options = array(
- 'stripe_connect_account_id',
- 'stripe_connect_account_country',
- 'test_publishable_key',
- 'test_secret_key',
- 'live_publishable_key',
- 'live_secret_key',
- );
-
- foreach ( $options as $option ) {
- edd_delete_option( $option );
- }
-
- // Remove Stripe from the enabled gateways.
- $gateways = edd_get_option( 'gateways', array() );
- unset( $gateways['stripe'] );
- edd_update_option( 'gateways', $gateways );
-
- $redirect = remove_query_arg(
- array(
- '_wpnonce',
- 'edds-stripe-disconnect',
- )
- );
-
- return wp_redirect( esc_url_raw( $redirect ) );
-}
-add_action( 'admin_init', 'edds_stripe_connect_process_disconnect' );
-
-/**
- * Updates the `stripe_connect_account_country` setting if using Stripe Connect
- * and no country information is available.
- *
- * @since 2.8.7
- */
-function edds_stripe_connect_maybe_refresh_account_country() {
- // Current user cannot modify options, bail.
- if ( false === current_user_can( 'manage_options' ) ) {
- return;
- }
-
- $account_id = edd_stripe()->connect()->get_connect_id();
-
- // Stripe Connect has not been used, bail.
- if ( empty( $account_id ) ) {
- return;
- }
-
- // Account country is already set, bail.
- $account_country = edd_get_option( 'stripe_connect_account_country', '' );
-
- if ( ! empty( $account_country ) ) {
- return;
- }
-
- try {
- $account = edds_api_request( 'Account', 'retrieve', $account_id );
-
- if ( isset( $account->country ) ) {
- $account_country = sanitize_text_field(
- strtolower( $account->country )
- );
-
- edd_update_option(
- 'stripe_connect_account_country',
- $account_country
- );
- }
- } catch ( \Exception $e ) {
- // Do nothing.
- }
-}
-add_action( 'admin_init', 'edds_stripe_connect_maybe_refresh_account_country' );
-
-/**
- * Renders custom HTML for the "Stripe Connect" setting field in the Stripe Payment Gateway
- * settings subtab.
- *
- * Provides a way to use Stripe Connect and manually manage API keys.
- *
- * @since 2.8.0
- */
-function edds_stripe_connect_setting_field() {
- $stripe_connect_url = edds_stripe_connect_url();
- $stripe_disconnect_url = edds_stripe_connect_disconnect_url();
-
- $stripe_connect_account_id = edd_stripe()->connect()->get_connect_id();
-
- $api_key = edd_is_test_mode()
- ? edd_get_option( 'test_publishable_key' )
- : edd_get_option( 'live_publishable_key' );
-
- ob_start();
-?>
-
-
-
-
-
-
-
-
',
- __( 'Stripe Connect helps ensure easy setup and security.', 'easy-digital-downloads' )
- ),
- 'actions' => '',
- 'test' => 'edds_stripe_connect',
- );
-
- $elements_mode = edds_get_elements_mode();
- if ( edd_stripe()->connect()->is_connected ) {
- if ( 'payment-elements' === $elements_mode ) {
- return $result;
- }
-
- // User is connected but on the Card Elements, we should give them a recommendation to use the Payment Elements.
- $result['label'] = __( 'You are using the legacy Card Elements fields', 'easy-digital-downloads' );
- $result['status'] = 'recommended';
- $result['badge']['color'] = 'orange';
- $result['description'] = sprintf(
- '
%s
',
- esc_html__( 'Increase conversions, security, and reliability by using the Payment Elements integration for Stripe.', 'easy-digital-downloads' )
- );
- $result['actions'] = sprintf(
- '%s',
- esc_url(
- edd_get_admin_url(
- array(
- 'page' => 'edd-settings',
- 'tab' => 'gateways',
- 'section' => 'edd-stripe',
- )
- )
- ),
- esc_html__( 'Switch to Payment Elements', 'easy-digital-downloads' )
- );
-
- } else {
- $result['label'] = __( 'You are using manually managed Stripe API keys', 'easy-digital-downloads' );
- $result['status'] = 'critical';
- $result['badge']['color'] = 'red';
- $result['description'] = sprintf(
- '
' .
- __( 'About this upgrade: This upgrade will improve the reliability of associating purchase records with your existing customer records in Stripe by changing their Stripe Customer IDs to be stored locally on their EDD customer record, instead of their user record.', 'easy-digital-downloads' ) .
- '
' .
- __( 'Advanced User? This upgrade can also be run via WPCLI with the following command: wp edd-stripe migrate_customer_ids', 'easy-digital-downloads' ) .
- '
' .
- '
',
- esc_url( admin_url( 'index.php?page=edd-upgrades&edd-upgrade=stripe_customer_id_migration' ) )
- );
- }
-
-}
-add_action( 'admin_notices', 'edd_stripe_upgrade_notices' );
-
-/**
- * Migrates Stripe Customer IDs from the usermeta table to the edd_customermeta table.
- *
- * @since 2.6
- * @return void
- */
-function edd_stripe_customer_id_migration() {
- global $wpdb;
-
- if ( ! current_user_can( 'manage_shop_settings' ) ) {
- wp_die( __( 'You do not have permission to do shop upgrades', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) );
- }
-
- ignore_user_abort( true );
-
- $step = isset( $_GET['step'] ) ? absint( $_GET['step'] ) : 1;
- $number = isset( $_GET['number'] ) ? absint( $_GET['number'] ) : 10;
- $offset = $step == 1 ? 0 : ( $step - 1 ) * $number;
-
- $total = isset( $_GET['total'] ) ? absint( $_GET['total'] ) : false;
- if ( empty( $total ) || $total <= 1 ) {
- $total_sql = "SELECT COUNT(user_id) as total_users FROM $wpdb->usermeta WHERE meta_key IN ( '_edd_stripe_customer_id', '_edd_stripe_customer_id_test' )";
- $results = $wpdb->get_row( $total_sql );
- $total = $results->total_users;
- }
-
- $stripe_user_meta = $wpdb->get_results(
- $wpdb->prepare(
- "SELECT * FROM $wpdb->usermeta WHERE meta_key IN ( '_edd_stripe_customer_id', '_edd_stripe_customer_id_test' ) ORDER BY umeta_id ASC LIMIT %d,%d;",
- $offset,
- $number
- )
- );
-
- if ( $stripe_user_meta ) {
-
- foreach ( $stripe_user_meta as $stripe_user ) {
-
- $user = get_userdata( $stripe_user->user_id );
- $email = $user->user_email;
-
- $customer = new EDD_Customer( $email );
-
- // If we don't have a customer on this site, just move along.
- if ( ! $customer->id > 0 ) {
- continue;
- }
-
- $stripe_customer_id = $stripe_user->meta_value;
-
- // We should try and use a recurring ID if one exists for this user
- if ( class_exists( 'EDD_Recurring_Subscriber' ) ) {
- $subscriber = new EDD_Recurring_Subscriber( $customer->id );
- $stripe_customer_id = $subscriber->get_recurring_customer_id( 'stripe' );
- }
-
- $customer->update_meta( $stripe_user->meta_key, $stripe_customer_id );
-
- }
-
- $step ++;
- $redirect = add_query_arg( array(
- 'page' => 'edd-upgrades',
- 'edd-upgrade' => 'stripe_customer_id_migration',
- 'step' => absint( $step ),
- 'number' => absint( $number ),
- 'total' => absint( $total ),
- ), admin_url( 'index.php' ) );
-
- wp_safe_redirect( $redirect );
- exit;
-
- } else {
-
- update_option( 'edds_stripe_version', preg_replace( '/[^0-9.].*/', '', EDD_STRIPE_VERSION ) );
- edd_set_upgrade_complete( 'stripe_customer_id_migration' );
- delete_option( 'edd_doing_upgrade' );
-
- wp_redirect( admin_url() );
- exit;
-
- }
-
-}
-add_action( 'edd_stripe_customer_id_migration', 'edd_stripe_customer_id_migration' );
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/card-actions.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/card-actions.php
deleted file mode 100644
index de6a7502..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/card-actions.php
+++ /dev/null
@@ -1,552 +0,0 @@
- __( 'This feature is not available at this time.', 'easy-digital-downloads' ),
- )
- );
- }
-
- // Source can't be found.
- $payment_method = isset( $_POST['payment_method'] ) ? sanitize_text_field( $_POST['payment_method'] ) : '';
-
- if ( empty( $payment_method ) ) {
- wp_send_json_error(
- array(
- 'message' => __( 'Error updating card.', 'easy-digital-downloads' ),
- )
- );
- }
-
- // Nonce failed.
- if ( ! edds_verify( 'nonce', $payment_method . '_update' ) ) {
- wp_send_json_error(
- array(
- 'message' => __( 'Error updating card.', 'easy-digital-downloads' ),
- )
- );
- }
- $stripe_customer_id = edds_get_stripe_customer_id( get_current_user_id() );
- if ( empty( $stripe_customer_id ) ) {
- wp_send_json_error(
- array(
- 'message' => __( 'Error updating card.', 'easy-digital-downloads' ),
- )
- );
- }
-
- try {
- $card_args = array();
- $card_fields = array(
- 'address_city',
- 'address_country',
- 'address_line1',
- 'address_line2',
- 'address_zip',
- 'address_state',
- 'exp_month',
- 'exp_year',
- );
-
- foreach ( $card_fields as $card_field ) {
- $card_args[ $card_field ] = ( isset( $_POST[ $card_field ] ) && '' !== $_POST[ $card_field ] )
- ? sanitize_text_field( $_POST[ $card_field ] )
- : null;
- }
-
- // Update a PaymentMethod.
- if ( 'pm_' === substr( $payment_method, 0, 3 ) ) {
- $address_args = array(
- 'city' => $card_args['address_city'],
- 'country' => $card_args['address_country'],
- 'line1' => $card_args['address_line1'],
- 'line2' => $card_args['address_line2'],
- 'postal_code' => $card_args['address_zip'],
- 'state' => $card_args['address_state'],
- );
-
- edds_api_request(
- 'PaymentMethod',
- 'update',
- $payment_method,
- array(
- 'billing_details' => array(
- 'address' => $address_args,
- ),
- 'card' => array(
- 'exp_month' => $card_args['exp_month'],
- 'exp_year' => $card_args['exp_year'],
- ),
- )
- );
-
- // Update a legacy Card.
- } else {
- edds_api_request( 'Customer', 'updateSource', $stripe_customer_id, $payment_method, $card_args );
- }
-
- // Check if customer has default card.
- $existing_cards = edd_stripe_get_existing_cards( get_current_user_id() );
- $default_payment_method = edds_customer_get_default_payment_method( get_current_user_id(), $existing_cards );
- // If there is no default card, make updated card default.
- if ( null === $default_payment_method ) {
- edds_customer_set_default_payment_method( $stripe_customer_id, current( $existing_cards )['source']->id );
- }
-
- wp_send_json_success(
- array(
- 'message' => esc_html__( 'Card successfully updated.', 'easy-digital-downloads' ),
- )
- );
- } catch ( \Exception $e ) {
- wp_send_json_error(
- array(
- 'message' => esc_html( $e->getMessage() ),
- )
- );
- }
-}
-add_action( 'wp_ajax_edds_update_payment_method', 'edd_stripe_process_card_update' );
-
-/**
- * Process the set default card action from the manage card form.
- *
- * @since 2.6
- * @return void
- */
-function edd_stripe_process_card_default() {
- $enabled = edd_stripe_existing_cards_enabled();
-
- // Feature not enabled.
- if ( ! $enabled ) {
- wp_send_json_error(
- array(
- 'message' => __( 'This feature is not available at this time.', 'easy-digital-downloads' ),
- )
- );
- }
-
- // Source can't be found.
- $payment_method = isset( $_POST['payment_method'] ) ? sanitize_text_field( $_POST['payment_method'] ) : '';
-
- if ( empty( $payment_method ) ) {
- wp_send_json_error(
- array(
- 'message' => __( 'Error updating card.', 'easy-digital-downloads' ),
- )
- );
- }
-
- // Nonce failed.
- if ( ! edds_verify( 'nonce', $payment_method . '_update' ) ) {
- wp_send_json_error(
- array(
- 'message' => __( 'Error updating card.', 'easy-digital-downloads' ),
- )
- );
- }
-
- // Customer can't be found.
- $stripe_customer_id = edds_get_stripe_customer_id( get_current_user_id() );
-
- if ( empty( $stripe_customer_id ) ) {
- wp_send_json_error(
- array(
- 'message' => __( 'Error updating card.', 'easy-digital-downloads' ),
- )
- );
- }
-
- try {
- edds_customer_set_default_payment_method( $stripe_customer_id, $payment_method );
-
- wp_send_json_success(
- array(
- 'message' => esc_html__( 'Card successfully set as default.', 'easy-digital-downloads' ),
- )
- );
- } catch ( \Exception $e ) {
- wp_send_json_error(
- array(
- 'message' => esc_html( $e->getMessage() ),
- )
- );
- }
-}
-add_action( 'wp_ajax_edds_set_payment_method_default', 'edd_stripe_process_card_default' );
-
-/**
- * Process the delete card action from the manage card form.
- *
- * @since 2.6
- * @return void
- */
-function edd_stripe_process_card_delete() {
- $enabled = edd_stripe_existing_cards_enabled();
-
- // Feature not enabled.
- if ( ! $enabled ) {
- wp_send_json_error(
- array(
- 'message' => __( 'This feature is not available at this time.', 'easy-digital-downloads' ),
- )
- );
- }
-
- // Source can't be found.
- $payment_method = isset( $_POST['payment_method'] ) ? sanitize_text_field( $_POST['payment_method'] ) : '';
-
- if ( empty( $payment_method ) ) {
- wp_send_json_error(
- array(
- 'message' => __( 'Error updating card.', 'easy-digital-downloads' ),
- )
- );
- }
-
- // Nonce failed.
- if ( ! edds_verify( 'nonce', $payment_method . '_update' ) ) {
- wp_send_json_error(
- array(
- 'message' => __( 'Error updating card.', 'easy-digital-downloads' ),
- )
- );
- }
-
- // Customer can't be found.
- $stripe_customer_id = edds_get_stripe_customer_id( get_current_user_id() );
-
- if ( empty( $stripe_customer_id ) ) {
- wp_send_json_error(
- array(
- 'message' => __( 'Error updating card.', 'easy-digital-downloads' ),
- )
- );
- }
-
- // Removal is disabled for this card.
- $should_remove = apply_filters(
- 'edd_stripe_should_remove_card',
- array(
- 'remove' => true,
- 'message' => '',
- ),
- $payment_method,
- $stripe_customer_id
- );
-
- if ( ! $should_remove['remove'] ) {
- wp_send_json_error(
- array(
- 'message' => esc_html__( 'This feature is not available at this time.', 'easy-digital-downloads' ),
- )
- );
- }
-
- try {
- // Detach a PaymentMethod.
- if ( 'pm_' === substr( $payment_method, 0, 3 ) ) {
- $payment_method = edds_api_request( 'PaymentMethod', 'retrieve', $payment_method );
- $payment_method->detach();
-
- // Delete a Card.
- } else {
- edds_api_request( 'Customer', 'deleteSource', $stripe_customer_id, $payment_method );
- }
-
- // Retrieve saved cards before checking for default.
- $existing_cards = edd_stripe_get_existing_cards( get_current_user_id() );
- $default_payment_method = edds_customer_get_default_payment_method( get_current_user_id(), $existing_cards );
-
- // If there is no default card, make updated card default.
- if ( null === $default_payment_method && ! empty( $existing_cards ) ) {
- edds_customer_set_default_payment_method( $stripe_customer_id, current( $existing_cards )['source']->id );
- }
-
- wp_send_json_success(
- array(
- 'message' => esc_html__( 'Card successfully removed.', 'easy-digital-downloads' ),
- )
- );
- } catch ( \Exception $e ) {
- wp_send_json_error(
- array(
- 'message' => esc_html( $e->getMessage() ),
- )
- );
- }
-}
-add_action( 'wp_ajax_edds_delete_payment_method', 'edd_stripe_process_card_delete' );
-
-/**
- * Handles adding a new PaymentMethod (via AJAX).
- *
- * @since 2.6
- * @return void
- */
-function edds_add_payment_method() {
- $enabled = edd_stripe_existing_cards_enabled();
-
- // Feature not enabled.
- if ( ! $enabled ) {
- wp_send_json_error(
- array(
- 'message' => __( 'This feature is not available at this time.', 'easy-digital-downloads' ),
- )
- );
- }
-
- if ( edd_stripe()->rate_limiting->has_hit_card_error_limit() ) {
- // Increase the card error count.
- edd_stripe()->rate_limiting->increment_card_error_count();
-
- wp_send_json_error(
- array(
- 'message' => __( 'Unable to update your account at this time, please try again later', 'easy-digital-downloads' ),
- )
- );
- }
-
- // PaymentMethod can't be found.
- $payment_method_id = isset( $_POST['payment_method_id'] ) ? sanitize_text_field( $_POST['payment_method_id'] ) : false;
-
- if ( ! $payment_method_id ) {
- wp_send_json_error(
- array(
- 'message' => __( 'Missing card ID.', 'easy-digital-downloads' ),
- )
- );
- }
-
- // Nonce failed.
- if ( ! edds_verify( 'nonce', 'edd-stripe-add-card' ) ) {
- wp_send_json_error(
- array(
- 'message' => __( 'Error adding card.', 'easy-digital-downloads' ),
- )
- );
- }
-
- $edd_customer = new \EDD_Customer( get_current_user_id(), true );
- if ( 0 === $edd_customer->id ) {
- wp_send_json_error(
- array(
- 'message' => __(
- 'Unable to retrieve customer.',
- 'easy-digital-downloads'
- ),
- )
- );
- }
-
- $stripe_customer_id = edds_get_stripe_customer_id( get_current_user_id() );
-
- $customer_name = '';
- if ( ! empty( $edd_customer->name ) ) {
- $customer_name = $edd_customer->name;
- }
-
- $stripe_customer = edds_get_stripe_customer(
- $stripe_customer_id,
- array(
- 'email' => $edd_customer->email,
- 'description' => $edd_customer->email,
- 'name' => $customer_name,
- )
- );
-
- if ( false === $stripe_customer ) {
- wp_send_json_error(
- array(
- 'message' => __(
- 'Unable to create customer in Stripe.',
- 'easy-digital-downloads'
- ),
- )
- );
- }
-
- // Ensure the EDD Customer is has a link to the most up to date Stripe Customer ID.
- $edd_customer->update_meta( edd_stripe_get_customer_key(), $stripe_customer->id );
-
- try {
- $payment_method = edds_api_request( 'PaymentMethod', 'retrieve', $payment_method_id );
- $payment_method->attach(
- array(
- 'customer' => $stripe_customer->id,
- )
- );
- // Check if customer has default card.
- $existing_cards = edd_stripe_get_existing_cards( get_current_user_id() );
- $default_payment_method = edds_customer_get_default_payment_method( get_current_user_id(), $existing_cards );
- // If there is no default card, make updated card default.
- if ( null === $default_payment_method ) {
- edds_customer_set_default_payment_method( $stripe_customer->id, current( $existing_cards )['source']->id );
- }
-
- wp_send_json_success(
- array(
- 'message' => esc_html__( 'Card successfully added.', 'easy-digital-downloads' ),
- )
- );
- } catch ( \Exception $e ) {
- // Increase the card error count.
- edd_stripe()->rate_limiting->increment_card_error_count();
-
- wp_send_json_error(
- array(
- 'message' => esc_html( $e->getMessage() ),
- )
- );
- }
-}
-add_action( 'wp_ajax_edds_add_payment_method', 'edds_add_payment_method' );
-
-/**
- * Sets default payment method if none.
- *
- * @since 2.8
- * @param string $stripe_customer_id Stripe Customer ID. Usually starts with cus_ .
- * @param string $payment_method_id Stripe Payment ID. Usually starts with pm_ .
- * @return \Stripe\Customer $customer Stripe Customer.
- */
-function edds_customer_set_default_payment_method( $stripe_customer_id, $payment_method_id ) {
- $customer = edds_api_request(
- 'Customer',
- 'update',
- $stripe_customer_id,
- array(
- 'invoice_settings' => array(
- 'default_payment_method' => $payment_method_id,
- ),
- )
- );
- return $customer;
-}
-
-/**
- * Checks if customer has default payment method.
- *
- * @since 2.8
- * @param int $user_id WordPress user ID.
- * @param array $payment_methods Array of payment methods for user, default = false will fetch payment methods.
- * @return null|string Payment Method ID if found, else null
- */
-function edds_customer_get_default_payment_method( $user_id, $payment_methods = false ) {
- // Retrieve saved cards before checking for default.
- if ( false === $payment_methods ) {
- $payment_methods = edd_stripe_get_existing_cards( $user_id );
- }
- $default_payment_method = null;
- if ( count( $payment_methods ) >= 1 ) {
- // Loop through existing cards for default.
- foreach ( $payment_methods as $card ) {
- if ( true === $card['default'] ) {
- $default_payment_method = $card['source']->id;
- break;
- }
- }
- }
- return $default_payment_method;
-}
-
-/**
- * Checks if customer Stripe Customer object exists.
- *
- * @since 2.8
- * @param string $stripe_customer_id Stripe Customer ID. Usually starts with cus_ .
- * @param array $customer_args {
- * Arguments to create a Stripe Customer.
- *
- * @link https://stripe.com/docs/api/customers/create
- * }
- * @return \Stripe\Customer|false $customer Stripe Customer if found or false on error.
- */
-function edds_get_stripe_customer( $stripe_customer_id, $customer_args ) {
- $customer = false;
- if ( ! empty( $stripe_customer_id ) ) {
- try {
- $customer = edds_api_request( 'Customer', 'retrieve', $stripe_customer_id );
- if ( isset( $customer->deleted ) && $customer->deleted ) { // If customer was deleted in Stripe, try to create a new one.
- $customer = edds_create_stripe_customer( $customer_args );
- }
- } catch ( \Stripe\Error\Base $e ) {
- $error_code = $e->getStripeCode();
- if ( 'resource_missing' === $error_code ) { // If Stripe returns an error of 'resource_missing', try to create a new Stripe Customer.
- try {
- $customer = edds_create_stripe_customer( $customer_args );
- } catch ( \Exception $e ) {
- // No further actions to take if something causes error.
- }
- }
- }
- } else {
- try {
- $customer = edds_create_stripe_customer( $customer_args );
- } catch ( \Exception $e ) {
- // No further actions to take if something causes error.
- }
- }
- return $customer;
-}
-
-/**
- * Creates a new Stripe Customer
- *
- * @since 2.8
- * @param array $customer_args {
- * Arguments to create a Stripe Customer.
- *
- * @link https://stripe.com/docs/api/customers/create
- * }
- * @return \Stripe\Customer|false $customer Stripe Customer if one is created or false on error.
- */
-function edds_create_stripe_customer( $customer_args = array() ) {
- /**
- * Filters the arguments used to create a Customer in Stripe.
- *
- * @since unknown
- *
- * @param array $customer_args {
- * Arguments to create a Stripe Customer.
- *
- * @link https://stripe.com/docs/api/customers/create
- * }
- * @param array $purchase_data {
- * Cart purchase data if in the checkout context. Empty otherwise.
- * }
- */
- $customer_args = apply_filters( 'edds_create_customer_args', $customer_args, array() );
- if ( empty( $customer_args['email'] ) || ! is_email( $customer_args['email'] ) ) {
- return false;
- }
- if ( empty( $customer_args['description'] ) ) {
- $customer_args['description'] = $customer_args['email'];
- }
-
- try {
- $customer = edds_api_request( 'Customer', 'create', $customer_args );
- } catch ( \Exception $e ) {
- $customer = false;
- }
-
- return $customer;
-
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/class-edd-stripe-rate-limiting.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/class-edd-stripe-rate-limiting.php
deleted file mode 100644
index 2559c497..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/class-edd-stripe-rate-limiting.php
+++ /dev/null
@@ -1,436 +0,0 @@
-actions();
- $this->filters();
- }
-
- /**
- * Register any actions we need to use.
- *
- * @since 2.6.19
- */
- private function actions() {
-
- // Setup the log file.
- add_action( 'plugins_loaded', array( $this, 'setup_log_file' ), 11 );
-
- // Maybe schedule the cron to clean up the log file.
- add_action( 'init', array( $this, 'schedule_cleanup' ) );
-
- // Hook into the scheduled cleanup.
- add_action( 'edds_cleanup_rate_limiting_log', array( $this, 'cleanup_log' ) );
-
- // Catch any recurring errors as they don't run through the main Stripe extension.
- add_action( 'edd_before_purchase_form', array( $this, 'listen_for_recurring_card_errors' ), 0 );
-
- }
-
- /**
- * Register any filters we need to use.
- *
- * @since 2.6.19
- */
- private function filters() {
-
- // Hide the purchase button if the visitor has hit the limit of errors.
- add_filter( 'edd_checkout_button_purchase', array( $this, 'maybe_hide_purchase_button' ) );
-
- }
-
- /**
- * Schedule a cleanup of the card testing log entries.
- *
- * Runs every hour, and clears any card testing logs that are past expiration.
- *
- * @since 2.8.13
- */
- public function schedule_cleanup() {
- if ( ! wp_next_scheduled( 'edds_cleanup_rate_limiting_log' ) ) {
- wp_schedule_event( time(), 'hourly', 'edds_cleanup_rate_limiting_log' );
- }
- }
-
- /**
- * Process the card testing logs.
- *
- * Loops over the card testing logs, and if an entry is past it's expiration, remove it from the list.
- *
- * @since 2.8.13
- */
- public function cleanup_log() {
- $current_logs = $this->get_decoded_file();
- if ( empty( $current_logs ) ) {
- return;
- }
-
- foreach ( $current_logs as $blocking_id => $entry ) {
- $expiration = ! empty( $entry['timeout'] ) ? $entry['timeout'] : 0;
-
- if ( $expiration < current_time( 'timestamp' ) ) { // @codingStandardsIgnoreLine
- unset( $current_logs[ $blocking_id ] );
- }
- }
-
- $this->write_to_log( $current_logs );
- }
-
- /**
- * Sets up the log file if it is writable
- *
- * @since 2.6.19
- * @return void
- */
- public function setup_log_file() {
-
- $upload_dir = wp_upload_dir();
- $this->filename = wp_hash( home_url( '/' ) ) . '-edd-stripe-rate-limiting.log';
- $this->file = trailingslashit( $upload_dir['basedir'] ) . $this->filename;
-
- if ( ! is_writeable( $upload_dir['basedir'] ) ) {
- $this->is_writable = false;
- }
-
- }
-
- /**
- * Checks if the current session has hit the card error limit.
- *
- * @since 2.6.19
- *
- * @return bool
- */
- public function has_hit_card_error_limit() {
- if ( ! $this->card_error_checks_enabled() ) {
- return false;
- }
-
- $blocking_id = $this->get_card_error_id();
- $entry = $this->get_rate_limiting_entry( $blocking_id );
- $expiration = ! empty( $entry['timeout'] ) ? $entry['timeout'] : 0;
- $card_errors = ! empty( $entry['count'] ) ? $entry['count'] : 0;
-
- if ( $expiration < current_time( 'timestamp' ) ) { // @codingStandardsIgnoreLine
- $this->remove_log_entry( $this->get_card_error_id() );
- return false;
- }
-
- $max_error_count = 5;
-
- /**
- * Filters the number of times checkout errors can occur before blocking future attempts.
- *
- * @since 2.6.19
- *
- * @param bool $max_error_count The maximum failed checkouts before blocking future attempts. Default 5.
- */
- $max_error_count = apply_filters( 'edds_max_card_error_count', $max_error_count );
-
- return $max_error_count <= $card_errors;
- }
-
- /**
- * Remove an entry from the rate limiting log.
- *
- * @since 2.6.19
- *
- * @param string $blocking_id The blocking ID for the rate limiting.
- */
- public function remove_log_entry( $blocking_id = '' ) {
- $current_logs = $this->get_decoded_file();
- unset( $current_logs[ $blocking_id ] );
-
- $this->write_to_log( $current_logs );
- }
-
- /**
- * Get a specific entry from the rate limiting log.
- *
- * @since 2.6.19
- *
- * @param string $blocking_id The blocking ID to get the entry for.
- *
- * @return array
- */
- public function get_rate_limiting_entry( $blocking_id = '' ) {
- $current_logs = $this->get_decoded_file();
- $entry = array();
-
- if ( array_key_exists( $blocking_id, $current_logs ) ) {
- $entry = $current_logs[ $blocking_id ];
- }
-
- return $entry;
- }
-
-
- /**
- * Retrieves the number of times an IP address has generated card errors.
- *
- * @since 2.6.19
- *
- * @return int
- */
- public function get_card_error_count() {
- $blocking_id = $this->get_card_error_id();
- $count = 0;
-
- $current_blocks = $this->get_decoded_file();
- if ( array_key_exists( $blocking_id, $current_blocks ) ) {
- $count = $current_blocks[ $blocking_id ]['count'];
- }
-
- return $count;
- }
-
- /**
- * Increments the Stripe card error counter.
- *
- * @since 2.6.19
- *
- * @return int
- */
- public function increment_card_error_count() {
- $current_count = $this->get_card_error_count();
- $blocking_id = $this->get_card_error_id();
-
- if ( empty( $current_count ) ) {
- $current_count = 1;
- } else {
- $current_count++;
- }
-
- $this->update_rate_limiting_count( $blocking_id, $current_count );
-
- return absint( $current_count );
- }
-
- /**
- * Update an entry in the rate limiting array.
- *
- * @since 2.6.19
- *
- * @param string $blocking_id The blocking ID.
- * @param int $current_count The count to update to.
- */
- protected function update_rate_limiting_count( $blocking_id = '', $current_count = 0 ) {
-
- $expiration_in_seconds = HOUR_IN_SECONDS;
-
- /**
- * Filters the length of time before checkout card error counts are reset.
- *
- * @since 2.6.19
- *
- * @param int $expiration_in_seconds The length in seconds before card error counts are reset. Default 60.
- */
- $expiration_in_seconds = apply_filters( 'edds_card_error_timeout', $expiration_in_seconds );
-
- $current_log = $this->get_decoded_file();
-
- $current_log[ $blocking_id ]['count'] = $current_count;
- $current_log[ $blocking_id ]['timeout'] = current_time( 'timestamp' ) + $expiration_in_seconds; // @codingStandardsIgnoreLine
-
- $this->write_to_log( $current_log );
-
- }
-
- /**
- * Determines if we should check for Stripe card errors and track them.
- *
- * @since 2.6.19
- *
- * @return bool
- */
- public function card_error_checks_enabled() {
- $checks_enabled = true;
-
- /**
- * Filters if card errors should be checked and tracked during checkout.
- *
- * @since 2.6.19
- *
- * @param bool $checks_enabled Enables or disables card error checking on checkout. Default true.
- */
- $checks_enabled = apply_filters( 'edds_card_error_checking_enabled', true );
-
- return true === $checks_enabled;
- }
-
- /**
- * Generates the card error tracking ID.
- *
- * ID is the IP address of the visitor. Prepends the value with `edds_card_errors_` for use with the transient system.
- * Uses IP tracking in an attempt to mitigate the amount of bogus WordPress user accounts being created.
- *
- * @since 2.6.19
- * @since 2.8.13 Try and use the __stripe_sid cookie before relying on IP.
- *
- * @return string
- */
- public function get_card_error_id() {
- return isset( $_COOKIE['__stripe_sid'] ) ? $_COOKIE['__stripe_sid'] : edd_get_ip();
- }
-
- /**
- * Determines if we should hide the purchase button.
- *
- * When someone has hit the card error limit, the purchase button is hidden.
- *
- * @since 2.6.19
- *
- * @param string $purchase_button_markup The markup for the purchase button.
- *
- * @return string
- */
- public function maybe_hide_purchase_button( $purchase_button_markup = '' ) {
- if ( $this->has_hit_card_error_limit() ) {
- $purchase_button_markup = '';
- }
-
- return $purchase_button_markup;
-
- }
-
- /**
- * When the purchase form errors are displayed, see if any were related to Stripe failures and increase the card error
- * counter.
- *
- * @since 2.6.19
- */
- public function listen_for_recurring_card_errors() {
-
- // Get all of our EDD errors.
- $errors = edd_get_errors();
-
- // If any of our errors are Stripe card errors from recurring, increment the card error counter.
- if ( isset( $errors['edd_recurring_stripe_error'] ) && ! empty( $errors['edd_recurring_stripe_error'] ) ) {
- $this->increment_card_error_count();
- }
-
- }
-
- /**
- * Retrieve the log data
- *
- * @since 2.6.19
- * @return string
- */
- protected function get_file_contents() {
- return $this->get_file();
- }
-
- /**
- * Get the decoded array of rate limiting from the log file.
- *
- * @since 2.6.19
- *
- * @return array
- */
- protected function get_decoded_file() {
- $decoded_contents = json_decode( $this->get_file_contents(), true );
- if ( is_null( $decoded_contents ) ) {
- $decoded_contents = array();
- }
-
- return (array) $decoded_contents;
- }
-
- /**
- * Retrieve the file data is written to
- *
- * @since 2.6.19
- * @return string
- */
- protected function get_file() {
-
- $file = json_encode( array() );
-
- if ( @file_exists( $this->file ) ) {
-
- if ( ! is_writeable( $this->file ) ) {
- $this->is_writable = false;
- }
-
- $file = @file_get_contents( $this->file );
- } else {
- @file_put_contents( $this->file, $file ); // @codingStandardsIgnoreLine
- @chmod( $this->file, 0664 ); // @codingStandardsIgnoreLine
- }
-
- return $file;
- }
-
- /**
- * Write the log message
- *
- * @since 2.6.19
- *
- * @param array $content The content of the rate limiting.
- *
- * @return void
- */
- public function write_to_log( $content = array() ) {
- if ( count( $content ) > 200 ) {
- // Reduce the max number of identifiers to 200.
- $content = array_slice( $content, -200 );
- }
-
- $content = json_encode( $content );
-
- if ( $this->is_writable ) {
- @file_put_contents( $this->file, $content ); // @codingStandardsIgnoreLine
- }
- }
-
- /**
- * Get the error message to display when the card error limit has been hit.
- *
- * @since 2.9.2.2
- * @return string The error message.
- */
- public function get_rate_limit_error_message() {
- return esc_html__(
- 'We are unable to process your payment at this time, please try again later or contact support.',
- 'easy-digital-downloads'
- );
- }
-
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/class-edd-stripe.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/class-edd-stripe.php
deleted file mode 100644
index 0e7082de..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/class-edd-stripe.php
+++ /dev/null
@@ -1,343 +0,0 @@
-includes();
- self::$instance->setup_classes();
- self::$instance->actions();
- self::$instance->filters();
- }
-
- return self::$instance;
- }
-
- /**
- * Includes files.
- *
- * @since 2.6.0
- */
- private function includes() {
- if ( ! class_exists( 'Stripe\Stripe' ) ) {
- require_once EDDS_PLUGIN_DIR . '/vendor/autoload.php';
- }
-
- require_once EDDS_PLUGIN_DIR . '/includes/functions.php';
- require_once EDDS_PLUGIN_DIR . '/includes/class-stripe-api.php';
-
- // We need this one to load early so we can use it in the upcoming includes.
- require_once EDDS_PLUGIN_DIR . '/includes/elements/functions.php';
- $elements_mode = edds_get_elements_mode();
-
- require_once EDDS_PLUGIN_DIR . '/includes/utils/exceptions/class-stripe-api-unmet-requirements.php';
- require_once EDDS_PLUGIN_DIR . '/includes/utils/exceptions/class-attribute-not-found.php';
- require_once EDDS_PLUGIN_DIR . '/includes/utils/exceptions/class-stripe-object-not-found.php';
- require_once EDDS_PLUGIN_DIR . '/includes/utils/exceptions/class-gateway-exception.php';
- require_once EDDS_PLUGIN_DIR . '/includes/utils/interface-static-registry.php';
- require_once EDDS_PLUGIN_DIR . '/includes/utils/class-registry.php';
- require_once EDDS_PLUGIN_DIR . '/includes/utils/modal.php';
-
- require_once EDDS_PLUGIN_DIR . '/includes/deprecated.php';
- require_once EDDS_PLUGIN_DIR . '/includes/compat.php';
- require_once EDDS_PLUGIN_DIR . '/includes/i18n.php';
- require_once EDDS_PLUGIN_DIR . '/includes/emails.php';
- require_once EDDS_PLUGIN_DIR . '/includes/payment-receipt.php';
- require_once EDDS_PLUGIN_DIR . '/includes/card-actions.php';
- require_once EDDS_PLUGIN_DIR . '/includes/gateway-actions.php';
- require_once EDDS_PLUGIN_DIR . '/includes/gateway-filters.php';
-
- // Payment Actions, separated by elements type.
- require_once EDDS_PLUGIN_DIR . '/includes/payment-actions/functions.php';
- switch ( $elements_mode ) {
- case 'card-elements':
- require_once EDDS_PLUGIN_DIR . '/includes/payment-actions/card-elements-actions.php';
- break;
-
- case 'payment-elements':
- require_once EDDS_PLUGIN_DIR . '/includes/payment-actions/payment-elements-actions.php';
- break;
- }
-
- require_once EDDS_PLUGIN_DIR . '/includes/webhooks.php';
- require_once EDDS_PLUGIN_DIR . '/includes/scripts.php';
- require_once EDDS_PLUGIN_DIR . '/includes/template-functions.php';
- require_once EDDS_PLUGIN_DIR . '/includes/class-edd-stripe-rate-limiting.php';
-
- // Load Apple Pay functions.
- require_once EDDS_PLUGIN_DIR . '/includes/payment-methods/apple-pay.php';
-
- // Stripe Elements, separated by elements type.
- switch ( $elements_mode ) {
- case 'card-elements':
- require_once EDDS_PLUGIN_DIR . '/includes/elements/card-elements.php';
- require_once EDDS_PLUGIN_DIR . '/includes/payment-methods/payment-request/index.php';
- break;
-
- case 'payment-elements':
- require_once EDDS_PLUGIN_DIR . '/includes/elements/payment-elements.php';
- break;
- }
-
- // Payment Methods.
- require_once EDDS_PLUGIN_DIR . '/includes/payment-methods/buy-now/index.php';
-
- if ( is_admin() ) {
- require_once EDDS_PLUGIN_DIR . '/includes/admin/class-notices-registry.php';
- require_once EDDS_PLUGIN_DIR . '/includes/admin/class-notices.php';
- require_once EDDS_PLUGIN_DIR . '/includes/admin/notices.php';
-
- require_once EDDS_PLUGIN_DIR . '/includes/admin/admin-actions.php';
- require_once EDDS_PLUGIN_DIR . '/includes/admin/admin-filters.php';
- require_once EDDS_PLUGIN_DIR . '/includes/admin/settings/stripe-connect.php';
- require_once EDDS_PLUGIN_DIR . '/includes/admin/settings.php';
- require_once EDDS_PLUGIN_DIR . '/includes/admin/upgrade-functions.php';
- require_once EDDS_PLUGIN_DIR . '/includes/admin/site-health.php';
- }
-
- if ( defined( 'WP_CLI' ) && WP_CLI ) {
- require_once EDDS_PLUGIN_DIR . '/includes/integrations/wp-cli.php';
- }
-
- if ( defined( 'EDD_ALL_ACCESS_VER' ) && EDD_ALL_ACCESS_VER ) {
- require_once EDDS_PLUGIN_DIR . '/includes/integrations/edd-all-access.php';
- }
-
- if ( class_exists( 'EDD_Auto_Register' ) ) {
- require_once EDDS_PLUGIN_DIR . '/includes/integrations/edd-auto-register.php';
- }
-
- // Load Regional Support.
- $this->load_regional_support();
-
- // Pro.
- $pro = EDDS_PLUGIN_DIR . '/includes/pro/index.php';
-
- if ( file_exists( $pro ) ) {
- require_once $pro;
- }
- }
-
- /**
- * Applies various hooks.
- *
- * @since 2.6.0
- */
- private function actions() {
- add_action( 'init', array( self::$instance, 'load_textdomain' ) );
- add_action( 'admin_init', array( self::$instance, 'database_upgrades' ) );
- }
-
- /**
- * Applies various filters.
- *
- * @since 2.6.0
- */
- private function filters() {
- add_filter( 'edd_payment_gateways', array( self::$instance, 'register_gateway' ) );
- }
-
- /**
- * Configures core components.
- *
- * @since 2.6.19
- */
- private function setup_classes() {
- $this->rate_limiting = new EDD_Stripe_Rate_Limiting();
- }
-
- /**
- * Gets the Stripe Connect utility class.
- *
- * @since 2.9.3
- */
- public function connect() {
- if ( ! is_null( $this->connect ) ) {
- return $this->connect;
- }
- require_once EDDS_PLUGIN_DIR . '/includes/class-stripe-connect.php';
- $this->connect = new EDD\Stripe\Connect();
-
- return $this->connect;
- }
-
- /**
- * Performs database upgrades.
- *
- * @since 2.6.0
- */
- public function database_upgrades() {
- $did_upgrade = false;
- $version = get_option( 'edds_stripe_version' );
-
- if ( ! $version || version_compare( $version, EDD_STRIPE_VERSION, '<' ) ) {
- $did_upgrade = true;
-
- switch ( EDD_STRIPE_VERSION ) {
- case '2.5.8' :
- edd_update_option( 'stripe_checkout_remember', true );
- break;
- case '2.8.0':
- edd_update_option( 'stripe_allow_prepaid', true );
- break;
- }
-
- }
-
- if ( $did_upgrade ) {
- update_option( 'edds_stripe_version', EDD_STRIPE_VERSION );
- }
- }
-
- /**
- * Loads the plugin text domain.
- *
- * @since 2.6.0
- */
- public function load_textdomain() {
- // Set filter for language directory
- $lang_dir = EDDS_PLUGIN_DIR . '/languages/';
-
- // Traditional WordPress plugin locale filter
- $locale = apply_filters( 'plugin_locale', get_locale(), 'edds' );
- $mofile = sprintf( '%1$s-%2$s.mo', 'edds', $locale );
-
- // Setup paths to current locale file
- $mofile_local = $lang_dir . $mofile;
- $mofile_global = WP_LANG_DIR . '/edd-stripe/' . $mofile;
-
- // Look in global /wp-content/languages/edd-stripe/ folder
- if( file_exists( $mofile_global ) ) {
- load_textdomain( 'edds', $mofile_global );
-
- // Look in local /wp-content/plugins/edd-stripe/languages/ folder
- } elseif( file_exists( $mofile_local ) ) {
- load_textdomain( 'edds', $mofile_local );
-
- } else {
- // Load the default language files
- load_plugin_textdomain( 'edds', false, $lang_dir );
- }
- }
-
- /**
- * Registers the gateway.
- *
- * @param array $gateways Payment gateways.
- * @return array
- */
- public function register_gateway( $gateways ) {
- // Format: ID => Name.
- $gateways['stripe'] = array(
- 'admin_label' => 'Stripe',
- 'checkout_label' => __( 'Credit Card', 'easy-digital-downloads' ),
- 'supports' => array(
- 'buy_now',
- ),
- 'icons' => array(
- 'mastercard',
- 'visa',
- 'discover',
- 'americanexpress',
- ),
- );
-
- return $gateways;
- }
-
- /**
- * Loads regional support.
- *
- * @since 2.9.2.2
- */
- private function load_regional_support() {
-
- $base_country = edd_get_option( 'base_country', 'US' );
- $regions_needing_support = array( 'IN' );
- if ( ! in_array( $base_country, $regions_needing_support, true ) ) {
- return;
- }
-
- $possible_region_file = 'class-edd-stripe-region-' . strtolower( $base_country ) . '.php';
- $possible_region_path = EDDS_PLUGIN_DIR . 'includes/utils/regional-support/' . $possible_region_file;
- if ( ! file_exists( $possible_region_path ) ) {
- return;
- }
-
- // Regional Support is needed.
- require_once EDDS_PLUGIN_DIR . 'includes/utils/regional-support/class-edd-stripe-region-base.php';
- require_once $possible_region_path;
- $possible_region_class = 'EDD_Stripe_Region_' . strtoupper( $base_country );
- if ( class_exists( $possible_region_class ) ) {
- $this->has_regional_support = true;
- require_once EDDS_PLUGIN_DIR . 'includes/utils/regional-support/' . $possible_region_file;
- $this->regional_support = new $possible_region_class();
- }
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/class-stripe-api.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/class-stripe-api.php
deleted file mode 100644
index 2b72aa4f..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/class-stripe-api.php
+++ /dev/null
@@ -1,139 +0,0 @@
-is_connected = ! empty( $this->get_connect_id() );
- }
-
- /**
- * Gets the connect ID.
- *
- * @return string|false
- */
- public function get_connect_id() {
- return edd_get_option( 'stripe_connect_account_id', false );
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/compat.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/compat.php
deleted file mode 100644
index 49105228..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/compat.php
+++ /dev/null
@@ -1,451 +0,0 @@
- $error_message ) {
- edd_set_error( $error_id, $error_message );
- }
- }
-}
-
-/**
- * A rewritten version of `edds_get_purchase_form_user()` that can be run during AJAX.
- *
- * @since 2.7.0
- *
- * @return array
- */
-function _edds_get_purchase_form_user( $valid_data = array() ) {
- // Initialize user
- $user = false;
-
- if ( is_user_logged_in() ) {
-
- // Set the valid user as the logged in collected data.
- $user = $valid_data['logged_in_user'];
-
- } elseif ( true === $valid_data['need_new_user'] || true === $valid_data['need_user_login'] ) {
-
- // Ensure $_COOKIE is available without a new HTTP request.
- add_action( 'set_logged_in_cookie', 'edds_set_logged_in_cookie_global' );
-
- // New user registration.
- if ( true === $valid_data['need_new_user'] ) {
-
- // Set user.
- $user = $valid_data['new_user_data'];
-
- // Register and login new user.
- $user['user_id'] = edd_register_and_login_new_user( $user );
-
- } elseif ( true === $valid_data['need_user_login'] ) { // User login.
-
- /*
- * The login form is now processed in the edd_process_purchase_login() function.
- * This is still here for backwards compatibility.
- * This also allows the old login process to still work if a user removes the
- * checkout login submit button.
- *
- * This also ensures that the customer is logged in correctly if they click "Purchase"
- * instead of submitting the login form, meaning the customer is logged in during the purchase process.
- */
-
- // Set user.
- $user = $valid_data['login_user_data'];
-
- // Login user.
- if ( empty( $user ) || -1 === $user['user_id'] ) {
- edd_set_error( 'invalid_user', __( 'The user information is invalid', 'easy-digital-downloads' ) );
- return false;
- } else {
- edd_log_user_in( $user['user_id'], $user['user_login'], $user['user_pass'] );
- }
- }
-
- remove_action( 'set_logged_in_cookie', 'edds_set_logged_in_cookie_global' );
- }
-
- // Check guest checkout.
- if ( false === $user && false === edd_no_guest_checkout() ) {
- // Set user.
- $user = $valid_data['guest_user_data'];
- }
-
- // Verify we have an user.
- if ( false === $user || empty( $user ) ) {
- return false;
- }
-
- // Get user first name.
- if ( ! isset( $user['user_first'] ) || strlen( trim( $user['user_first'] ) ) < 1 ) {
- $user['user_first'] = isset( $_POST["edd_first"] ) ? strip_tags( trim( $_POST["edd_first"] ) ) : '';
- }
-
- // Get user last name.
- if ( ! isset( $user['user_last'] ) || strlen( trim( $user['user_last'] ) ) < 1 ) {
- $user['user_last'] = isset( $_POST["edd_last"] ) ? strip_tags( trim( $_POST["edd_last"] ) ) : '';
- }
-
- // Get the user's billing address details.
- $user['address'] = array();
- $user['address']['line1'] = ! empty( $_POST['card_address'] ) ? sanitize_text_field( $_POST['card_address'] ) : '';
- $user['address']['line2'] = ! empty( $_POST['card_address_2'] ) ? sanitize_text_field( $_POST['card_address_2'] ) : '';
- $user['address']['city'] = ! empty( $_POST['card_city'] ) ? sanitize_text_field( $_POST['card_city'] ) : '';
- $user['address']['state'] = ! empty( $_POST['card_state'] ) ? sanitize_text_field( $_POST['card_state'] ) : '';
- $user['address']['country'] = ! empty( $_POST['billing_country'] ) ? sanitize_text_field( $_POST['billing_country'] ) : '';
- $user['address']['zip'] = ! empty( $_POST['card_zip'] ) ? sanitize_text_field( $_POST['card_zip'] ) : '';
-
- if ( empty( $user['address']['country'] ) ) {
- $user['address'] = false; // Country will always be set if address fields are present.
- }
-
- if ( ! empty( $user['user_id'] ) && $user['user_id'] > 0 && ! empty( $user['address'] ) ) {
- $customer = edd_get_customer_by( 'user_id', $user['user_id'] );
- if ( $customer ) {
- edd_maybe_add_customer_address( $customer->id, $user['address'] );
- }
- }
-
- // Return valid user.
- return $user;
-}
-
-/**
- * A rewritten version of `edd_process_purchase_form()` that allows for full AJAX processing.
- *
- * `edd_process_purchase_form()` is run up until:
- *
- * if ( $is_ajax ) {
- * echo 'success';
- * edd_die();
- * }
- *
- * Then this function is called which reruns the start of `edd_process_purchase_form()` and
- * continues the rest of the processing.
- *
- * @link https://github.com/easydigitaldownloads/easy-digital-downloads/blob/master/includes/process-purchase.php
- *
- * @since 2.7.0
- */
-function _edds_process_purchase_form() {
- // Unset any Errors so they aren't left over form other attempts.
- edd_clear_errors();
-
- // Catch exceptions at a high level.
- try {
- // `edd_process_purchase_form()` and subsequent code executions are written
- // expecting form processing to happen via a POST request from a client form.
- //
- // This version is called from an AJAX POST request, so the form data is sent
- // in a serialized string to ensure all fields are available.
- //
- // Map and merge formData to $_POST so it's accessible in other functions.
- parse_str( $_POST['form_data'], $form_data );
- $_POST = array_merge( $_POST, $form_data );
- $_REQUEST = array_merge( $_REQUEST, $_POST );
-
- /*
- * Reset the tax rate so that it will be recalculated correctly.
- * This is only needed on EDD 3.0+.
- */
- if ( method_exists( EDD()->cart, 'set_tax_rate' ) ) {
- EDD()->cart->set_tax_rate( null );
- }
-
- /**
- * @since unknown
- * @todo document
- */
- do_action( 'edd_pre_process_purchase' );
-
- // Make sure the cart isn't empty.
- if ( empty( EDD()->cart->contents ) && empty( EDD()->cart->fees) ) {
- throw new \Exception( esc_html__( 'Your cart is empty.', 'easy-digital-downloads' ) );
- }
-
- if ( ! isset( $_POST['edd-process-checkout-nonce'] ) ) {
- edd_debug_log( __( 'Missing nonce when processing checkout. Please read the following for more information: https://easydigitaldownloads.com/development/2018/07/05/important-update-to-ajax-requests-in-easy-digital-downloads-2-9-4', 'easy-digital-downloads' ), true );
- }
-
- // Verify the checkout session only.
- if ( false === edds_verify() ) {
- throw new \Exception( esc_html__( 'Error processing purchase. Please reload the page and try again.', 'easy-digital-downloads' ) );
- }
-
- // Validate the form $_POST data.
- $valid_data = edd_purchase_form_validate_fields();
-
- // Allow themes and plugins to hook to errors.
- //
- // In the future these should throw exceptions, existing `edd_set_error()` usage will be caught below.
- do_action( 'edd_checkout_error_checks', $valid_data, $_POST );
-
- // Validate the user.
- $user = _edds_get_purchase_form_user( $valid_data );
-
- // Let extensions validate fields after user is logged in if user has used login/registration form
- do_action( 'edd_checkout_user_error_checks', $user, $valid_data, $_POST );
-
- if ( false === $valid_data || edd_get_errors() || ! $user ) {
- $errors = edd_get_errors();
-
- if ( is_array( $errors ) ) {
- throw new \Exception( current( $errors ) );
- }
- }
-
- // Setup user information.
- $user_info = array(
- 'id' => $user['user_id'],
- 'email' => $user['user_email'],
- 'first_name' => $user['user_first'],
- 'last_name' => $user['user_last'],
- 'discount' => $valid_data['discount'],
- 'address' => ! empty( $user['address'] ) ? $user['address'] : array(),
- );
-
- // Update a customer record if they have added/updated information.
- $customer = new EDD_Customer( $user_info['email'] );
-
- $name = $user_info['first_name'] . ' ' . $user_info['last_name'];
-
- if ( empty( $customer->name ) || $name != $customer->name ) {
- $update_data = array(
- 'name' => $name
- );
-
- // Update the customer's name and update the user record too.
- $customer->update( $update_data );
-
- wp_update_user( array(
- 'ID' => get_current_user_id(),
- 'first_name' => $user_info['first_name'],
- 'last_name' => $user_info['last_name']
- ) );
- }
-
- // Update the customer's address if different to what's in the database
- $address = wp_parse_args( $user_info['address'], array(
- 'line1' => '',
- 'line2' => '',
- 'city' => '',
- 'state' => '',
- 'country' => '',
- 'zip' => '',
- ) );
-
- $address = array(
- 'address' => $address['line1'],
- 'address2' => $address['line2'],
- 'city' => $address['city'],
- 'region' => $address['state'],
- 'country' => $address['country'],
- 'postal_code' => $address['zip'],
- );
-
- if ( ! empty( $user['user_id'] ) && $user['user_id'] > 0 && ! empty( $address ) ) {
- $customer = edd_get_customer_by( 'user_id', $user['user_id'] );
- if ( $customer ) {
- edd_maybe_add_customer_address( $customer->id, $user['address'] );
- }
- }
-
- $auth_key = defined( 'AUTH_KEY' ) ? AUTH_KEY : '';
-
- $card_country = isset( $valid_data['cc_info']['card_country'] ) ? $valid_data['cc_info']['card_country'] : false;
- $card_state = isset( $valid_data['cc_info']['card_state'] ) ? $valid_data['cc_info']['card_state'] : false;
- $card_zip = isset( $valid_data['cc_info']['card_zip'] ) ? $valid_data['cc_info']['card_zip'] : false;
-
- // Set up the unique purchase key. If we are resuming a payment, we'll overwrite this with the existing key.
- $purchase_key = strtolower( md5( $user['user_email'] . date( 'Y-m-d H:i:s' ) . $auth_key . uniqid( 'edd', true ) ) );
- $existing_payment = EDD()->session->get( 'edd_resume_payment' );
-
- if ( ! empty( $existing_payment ) ) {
- $payment = new EDD_Payment( $existing_payment );
-
- if( $payment->is_recoverable() && ! empty( $payment->key ) ) {
- $purchase_key = $payment->key;
- }
- }
-
- // Setup purchase information.
- $purchase_data = array(
- 'downloads' => edd_get_cart_contents(),
- 'fees' => edd_get_cart_fees(), // Any arbitrary fees that have been added to the cart
- 'subtotal' => edd_get_cart_subtotal(), // Amount before taxes and discounts
- 'discount' => edd_get_cart_discounted_amount(), // Discounted amount
- 'tax' => edd_get_cart_tax(), // Taxed amount
- 'tax_rate' => edd_use_taxes() ? edd_get_cart_tax_rate( $card_country, $card_state, $card_zip ) : 0, // Tax rate
- 'price' => edd_get_cart_total(), // Amount after taxes
- 'purchase_key' => $purchase_key,
- 'user_email' => $user['user_email'],
- 'date' => date( 'Y-m-d H:i:s', current_time( 'timestamp' ) ),
- 'user_info' => stripslashes_deep( $user_info ),
- 'post_data' => $_POST,
- 'cart_details' => edd_get_cart_content_details(),
- 'gateway' => $valid_data['gateway'],
- 'card_info' => $valid_data['cc_info']
- );
-
- // Add the user data for hooks
- $valid_data['user'] = $user;
-
- // Allow themes and plugins to hook before the gateway
- do_action( 'edd_checkout_before_gateway', $_POST, $user_info, $valid_data );
-
- // Store payment method data.
- $purchase_data['gateway_nonce'] = wp_create_nonce( 'edd-gateway' );
-
- // Allow the purchase data to be modified before it is sent to the gateway
- $purchase_data = apply_filters(
- 'edd_purchase_data_before_gateway',
- $purchase_data,
- $valid_data
- );
-
- // Setup the data we're storing in the purchase session
- $session_data = $purchase_data;
-
- // Used for showing download links to non logged-in users after purchase, and for other plugins needing purchase data.
- edd_set_purchase_session( $session_data );
-
- /**
- * Allows further processing...
- */
- do_action( 'edd_gateway_' . $purchase_data['gateway'], $purchase_data );
- } catch( \Exception $e ) {
- return wp_send_json_error( array(
- 'message' => $e->getMessage(),
- ) );
- }
-}
-add_action( 'wp_ajax_edds_process_purchase_form', '_edds_process_purchase_form' );
-add_action( 'wp_ajax_nopriv_edds_process_purchase_form', '_edds_process_purchase_form' );
-
-
-/**
- * WordPress core function polyfill for WordPress 5.4.
- *
- * @since 2.9.0
- */
-if ( ! function_exists( 'wp_get_environment_type' ) ) {
- /**
- * Retrieves the current environment type.
- *
- * The type can be set via the `WP_ENVIRONMENT_TYPE` global system variable,
- * or a constant of the same name.
- *
- * Possible values are 'local', 'development', 'staging', and 'production'.
- * If not set, the type defaults to 'production'.
- *
- * @return string The current environment type.
- */
- function wp_get_environment_type() {
- static $current_env = '';
-
- if ( ! defined( 'WP_RUN_CORE_TESTS' ) && $current_env ) {
- return $current_env;
- }
-
- $wp_environments = array(
- 'local',
- 'development',
- 'staging',
- 'production',
- );
-
- // Add a note about the deprecated WP_ENVIRONMENT_TYPES constant.
- if ( defined( 'WP_ENVIRONMENT_TYPES' ) && function_exists( '_deprecated_argument' ) ) {
- if ( function_exists( '__' ) ) {
- /* translators: %s: WP_ENVIRONMENT_TYPES */
- $message = sprintf( __( 'The %s constant is no longer supported.' ), 'WP_ENVIRONMENT_TYPES' );
- } else {
- $message = sprintf( 'The %s constant is no longer supported.', 'WP_ENVIRONMENT_TYPES' );
- }
-
- _deprecated_argument(
- 'define()',
- '5.5.1',
- $message
- );
- }
-
- // Check if the environment variable has been set, if `getenv` is available on the system.
- if ( function_exists( 'getenv' ) ) {
- $has_env = getenv( 'WP_ENVIRONMENT_TYPE' );
- if ( false !== $has_env ) {
- $current_env = $has_env;
- }
- }
-
- // Fetch the environment from a constant, this overrides the global system variable.
- if ( defined( 'WP_ENVIRONMENT_TYPE' ) && WP_ENVIRONMENT_TYPE ) {
- $current_env = WP_ENVIRONMENT_TYPE;
- }
-
- // Make sure the environment is an allowed one, and not accidentally set to an invalid value.
- if ( ! in_array( $current_env, $wp_environments, true ) ) {
- $current_env = 'production';
- }
-
- return $current_env;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/deprecated.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/deprecated.php
deleted file mode 100644
index 82c34b99..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/deprecated.php
+++ /dev/null
@@ -1,180 +0,0 @@
-database_upgrades();
-}
-
-/**
- * Internationalization
- *
- * @since 1.6.6
- * @return void
- */
-function edds_textdomain() {
- _edd_deprecated_function(
- __FUNCTION__,
- '2.8.1',
- null,
- debug_backtrace()
- );
-
- edd_stripe()->load_textdomain();
-}
-
-/**
- * Register our payment gateway
- *
- * @since 1.0
- * @return array
- */
-function edds_register_gateway( $gateways ) {
- _edd_deprecated_function(
- __FUNCTION__,
- '2.8.1',
- null,
- debug_backtrace()
- );
-
- return edd_stripe()->register_gateway( $gateways );
-}
-
-/**
- * Process refund in Stripe, in EDD 2.x
- * For EDD 3.0, see `edd_stripe_maybe_refund_charge()`
- * @see edd_stripe_maybe_refund_charge()
- *
- * @access public
- * @since 1.8
- * @deprecated 2.9.0
- * @return void
- */
-function edd_stripe_process_refund( $payment_id, $new_status, $old_status ) {
- _edd_deprecated_function(
- __FUNCTION__,
- '2.9.0',
- 'edd_stripe_maybe_refund_charge',
- debug_backtrace()
- );
-}
-
-/**
- * Load our admin javascript
- *
- * @access public
- * @since 1.8
- * @deprecated 2.9.0 - Deprecated as 2.9.0 requires EDD 3.1+
- * @return void
- */
-function edd_stripe_admin_js( $payment_id = 0 ) {
- /**
- * Since Stripe 2.9.0 requires EDD 3.1, we no longer need to load this.
- */
- _edd_deprecated_function(
- __FUNCTION__,
- '2.9.0',
- null,
- debug_backtrace()
- );
-}
-
-/**
- * Display the payment status filters
- *
- * @since 1.6
- * @deprecated 2.9.0
- * @param array $views The array of views for the payments/orders table.
- * @return array
- */
-function edds_payment_status_filters( $views ) {
- _edd_deprecated_function(
- __FUNCTION__,
- '2.9.0',
- null,
- debug_backtrace()
- );
-}
-
-
-/**
- * Renamed Apple Pay functions after we removed "prb" from them.
- *
- * Most of these were used internally only, and were hooked into display notices.
- * No real documetnation is needed here.
- */
-function edds_prb_apple_pay_admin_notices_register() {
- _edd_deprecated_function( __FUNCTION__, '2.9.1', 'edds_apple_pay_admin_notices_register' );
- return edds_apple_pay_admin_notices_register();
-}
-
-function edds_prb_apple_pay_get_fileinfo() {
- _edd_deprecated_function( __FUNCTION__, '2.9.1', 'edds_apple_pay_get_fileinfo' );
- return edds_apple_pay_get_fileinfo();
-}
-
-function edds_prb_apple_pay_is_valid() {
- _edd_deprecated_function( __FUNCTION__, '2.9.1', 'edds_apple_pay_is_valid' );
- return edds_apple_pay_is_valid();
-}
-
-function edds_prb_apple_pay_has_domain_verification_file() {
- _edd_deprecated_function( __FUNCTION__, '2.9.1', 'edds_apple_pay_has_domain_verification_file' );
- return edds_apple_pay_has_domain_verification_file();
-}
-
-function edds_prb_apple_pay_has_domain_verification() {
- _edd_deprecated_function( __FUNCTION__, '2.9.1', 'edds_apple_pay_has_domain_verification' );
- return edds_apple_pay_has_domain_verification();
-}
-
-function edds_prb_apple_pay_create_directory_and_move_file() {
- _edd_deprecated_function( __FUNCTION__, '2.9.1', 'edds_apple_pay_create_directory_and_move_file' );
- edds_apple_pay_create_directory_and_move_file();
-}
-
-function edds_prb_apple_pay_check_domain() {
- _edd_deprecated_function( __FUNCTION__, '2.9.1', 'edds_apple_pay_check_domain' );
- edds_apple_pay_check_domain();
-}
-
-function edds_prb_apple_pay_verify_domain() {
- _edd_deprecated_function( __FUNCTION__, '2.9.1', 'edds_apple_pay_verify_domain' );
- edds_apple_pay_verify_domain();
-}
-
-function edds_prb_apple_pay_admin_notices_print() {
- _edd_deprecated_function( __FUNCTION__, '2.9.1', 'edds_apple_pay_admin_notices_print' );
- edds_apple_pay_admin_notices_print();
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/elements/card-elements.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/elements/card-elements.php
deleted file mode 100644
index 273e7308..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/elements/card-elements.php
+++ /dev/null
@@ -1,102 +0,0 @@
- true,
- 'i18n' => array(
- 'errorMessages' => edds_get_localized_error_messages(),
- ),
- );
- $elements_styles = edds_get_stripe_elements_styles();
-
- if ( ! empty( $elements_styles ) ) {
- $elements_options['style'] = $elements_styles;
- }
-
- /**
- * Filters the options used to create the Stripe Elements card field.
- *
- * @since 2.7.0
- *
- * @link https://stripe.com/docs/stripe-js/reference#element-options
- *
- * @param array $elements_options Options used to create Stripe Elements card field.
- */
- $elements_options = apply_filters( 'edds_stripe_elements_options', $elements_options );
-
- // Elements doesn't like an empty array (which won't be converted to an object in JS).
- if ( empty( $elements_options ) ) {
- return null;
- }
-
- return $elements_options;
-}
-
-/**
- * Add the Card Elements values to the Stripe Localized variables.
- *
- * @since 2.9.0
- *
- * @param array $stripe_vars The array of values to localize for Stripe.
- *
- * @return array Includes any Card Elements values to the array of localized variables.
- */
-function edds_card_element_js_vars( $stripe_vars ) {
- $stripe_vars['elementsOptions'] = edds_get_stripe_elements_options();
- $stripe_vars['elementsSplitFields'] = '1' === edd_get_option( 'stripe_split_payment_fields', false ) ? 'true' : 'false';
- $stripe_vars['checkoutHasPaymentRequest'] = edds_prb_is_enabled( 'checkout' ) ? 'true' : 'false';
-
- return $stripe_vars;
-}
-add_filter( 'edd_stripe_js_vars', 'edds_card_element_js_vars', 10, 1 );
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/elements/functions.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/elements/functions.php
deleted file mode 100644
index 2a7ee69b..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/elements/functions.php
+++ /dev/null
@@ -1,75 +0,0 @@
-connect()->get_connect_id() );
-}
-
-/**
- * Get the current elements mode.
- *
- * If the user is gated into the legacy mode, set the default to card-elements.
- *
- * @since 2.9.0
- * @since 2.9.5.1 We're now listening for an elements_mode flag in POST requests.
- *
- * @return string The elements mode string.
- */
-function edds_get_elements_mode() {
- $default = _edds_legacy_elements_enabled() ? 'card-elements' : 'payment-elements';
-
- /**
- * Because we use the deferred payment intents beta, only connected accounts can use Payment Elements
- * for now, so we'll force them to be in `card-elements`.
- */
- if ( edds_stripe_connect_can_manage_keys() ) {
- return 'card-elements';
- }
-
- /**
- * Recurring Subscription payment method updates need to still run card elements for now.
- */
- if (
- function_exists( 'edd_recurring' ) &&
- ( isset( $_GET['action'] ) && 'update' === $_GET['action'] ) &&
- ( isset( $_GET['subscription_id'] ) && is_numeric( $_GET['subscription_id'] ) )
- ) {
- add_filter( 'edd_get_option_stripe_split_payment_fields', '__return_false' );
- return 'card-elements';
- }
-
- /**
- * Card elements does a lot with AJAX requests, which will lose the context of being on the Subscription update form, so
- * we are sending in a flag for using card elements with the elements_mode equal to 'card-elements' in those POST requests.
- *
- * @since 2.9.5.1
- */
- if ( isset( $_POST['elements_mode'] ) && 'card-elements' === $_POST['elements_mode'] ) {
- return 'card-elements';
- }
-
- return edd_get_option( 'stripe_elements_mode', $default );
-}
-
-/**
- * INTERNAL ONLY: Determines if the user is gated into using the legacy card-elements.
- *
- * This is a transitionary function, intentded to allow us to later remove it. Do not
- * use this function in any extending of EDD or Stripe.
- *
- * @since 2.9.0
- *
- * @return bool If the user is gated into using the legacy card-elements.
- */
-function _edds_legacy_elements_enabled() {
- return get_option( '_edds_legacy_elements_enabled', false );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/elements/payment-elements.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/elements/payment-elements.php
deleted file mode 100644
index 6429036d..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/elements/payment-elements.php
+++ /dev/null
@@ -1,359 +0,0 @@
- 'tabs',
- 'defaultCollapsed' => false,
- );
-
- /**
- * Filters the layout variables passed to the Stripe Payment Elements.
- *
- * @since 2.9.0
- *
- * @link https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-layout
- *
- * @see assets/js/src/frontend/payment-elements/index.js::generateElementStyles
- *
- * @param array $payment_elements_layout Layout values used to create Stripe Elements object.
- */
- return apply_filters( 'edds_stripe_payment_elements_layout', $payment_elements_layout );
-}
-
-/**
- * Retreives and allows filtering the wallets sent to the Payment Elements.
- *
- * @since 2.9.0
- */
-function edds_get_stripe_payment_elements_wallets() {
-
- $default_wallet_behavior = 'auto';
-
- /**
- * Allows the ability to completely disable wallets (Google Pay, Apple Pay, etc) with a single filter.
- *
- * @example
- * add_filter( 'edds_stripe_payment_elements_disable_wallets', '__return_true' );
- *
- * @since 2.9.0
- *
- * @link https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-wallets
- *
- * @see assets/js/src/frontend/payment-elements/index.js::generateElementStyles
- *
- * @param bool If wallets should be disabled.
- */
- if ( apply_filters( 'edds_stripe_payment_elements_disable_wallets', false ) ) {
- $default_wallet_behavior = 'never';
- }
-
- $enabled_wallets = array(
- 'applePay' => $default_wallet_behavior,
- 'googlePay' => $default_wallet_behavior,
- );
-
- /**
- * Filters the wallets that the Payment Element will load.
- *
- * If you want to disable these, set their values to `never`
- *
- * @example
- * array(
- * 'applePay' => 'never',
- * 'googlePay' => 'auto',
- * )
- *
- * This uses an array_merge to ensure that if someone supplies a partial array we don't lose the default behavior.
- *
- * @since 2.9.0
- *
- * @link https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-wallets
- *
- * @see assets/js/src/frontend/payment-elements/index.js::generateElementStyles
- *
- * @param array $enabled_wallets Allowed wallets payment methods ot use on the Payment Element.
- */
- $enabld_wallets = array_merge( $enabled_wallets, apply_filters( 'edds_stripe_payment_elements_wallets', $enabled_wallets ) );
-
- return $enabld_wallets;
-}
-
-/**
- * Retreives and allows filtering the label style sent to the Payment Elements.
- *
- * @since 2.9.0
- */
-function edds_get_stripe_payment_elements_label_style() {
- $label_style = 'above';
-
- /**
- * Filters the label appearance option.
- *
- * This can be set to either 'above' or 'floating'
- *
- * @since 2.9.0
- *
- * @link https://stripe.com/docs/elements/appearance-api?platform=web#others
- *
- * @see assets/js/src/frontend/payment-elements/index.js::generateElementStyles
- *
- * @param array $label_style The style to use for the Payment Elements labels.
- */
- return apply_filters( 'edds_stripe_payment_elements_label_style', $label_style );
-
-}
-
-/**
- * Allows passing custom fonts into the Stripe Payment Elements.
- *
- * @since 2.9.0
- */
-function edds_get_stripe_payment_elements_fonts() {
- $fonts = array();
-
- /**
- * Allows passing custom font objects into the Stripe Elements.
- *
- * This either needs to be a CSS font soruce object, or a custom font source object.
- * You can see the format and requiremnts for these in the links below. We default to none.
- *
- * @since 2.9.0
- *
- * @link https://stripe.com/docs/js/appendix/css_font_source_object
- * @link https://stripe.com/docs/js/appendix/custom_font_source_object
- *
- * @see assets/js/src/frontend/payment-elements/index.js::generateElementStyles
- *
- * @param array $fonts The style to use for the Payment Elements labels.
- */
- return apply_filters( 'edds_stripe_payment_elements_fonts', $fonts );
-
-}
-
-/**
- * Allows passing custom fields into the Stripe Elements.
- *
- * @since 2.9.2.2
- */
-function edds_get_stripe_payment_elements_fields() {
- $default_fields = array(
- 'billingDetails' => array(
- 'name' => 'auto',
- 'email' => 'never', // It is not advised to change this to auto, as it will create duplicate email fields on checkout.
- 'phone' => 'never',
- 'address' => 'never',
- ),
- );
-
- // By default, if the store has the address fields required, don't include them in the Payment Element.
- if ( 'none' !== edd_get_option( 'stripe_billing_fields', 'none' ) ) {
- $default_fields['billingDetails']['address'] = 'never';
- }
-
- /**
- * Allows passing custom fields into the Stripe Elements.
- *
- * This needs to be an array. The default fields hold our values for the billingDetails fields. Fields can have a value of
- * either 'auto' or 'never'. If you want to disable a field, set it to 'never'. When set to 'auto', Stripe will attempt to
- * determine if the field is necessary based on a combination of currency, country, and account.
- *
- * @since 2.9.2.2
- *
- * @link https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields
- *
- * @see assets/js/src/frontend/payment-elements/index.js::createAndMountElement
- *
- * @param array $default_fields The default fields and their values.
- */
- return apply_filters( 'edds_stripe_payment_elements_fields', $default_fields );
-}
-
-/**
- * Returns an array of terms for the payment elements.
- *
- * @since 2.9.4
- *
- * @return array The terms array by payment method.
- */
-function edds_get_stripe_payment_elements_terms() {
- $terms = array( 'card' => 'auto' );
-
- /**
- * Allows filtering the payment elements terms.
- *
- * @see https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-terms
- *
- * @since 2.9.4
- * @param array The terms array by payment method.
- */
-
- return apply_filters( 'edds_stripe_payment_elements_terms', $terms );
-}
-
-/**
- * Gathers all the possible customizations for the Stripe Payment Elements.
- *
- * Pulls in the filtered customizations for the theme, variables, rules, and layout items
- * for the Payment Elements instantiation. This allows developers to make customizations.
- *
- * EDD does attempt to match the input styles on the checkout already, in the Javascript.
- *
- * @since 2.9.0
- *
- * @returns array $customizations The array of customizations.
- */
-function edds_gather_payment_element_customizations() {
- $customizations = array(
- 'theme' => edds_get_stripe_payment_elements_theme(),
- 'variables' => edds_get_stripe_payment_elements_variables(),
- 'rules' => edds_get_stripe_payment_elements_rules(),
- 'layout' => edds_get_stripe_payment_elements_layout(),
- 'wallets' => edds_get_stripe_payment_elements_wallets(),
- 'labels' => edds_get_stripe_payment_elements_label_style(),
- 'fonts' => edds_get_stripe_payment_elements_fonts(),
- 'paymentMethodTypes' => edds_payment_element_payment_method_types(),
- 'fields' => edds_get_stripe_payment_elements_fields(),
- 'terms' => edds_get_stripe_payment_elements_terms(),
- 'i18n' => array(
- 'errorMessages' => edds_get_localized_error_messages(),
- ),
- );
-
- if ( function_exists( 'edd_recurring' ) ) {
- $customizations['cartHasSubscription'] = edd_recurring()->cart_contains_recurring() ? 'true' : 'false';
- }
-
- return $customizations;
-}
-
-/**
- * Add the Payment Elements values to the Stripe Localized variables.
- *
- * @since 2.9.0
- *
- * @param array $stripe_vars The array of values to localize for Stripe.
- *
- * @return array Includes any Payment Elements values to the array of localized variables.
- */
-function edds_payment_element_js_vars( $stripe_vars ) {
- $stripe_vars['elementsCustomizations'] = edds_gather_payment_element_customizations();
-
- return $stripe_vars;
-}
-add_filter( 'edd_stripe_js_vars', 'edds_payment_element_js_vars', 10, 1 );
-
-/**
- * Returns an array of payment method types.
- *
- * By default this is empty to allow the automatic payment methods to take over, but in the event someone
- * wants to alter this, they can at their own risk as EDD controls what payment methods are availbale
- * at the platform level.
- *
- * As of 2.9.2.1 - EDD only supports 'card' and 'link' as options.
- *
- * @since 2.9.2.1
- *
- * @return array The allowed payment_method_types
- */
-function edds_payment_element_payment_method_types() {
- /**
- * Allows passing payment_method_types to the elements and intent.
- *
- * This is by default empty, but you can alter this on an account level if needed.
- *
- * @since 2.9.2.1
- *
- * @example
- * add_filter( 'edds_stripe_payment_elements_payment_method_types', function( $payment_method_types ) {
- * return array(
- * 'card',
- * 'link',
- * );
- * } );
- *
- * @param array The allowed payment elements payment method types.
- */
- return apply_filters( 'edds_stripe_payment_elements_payment_method_types', array() );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/emails.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/emails.php
deleted file mode 100644
index 5abeb2f3..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/emails.php
+++ /dev/null
@@ -1,51 +0,0 @@
-get_meta( '_edd_payment_meta', true );
-
- $from_name = edd_get_option( 'from_name', wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ) );
- $from_name = apply_filters( 'edd_purchase_from_name', $from_name, $payment_id, $payment_data );
- $from_email = edd_get_option( 'from_email', get_bloginfo( 'admin_email' ) );
- $from_email = apply_filters( 'edd_purchase_from_address', $from_email, $payment_id, $payment_data );
-
- if ( empty( $to_email ) ) {
- $to_email = $payment->email;
- }
-
- $subject = esc_html__( 'Your Preapproved Payment Requires Action', 'easy-digital-downloads' );
- $heading = edd_do_email_tags( esc_html__( 'Payment Requires Action', 'easy-digital-downloads' ), $payment_id );
-
- $message = esc_html__( 'Dear {name},', 'easy-digital-downloads' ) . "\n\n";
- $message .= esc_html__( 'Your preapproved payment requires further action before your purchase can be completed. Please click the link below to take finalize your purchase', 'easy-digital-downloads' ) . "\n\n";
- $message .= esc_url( add_query_arg( 'payment_key', $payment->key, edd_get_success_page_uri() ) );
- $message = edd_do_email_tags( $message, $payment_id );
-
- /** This filter is documented in easy-digital-downloads/includes/emails/template.php */
- $message = apply_filters( 'edd_email_template_wpautop', true ) ? wpautop( $message ) : $message;
-
- $emails = EDD()->emails;
-
- $emails->__set( 'from_name', $from_name );
- $emails->__set( 'from_email', $from_email );
- $emails->__set( 'heading', $heading );
-
- $headers = $emails->get_headers();
- $emails->__set( 'headers', $headers );
-
- $emails->send( $to_email, $subject, $message );
-}
-add_action( 'edds_preapproved_payment_needs_action', 'edds_preapproved_payment_needs_action_notification' );
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/functions.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/functions.php
deleted file mode 100644
index 0d263d37..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/functions.php
+++ /dev/null
@@ -1,781 +0,0 @@
- (
- version_compare( PHP_VERSION, '7.1', '>' )
- ),
- 'edd' => (
- defined( 'EDD_VERSION' )
- ? version_compare( EDD_VERSION, '3.1', '>=' )
- : true
- ),
- 'recurring' => (
- defined( 'EDD_RECURRING_VERSION' )
- ? version_compare( EDD_RECURRING_VERSION, '2.9.99', '>' )
- : true
- ),
- 'wp' => (
- version_compare( get_bloginfo( 'version' ), '5.4', '>=' )
- ),
- );
-
- if ( false === $requirement ) {
- return false === in_array( false, $requirements, true );
- } else {
- return isset( $requirements[ $requirement ] )
- ? $requirements[ $requirement ]
- : true;
- }
-}
-
-/**
- * Allows preconfigured Stripe API requests to be made.
- *
- * @since 2.7.0
- *
- * @throws \EDD_Stripe_Utils_Exceptions_Stripe_Object_Not_Found When attempting to call an object or method that is not available.
- * @throws \Stripe\Exception
- *
- * @param string $object Name of the Stripe object to request.
- * @param string $method Name of the API operation to perform during the request.
- * @param mixed ...$args Additional arguments to pass to the request.
- * @return \Stripe\StripeObject
- */
-function edds_api_request( $object, $method, $args = null ) {
- $api = new EDD_Stripe_API();
-
- return call_user_func_array( array( $api, 'request' ), func_get_args() );
-}
-
-/**
- * Converts a truthy value (e.g. '1', 'yes') to a bool.
- *
- * @since 2.8.0
- *
- * @param mixed $truthy_value Truthy value.
- * @return bool
- */
-function edds_truthy_to_bool( $truthy_value ) {
- $truthy = array(
- 'yes',
- 1,
- '1',
- 'true',
- );
-
- return is_bool( $truthy_value )
- ? $truthy_value
- : in_array( strtolower( $truthy_value ), $truthy, true );
-}
-
-/**
- * Retrieve the exsting cards setting.
- * @return bool
- */
-function edd_stripe_existing_cards_enabled() {
- $use_existing_cards = edd_get_option( 'stripe_use_existing_cards', false );
-
- // Payment Elements doesn't support existing cards.
- if ( 'payment-elements' === edds_get_elements_mode() ) {
- $use_existing_cards = false;
- }
-
- return ! empty( $use_existing_cards );
-}
-
-/**
- * Given a user ID, retrieve existing cards within stripe.
- *
- * @since 2.6
- * @param int $user_id
- *
- * @return array
- */
-function edd_stripe_get_existing_cards( $user_id = 0 ) {
- if ( empty( $user_id ) ) {
- return array();
- }
-
- $enabled = edd_stripe_existing_cards_enabled();
-
- if ( ! $enabled ) {
- return array();
- }
-
- static $existing_cards;
-
- if ( ! is_null( $existing_cards ) && array_key_exists( $user_id, $existing_cards ) ) {
- return $existing_cards[ $user_id ];
- }
-
- // Check if the user has existing cards
- $customer_cards = array();
- $stripe_customer_id = edds_get_stripe_customer_id( $user_id );
-
- if ( ! empty( $stripe_customer_id ) ) {
- try {
- $stripe_customer = edds_api_request( 'Customer', 'retrieve', $stripe_customer_id );
-
- if ( isset( $stripe_customer->deleted ) && $stripe_customer->deleted ) {
- return $customer_cards;
- }
-
- $payment_methods = edds_api_request( 'PaymentMethod', 'all', array(
- 'type' => 'card',
- 'customer' => $stripe_customer->id,
- 'limit' => 100,
- ) );
-
- $cards = edds_api_request( 'Customer', 'allSources', $stripe_customer->id, array(
- 'limit' => 100,
- ) );
-
- $sources = array_merge( $payment_methods->data, $cards->data );
-
- foreach ( $sources as $source ) {
- if ( ! in_array( $source->object, array( 'payment_method', 'card' ), true ) ) {
- continue;
- }
-
- $source_data = new stdClass();
- $source_data->id = $source->id;
-
- switch( $source->object ) {
- case 'payment_method':
- $source_data->brand = ucwords( $source->card->brand );
- $source_data->last4 = $source->card->last4;
- $source_data->exp_month = $source->card->exp_month;
- $source_data->exp_year = $source->card->exp_year;
- $source_data->fingerprint = $source->card->fingerprint;
- $source_data->address_line1 = $source->billing_details->address->line1;
- $source_data->address_line2 = $source->billing_details->address->line2;
- $source_data->address_city = $source->billing_details->address->city;
- $source_data->address_zip = $source->billing_details->address->postal_code;
- $source_data->address_state = $source->billing_details->address->state;
- $source_data->address_country = $source->billing_details->address->country;
-
- $customer_cards[ $source->id ]['default'] = $source->id === $stripe_customer->invoice_settings->default_payment_method;
- break;
- case 'card':
- $source_data->brand = $source->brand;
- $source_data->last4 = $source->last4;
- $source_data->exp_month = $source->exp_month;
- $source_data->exp_year = $source->exp_year;
- $source_data->fingerprint = $source->fingerprint;
- $source_data->address_line1 = $source->address_line1;
- $source_data->address_line2 = $source->address_line2;
- $source_data->address_city = $source->address_city;
- $source_data->address_zip = $source->address_zip;
- $source_data->address_state = $source->address_state;
- $source_data->address_country = $source->address_country;
- break;
- }
-
- $customer_cards[ $source->id ]['source'] = $source_data;
- }
- } catch ( Exception $e ) {
- return $customer_cards;
- }
- }
-
- // Show only the latest version of card for duplicates.
- $fingerprints = array();
- foreach ( $customer_cards as $key => $customer_card ) {
- $fingerprint = $customer_card['source']->fingerprint;
- if ( ! in_array( $fingerprint, $fingerprints ) ) {
- $fingerprints[] = $fingerprint;
- } else {
- unset( $customer_cards[ $key ] );
- }
- }
-
- // Put default card first.
- usort(
- $customer_cards,
- function( $a, $b ) {
- return $a['default'] ? 1 : -1;
- }
- );
-
- $existing_cards[ $user_id ] = $customer_cards;
-
- return $existing_cards[ $user_id ];
-}
-
-/**
- * Look up the stripe customer id in user meta, and look to recurring if not found yet
- *
- * @since 2.4.4
- * @since 2.6 Added lazy load for moving to customer meta and ability to look up by customer ID.
- * @param int $id_or_email The user ID, customer ID or email to look up.
- * @param bool $by_user_id If the lookup is by user ID or not.
- *
- * @return string Stripe customer ID
- */
-function edds_get_stripe_customer_id( $id_or_email, $by_user_id = true ) {
- $stripe_customer_id = '';
- $meta_key = edd_stripe_get_customer_key();
-
- if ( is_email( $id_or_email ) ) {
- $by_user_id = false;
- }
-
- $customer = new EDD_Customer( $id_or_email, $by_user_id );
- if ( $customer->id > 0 ) {
- $stripe_customer_id = $customer->get_meta( $meta_key );
- }
-
- if ( empty( $stripe_customer_id ) ) {
- $user_id = 0;
- if ( ! empty( $customer->user_id ) ) {
- $user_id = $customer->user_id;
- } else if ( $by_user_id && is_numeric( $id_or_email ) ) {
- $user_id = $id_or_email;
- } else if ( is_email( $id_or_email ) ) {
- $user = get_user_by( 'email', $id_or_email );
- if ( $user ) {
- $user_id = $user->ID;
- }
- }
-
- if ( ! isset( $user ) ) {
- $user = get_user_by( 'id', $user_id );
- }
-
- if ( $user ) {
-
- $customer = new EDD_Customer( $user->user_email );
-
- if ( ! empty( $user_id ) ) {
- $stripe_customer_id = get_user_meta( $user_id, $meta_key, true );
-
- // Lazy load migrating data over to the customer meta from Stripe issue #113
- $customer->update_meta( $meta_key, $stripe_customer_id );
- }
-
- }
-
- }
-
- if ( empty( $stripe_customer_id ) && class_exists( 'EDD_Recurring_Subscriber' ) ) {
-
- $subscriber = new EDD_Recurring_Subscriber( $id_or_email, $by_user_id );
-
- if ( $subscriber->id > 0 ) {
-
- $verified = false;
-
- if ( ( $by_user_id && $id_or_email == $subscriber->user_id ) ) {
- // If the user ID given, matches that of the subscriber
- $verified = true;
- } else {
- // If the email used is the same as the primary email
- if ( $subscriber->email == $id_or_email ) {
- $verified = true;
- }
-
- // If the email is in the EDD 2.6 Additional Emails
- if ( property_exists( $subscriber, 'emails' ) && in_array( $id_or_email, $subscriber->emails ) ) {
- $verified = true;
- }
- }
-
- if ( $verified ) {
- $stripe_customer_id = $subscriber->get_recurring_customer_id( 'stripe' );
- }
-
- }
-
- if ( ! empty( $stripe_customer_id ) ) {
- $customer->update_meta( $meta_key, $stripe_customer_id );
- }
-
- }
-
- return $stripe_customer_id;
-}
-
-/**
- * Get the meta key for storing Stripe customer IDs in
- *
- * @access public
- * @since 1.6.7
- * @return string
- */
-function edd_stripe_get_customer_key() {
-
- $key = '_edd_stripe_customer_id';
- if( edd_is_test_mode() ) {
- $key .= '_test';
- }
- return $key;
-}
-
-/**
- * Determines if the provided currency is a zero-decimal currency
- *
- * @access public
- * @since 1.8.4
- * @param string $currency Three-letter ISO currency code or an empty string. If empty, the shop's currency is used.
- * @since 2.8.8 $currency parameter added
- * @return bool
- */
-function edds_is_zero_decimal_currency( $currency = '' ) {
- if ( empty( $currency ) ) {
- $currency = edd_get_currency();
- }
-
- $currency = strtolower( $currency );
-
- $currencies = array(
- 'bif',
- 'clp',
- 'djf',
- 'gnf',
- 'jpy',
- 'kmf',
- 'krw',
- 'mga',
- 'pyg',
- 'rwf',
- 'ugx',
- 'vnd',
- 'vuv',
- 'xaf',
- 'xof',
- 'xpf',
- );
-
- return in_array( $currency, $currencies, true );
-}
-
-/**
- * Retrieves a sanitized statement descriptor.
- *
- * @since 2.6.19
- *
- * @return string $statement_descriptor Sanitized statement descriptor.
- */
-function edds_get_statement_descriptor() {
- $statement_descriptor = edd_get_option( 'stripe_statement_descriptor', '' );
- $statement_descriptor = edds_sanitize_statement_descriptor( $statement_descriptor );
-
- return $statement_descriptor;
-}
-
-/**
- * Retrieves a list of unsupported characters for Stripe statement descriptors.
- *
- * @since 2.6.19
- *
- * @return array $unsupported_characters List of unsupported characters.
- */
-function edds_get_statement_descriptor_unsupported_characters() {
- $unsupported_characters = array(
- '<',
- '>',
- '"',
- '\'',
- '\\',
- '*',
- );
-
- /**
- * Filters the list of unsupported characters for Stripe statement descriptors.
- *
- * @since 2.6.19
- *
- * @param array $unsupported_characters List of unsupported characters.
- */
- $unsupported_characters = apply_filters( 'edds_get_statement_descriptor_unsupported_characters', $unsupported_characters );
-
- return $unsupported_characters;
-}
-
-/**
- * Sanitizes a string to be used for a statement descriptor.
- *
- * @since 2.6.19
- *
- * @link https://stripe.com/docs/connect/statement-descriptors#requirements
- *
- * @param string $statement_descriptor Statement descriptor to sanitize.
- * @return string $statement_descriptor Sanitized statement descriptor.
- */
-function edds_sanitize_statement_descriptor( $statement_descriptor ) {
- $unsupported_characters = edds_get_statement_descriptor_unsupported_characters();
-
- $statement_descriptor = trim( str_replace( $unsupported_characters, '', $statement_descriptor ) );
- $statement_descriptor = substr( $statement_descriptor, 0, 22 );
-
- return $statement_descriptor;
-}
-
-/**
- * Retrieves a given registry instance by name.
- *
- * @since 2.6.19
- *
- * @param string $name Registry name.
- * @return null|EDD_Stripe_Registry Null if the registry doesn't exist, otherwise the object instance.
- */
-function edds_get_registry( $name ) {
- switch( $name ) {
- case 'admin-notices':
- $registry = EDD_Stripe_Admin_Notices_Registry::instance();
- break;
- default:
- $registry = null;
- break;
- }
-
- return $registry;
-}
-
-/**
- * Attempts to verify a nonce from various payment forms when the origin
- * of the action isn't explicitly known.
- *
- * This could be coming from the Checkout, Payment Authorization,
- * or Update Payment Method (Recurring) form.
- *
- * @since 2.8.0
- *
- * @return bool
- */
-function edds_verify_payment_form_nonce() {
- if ( false !== edds_verify() ) {
- return true;
- }
-
- // Update Payment Method.
- $nonce = isset( $_POST['edd_recurring_update_nonce'] )
- ? sanitize_text_field( $_POST['edd_recurring_update_nonce'] )
- : '';
-
- if ( ! empty( $nonce ) ) {
- return wp_verify_nonce( $nonce, 'update-payment' );
- }
-
- return false;
-}
-
-/**
- * Attempts to verify a given token or nonce.
- *
- * @since 2.8.12
- * @param string $nonce The nonce to check for (default is checkout).
- * @param string $action The nonce action (default is checkout).
- * @return bool
- */
-function edds_verify( $nonce = 'edd-process-checkout-nonce', $action = 'edd-process-checkout' ) {
- // Tokenizer.
- $token = isset( $_POST['token'] ) ? sanitize_text_field( $_POST['token'] ) : '';
- $timestamp = isset( $_POST['timestamp'] ) ? sanitize_text_field( $_POST['timestamp'] ) : '';
- if ( ! empty( $timestamp ) && ! empty( $token ) ) {
- edd_debug_log( $action . ' verified by tokenizer: ' . $token );
-
- return \EDD\Utils\Tokenizer::is_token_valid( $token, $timestamp );
- }
-
- edd_debug_log( 'Attempted to verify ' . $action . ' session by tokenizer but the data was missing.' );
-
- // Checkout.
- $nonce = isset( $_POST[ $nonce ] )
- ? sanitize_text_field( $_POST[ $nonce ] )
- : '';
-
- if ( empty( $nonce ) ) {
- return false;
- }
-
- return wp_verify_nonce( $nonce, $action );
-}
-
-/**
- * Routes user to correct support documentation, depending on whether they are using Standard or Pro version of Stripe
- *
- * @since 2.8.1
- * @param string $type The type of Stripe documentation.
- * @return string
- */
-function edds_documentation_route( $type ) {
- $base_url = 'https://easydigitaldownloads.com/docs';
-
- /**
- * Filter to change EDD-Stripe support url.
- *
- * @since 2.8.1
- * @param string $base_url The url string for EDD-Stripe standard.
- */
- $base_url = apply_filters( 'edds_documentation_route_base', $base_url );
-
- return trailingslashit( $base_url ) . $type;
-
-}
-
-/**
- * Determines if the current Stripe account's country supports application fees.
- *
- * @since 2.8.7
- *
- * @return bool True if the Stripe account country (or core "Base Country" setting)
- * can use the `application_fee_amount` parameter in API requests.
- * True if no country information can be found which will still be
- * validated by Stripe when a request is made.
- */
-function edds_stripe_connect_account_country_supports_application_fees() {
- $edd_country = edd_get_option( 'base_country', '' );
-
- $account_country = edd_get_option(
- 'stripe_connect_account_country',
- $edd_country
- );
-
- // If we have no country to compare against try to add an application fee.
- // If the Stripe account is actually one of the blocked countries an API
- // error will be reflected in the Checkout.
- if ( empty( $account_country ) ) {
- return true;
- }
-
- $account_country = strtolower( $account_country );
-
- $blocked_countries = array(
- 'br',
- 'in',
- 'mx',
- );
-
- return ! in_array( $account_country, $blocked_countries, true );
-}
-
-/**
- * Refunds a charge made via Stripe.
- *
- * @since 2.8.7
- *
- * @param int|Order $order_id_or_object The ID or object (EDD 3.0+ only) of the order to refund.
- * @param Order|null $refund_object Optional. The refund object associated with this
- * charge refund. If provided, then the refund amount
- * is used as the charge refund amount (for partial refunds), and
- * an EDD transaction record will be inserted (EDD 3.0+ only).
- *
- * @throws \EDD_Stripe_Utils_Exceptions_Stripe_Object_Not_Found When attempting to call an object or method that is not available.
- * @throws \Exception
- */
-function edd_refund_stripe_purchase( $order_id_or_object, $refund_object = null ) {
- $order_id = $order_id_or_object instanceof Order ? $order_id_or_object->id : $order_id_or_object;
-
- edd_debug_log( sprintf(
- 'Processing Stripe refund for order #%d',
- $order_id
- ) );
-
- if ( ! is_numeric( $order_id ) ) {
- throw new \Exception( __( 'Invalid order ID.', 'easy-digital-downloads' ), 400 );
- }
-
- $charge_id = edd_get_payment_transaction_id( $order_id );
-
- if ( empty( $charge_id ) || $charge_id == $order_id ) {
- $notes = edd_get_payment_notes( $order_id );
-
- foreach ( $notes as $note ) {
- if ( preg_match( '/^Stripe Charge ID: ([^\s]+)/', $note->comment_content, $match ) ) {
- $charge_id = $match[1];
- break;
- }
- }
- }
-
- // Bail if no charge ID was found.
- if ( empty( $charge_id ) ) {
- edd_debug_log( sprintf( 'Exiting refund of order #%d. No Stripe charge found.', $order_id ) );
-
- return;
- }
-
- $args = array(
- 'charge' => $charge_id,
- );
-
- if ( $refund_object instanceof Order && $order_id_or_object instanceof Order && abs( $refund_object->total ) !== abs( $order_id_or_object->total ) ) {
- $args['amount'] = abs( $refund_object->total );
- if ( ! edds_is_zero_decimal_currency() ) {
- $args['amount'] = round( $args['amount'] * 100, 0 );
- }
-
- edd_debug_log( sprintf(
- 'Processing partial Stripe refund for order #%d. Refund amount: %s; Amount sent to Stripe: %s',
- $order_id_or_object->id,
- edd_currency_filter( $refund_object->total, $refund_object->currency ),
- $args['amount']
- ) );
- } else {
- edd_debug_log( sprintf( 'Processing full Stripe refund for order #%d.', $order_id ) );
- }
-
- /**
- * Filters the refund arguments sent to Stripe.
- *
- * @link https://stripe.com/docs/api/refunds/create
- *
- * @param array $args
- */
- $args = apply_filters( 'edds_create_refund_args', $args );
-
- /**
- * Filters the secondary refund arguments.
- *
- * @param array $sec_args
- */
- $sec_args = apply_filters( 'edds_create_refund_secondary_args', array() );
-
- $refund = edds_api_request( 'Refund', 'create', $args, $sec_args );
-
- $amount_refunded = (float) $refund->amount;
- if ( ! edds_is_zero_decimal_currency() ) {
- $amount_refunded = round( $amount_refunded / 100, edd_currency_decimal_filter( 2, strtoupper( $refund->currency ) ) );
- }
-
- $order_note = sprintf(
- /* translators: %1$s the amount refunded; %2$s Stripe Refund ID */
- __( '%1$s refunded in Stripe. Refund ID %2$s', 'easy-digital-downloads' ),
- edd_currency_filter( $amount_refunded, strtoupper( $refund->currency ) ),
- $refund->id
- );
-
- edd_insert_payment_note( $order_id, $order_note );
-
- if ( $refund_object instanceof Order ) {
- edd_add_order_transaction( array(
- 'object_id' => $refund_object->id,
- 'object_type' => 'order',
- 'transaction_id' => sanitize_text_field( $refund->id ),
- 'gateway' => 'stripe',
- 'status' => 'complete',
- 'total' => edd_negate_amount( $amount_refunded )
- ) );
-
- edd_add_note( array(
- 'object_id' => $refund_object->id,
- 'object_type' => 'order',
- 'user_id' => is_admin() ? get_current_user_id() : 0,
- 'content' => $order_note
- ) );
- }
-
- /**
- * Triggers after a refund has been processed.
- *
- * @param int $order_id ID of the order that was refunded.
- */
- do_action( 'edds_payment_refunded', $order_id );
-}
-
-/**
- * Checks if Stripe preapproval is enabled. Pro must be active.
- *
- * @since 2.8.9
- * @return bool
- */
-function edds_is_preapprove_enabled() {
- return edds_is_pro() && edd_get_option( 'stripe_preapprove_only' );
-}
-
-/**
- * Gets the hidden input for adding tokenizer support to Stripe checkout.
- *
- * @since 2.8.12
- * @param string $custom_id Optional: append a custom string to the ID.
- * @return string
- */
-function edds_get_tokenizer_input( $custom_id = '' ) {
-
- $id = 'edd-process-stripe-token';
- if ( $custom_id ) {
- $id .= '-' . $custom_id;
- }
- $timestamp = time();
-
- return sprintf(
- '',
- esc_attr( $id ),
- esc_attr( $timestamp ),
- esc_attr( \EDD\Utils\Tokenizer::tokenize( $timestamp ) )
- );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/gateway-actions.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/gateway-actions.php
deleted file mode 100644
index 03199e4c..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/gateway-actions.php
+++ /dev/null
@@ -1,82 +0,0 @@
- _x( 'Preapproval Pending', 'Pending preapproved payment', 'easy-digital-downloads' ),
- 'public' => true,
- 'exclude_from_search' => false,
- 'show_in_admin_all_list' => true,
- 'show_in_admin_status_list' => true,
- /* translators: %s Payment status count */
- 'label_count' => _n_noop( 'Active (%s)', 'Active (%s)', 'easy-digital-downloads' )
- ) );
- register_post_status( 'preapproval', array(
- 'label' => _x( 'Preapproved', 'Preapproved payment', 'easy-digital-downloads' ),
- 'public' => true,
- 'exclude_from_search' => false,
- 'show_in_admin_all_list' => true,
- 'show_in_admin_status_list' => true,
- /* translators: %s Payment status count */
- 'label_count' => _n_noop( 'Active (%s)', 'Active (%s)', 'easy-digital-downloads' )
- ) );
- register_post_status( 'cancelled', array(
- 'label' => _x( 'Cancelled', 'Cancelled payment', 'easy-digital-downloads' ),
- 'public' => true,
- 'exclude_from_search' => false,
- 'show_in_admin_all_list' => true,
- 'show_in_admin_status_list' => true,
- /* translators: %s Payment status count */
- 'label_count' => _n_noop( 'Active (%s)', 'Active (%s)', 'easy-digital-downloads' )
- ) );
-}
-add_action( 'init', 'edds_register_post_statuses', 110 );
-
-/**
- * Register the statement_descriptor email tag.
- *
- * @since 2.6
- * @return void
- */
-function edd_stripe_register_email_tags() {
- $statement_descriptor = edds_get_statement_descriptor();
- if ( ! empty( $statement_descriptor ) ) {
- edd_add_email_tag(
- 'stripe_statement_descriptor',
- __( 'Outputs a line stating what charges will appear as on customer\'s credit card statements.', 'easy-digital-downloads' ),
- 'edd_stripe_statement_descriptor_template_tag',
- __( 'Statement Descriptor', 'easy-digital-downloads' )
- );
- }
-}
-add_action( 'edd_add_email_tags', 'edd_stripe_register_email_tags' );
-
-/**
- * Swap the {statement_descriptor} email tag with the string from the option
- *
- * @since 2.6
- * @param $payment_id
- *
- * @return mixed
- */
-function edd_stripe_statement_descriptor_template_tag( $payment_id ) {
- $payment = new EDD_Payment( $payment_id );
- if ( 'stripe' !== $payment->gateway ) {
- return '';
- }
-
- $statement_descriptor = edds_get_statement_descriptor();
- if ( empty( $statement_descriptor ) ) {
- return '';
- }
-
- // If you want to filter this, use the %s to define where you want the actual statement descriptor to show in your message.
- $email_tag_output = __( apply_filters( 'edd_stripe_statement_descriptor_email_tag', 'Charges will appear on your card statement as %s' ), 'easy-digital-downloads' );
-
- return sprintf( $email_tag_output, $statement_descriptor );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/gateway-filters.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/gateway-filters.php
deleted file mode 100644
index 86dd2950..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/gateway-filters.php
+++ /dev/null
@@ -1,91 +0,0 @@
- __( 'Payment processing cancelled; your order is not yet complete.', 'easy-digital-downloads' ),
- 'invalid_number' => __( 'The card number is not a valid credit card number.', 'easy-digital-downloads' ),
- 'invalid_expiry_month' => __( 'The card\'s expiration month is invalid.', 'easy-digital-downloads' ),
- 'invalid_expiry_year' => __( 'The card\'s expiration year is invalid.', 'easy-digital-downloads' ),
- 'invalid_cvc' => __( 'The card\'s security code is invalid.', 'easy-digital-downloads' ),
- 'incorrect_number' => __( 'The card number you provided is incorrect. Please check the number and try again.', 'easy-digital-downloads' ),
- 'incomplete_number' => __( 'The card number is incomplete.', 'easy-digital-downloads' ),
- 'incomplete_cvc' => __( 'The card\'s security code is incomplete.', 'easy-digital-downloads' ),
- 'incomplete_expiry' => __( 'The card\'s expiration date is incomplete.', 'easy-digital-downloads' ),
- 'incorrect_cvc' => __( 'The card\'s security code is incorrect.', 'easy-digital-downloads' ),
- 'incorrect_zip' => __( 'The card\'s zip code failed validation.', 'easy-digital-downloads' ),
- 'invalid_expiry_year_past' => __( 'The card\'s expiration year is in the past.', 'easy-digital-downloads' ),
- 'processing_error' => __( 'An error occurred while processing the card. Please try again.', 'easy-digital-downloads' ),
- 'email_invalid' => __( 'Invalid email address, please correct and try again.', 'easy-digital-downloads' ),
- 'authentication_required' => __( 'Your purchase may require additional authentication. Please try again and confirm any authentication requests.', 'easy-digital-downloads' ),
- 'approve_with_id' => __( 'There was an error processing your payment. Please try again, and if you continue to have problems, contact your card issuer.', 'easy-digital-downloads' ),
- 'currency_not_supported' => __( 'Your payment method is not authorized to make purchases in this currency. Please contact your card issuer.', 'easy-digital-downloads' ),
- 'expired_card' => __( 'The payment method you have provided is expired. Please try a different payment method.', 'easy-digital-downloads' ),
- 'try_again_later' => __( 'There was an error processing your payment. Please try again.', 'easy-digital-downloads' ),
- 'generic_decline' => $generic_different_payment_method,
- 'payment_intent_payment_attempt_failed' => $generic_different_payment_method,
- 'invalid_request_error' => $generic_different_payment_method,
- 'insufficient_funds' => $generic_different_payment_method,
- 'pin_try_exceeded' => $generic_different_payment_method,
- 'withdrawal_count_limit_exceeded' => $generic_different_payment_method,
- 'call_issuer' => $generic_contact_issuer_message,
- 'card_not_supported' => $generic_contact_issuer_message,
- 'card_velocity_exceeded' => $generic_contact_issuer_message,
- 'do_not_honor' => $generic_contact_issuer_message,
- 'do_not_try_again' => $generic_contact_issuer_message,
- 'invalid_account' => $generic_contact_issuer_message,
- 'invalid_amount' => $generic_contact_issuer_message,
- 'issuer_not_available' => $generic_contact_issuer_message,
- 'new_account_information_available' => $generic_contact_issuer_message,
- 'no_action_taken' => $generic_contact_issuer_message,
- 'not_permitted' => $generic_contact_issuer_message,
- 'pickup_card' => $generic_contact_issuer_message,
- 'restricted_card' => $generic_contact_issuer_message,
- 'revocation_of_all_authorizations' => $generic_contact_issuer_message,
- 'revocation_of_authorization' => $generic_contact_issuer_message,
- 'security_violation' => $generic_contact_issuer_message,
- 'service_not_allowed' => $generic_contact_issuer_message,
- 'stop_payment_order' => $generic_contact_issuer_message,
- 'transaction_not_allowed' => $generic_contact_issuer_message,
- 'card_declined' => $generic_contact_issuer_message,
- );
-
- /**
- * Filters the list of available error codes and corresponding error messages.
- *
- * @since 2.8.0
- *
- * @param array $error_list List of error codes and corresponding error messages.
- */
- $error_list = apply_filters( 'edds_get_localized_error_list', $error_list );
-
- return $error_list;
-}
-
-/**
- * Returns a localized error message for a corresponding Stripe
- * error code.
- *
- * @link https://stripe.com/docs/error-codes
- *
- * @since 2.8.0
- *
- * @param string $error_code Error code.
- * @param string $error_message Original error message to return if a localized version does not exist.
- * @return string $error_message Potentially localized error message.
- */
-function edds_get_localized_error_message( $error_code, $error_message, $decline_code = false ) {
- $error_list = edds_get_localized_error_messages();
-
- if (
- ( 'card_declined' === $error_code || 'payment_intent_payment_attempt_failed' === $error_code || 'payment_intent_payment_attempt_failed' === $error_code ) &&
- false !== $decline_code &&
- ! empty( $error_list[ $decline_code ] )
- ) {
- $error_message = $error_list[ $decline_code ];
- } elseif ( ! empty( $error_list[ $error_code ] ) ) {
- $error_message = $error_list[ $error_code ];
- }
-
- // To make development and testing easier for store owners, append the error and decline codes.
- if ( 'local' === wp_get_environment_type() ) {
- $error_message .= ' Error Code: ' . $error_code;
- if ( false !== $decline_code ) {
- $error_message .= ' Decline Code: ' . $decline_code;
- }
- }
-
- return $error_message;
-}
-
-/**
- * Returns a translatable string for informing the user that carts can only contain a single subscription and not be 'mixed'.
- *
- * @since 2.9.1
- *
- * @return string The translatable string for the single subscription requirement error.
- */
-function edds_get_single_subscription_cart_error() {
- return esc_html__(
- 'Subscriptions must be purchased individually. Please update your cart to only contain a single subscription.',
- 'easy-digital-downloads'
- );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/integrations/edd-all-access.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/integrations/edd-all-access.php
deleted file mode 100644
index 11c125ac..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/integrations/edd-all-access.php
+++ /dev/null
@@ -1,27 +0,0 @@
- $download_id,
- )
- );
-
- return false === $all_access['success'];
-}
-add_filter( 'edds_prb_purchase_link_enabled', 'edds_all_access_prb_purchase_link_enabled', 10, 2 );
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/integrations/edd-auto-register.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/integrations/edd-auto-register.php
deleted file mode 100644
index e2cdc435..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/integrations/edd-auto-register.php
+++ /dev/null
@@ -1,32 +0,0 @@
-: If the routine should be run even if the upgrade routine has been run already
- *
- * ## EXAMPLES
- *
- * wp edd-stripe migrate_customer_ids
- * wp edd-stripe migrate_customer_ids --force
- */
- public function migrate_customer_ids( $args, $assoc_args ) {
- global $wpdb;
- $force = isset( $assoc_args['force'] ) ? true : false;
-
- $upgrade_completed = edd_has_upgrade_completed( 'stripe_customer_id_migration' );
-
- if ( ! $force && $upgrade_completed ) {
- WP_CLI::error( __( 'The Stripe customer ID migration has already been run. To do this anyway, use the --force argument.', 'easy-digital-downloads' ) );
- }
-
- $sql = "SELECT user_id, meta_key, meta_value FROM $wpdb->usermeta WHERE meta_key IN ( '_edd_stripe_customer_id', '_edd_stripe_customer_id_test' )";
- $results = $wpdb->get_results( $sql );
- $total = count( $results );
-
- if ( ! empty( $total ) ) {
-
- $progress = new \cli\progress\Bar( 'Processing user meta', $total );
-
- foreach ( $results as $result ) {
- $user_data = get_userdata( $result->user_id );
- $customer = new EDD_Customer( $user_data->user_email );
-
- if ( ! $customer->id > 0 ) {
- $customer = new EDD_Customer( $result->user_id, true );
-
- if ( ! $customer->id > 0 ) {
- continue;
- }
- }
-
- $stripe_customer_id = $result->meta_value;
-
- // We should try and use a recurring ID if one exists for this user
- if ( class_exists( 'EDD_Recurring_Subscriber' ) ) {
- $subscriber = new EDD_Recurring_Subscriber( $customer->id );
- $stripe_customer_id = $subscriber->get_recurring_customer_id( 'stripe' );
- }
-
- $customer->update_meta( $result->meta_key, $stripe_customer_id );
-
- $progress->tick();
- }
-
- $progress->finish();
- WP_CLI::line( __( 'Migration complete.', 'easy-digital-downloads' ) );
- } else {
- WP_CLI::line( __( 'No user records were found that needed to be migrated.', 'easy-digital-downloads' ) );
- }
-
- update_option( 'edds_stripe_version', preg_replace( '/[^0-9.].*/', '', EDD_STRIPE_VERSION ) );
- edd_set_upgrade_complete( 'stripe_customer_id_migration' );
-
- }
-}
\ No newline at end of file
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/payment-actions/card-elements-actions.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/payment-actions/card-elements-actions.php
deleted file mode 100644
index a65c59a4..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/payment-actions/card-elements-actions.php
+++ /dev/null
@@ -1,1191 +0,0 @@
-rate_limiting->has_hit_card_error_limit() ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'We are unable to process your payment at this time, please try again later or contact support.',
- 'easy-digital-downloads'
- )
- );
- }
-
- /**
- * Allows processing before an Intent is created.
- *
- * @since 2.7.0
- *
- * @param array $purchase_data Purchase data.
- */
- do_action( 'edds_pre_process_purchase_form', $purchase_data );
-
- $payment_method_id = isset( $_POST['payment_method_id'] ) ? sanitize_text_field( $_POST['payment_method_id'] ) : false;
- $payment_method_exists = isset( $_POST['payment_method_exists'] ) ? 'true' == $_POST['payment_method_exists'] : false;
-
- if ( ! $payment_method_id ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'Unable to locate payment method. Please try again with a new payment method.',
- 'easy-digital-downloads'
- )
- );
- }
-
- // Ensure Payment Method is still valid.
- $payment_method = edds_api_request( 'PaymentMethod', 'retrieve', $payment_method_id );
- $card = isset( $payment_method->card ) ? $payment_method->card : null;
-
- // ...block prepaid cards if option is not enabled.
- if (
- $card &&
- 'prepaid' === $card->funding &&
- false === (bool) edd_get_option( 'stripe_allow_prepaid' )
- ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'Prepaid cards are not a valid payment method. Please try again with a new payment method.',
- 'easy-digital-downloads'
- )
- );
- }
-
- if ( edds_is_zero_decimal_currency() ) {
- $amount = $purchase_data['price'];
- } else {
- $amount = round( $purchase_data['price'] * 100, 0 );
- }
-
- // Retrieves or creates a Stripe Customer.
- $customer = edds_checkout_setup_customer( $purchase_data );
-
- if ( ! $customer ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'Unable to create customer. Please try again.',
- 'easy-digital-downloads'
- )
- );
- }
-
- /**
- * Allows processing before an Intent is created, but
- * after a \Stripe\Customer is available.
- *
- * @since 2.7.0
- *
- * @param array $purchase_data Purchase data.
- * @param \Stripe\Customer $customer Stripe Customer object.
- */
- do_action( 'edds_process_purchase_form_before_intent', $purchase_data, $customer );
-
- // Flag if this is the first card being attached to the Customer.
- $existing_payment_methods = edd_stripe_get_existing_cards( $purchase_data['user_info']['id'] );
- $is_first_payment_method = empty( $existing_payment_methods );
-
- $address_info = $purchase_data['user_info']['address'];
-
- // Update PaymentMethod details if necessary.
- if ( $payment_method_exists && ! empty( $_POST['edd_stripe_update_billing_address'] ) ) {
- $billing_address = array();
-
- foreach ( $address_info as $key => $value ) {
- // Adjusts address data keys to work with PaymentMethods.
- switch( $key ) {
- case 'zip':
- $key = 'postal_code';
- break;
- }
-
- $billing_address[ $key ] = ! empty( $value ) ? sanitize_text_field( $value ) : '';
- }
-
- edds_api_request( 'PaymentMethod', 'update', $payment_method_id, array(
- 'billing_details' => array(
- 'address' => $billing_address,
- ),
- ) );
- }
-
- // Create a list of {$download_id}_{$price_id}
- $payment_items = array();
-
- foreach ( $purchase_data['cart_details'] as $item ) {
- $price_id = isset( $item['item_number']['options']['price_id'] )
- ? $item['item_number']['options']['price_id']
- : null;
-
- $payment_items[] = $item['id'] . ( ! empty( $price_id ) ? ( '_' . $price_id ) : '' );
- }
-
- // Shared Intent arguments.
- $intent_args = array(
- 'confirm' => true,
- 'payment_method' => $payment_method_id,
- 'customer' => $customer->id,
- 'metadata' => array(
- 'email' => esc_html( $purchase_data['user_info']['email'] ),
- 'edd_payment_subtotal' => esc_html( $purchase_data['subtotal'] ),
- 'edd_payment_discount' => esc_html( $purchase_data['discount'] ),
- 'edd_payment_tax' => esc_html( $purchase_data['tax'] ),
- 'edd_payment_tax_rate' => esc_html( $purchase_data['tax_rate'] ),
- 'edd_payment_fees' => esc_html( edd_get_cart_fee_total() ),
- 'edd_payment_total' => esc_html( $purchase_data['price'] ),
- 'edd_payment_items' => esc_html( implode( ', ', $payment_items ) ),
- ),
- );
-
- // Attempt to map existing charge arguments to PaymentIntents.
- if ( has_filter( 'edds_create_charge_args' ) ) {
- /**
- * @deprecated 2.7.0 In favor of `edds_create_payment_intent_args`.
- *
- * @param array $intent_args
- */
- $old_charge_args = apply_filters_deprecated(
- 'edds_create_charge_args',
- array(
- $intent_args,
- ),
- '2.7.0',
- 'edds_create_payment_intent_args'
- );
-
- // Grab a few compatible arguments from the old charges filter.
- $compatible_keys = array(
- 'amount',
- 'currency',
- 'customer',
- 'description',
- 'metadata',
- 'application_fee',
- );
-
- foreach ( $compatible_keys as $compatible_key ) {
- if ( ! isset( $old_charge_args[ $compatible_key ] ) ) {
- continue;
- }
-
- $value = $old_charge_args[ $compatible_key ];
-
- switch ( $compatible_key ) {
- case 'application_fee' :
- $intent_args['application_fee_amount'] = $value;
- break;
-
- default:
- // If a legacy value is an array merge it with the existing values to avoid overriding completely.
- $intent_args[ $compatible_key ] = is_array( $value ) && is_array( $intent_args[ $compatible_key ] )
- ? wp_parse_args( $value, $intent_args[ $compatible_key ] )
- : $value;
- }
-
- edd_debug_log( __( 'Charges are no longer directly created in Stripe. Please read the following for more information: https://easydigitaldownloads.com/development/', 'easy-digital-downloads' ), true );
- }
- }
-
- // Create a SetupIntent for a non-payment carts.
- if ( edds_is_preapprove_enabled() || 0 === $amount ) {
- $intent_args = array_merge(
- array(
- 'usage' => 'off_session',
- 'description' => edds_get_payment_description( $purchase_data['cart_details'] ),
- ),
- $intent_args
- );
-
- /**
- * Filters the arguments used to create a SetupIntent.
- *
- * @since 2.7.0
- *
- * @param array $intent_args SetupIntent arguments.
- * @param array $purchase_data {
- * Purchase form data.
- *
- * }
- */
- $intent_args = apply_filters( 'edds_create_setup_intent_args', $intent_args, $purchase_data );
-
- $intent = edds_api_request( 'SetupIntent', 'create', $intent_args );
-
- // Manually attach PaymentMethod to the Customer.
- if ( ! $payment_method_exists && edd_stripe_existing_cards_enabled() ) {
- $payment_method = edds_api_request( 'PaymentMethod', 'retrieve', $payment_method_id );
- $payment_method->attach( array(
- 'customer' => $customer->id,
- ) );
- }
-
- // Create a PaymentIntent for an immediate charge.
- } else {
- $purchase_summary = edds_get_payment_description( $purchase_data['cart_details'] );
- $statement_descriptor = edds_get_statement_descriptor();
-
- if ( empty( $statement_descriptor ) ) {
- $statement_descriptor = substr( $purchase_summary, 0, 22 );
- }
-
- $statement_descriptor = apply_filters( 'edds_statement_descriptor', $statement_descriptor, $purchase_data );
- $statement_descriptor = edds_sanitize_statement_descriptor( $statement_descriptor );
-
- if ( empty( $statement_descriptor ) ) {
- $statement_descriptor = null;
- } elseif ( is_numeric( $statement_descriptor ) ) {
- $statement_descriptor = edd_get_label_singular() . ' ' . $statement_descriptor;
- }
-
- $intent_args = array_merge(
- array(
- 'amount' => $amount,
- 'currency' => edd_get_currency(),
- 'setup_future_usage' => 'off_session',
- 'confirmation_method' => 'manual',
- 'save_payment_method' => true,
- 'description' => $purchase_summary,
- 'statement_descriptor' => $statement_descriptor,
- ),
- $intent_args
- );
-
- if (
- ! empty( edd_stripe()->connect()->get_connect_id() ) &&
- true === edds_stripe_connect_account_country_supports_application_fees()
- ) {
- $intent_args['application_fee_amount'] = round( $amount * 0.02 );
- }
-
- /**
- * Filters the arguments used to create a SetupIntent.
- *
- * @since 2.7.0
- *
- * @param array $intent_args SetupIntent arguments.
- * @param array $purchase_data {
- * Purchase form data.
- *
- * }
- */
- $intent_args = apply_filters( 'edds_create_payment_intent_args', $intent_args, $purchase_data );
-
- $intent = edds_api_request( 'PaymentIntent', 'create', $intent_args );
- }
-
- // Set the default payment method when attaching the first one.
- if ( $is_first_payment_method ) {
- edds_api_request( 'Customer', 'update', $customer->id, array(
- 'invoice_settings' => array(
- 'default_payment_method' => $payment_method_id,
- ),
- ) );
- }
-
- /**
- * Allows further processing after an Intent is created.
- *
- * @since 2.7.0
- *
- * @param array $purchase_data Purchase data.
- * @param \Stripe\PaymentIntent|\Stripe\SetupIntent $intent Created Stripe Intent.
- * @param int $payment_id EDD Payment ID.
- */
- do_action( 'edds_process_purchase_form', $purchase_data, $intent );
-
- return wp_send_json_success( array(
- 'intent' => $intent,
- // Send back a new nonce because the user might have logged in.
- 'nonce' => wp_create_nonce( 'edd-process-checkout' ),
- ) );
-
- // Catch card-specific errors to handle rate limiting.
- } catch ( \Stripe\Exception\CardException $e ) {
- // Increase the card error count.
- edd_stripe()->rate_limiting->increment_card_error_count();
-
- $error = $e->getJsonBody()['error'];
-
- // Record error in log.
- edd_record_gateway_error(
- esc_html__( 'Stripe Error', 'easy-digital-downloads' ),
- sprintf(
- esc_html__( 'There was an error while processing a Stripe payment. Payment data: %s', 'easy-digital-downloads' ),
- wp_json_encode( $error )
- ),
- 0
- );
-
- $decline_code = ! empty( $error['decline_code'] ) ? $error['decline_code'] : false;
-
- return wp_send_json_error( array(
- 'message' => esc_html(
- edds_get_localized_error_message( $error['code'], $error['message'], $decline_code )
- ),
- ) );
-
- // Catch Stripe-specific errors.
- } catch ( \Stripe\Exception\ApiErrorException $e ) {
- $error = $e->getJsonBody()['error'];
-
- // Record error in log.
- edd_record_gateway_error(
- esc_html__( 'Stripe Error', 'easy-digital-downloads' ),
- sprintf(
- esc_html__( 'There was an error while processing a Stripe payment. Payment data: %s', 'easy-digital-downloads' ),
- wp_json_encode( $error )
- ),
- 0
- );
-
- return wp_send_json_error( array(
- 'message' => esc_html(
- edds_get_localized_error_message( $error['code'], $error['message'] )
- ),
- ) );
-
- // Catch gateway processing errors.
- } catch ( \EDD_Stripe_Gateway_Exception $e ) {
- if ( true === $e->hasLogMessage() ) {
- edd_record_gateway_error(
- esc_html__( 'Stripe Error', 'easy-digital-downloads' ),
- $e->getLogMessage(),
- 0
- );
- }
-
- return wp_send_json_error( array(
- 'message' => esc_html( $e->getMessage() ),
- ) );
-
- // Catch any remaining error.
- } catch( \Exception $e ) {
-
- // Safety precaution in case the payment form is submitted directly.
- // Redirects back to the Checkout.
- if ( isset( $_POST['edd_email'] ) && ! isset( $_POST['payment_method_id'] ) ) {
- edd_set_error( $e->getCode(), $e->getMessage() );
- edd_send_back_to_checkout( '?payment-mode=' . $purchase_data['gateway'] );
- }
-
- return wp_send_json_error( array(
- 'message' => esc_html( $e->getMessage() ),
- ) );
- }
-}
-add_action( 'edd_gateway_stripe', 'edds_process_purchase_form' );
-
-/**
- * Retrieves an Intent.
- *
- * @since 2.7.0
- */
-function edds_get_intent() {
- // Map and merge serialized `form_data` to $_POST so it's accessible to other functions.
- _edds_map_form_data_to_request( $_POST );
-
- $intent_id = isset( $_REQUEST['intent_id'] ) ? sanitize_text_field( $_REQUEST['intent_id'] ) : null;
- $intent_type = isset( $_REQUEST['intent_type'] ) ? sanitize_text_field( $_REQUEST['intent_type'] ) : 'payment_intent';
-
- try {
- if ( edd_stripe()->rate_limiting->has_hit_card_error_limit() ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Rate limit reached during Intent retrieval.'
- );
- }
-
- if ( false === edds_verify_payment_form_nonce() ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Nonce verification failed during Intent retrieval.'
- );
- }
-
- if ( 'setup_intent' === $intent_type ) {
- $intent = edds_api_request( 'SetupIntent', 'retrieve', $intent_id );
- } else {
- $intent = edds_api_request( 'PaymentIntent', 'retrieve', $intent_id );
- }
-
- return wp_send_json_success( array(
- 'intent' => $intent,
- ) );
- // Catch gateway processing errors.
- } catch ( \EDD_Stripe_Gateway_Exception $e ) {
- // Increase the rate limit if an exception occurs mid-process.
- edd_stripe()->rate_limiting->increment_card_error_count();
-
- if ( true === $e->hasLogMessage() ) {
- edd_record_gateway_error(
- esc_html__( 'Stripe Error', 'easy-digital-downloads' ),
- $e->getLogMessage(),
- 0
- );
- }
-
- return wp_send_json_error( array(
- 'message' => esc_html( $e->getMessage() ),
- ) );
-
- // Catch any remaining error.
- } catch( \Exception $e ) {
- return wp_send_json_error( array(
- 'message' => esc_html( $e->getMessage() ),
- ) );
- }
-}
-add_action( 'wp_ajax_edds_get_intent', 'edds_get_intent' );
-add_action( 'wp_ajax_nopriv_edds_get_intent', 'edds_get_intent' );
-
-/**
- * Confirms a PaymentIntent.
- *
- * @since 2.7.0
- */
-function edds_confirm_intent() {
- // Map and merge serialized `form_data` to $_POST so it's accessible to other functions.
- _edds_map_form_data_to_request( $_POST );
-
- $intent_id = isset( $_REQUEST['intent_id'] ) ? sanitize_text_field( $_REQUEST['intent_id'] ) : null;
- $intent_type = isset( $_REQUEST['intent_type'] ) ? sanitize_text_field( $_REQUEST['intent_type'] ) : 'payment_intent';
-
- try {
- if ( edd_stripe()->rate_limiting->has_hit_card_error_limit() ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Rate limit reached during Intent confirmation.'
- );
- }
-
- if ( false === edds_verify_payment_form_nonce() ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Nonce verification failed during Intent confirmation.'
- );
- }
-
- // SetupIntent was used if the cart total is $0.
- if ( 'setup_intent' === $intent_type ) {
- $intent = edds_api_request( 'SetupIntent', 'retrieve', $intent_id );
- } else {
- $intent = edds_api_request( 'PaymentIntent', 'retrieve', $intent_id );
- $intent->confirm();
- }
-
- /**
- * Allows further processing after an Intent is confirmed.
- * Runs for all calls to confirm(), regardless of action needed.
- *
- * @since 2.7.0
- *
- * @param \Stripe\PaymentIntent|\Stripe\SetupIntent $intent Stripe intent.
- */
- do_action( 'edds_confirm_payment_intent', $intent );
-
- return wp_send_json_success( array(
- 'intent' => $intent,
- ) );
-
- // Catch gateway processing errors.
- } catch ( \EDD_Stripe_Gateway_Exception $e ) {
- // Increase the rate limit if an exception occurs mid-process.
- edd_stripe()->rate_limiting->increment_card_error_count();
-
- if ( true === $e->hasLogMessage() ) {
- edd_record_gateway_error(
- esc_html__( 'Stripe Error', 'easy-digital-downloads' ),
- $e->getLogMessage(),
- 0
- );
- }
-
- return wp_send_json_error( array(
- 'message' => esc_html( $e->getMessage() ),
- ) );
-
- // Catch any remaining error.
- } catch( Exception $e ) {
- return wp_send_json_error( array(
- 'message' => esc_html( $e->getMessage() ),
- ) );
- }
-}
-add_action( 'wp_ajax_edds_confirm_intent', 'edds_confirm_intent' );
-add_action( 'wp_ajax_nopriv_edds_confirm_intent', 'edds_confirm_intent' );
-
-/**
- * Capture a PaymentIntent.
- *
- * @since 2.7.0
- */
-function edds_capture_intent() {
- // Map and merge serialized `form_data` to $_POST so it's accessible to other functions.
- _edds_map_form_data_to_request( $_POST );
-
- $intent_id = isset( $_REQUEST['intent_id'] ) ? sanitize_text_field( $_REQUEST['intent_id'] ) : null;
-
- try {
- if ( edd_stripe()->rate_limiting->has_hit_card_error_limit() ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Rate limit reached during Intent capture.'
- );
- }
-
- // Verify the checkout session only.
- if ( false === edds_verify() ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Nonce verification failed during Intent capture.'
- );
- }
-
- $intent = edds_api_request( 'PaymentIntent', 'retrieve', $intent_id );
-
- /**
- * Allows processing before a PaymentIntent is captured.
- *
- * @since 2.7.0
- *
- * @param \Stripe\PaymentIntent $payment_intent Stripe PaymentIntent.
- */
- do_action( 'edds_capture_payment_intent', $intent );
-
- // Capture capturable amount if nothing else has captured the intent.
- if ( 'requires_capture' === $intent->status ) {
- $intent->capture( array(
- 'amount_to_capture' => $intent->amount_capturable,
- ) );
- }
-
- return wp_send_json_success( array(
- 'intent' => $intent,
- ) );
-
- // Catch gateway processing errors.
- } catch ( \EDD_Stripe_Gateway_Exception $e ) {
- // Increase the rate limit if an exception occurs mid-process.
- edd_stripe()->rate_limiting->increment_card_error_count();
-
- if ( true === $e->hasLogMessage() ) {
- edd_record_gateway_error(
- esc_html__( 'Stripe Error', 'easy-digital-downloads' ),
- $e->getLogMessage(),
- 0
- );
- }
-
- return wp_send_json_error( array(
- 'message' => esc_html( $e->getMessage() ),
- ) );
-
- // Catch any remaining error.
- } catch( Exception $e ) {
- return wp_send_json_error( array(
- 'message' => esc_html( $e->getMessage() ),
- ) );
- }
-}
-add_action( 'wp_ajax_edds_capture_intent', 'edds_capture_intent' );
-add_action( 'wp_ajax_nopriv_edds_capture_intent', 'edds_capture_intent' );
-
-/**
- * Update a PaymentIntent.
- *
- * @since 2.7.0
- */
-function edds_update_intent() {
- // Map and merge serialized `form_data` to $_POST so it's accessible to other functions.
- _edds_map_form_data_to_request( $_POST );
-
- $intent_id = isset( $_REQUEST['intent_id'] ) ? sanitize_text_field( $_REQUEST['intent_id'] ) : null;
-
- try {
- if ( edd_stripe()->rate_limiting->has_hit_card_error_limit() ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Rate limit reached during Intent update.'
- );
- }
-
- if ( false === edds_verify_payment_form_nonce() ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Nonce verification failed during Intent update.'
- );
- }
-
- $intent = edds_api_request( 'PaymentIntent', 'retrieve', $intent_id );
-
- /**
- * Allows processing before a PaymentIntent is updated.
- *
- * @since 2.7.0
- *
- * @param string $intent_id Stripe PaymentIntent ID.
- */
- do_action( 'edds_update_payment_intent', $intent_id );
-
- $intent_args = array();
- $intent_args_whitelist = array(
- 'payment_method',
- );
-
- foreach ( $intent_args_whitelist as $intent_arg ) {
- if ( isset( $_POST[ $intent_arg ] ) ) {
- $intent_args[ $intent_arg ] = sanitize_text_field( $_POST[ $intent_arg ] );
- }
- }
-
- $intent = edds_api_request( 'PaymentIntent', 'update', $intent_id, $intent_args );
-
- return wp_send_json_success( array(
- 'intent' => $intent,
- ) );
-
- // Catch gateway processing errors.
- } catch ( \EDD_Stripe_Gateway_Exception $e ) {
- // Increase the rate limit if an exception occurs mid-process.
- edd_stripe()->rate_limiting->increment_card_error_count();
-
- if ( true === $e->hasLogMessage() ) {
- edd_record_gateway_error(
- esc_html__( 'Stripe Error', 'easy-digital-downloads' ),
- $e->getLogMessage(),
- 0
- );
- }
-
- return wp_send_json_error( array(
- 'message' => esc_html( $e->getMessage() ),
- ) );
-
- // Catch any remaining error.
- } catch( Exception $e ) {
- return wp_send_json_error( array(
- 'message' => esc_html( $e->getMessage() ),
- ) );
- }
-}
-add_action( 'wp_ajax_edds_update_intent', 'edds_update_intent' );
-add_action( 'wp_ajax_nopriv_edds_update_intent', 'edds_update_intent' );
-
-/**
- * Create an \EDD_Payment.
- *
- * @since 2.7.0
- */
-function edds_create_payment() {
- // Map and merge serialized `form_data` to $_POST so it's accessible to other functions.
- _edds_map_form_data_to_request( $_POST );
-
- // Simulate being in an `edd_process_purchase_form()` request.
- _edds_fake_process_purchase_step();
-
- try {
- if ( edd_stripe()->rate_limiting->has_hit_card_error_limit() ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Rate limit reached during payment creation.'
- );
- }
-
- // This must happen in the Checkout flow, so validate the Checkout nonce.
- if ( false === edds_verify() ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Nonce verification failed during payment creation.'
- );
- }
-
- $intent = isset( $_REQUEST['intent'] ) ? $_REQUEST['intent'] : array();
-
- if ( ! isset( $intent['id'] ) ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Unable to retrieve Intent data during payment creation.'
- );
- }
-
- $purchase_data = edd_get_purchase_session();
-
- if ( false === $purchase_data ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Unable to retrieve purchase data during payment creation.'
- );
- }
-
- // Ensure Intent has transitioned to the correct status.
- if ( 'setup_intent' === $intent['object'] ) {
- $intent = edds_api_request( 'SetupIntent', 'retrieve', $intent['id'] );
- } else {
- $intent = edds_api_request( 'PaymentIntent', 'retrieve', $intent['id'] );
- }
-
- if ( ! in_array( $intent->status, array( 'succeeded', 'requires_capture' ), true ) ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Invalid Intent status ' . $intent->status . ' during payment creation.'
- );
- }
-
- $payment_data = array(
- 'price' => $purchase_data['price'],
- 'date' => $purchase_data['date'],
- 'user_email' => $purchase_data['user_email'],
- 'purchase_key' => $purchase_data['purchase_key'],
- 'currency' => edd_get_currency(),
- 'downloads' => $purchase_data['downloads'],
- 'cart_details' => $purchase_data['cart_details'],
- 'user_info' => $purchase_data['user_info'],
- 'status' => 'pending',
- 'gateway' => 'stripe',
- );
-
- // Ensure $_COOKIE is available without a new HTTP request.
- if ( class_exists( 'EDD_Auto_Register' ) ) {
- add_action( 'set_logged_in_cookie', 'edds_set_logged_in_cookie_global' );
- add_filter( 'edd_get_option_edd_auto_register_complete_orders_only', '__return_false' );
- }
-
- // Record the pending payment.
- $payment_id = edd_insert_payment( $payment_data );
-
- if ( false === $payment_id ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Unable to insert payment record.'
- );
- }
-
- // Retrieve created payment.
- $payment = edd_get_payment( $payment_id );
-
- // Retrieve the relevant Intent.
- if ( 'setup_intent' === $intent->object ) {
- $intent = edds_api_request( 'SetupIntent', 'update', $intent->id, array(
- 'metadata' => array(
- 'edd_payment_id' => $payment_id,
- ),
- ) );
-
- $payment->add_note( 'Stripe SetupIntent ID: ' . $intent->id );
- $payment->update_meta( '_edds_stripe_setup_intent_id', $intent->id );
- } else {
- $intent = edds_api_request( 'PaymentIntent', 'update', $intent->id, array(
- 'metadata' => array(
- 'edd_payment_id' => $payment_id,
- ),
- ) );
-
- $payment->add_note( 'Stripe PaymentIntent ID: ' . $intent->id );
- $payment->update_meta( '_edds_stripe_payment_intent_id', $intent->id );
- }
-
- // Use Intent ID for temporary transaction ID.
- // It will be updated when a charge is available.
- $payment->transaction_id = $intent->id;
-
- // Retrieves or creates a Stripe Customer.
- $payment->update_meta( '_edds_stripe_customer_id', $intent->customer );
- $payment->add_note( 'Stripe Customer ID: ' . $intent->customer );
-
- // Attach the \Stripe\Customer ID to the \EDD_Customer meta if one exists.
- $edd_customer = new EDD_Customer( $purchase_data['user_email'] );
-
- if ( $edd_customer->id > 0 ) {
- $edd_customer->update_meta( edd_stripe_get_customer_key(), $intent->customer );
- }
-
- $saved = $payment->save();
-
- if ( class_exists( 'EDD_Auto_Register' ) ) {
- remove_action( 'set_logged_in_cookie', 'edds_set_logged_in_cookie_global' );
- }
-
- if ( true === $saved ) {
- /**
- * Allows further processing after a payment is created.
- *
- * @since 2.7.0
- *
- * @param \EDD_Payment $payment EDD Payment.
- * @param \Stripe\PaymentIntent|\Stripe\SetupIntent $intent Created Stripe Intent.
- */
- do_action( 'edds_payment_created', $payment, $intent );
-
- return wp_send_json_success( array(
- 'intent' => $intent,
- 'payment' => $payment,
- // Send back a new nonce because the user might have logged in via Auto Register.
- 'nonce' => wp_create_nonce( 'edd-process-checkout' ),
- ) );
- } else {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'Unable to create payment.',
- 'easy-digital-downloads'
- ),
- 'Unable to save payment record.'
- );
- }
-
- // Catch gateway processing errors.
- } catch ( \EDD_Stripe_Gateway_Exception $e ) {
- // Increase the rate limit count when something goes wrong mid-process.
- edd_stripe()->rate_limiting->increment_card_error_count();
-
- if ( true === $e->hasLogMessage() ) {
- edd_record_gateway_error(
- esc_html__( 'Stripe Error', 'easy-digital-downloads' ),
- $e->getLogMessage(),
- 0
- );
- }
-
- return wp_send_json_error( array(
- 'message' => esc_html( $e->getMessage() ),
- ) );
-
- // Catch any remaining error.
- } catch( \Exception $e ) {
- return wp_send_json_error( array(
- 'message' => esc_html( $e->getMessage() ),
- ) );
- }
-}
-add_action( 'wp_ajax_edds_create_payment', 'edds_create_payment' );
-add_action( 'wp_ajax_nopriv_edds_create_payment', 'edds_create_payment' );
-
-/**
- * Completes an \EDD_Payment (via AJAX)
- *
- * @since 2.7.0
- */
-function edds_complete_payment() {
- // Map and merge serialized `form_data` to $_POST so it's accessible to other functions.
- _edds_map_form_data_to_request( $_POST );
-
- $intent = isset( $_REQUEST['intent'] ) ? $_REQUEST['intent'] : array();
-
- try {
- if ( edd_stripe()->rate_limiting->has_hit_card_error_limit() ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Rate limit reached during payment completion.'
- );
- }
-
- // Verify the checkout session only.
- if ( false === edds_verify() ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Nonce verification failed during payment completion.'
- );
- }
-
- if ( ! isset( $intent['id'] ) ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Unable to retrieve Intent during payment completion.'
- );
- }
-
- // Retrieve the intent from Stripe again to verify linked payment.
- if ( 'setup_intent' === $intent['object'] ) {
- $intent = edds_api_request( 'SetupIntent', 'retrieve', $intent['id'] );
- } else {
- $intent = edds_api_request( 'PaymentIntent', 'retrieve', $intent['id'] );
- }
-
- $payment = edd_get_payment( $intent->metadata->edd_payment_id );
-
- if ( ! $payment ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Unable to retrieve pending payment record.'
- );
- }
-
- if ( 'setup_intent' !== $intent['object'] ) {
- $charge_id = sanitize_text_field( current( $intent['charges']['data'] )['id'] );
-
- $payment->add_note( 'Stripe Charge ID: ' . $charge_id );
- $payment->transaction_id = sanitize_text_field( $charge_id );
- }
-
- // Mark payment as Preapproved.
- if ( edds_is_preapprove_enabled() ) {
- $payment->status = 'preapproval';
-
- // Complete payment and transition the Transaction ID to the actual Charge ID.
- } else {
- $payment->status = 'publish';
- }
-
- if ( $payment->save() ) {
- /**
- * Allows further processing after a payment is completed.
- *
- * Sends back just the Intent ID to avoid needing always retrieve
- * the intent in this step, which has been transformed via JSON,
- * and is no longer a \Stripe\PaymentIntent
- *
- * @since 2.7.0
- *
- * @param \EDD_Payment $payment EDD Payment.
- * @param string $intent_id Stripe Intent ID.
- */
- do_action( 'edds_payment_complete', $payment, $intent['id'] );
-
- // Empty cart.
- edd_empty_cart();
-
- return wp_send_json_success( array(
- 'payment' => $payment,
- 'intent' => $intent,
- ) );
- } else {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Unable to update payment record to completion.'
- );
- }
-
- // Catch gateway processing errors.
- } catch ( \EDD_Stripe_Gateway_Exception $e ) {
- // Increase the rate limit count when something goes wrong mid-process.
- edd_stripe()->rate_limiting->increment_card_error_count();
-
- if ( true === $e->hasLogMessage() ) {
- edd_record_gateway_error(
- esc_html__( 'Stripe Error', 'easy-digital-downloads' ),
- $e->getLogMessage(),
- 0
- );
- }
-
- return wp_send_json_error( array(
- 'message' => esc_html( $e->getMessage() ),
- ) );
-
- // Catch any remaining error.
- } catch( \Exception $e ) {
- return wp_send_json_error( array(
- 'message' => esc_html( $e->getMessage() ),
- ) );
- }
-}
-add_action( 'wp_ajax_edds_complete_payment', 'edds_complete_payment' );
-add_action( 'wp_ajax_nopriv_edds_complete_payment', 'edds_complete_payment' );
-
-/**
- * Completes a Payment authorization.
- *
- * @since 2.7.0
- */
-function edds_complete_payment_authorization() {
- $intent_id = isset( $_REQUEST['intent_id'] ) ? sanitize_text_field( $_REQUEST['intent_id'] ) : null;
-
- try {
- if ( edd_stripe()->rate_limiting->has_hit_card_error_limit() ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Rate limit reached during payment authorization.'
- );
- }
-
- $nonce_verified = edds_verify( 'edds-complete-payment-authorization', 'edds-complete-payment-authorization' );
- if ( false === $nonce_verified ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Nonce verification failed during payment authorization.'
- );
- }
-
- $intent = edds_api_request( 'PaymentIntent', 'retrieve', $intent_id );
- $edd_payment_id = $intent->metadata->edd_payment_id ? $intent->metadata->edd_payment_id : false;
-
- if ( ! $edd_payment_id ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Unable to retrieve payment record ID from Stripe metadata.'
- );
- }
-
- $payment = edd_get_payment( $edd_payment_id );
- $charge_id = current( $intent->charges->data )->id;
-
- $payment->add_note( 'Stripe Charge ID: ' . $charge_id );
- $payment->transaction_id = $charge_id;
- $payment->status = 'publish';
-
-
- if ( $payment->save() ) {
-
- /**
- * Allows further processing after a payment authorization is completed.
- *
- * @since 2.7.0
- *
- * @param \Stripe\PaymentIntent $intent Created Stripe Intent.
- * @param EDD_Payment $payment EDD Payment.
- */
- do_action( 'edds_payment_authorization_complete', $intent, $payment );
-
- return wp_send_json_success( array(
- 'intent' => $intent,
- 'payment' => $payment,
- ) );
- } else {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Unable to save payment record during authorization.'
- );
- }
- } catch( \Exception $e ) {
- return wp_send_json_error( array(
- 'message' => esc_html( $e->getMessage() ),
- ) );
- }
-}
-add_action( 'wp_ajax_edds_complete_payment_authorization', 'edds_complete_payment_authorization' );
-add_action( 'wp_ajax_nopriv_edds_complete_payment_authorization', 'edds_complete_payment_authorization' );
-
-/**
- * Generates a description based on the cart details.
- *
- * @param array $cart_details {
- *
- * }
- * @return string
- */
-function edds_get_payment_description( $cart_details ) {
- $purchase_summary = '';
-
- if( is_array( $cart_details ) && ! empty( $cart_details ) ) {
- foreach( $cart_details as $item ) {
- $purchase_summary .= $item['name'];
- $price_id = isset( $item['item_number']['options']['price_id'] )
- ? absint( $item['item_number']['options']['price_id'] )
- : false;
-
- if ( false !== $price_id ) {
- $purchase_summary .= ' - ' . edd_get_price_option_name( $item['id'], $item['item_number']['options']['price_id'] );
- }
-
- $purchase_summary .= ', ';
- }
-
- $purchase_summary = rtrim( $purchase_summary, ', ' );
- }
-
- // Stripe has a maximum of 999 characters in the charge description
- $purchase_summary = substr( $purchase_summary, 0, 1000 );
-
- return html_entity_decode( $purchase_summary, ENT_COMPAT, 'UTF-8' );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/payment-actions/functions.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/payment-actions/functions.php
deleted file mode 100644
index c84a29d5..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/payment-actions/functions.php
+++ /dev/null
@@ -1,242 +0,0 @@
- $purchase_data['user_email'],
- 'description' => $purchase_data['user_email'],
- 'name' => $customer_name,
- );
-
- /**
- * Filters the arguments used to create a Customer in Stripe.
- *
- * @since unknown
- *
- * @param array $customer_args {
- * Arguments to create a Stripe Customer.
- *
- * @link https://stripe.com/docs/api/customers/create
- * }
- * @param array $purchase_data {
- * Cart purchase data if in the checkout context. Empty otherwise.
- * }
- */
- $customer_args = apply_filters( 'edds_create_customer_args', $customer_args, $purchase_data );
- $customer = edds_get_stripe_customer( $stripe_customer_id, $customer_args );
-
- return $customer;
-}
-
-
-/**
- * Charge a preapproved payment
- *
- * @since 1.6
- * @return bool
- */
-function edds_charge_preapproved( $payment_id = 0 ) {
- $retval = false;
-
- if ( empty( $payment_id ) ) {
- return $retval;
- }
-
- $payment = edd_get_payment( $payment_id );
- $customer_id = $payment->get_meta( '_edds_stripe_customer_id' );
-
- if ( empty( $customer_id ) ) {
- return $retval;
- }
-
- if ( ! in_array( $payment->status, array( 'preapproval', 'preapproval_pending' ), true ) ) {
- return $retval;
- }
-
- $setup_intent_id = $payment->get_meta( '_edds_stripe_setup_intent_id' );
-
- try {
- if ( edds_is_zero_decimal_currency() ) {
- $amount = edd_get_payment_amount( $payment->ID );
- } else {
- $amount = edd_get_payment_amount( $payment->ID ) * 100;
- }
-
- $cart_details = edd_get_payment_meta_cart_details( $payment->ID );
- $purchase_summary = edds_get_payment_description( $cart_details );
- $statement_descriptor = edds_get_statement_descriptor();
-
- if ( empty( $statement_descriptor ) ) {
- $statement_descriptor = substr( $purchase_summary, 0, 22 );
- }
-
- $statement_descriptor = apply_filters( 'edds_preapproved_statement_descriptor', $statement_descriptor, $payment->ID );
- $statement_descriptor = edds_sanitize_statement_descriptor( $statement_descriptor );
-
- if ( empty( $statement_descriptor ) ) {
- $statement_descriptor = null;
- }
-
- // Create a PaymentIntent using SetupIntent data.
- if ( ! empty( $setup_intent_id ) ) {
- $setup_intent = edds_api_request( 'SetupIntent', 'retrieve', $setup_intent_id );
- $intent_args = array(
- 'amount' => $amount,
- 'currency' => edd_get_currency(),
- 'payment_method' => $setup_intent->payment_method,
- 'customer' => $setup_intent->customer,
- 'off_session' => true,
- 'confirm' => true,
- 'description' => $purchase_summary,
- 'metadata' => $setup_intent->metadata->toArray(),
- 'statement_descriptor' => $statement_descriptor,
- );
- // Process a legacy preapproval. Uses the Customer's default source.
- } else {
- $customer = \Stripe\Customer::retrieve( $customer_id );
- $intent_args = array(
- 'amount' => $amount,
- 'currency' => edd_get_currency(),
- 'payment_method' => $customer->default_source,
- 'customer' => $customer->id,
- 'off_session' => true,
- 'confirm' => true,
- 'description' => $purchase_summary,
- 'metadata' => array(
- 'email' => edd_get_payment_user_email( $payment->ID ),
- 'edd_payment_id' => $payment->ID,
- ),
- 'statement_descriptor' => $statement_descriptor,
- );
- }
-
- /** This filter is documented in includes/payment-actions.php */
- $intent_args = apply_filters( 'edds_create_payment_intent_args', $intent_args, array() );
-
- $payment_intent = edds_api_request( 'PaymentIntent', 'create', $intent_args );
-
- if ( 'succeeded' === $payment_intent->status ) {
- $charge_id = current( $payment_intent->charges->data )->id;
-
- $payment->status = 'publish';
- $payment->add_note( 'Stripe Charge ID: ' . $charge_id );
- $payment->add_note( 'Stripe PaymentIntent ID: ' . $payment_intent->id );
- $payment->add_meta( '_edds_stripe_payment_intent_id', $payment_intent->id );
- $payment->transaction_id = $charge_id;
-
- $retval = $payment->save();
- }
- } catch( \Stripe\Exception\ApiErrorException $e ) {
- $error = $e->getJsonBody()['error'];
-
- $payment->status = 'preapproval_pending';
- $payment->add_note( esc_html(
- edds_get_localized_error_message( $error['code'], $error['message'] )
- ) );
- $payment->add_note( 'Stripe PaymentIntent ID: ' . $error['payment_intent']['id'] );
- $payment->add_meta( '_edds_stripe_payment_intent_id', $error['payment_intent']['id'] );
- $payment->save();
-
- /**
- * Allows further processing when a Preapproved payment needs further action.
- *
- * @since 2.7.0
- *
- * @param int $payment_id ID of the payment.
- */
- do_action( 'edds_preapproved_payment_needs_action', $payment_id );
- } catch( \Exception $e ) {
- $payment->add_note( esc_html( $e->getMessage() ) );
- }
-
- return $retval;
-}
-
-/**
- * If selected, refunds a charge in Stripe when creating a new refund record.
- * This handles refunds in EDD 3.0+. For EDD 2.x see `edd_stripe_process_refund()`
- * @see edd_stripe_process_refund()
- *
- * @since 2.8.7
- *
- * @param int $order_id ID of the order we're processing a refund for.
- * @param int $refund_id ID of the newly created refund record.
- * @param bool $all_refunded Whether or not this was a full refund.
- */
-function edd_stripe_maybe_refund_charge( $order_id, $refund_id, $all_refunded ) {
- if ( ! current_user_can( 'edit_shop_payments', $order_id ) ) {
- return;
- }
-
- if ( empty( $_POST['data'] ) ) {
- return;
- }
-
- $order = edd_get_order( $order_id );
- if ( empty( $order->gateway ) || 'stripe' !== $order->gateway ) {
- return;
- }
-
- edd_debug_log( sprintf( 'Stripe - Maybe processing refund for order #%d.', $order_id ) );
-
- // Get our data out of the serialized string.
- parse_str( $_POST['data'], $form_data );
-
- if ( empty( $form_data['edd-stripe-refund'] ) ) {
- edd_debug_log( 'Stripe - Exiting refund process, as checkbox was not selected.' );
-
- edd_add_note( array(
- 'object_id' => $order_id,
- 'object_type' => 'order',
- 'user_id' => is_admin() ? get_current_user_id() : 0,
- 'content' => __( 'Charge not refunded in Stripe, as checkbox was not selected.', 'easy-digital-downloads' )
- ) );
-
- return;
- }
-
- edd_debug_log( 'Stripe - Refund checkbox was selected, proceeding to refund charge.' );
-
- $refund = edd_get_order( $refund_id );
- if ( empty( $refund->total ) ) {
- edd_debug_log( sprintf(
- 'Stripe - Exiting refund for order #%d - refund total is empty.',
- $order_id
- ) );
-
- return;
- }
-
- try {
- edd_refund_stripe_purchase( $order, $refund );
- } catch ( \Exception $e ) {
- edd_debug_log( sprintf( 'Exception thrown while refunding order #%d. Message: %s', $order_id, $e->getMessage() ) );
- }
-}
-add_action( 'edd_refund_order', 'edd_stripe_maybe_refund_charge', 10, 3 );
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/payment-actions/payment-elements-actions.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/payment-actions/payment-elements-actions.php
deleted file mode 100644
index cff625dd..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/payment-actions/payment-elements-actions.php
+++ /dev/null
@@ -1,776 +0,0 @@
-has_regional_support || false === edd_stripe()->regional_support->requires_card_name ) {
- add_filter(
- 'edd_purchase_form_required_fields',
- function( $required_fields ) {
- unset( $required_fields['card_name'] );
- return $required_fields;
- }
- );
- remove_action( 'edd_checkout_error_checks', 'edds_process_post_data' );
- }
-}
-add_action( 'edd_pre_process_purchase', 'edds_maybe_disable_card_name' );
-
-/**
- * Starts the process of completing a purchase with Stripe.
- *
- * Generates an intent that can require user authorization before proceeding.
- *
- * @link https://stripe.com/docs/payments/intents
- * @since 2.7.0
- *
- * @param array $purchase_data {
- * Purchase form data.
- *
- * }
- */
-function edds_process_purchase_form( $purchase_data ) {
- // Catch a straight to gateway request.
- // Remove the error set by the "gateway mismatch" and allow the redirect.
- if ( isset( $_REQUEST['edd_action'] ) && 'straight_to_gateway' === $_REQUEST['edd_action'] ) {
- foreach ( $purchase_data['downloads'] as $download ) {
- $options = isset( $download['options'] ) ? $download['options'] : array();
- $options['quantity'] = isset( $download['quantity'] ) ? $download['quantity'] : 1;
-
- edd_add_to_cart( $download['id'], $options );
- }
-
- edd_unset_error( 'edd-straight-to-gateway-error' );
- edd_send_back_to_checkout();
-
- return;
- }
-
- try {
- if ( edd_stripe()->rate_limiting->has_hit_card_error_limit() ) {
- throw new \EDD_Stripe_Gateway_Exception( edd_stripe()->rate_limiting->get_rate_limit_error_message() );
- }
-
- /**
- * Allows processing before an Intent is created.
- *
- * @since 2.7.0
- *
- * @param array $purchase_data Purchase data.
- */
- do_action( 'edds_pre_process_purchase_form', $purchase_data );
-
- if ( edds_is_zero_decimal_currency() ) {
- $amount = $purchase_data['price'];
- } else {
- $amount = round( $purchase_data['price'] * 100, 0 );
- }
-
- /**
- * We need to unhook some of the Recurring Payments actions here as we're handling captures ourselves.
- *
- * We're also going to attempt to restrict this to a single subscription and no mixed carts, for the time being.
- */
- $cart_contains_subscription = (bool) ( function_exists( 'edd_recurring' ) && edd_recurring()->cart_contains_recurring() );
-
- if ( $cart_contains_subscription ) {
- if ( count( edd_get_cart_contents() ) > 1 || edd_recurring()->cart_is_mixed() ) {
- throw new \EDD_Stripe_Gateway_Exception( edds_get_single_subscription_cart_error() );
- }
-
- if ( edd_recurring()->cart_has_free_trial() ) {
- $amount = 0;
- }
-
- global $edd_recurring_stripe;
- remove_filter( 'edds_create_payment_intent_args', array( $edd_recurring_stripe, 'create_payment_intent_args' ), 10, 2 );
- }
-
- $existing_intent = false;
- $customer = false;
-
- if ( ! empty( $_REQUEST['intent_id'] ) && ! empty( $_REQUEST['intent_fingerprint'] ) ) {
- $intent = edds_api_request( $_REQUEST['intent_type'], 'retrieve', $_REQUEST['intent_id'] );
- if ( ! empty( $intent->customer ) ) {
- $existing_intent = true;
- $customer = edds_get_stripe_customer( $intent->customer, array() );
- }
- }
-
- // We didn't have a customer on the existing intent. Make a new one.
- if ( empty( $customer ) ) {
- // Retrieves or creates a Stripe Customer.
- $customer = edds_checkout_setup_customer( $purchase_data );
- }
-
- if ( ! $customer ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'Unable to create customer. Please try again.',
- 'easy-digital-downloads'
- )
- );
- }
-
- /**
- * Allows processing before an Intent is created, but
- * after a \Stripe\Customer is available.
- *
- * @since 2.7.0
- *
- * @param array $purchase_data Purchase data.
- * @param \Stripe\Customer $customer Stripe Customer object.
- */
- do_action( 'edds_process_purchase_form_before_intent', $purchase_data, $customer );
-
- // Create a list of {$download_id}_{$price_id}.
- $payment_items = array();
-
- foreach ( $purchase_data['cart_details'] as $item ) {
- $price_id = isset( $item['item_number']['options']['price_id'] )
- ? $item['item_number']['options']['price_id']
- : null;
-
- $payment_items[] = $item['id'] . ( ! empty( $price_id ) ? ( '_' . $price_id ) : '' );
- }
-
- // Shared Intent arguments.
- $intent_args = array(
- 'customer' => $customer->id,
- 'metadata' => array(
- 'email' => esc_html( $purchase_data['user_info']['email'] ),
- 'edd_payment_subtotal' => esc_html( $purchase_data['subtotal'] ),
- 'edd_payment_discount' => esc_html( $purchase_data['discount'] ),
- 'edd_payment_tax' => esc_html( $purchase_data['tax'] ),
- 'edd_payment_tax_rate' => esc_html( $purchase_data['tax_rate'] ),
- 'edd_payment_fees' => esc_html( edd_get_cart_fee_total() ),
- 'edd_payment_total' => esc_html( $purchase_data['price'] ),
- 'edd_payment_items' => esc_html( implode( ', ', $payment_items ) ),
- 'zero_decimal_amount' => $amount,
- ),
- );
-
- $payment_method = $_REQUEST['payment_method'];
-
- // Attach the payment method.
- $intent_args['payment_method'] = sanitize_text_field( $payment_method['id'] );
-
- // Set to automatic payment methods so any of the supported methods can be used here.
- $intent_args['automatic_payment_methods'] = array( 'enabled' => true );
-
- // We need the intent type later, so we'll set it here.
- $intent_type = ( edds_is_preapprove_enabled() || 0 === $amount ) ? 'SetupIntent' : 'PaymentIntent';
-
- // Create a SetupIntent for a non-payment carts.
- if ( 'SetupIntent' === $intent_type ) {
- $intent_args = array_merge(
- array(
- 'description' => edds_get_payment_description( $purchase_data['cart_details'] ),
- 'usage' => 'off_session',
- ),
- $intent_args
- );
-
- /**
- * BETA Functionality.
- *
- * Sending the automatic_payment_methods flag to the SetupIntent is a beta feature that we have to enable via an API version
- *
- * @link https://stripe.com/docs/payments/defer-intent-creation?type=setup#create-intent
- */
- add_action(
- 'edds_pre_stripe_api_request',
- function() {
- \Stripe\Stripe::setApiVersion( '2018-09-24;automatic_payment_methods_beta=v1' );
- },
- 11
- );
-
- /**
- * Filters the arguments used to create a SetupIntent.
- *
- * @since 2.7.0
- *
- * @param array $intent_args SetupIntent arguments.
- * @param array $purchase_data {
- * Purchase form data.
- *
- * }
- */
- $intent_args = apply_filters( 'edds_create_setup_intent_args', $intent_args, $purchase_data );
- } else {
- $purchase_summary = edds_get_payment_description( $purchase_data['cart_details'] );
- $statement_descriptor = edds_get_statement_descriptor();
-
- if ( empty( $statement_descriptor ) ) {
- $statement_descriptor = substr( $purchase_summary, 0, 22 );
- }
-
- $statement_descriptor = apply_filters( 'edds_statement_descriptor', $statement_descriptor, $purchase_data );
- $statement_descriptor = edds_sanitize_statement_descriptor( $statement_descriptor );
-
- if ( empty( $statement_descriptor ) ) {
- $statement_descriptor = null;
- } elseif ( is_numeric( $statement_descriptor ) ) {
- $statement_descriptor = edd_get_label_singular() . ' ' . $statement_descriptor;
- }
-
- $intent_args = array_merge(
- array(
- 'amount' => $amount,
- 'currency' => edd_get_currency(),
- 'description' => $purchase_summary,
- 'statement_descriptor' => $statement_descriptor,
- 'setup_future_usage' => 'off_session',
-
- ),
- $intent_args
- );
-
- $intent_type = 'PaymentIntent';
-
- if (
- ! empty( edd_stripe()->connect()->get_connect_id() ) &&
- true === edds_stripe_connect_account_country_supports_application_fees()
- ) {
- $intent_args['application_fee_amount'] = round( $amount * 0.02 );
- }
-
- /**
- * Filters the arguments used to create a SetupIntent.
- *
- * @since 2.7.0
- *
- * @param array $intent_args SetupIntent arguments.
- * @param array $purchase_data {
- * Purchase form data.
- *
- * }
- */
- $intent_args = apply_filters( 'edds_create_payment_intent_args', $intent_args, $purchase_data );
- }
-
- $new_fingerprint = md5( json_encode( $intent_args ) );
-
- // Only update the intent, and process this further if we've made changes to the intent.
- if ( ! empty( $_REQUEST['intent_id'] ) && ! empty( $_REQUEST['intent_fingerprint'] ) ) {
- if ( hash_equals( $_REQUEST['intent_fingerprint'], $new_fingerprint ) ) {
- return wp_send_json_success( array(
- 'intent_id' => $intent->id,
- 'client_secret' => $intent->client_secret,
- 'intent_type' => $intent_type,
- 'token' => wp_create_nonce( 'edd-process-checkout' ),
- 'intent_fingerprint' => $new_fingerprint,
- 'intent_changed' => 0,
- ) );
- }
- }
-
- /**
- * If purchasing a subscription with a card, we need to add the subscription mandate data.
- *
- * This will ensure that any cards that require mandates like INR payments or India based cards will correctly add
- * the mandates necessary for recurring payments.
- *
- * We do this after we check for an existing intent ID, because the mandate data will change depending on the 'timestamp'.
- */
- if ( 'card' === $payment_method['type'] && true === $cart_contains_subscription ) {
- require_once EDDS_PLUGIN_DIR . 'includes/utils/class-edd-stripe-mandates.php';
- $mandates = new EDD_Stripe_Mandates( $purchase_data, $intent_type );
- $mandate_options = $mandates->mandate_options;
-
- // Add the mandate options to the intent arguments.
- $intent_args['payment_method_options']['card']['mandate_options'] = $mandate_options;
- }
-
- if ( ! empty( $existing_intent ) ) {
- // Existing intents need to not have the automatic_payment_methods flag set.
- if ( ! empty( $intent_args['automatic_payment_methods'] ) ) {
- unset( $intent_args['automatic_payment_methods'] );
- }
-
- edds_api_request( $intent_type, 'update', $intent->id, $intent_args );
- $intent = edds_api_request( $intent_type, 'retrieve', $intent->id );
- } else {
- $intent = edds_api_request( $intent_type, 'create', $intent_args );
- }
-
- /**
- * Allows further processing after an Intent is created.
- *
- * @since 2.7.0
- *
- * @param array $purchase_data Purchase data.
- * @param \Stripe\PaymentIntent|\Stripe\SetupIntent $intent Created Stripe Intent.
- * @param int $payment_id EDD Payment ID.
- */
- do_action( 'edds_process_purchase_form', $purchase_data, $intent );
-
- return wp_send_json_success( array(
- 'intent_id' => $intent->id,
- 'client_secret' => $intent->client_secret,
- 'intent_type' => $intent_type,
- 'token' => wp_create_nonce( 'edd-process-checkout' ),
- 'intent_fingerprint' => $new_fingerprint,
- 'intent_changed' => 1,
- ) );
-
- } catch ( \Stripe\Exception\ApiErrorException $e ) {
- $error = $e->getJsonBody()['error'];
-
- // Record error in log.
- edd_record_gateway_error(
- esc_html__( 'Stripe Error 002', 'easy-digital-downloads' ),
- sprintf(
- esc_html__( 'There was an error while processing a Stripe payment. Order data: %s', 'easy-digital-downloads' ),
- wp_json_encode( $error )
- ),
- 0
- );
-
- return wp_send_json_error( array(
- 'message' => esc_html(
- edds_get_localized_error_message( $error['code'], $error['message'] )
- ),
- ) );
-
- // Catch gateway processing errors.
- } catch ( \EDD_Stripe_Gateway_Exception $e ) {
- if ( true === $e->hasLogMessage() ) {
- edd_record_gateway_error(
- esc_html__( 'Stripe Error 003', 'easy-digital-downloads' ),
- $e->getLogMessage(),
- 0
- );
- }
-
- return wp_send_json_error( array(
- 'message' => esc_html( $e->getMessage() ),
- ) );
-
- // Catch any remaining error.
- } catch( \Exception $e ) {
-
- return wp_send_json_error( array(
- 'message' => esc_html( $e->getMessage() ),
- ) );
- }
-}
-add_action( 'edd_gateway_stripe', 'edds_process_purchase_form' );
-
-/**
- * Create an \EDD\Orders\Order.
- *
- * @since 2.9.0
- */
-function edds_create_and_complete_order() {
- // Map and merge serialized `form_data` to $_POST so it's accessible to other functions.
- _edds_map_form_data_to_request( $_POST );
-
- // Simulate being in an `edd_process_purchase_form()` request.
- _edds_fake_process_purchase_step();
-
- try {
- if ( edd_stripe()->rate_limiting->has_hit_card_error_limit() ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'Error 1001: An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Rate limit reached during payment creation.'
- );
- }
-
- // This must happen in the Checkout flow, so validate the Checkout nonce.
- if ( false === edds_verify() ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'Error 1002: An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Nonce verification failed during payment creation.'
- );
- }
-
- $intent_id = isset( $_REQUEST['intent_id'] ) ? $_REQUEST['intent_id'] : '';
-
- if ( ! isset( $intent_id ) ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'Error 1003: An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Unable to retrieve Intent data during payment creation.'
- );
- }
-
- $purchase_data = edd_get_purchase_session();
-
- if ( false === $purchase_data ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'Error 1004: An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Unable to retrieve purchase data during payment creation.'
- );
- }
-
- // Ensure Intent has transitioned to the correct status.
- if ( 'SetupIntent' === $_REQUEST['intent_type'] ) {
- $intent = edds_api_request( 'SetupIntent', 'retrieve', $intent_id );
- } else {
- $intent = edds_api_request( 'PaymentIntent', 'retrieve', $intent_id );
- }
-
- if ( ! in_array( $intent->status, array( 'succeeded', 'requires_capture' ), true ) ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'Error 1005: An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Invalid Intent status ' . $intent->status . ' during order creation.'
- );
- }
-
- $order_data = array(
- 'price' => $purchase_data['price'],
- 'date' => $purchase_data['date'],
- 'user_email' => $purchase_data['user_email'],
- 'purchase_key' => $purchase_data['purchase_key'],
- 'currency' => edd_get_currency(),
- 'downloads' => $purchase_data['downloads'],
- 'cart_details' => $purchase_data['cart_details'],
- 'user_info' => $purchase_data['user_info'],
- 'status' => 'pending',
- 'gateway' => 'stripe',
- );
-
- // Ensure $_COOKIE is available without a new HTTP request.
- if ( class_exists( 'EDD_Auto_Register' ) ) {
- add_action( 'set_logged_in_cookie', 'edds_set_logged_in_cookie_global' );
- add_filter( 'edd_get_option_edd_auto_register_complete_orders_only', '__return_false' );
- }
-
- // Record the pending order.
- $order_id = edd_build_order( $order_data );
-
- if ( false === $order_id ) {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'Error 1006: An error occurred, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Unable to insert order record.'
- );
- }
-
- // Now get the newly created order.
- $order = edd_get_order( $order_id );
-
- // Retrieve the relevant Intent.
- if ( 'setup_intent' === $intent->object ) {
- $order_transaction_id = false;
-
- $intent = edds_api_request( 'SetupIntent', 'update', $intent->id, array(
- 'metadata' => array(
- 'edd_payment_id' => $order->id,
- ),
- ) );
-
- edd_add_note(
- array(
- 'object_id' => $order->id,
- 'content' => 'Payment Elements - Stripe SetupIntent ID: ' . $intent->id,
- 'user_id' => is_admin() ? get_current_user_id() : 0,
- 'object_type' => 'order',
- )
- );
-
- edd_add_order_meta(
- $order->id,
- '_edds_stripe_setup_intent_id',
- $intent->id
- );
- } else {
- $intent = edds_api_request( 'PaymentIntent', 'update', $intent->id, array(
- 'metadata' => array(
- 'edd_payment_id' => $order->id,
- ),
- ) );
-
- edd_add_note(
- array(
- 'object_id' => $order->id,
- 'content' => 'Payment Elements - Stripe PaymentIntent ID: ' . $intent->id,
- 'user_id' => is_admin() ? get_current_user_id() : 0,
- 'object_type' => 'order',
- )
- );
-
- edd_add_order_meta(
- $order->id,
- '_edds_stripe_payment_intent_id',
- $intent->id
- );
-
- // Use Intent ID for temporary transaction ID.
- // It will be updated when a charge is available.
- $order_transaction_id = edd_add_order_transaction(
- array(
- 'object_id' => $order->id,
- 'object_type' => 'order',
- 'transaction_id' => sanitize_text_field( $intent->id ),
- 'gateway' => 'stripe',
- 'status' => 'pending',
- 'total' => $order->total,
- )
- );
- }
-
- // Retrieves or creates a Stripe Customer.
- edd_update_order_meta( $order->id, '_edds_stripe_customer_id', $intent->customer );
-
- edd_add_note(
- array(
- 'object_id' => $order->id,
- 'content' => 'Stripe Customer ID: ' . $intent->customer,
- 'user_id' => is_admin() ? get_current_user_id() : 0,
- 'object_type' => 'order',
- )
- );
-
- // The returned Intent charges might contain a mandate ID, so let's save that and make a note.
- if ( ! empty( $intent->charges->data ) ) {
- foreach ( $intent->charges->data as $charge ) {
- if ( empty( $charge->payment_method_details->card->mandate ) ) {
- continue;
- }
-
- $mandate_id = $charge->payment_method_details->card->mandate;
- edd_update_order_meta( $order->id, '_edds_stripe_mandate', $mandate_id );
-
- edd_add_note(
- array(
- 'object_id' => $order->id,
- 'content' => 'Stripe Mandate ID: ' . $mandate_id,
- 'user_id' => is_admin() ? get_current_user_id() : 0,
- 'object_type' => 'order',
- )
- );
- }
- }
-
- // Attach the \Stripe\Customer ID to the \EDD_Customer meta if one exists.
- $edd_customer = new EDD_Customer( $purchase_data['user_email'] );
-
- if ( $edd_customer->id > 0 ) {
- $edd_customer->update_meta( edd_stripe_get_customer_key(), $intent->customer );
- }
-
- if ( class_exists( 'EDD_Auto_Register' ) ) {
- remove_action( 'set_logged_in_cookie', 'edds_set_logged_in_cookie_global' );
- }
-
- if ( has_action( 'edds_payment_created' ) ) {
- // Load up an EDD Payment record here, in the event there is something hooking into it.
- $payment = new EDD_Payment( $order->id );
-
- /**
- * Allows further processing after a payment is created.
- *
- * NOTE TO DEVELOPERS: Only hook into one of these complete hooks. Using both will result in
- * unexpected double processing.
- *
- * @since 2.7.0
- *
- * @param \EDD_Payment $payment EDD Payment.
- * @param \Stripe\PaymentIntent|\Stripe\SetupIntent $intent Created Stripe Intent.
- */
- do_action( 'edds_payment_created', $payment, $intent );
- }
-
- /**
- * Allows further processing after a order is created.
- *
- * Sends back just the Intent ID to avoid needing always retrieve
- * the intent in this step, which has been transformed via JSON,
- * and is no longer a \Stripe\PaymentIntent
- *
- * @since 2.9.0
- *
- * @param \EDD\Orders\Order $order EDD Order Object.
- * @param \Stripe\PaymentIntent|\Stripe\SetupIntent $intent Created Stripe Intent.
- */
- do_action( 'edds_order_created', $order, $intent );
-
- // Now we need to mark the order as complete.
- $final_status = edds_is_preapprove_enabled() ? 'preapproval' : 'complete';
- $updated = edd_update_order_status( $order->id, $final_status );
-
- if ( $updated ) {
-
- if ( 'setup_intent' !== $intent['object'] ) {
- $charge_id = sanitize_text_field( current( $intent['charges']['data'] )['id'] );
-
- edd_add_note(
- array(
- 'object_id' => $order->id,
- 'content' => 'Stripe Charge ID: ' . $charge_id,
- 'user_id' => is_admin() ? get_current_user_id() : 0,
- 'object_type' => 'order',
- )
- );
-
- if ( ! empty( $order_transaction_id ) ) {
- edd_update_order_transaction(
- $order_transaction_id,
- array(
- 'transaction_id' => sanitize_text_field( $charge_id ),
- )
- );
- }
- }
-
- if ( has_action( 'edds_payment_complete' ) ) {
- // Load up an EDD Payment record here, in the event there is something hooking into it.
- $payment = new EDD_Payment( $order->id );
-
- /**
- * Allows further processing after a payment is completed.
- *
- * Sends back just the Intent ID to avoid needing always retrieve
- * the intent in this step, which has been transformed via JSON,
- * and is no longer a \Stripe\PaymentIntent
- *
- * NOTE TO DEVELOPERS: Only hook into one of these complete hooks. Using both will result in
- * unexpected double processing.
- *
- * @since 2.7.0
- *
- * @param \EDD_Payment $payment EDD Payment.
- * @param string $intent_id Stripe Intent ID.
- */
- do_action( 'edds_payment_complete', $payment, $intent['id'] );
- }
-
- /**
- * Allows further processing after a order is completed.
- *
- * Sends back just the Intent ID to avoid needing always retrieve
- * the intent in this step, which has been transformed via JSON,
- * and is no longer a \Stripe\PaymentIntent
- *
- * @since 2.9.0
- *
- * @param \EDD\Orders\Order $order The EDD Order object.
- * @param string $intent_id Stripe Intent ID.
- */
- do_action( 'edds_order_complete', $order, $intent['id'] );
-
- // Empty cart.
- edd_empty_cart();
- } else {
- throw new \EDD_Stripe_Gateway_Exception(
- esc_html__(
- 'Error 1007: An error occurred completing the order, but your payment may have gone through. Please contact the site administrator.',
- 'easy-digital-downloads'
- ),
- 'Unable to insert order record.'
- );
- }
-
- return wp_send_json_success( array(
- 'intent' => $intent,
- 'order' => $order,
- // Send back a new nonce because the user might have logged in via Auto Register.
- 'nonce' => wp_create_nonce( 'edd-process-checkout' ),
- ) );
-
- // Catch gateway processing errors.
- } catch ( \EDD_Stripe_Gateway_Exception $e ) {
- // Increase the rate limit count when something goes wrong mid-process.
- edd_stripe()->rate_limiting->increment_card_error_count();
-
- if ( true === $e->hasLogMessage() ) {
- edd_record_gateway_error(
- esc_html__( 'Stripe Error', 'easy-digital-downloads' ),
- $e->getLogMessage(),
- 0
- );
- }
-
- return wp_send_json_error( array(
- 'message' => esc_html( $e->getMessage() ),
- ) );
-
- // Catch any remaining error.
- } catch( \Exception $e ) {
- return wp_send_json_error( array(
- 'message' => esc_html( $e->getMessage() ),
- ) );
- }
-}
-add_action( 'wp_ajax_edds_create_and_complete_order', 'edds_create_and_complete_order' );
-add_action( 'wp_ajax_nopriv_edds_create_and_complete_order', 'edds_create_and_complete_order' );
-
-/**
- * Uptick the rate limit card error count when a failure happens.
- *
- * @since 2.9.0
- */
-function edds_payment_elements_rate_limit_tick() {
- // Increase the card error count.
- edd_stripe()->rate_limiting->increment_card_error_count();
-
- wp_send_json_success(
- array(
- 'is_at_limit' => edd_stripe()->rate_limiting->has_hit_card_error_limit(),
- 'message' => edd_stripe()->rate_limiting->get_rate_limit_error_message(),
- )
- );
-}
-add_action( 'wp_ajax_edds_payment_elements_rate_limit_tick', 'edds_payment_elements_rate_limit_tick' );
-add_action( 'wp_ajax_nopriv_edds_payment_elements_rate_limit_tick', 'edds_payment_elements_rate_limit_tick' );
-
-/**
- * Generates a description based on the cart details.
- *
- * @param array $cart_details {
- *
- * }
- * @return string
- */
-function edds_get_payment_description( $cart_details ) {
- $purchase_summary = '';
-
- if ( is_array( $cart_details ) && ! empty( $cart_details ) ) {
- foreach( $cart_details as $item ) {
- $purchase_summary .= $item['name'];
- $price_id = isset( $item['item_number']['options']['price_id'] )
- ? absint( $item['item_number']['options']['price_id'] )
- : false;
-
- if ( false !== $price_id ) {
- $purchase_summary .= ' - ' . edd_get_price_option_name( $item['id'], $item['item_number']['options']['price_id'] );
- }
-
- $purchase_summary .= ', ';
- }
-
- $purchase_summary = rtrim( $purchase_summary, ', ' );
- }
-
- // Stripe has a maximum of 999 characters in the charge description.
- $purchase_summary = substr( $purchase_summary, 0, 1000 );
-
- return html_entity_decode( $purchase_summary, ENT_COMPAT, 'UTF-8' );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/payment-methods/apple-pay.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/payment-methods/apple-pay.php
deleted file mode 100644
index 8fae6e68..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/payment-methods/apple-pay.php
+++ /dev/null
@@ -1,293 +0,0 @@
-' . esc_html__( 'Apple Pay domain verification error.', 'easy-digital-downloads' ) . ' ' .
- edd_get_option( 'stripe_apple_pay_domain_error', '' )
- );
-
- $registry->add(
- 'apple-pay-' . $_SERVER['HTTP_HOST'],
- array(
- 'message' => wp_kses(
- wpautop( $message ),
- array(
- 'code' => true,
- 'br' => true,
- 'strong' => true,
- 'p' => true,
- 'a' => array(
- 'href' => true,
- 'rel' => true,
- 'target' => true,
- ),
- )
- ),
- 'type' => 'error',
- 'dismissible' => true,
- )
- );
- } catch( Exception $e ) {
- return new WP_Error( 'edds-invalid-notices-registration', esc_html( $e->getMessage() ) );
- };
-
- return true;
-}
-add_action( 'admin_init', 'edds_apple_pay_admin_notices_register', 30 );
-
-/**
- * Conditionally prints registered notices.
- *
- * @since 2.8.0
- */
-function edds_apple_pay_admin_notices_print() {
- // Current user needs capability to dismiss notices.
- if ( ! current_user_can( 'manage_options' ) ) {
- return;
- }
-
- $registry = edds_get_registry( 'admin-notices' );
-
- if ( ! $registry ) {
- return;
- }
-
- $notices = new EDD_Stripe_Admin_Notices( $registry );
-
- wp_enqueue_script( 'edds-admin-notices' );
-
- try {
- $error = edd_get_option( 'stripe_apple_pay_domain_error', '' );
- $test_mode = edd_is_test_mode();
-
- if ( ! empty( edd_stripe()->connect()->is_connected ) && ! empty( $error ) && false === $test_mode ) {
- $notices->output( 'apple-pay-' . $_SERVER['HTTP_HOST'] );
- }
- } catch( Exception $e ) {}
-}
-add_action( 'admin_notices', 'edds_apple_pay_admin_notices_print' );
-
-/**
- * Returns information associated with the name/location of the domain verification file.
- *
- * @since 2.8.0
- *
- * @return array Domain verification file information.
- */
-function edds_apple_pay_get_fileinfo() {
- $path = untrailingslashit( $_SERVER['DOCUMENT_ROOT'] );
- $dir = '.well-known';
- $file = 'apple-developer-merchantid-domain-association';
-
- return array(
- 'path' => $path,
- 'dir' => $dir,
- 'file' => $file,
- 'fullpath' => $path . '/' . $dir . '/' . $file,
- );
-}
-
-/**
- * Determines if the current website is setup to use Apple Pay.
- *
- * @since 2.8.0
- *
- * @return bool True if the domain has been verified and the association file exists.
- */
-function edds_apple_pay_is_valid() {
- return (
- edds_apple_pay_has_domain_verification_file() &&
- edds_apple_pay_has_domain_verification()
- );
-}
-
-/**
- * Determines if the domain verification file already exists.
- *
- * @since 2.8.0
- *
- * @return bool True if the domain verification file exists.
- */
-function edds_apple_pay_has_domain_verification_file() {
- $fileinfo = edds_apple_pay_get_fileinfo();
-
- if ( ! @file_exists( $fileinfo['fullpath'] ) ) {
- return false;
- }
-
- return true;
-}
-
-/**
- * Determines if the currently verified domain matches the current site.
- *
- * @since 2.8.0
- *
- * @return bool True if the saved verified domain matches the current site.
- */
-function edds_apple_pay_has_domain_verification() {
- return edd_get_option( 'stripe_prb_apple_pay_domain' ) === $_SERVER['HTTP_HOST'];
-}
-
-/**
- * Attempts to create a directory in the server root and copy the domain verification file.
- *
- * @since 2.8.0
- *
- * @throws \Exception If the directory or file cannot be created.
- */
-function edds_apple_pay_create_directory_and_move_file() {
- $file = edds_apple_pay_has_domain_verification_file();
-
- if ( true === $file ) {
- return;
- }
-
- $fileinfo = edds_apple_pay_get_fileinfo();
-
- // Create directory if it does not exist.
- if ( ! file_exists( trailingslashit( $fileinfo['path'] ) . $fileinfo['dir'] ) ) {
- if ( ! @mkdir( trailingslashit( $fileinfo['path'] ) . $fileinfo['dir'], 0755 ) ) { // @codingStandardsIgnoreLine
- throw new \Exception( __( 'Unable to create domain association folder in domain root.', 'easy-digital-downloads' ) );
- }
- }
-
- // Move file if needed.
- if ( ! edds_apple_pay_has_domain_verification_file() ) {
- if ( ! @copy( trailingslashit( EDDS_PLUGIN_DIR ) . $fileinfo['file'], $fileinfo['fullpath'] ) ) { // @codingStandardsIgnoreLine
- throw new \Exception( __( 'Unable to copy domain association file to domain .well-known directory.', 'easy-digital-downloads' ) );
- }
- }
-}
-
-/**
- * Checks Apple Pay domain verification if there is an existing error.
- * If the domain was added to the Stripe Dashboard clear the error.
- *
- * @since 2.8.0
- */
-function edds_apple_pay_check_domain() {
- if ( empty( edd_stripe()->connect()->is_connected ) ) {
- return;
- }
-
- $error = edd_get_option( 'stripe_apple_pay_domain_error', '' );
-
- if ( empty( $error ) ) {
- return;
- }
-
- try {
- $domains = edds_api_request( 'ApplePayDomain', 'all' );
-
- foreach ( $domains->autoPagingIterator() as $domain ) {
- if ( $domain->domain_name === $_SERVER['HTTP_HOST'] ) {
- edd_delete_option( 'stripe_apple_pay_domain_error' );
- edd_update_option( 'stripe_prb_apple_pay_domain', $_SERVER['HTTP_HOST'] );
- break;
- }
- }
- } catch ( \Exception $e ) {}
-}
-add_action( 'admin_init', 'edds_apple_pay_check_domain', 10 );
-
-/**
- * Verifies the current domain.
- *
- * @since 2.8.0
- */
-function edds_apple_pay_verify_domain() {
- // If Stripe isn't connected, just return.
- if ( empty( edd_stripe()->connect()->is_connected ) ) {
- return;
- }
-
- // Payment Request Button is not enabled, and card-elements is used.
- $elements_mode = edds_get_elements_mode();
-
- if ( 'card-elements' === $elements_mode ) {
- if ( function_exists( 'edds_prb_is_enabled' ) && false === edds_prb_is_enabled() ) {
- return;
- }
- }
-
- // Avoid getting caught in AJAX requests.
- if ( defined( 'DOING_AJAX' ) && true === DOING_AJAX ) {
- return;
- }
-
- // Must be verified in Live Mode.
- if ( true === edd_is_test_mode() ) {
- return;
- }
-
- // Current site is a development environment, Apple Pay won't be able to be used, do nothing.
- if ( false !== edd_is_dev_environment() ) {
- return;
- }
-
- // Current domain matches and the file exists, do nothing.
- if ( true === edds_apple_pay_is_valid() ) {
- return;
- }
-
- try {
- // Create directory and move file if needed.
- edds_apple_pay_create_directory_and_move_file();
-
- $stripe_connect_account_id = edd_stripe()->connect()->get_connect_id();
-
- if (
- empty( $stripe_connect_account_id ) || // If we don't have a stripe connect account ID
- ( ! empty( $stripe_connect_account_id ) && empty( edd_get_option( 'stripe_prb_apple_pay_domain') ) ) // Or if we do have a stripe connect account ID, but we haven't registered the domain for Apple Pay
- ) {
- edds_api_request(
- 'ApplePayDomain',
- 'create',
- array(
- 'domain_name' => $_SERVER['HTTP_HOST'],
- )
- );
-
- edd_update_option( 'stripe_prb_apple_pay_domain', $_SERVER['HTTP_HOST'] );
-
- // Set an error that the domain needs to be manually added.
- // Using Stripe Connect API keys does not allow this to be done automatically.
- } else {
- throw new \Exception(
- sprintf(
- /* translators: %1$s Opening anchor tag, do not translate. %2$s Closing anchor tag, do not translate. */
- ( __( 'Please %1$smanually add your domain%2$s %3$s to use Apple Pay.', 'easy-digital-downloads' ) . ' ' ),
- '',
- '',
- '' . $_SERVER['HTTP_HOST'] . ''
- )
- );
- }
- } catch ( \Exception $e ) {
- // Set error if something went wrong.
- edd_update_option( 'stripe_apple_pay_domain_error', $e->getMessage() );
- }
-}
-add_action( 'admin_init', 'edds_apple_pay_verify_domain', 20 );
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/payment-methods/buy-now/ajax.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/payment-methods/buy-now/ajax.php
deleted file mode 100644
index 1f8366fb..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/payment-methods/buy-now/ajax.php
+++ /dev/null
@@ -1,62 +0,0 @@
- __( 'Unable to add item to cart.', 'easy-digital-downloads' ),
- ) );
- }
-
- $download_id = absint( $data['download_id'] );
- if ( false === edds_verify( 'nonce', 'edd-add-to-cart-' . $download_id ) ) {
- return wp_send_json_error( array(
- 'message' => __( 'Unable to add item to cart.', 'easy-digital-downloads' ),
- ) );
- }
-
- $args = array(
- 'quantity' => absint( $data['quantity'] ),
- 'price_id' => null,
- );
-
- if ( edd_has_variable_prices( $download_id ) ) {
- $args['price_id'] = absint( $data['price_id'] );
- }
-
- // Add individual item.
- edd_add_to_cart( $download_id, $args );
-
- return wp_send_json_success( array(
- 'checkout' => edds_buy_now_checkout(),
- ) );
-}
-add_action( 'wp_ajax_edds_add_to_cart', 'edds_buy_now_ajax_add_to_cart' );
-add_action( 'wp_ajax_nopriv_edds_add_to_cart', 'edds_buy_now_ajax_add_to_cart' );
-
-/**
- * Empties the cart on the `edds_buy_now_empty_cart` AJAX action.
- *
- * @since 2.8.0
- */
-function edds_buy_now_ajax_empty_cart() {
- if ( ! empty( EDD()->cart->contents ) ) {
- EDD()->cart->empty_cart();
- }
-
- return wp_send_json_success();
-}
-add_action( 'wp_ajax_edds_empty_cart', 'edds_buy_now_ajax_empty_cart' );
-add_action( 'wp_ajax_nopriv_edds_empty_cart', 'edds_buy_now_ajax_empty_cart' );
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/payment-methods/buy-now/checkout.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/payment-methods/buy-now/checkout.php
deleted file mode 100644
index f873c241..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/payment-methods/buy-now/checkout.php
+++ /dev/null
@@ -1,84 +0,0 @@
- array(
- 'error_id' => 'invalid_email',
- 'error_message' => __( 'Please enter a valid email address', 'easy-digital-downloads' )
- ),
- );
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/payment-methods/buy-now/functions.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/payment-methods/buy-now/functions.php
deleted file mode 100644
index c1552331..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/payment-methods/buy-now/functions.php
+++ /dev/null
@@ -1,59 +0,0 @@
- 'edds-buy-now',
- 'title' => __( 'Buy Now', 'easy-digital-downloads' ),
- 'class' => array(
- 'edds-buy-now-modal',
- ),
- 'content' => '',
- ) ); // WPCS: XSS okay.
-}
-add_action( 'wp_print_footer_scripts', 'edds_buy_now_modal', 0 );
-
-/**
- * Outputs a custom "Buy Now"-specific Checkout form.
- *
- * @since 2.8.0
- */
-function edds_buy_now_checkout() {
- $total = (int) edd_get_cart_total();
-
- $form_mode = $total > 0
- ? 'payment-mode=stripe'
- : 'payment-mode=manual';
-
- $form_action = edd_get_checkout_uri( $form_mode );
- $existing_cards = edd_stripe_get_existing_cards( get_current_user_id() );
-
- $customer = EDD()->session->get( 'customer' );
- $customer = wp_parse_args(
- $customer,
- array(
- 'email' => '',
- )
- );
-
- if ( is_user_logged_in() ) {
- $user_data = get_userdata( get_current_user_id() );
-
- foreach( $customer as $key => $field ) {
- if ( 'email' == $key && empty( $field ) ) {
- $customer[ $key ] = $user_data->user_email;
- } elseif ( empty( $field ) ) {
- $customer[ $key ] = $user_data->$key;
- }
- }
- }
-
- $customer = array_map( 'sanitize_text_field', $customer );
-
- remove_action( 'edd_after_cc_fields', 'edd_default_cc_address_fields', 10 );
- remove_action( 'edd_purchase_form_before_submit', 'edd_checkout_final_total', 999 );
-
- // Filter purchase button label.
- add_filter( 'edd_get_checkout_button_purchase_label', 'edds_buy_now_checkout_purchase_label' );
-
- ob_start();
-?>
-
-
- rate_limiting->has_hit_card_error_limit() ) {
- edd_set_error( 'edd_stripe_error_limit', __( 'We are unable to process your payment at this time, please try again later or contacts support.', 'easy-digital-downloads' ) );
- return;
- }
-
- // Can't use just edd_is_checkout() because this could happen in an AJAX request.
- $is_checkout = edd_is_checkout() || ( isset( $_REQUEST['action'] ) && 'edd_load_gateway' === $_REQUEST['action'] );
-
- edd_stripe_css( true );
- $existing_cards = edd_stripe_get_existing_cards( $user_id );
- if ( ! empty( $existing_cards ) ) : ?>
-
- 0 ) {
- return;
- }
-
- $hook = 'payment-elements' === edds_get_elements_mode() || apply_filters( 'edds_address_before_payment', false ) ? 'edd_before_cc_fields' : 'edd_after_cc_fields';
-
- if ( edd_use_taxes() ) {
- remove_action( 'edd_after_cc_fields', 'edd_default_cc_address_fields' );
- add_action( $hook, 'edd_default_cc_address_fields' );
- return;
- }
-
- $display = edd_get_option( 'stripe_billing_fields', 'full' );
-
- switch ( $display ) {
-
- case 'full':
- // Make address fields required.
- add_filter( 'edd_require_billing_address', '__return_true' );
- remove_action( 'edd_after_cc_fields', 'edd_default_cc_address_fields' );
- add_action( $hook, 'edd_default_cc_address_fields' );
-
- break;
-
- case 'zip_country':
- remove_action( 'edd_after_cc_fields', 'edd_default_cc_address_fields', 10 );
- add_action( $hook, 'edd_stripe_zip_and_country', 9 );
-
- // Make Zip required.
- add_filter( 'edd_purchase_form_required_fields', 'edd_stripe_require_zip_and_country' );
-
- break;
-
- case 'none':
- remove_action( 'edd_after_cc_fields', 'edd_default_cc_address_fields', 10 );
-
- break;
-
- }
-
-}
-add_action( 'init', 'edd_stripe_setup_billing_address_fields', 9 );
-
-/**
- * Force zip code and country to be required when billing address display is zip only
- *
- * @access public
- * @since 2.5
- * @return array $fields The required fields
- */
-function edd_stripe_require_zip_and_country( $fields ) {
-
- $fields['card_zip'] = array(
- 'error_id' => 'invalid_zip_code',
- 'error_message' => __( 'Please enter your zip / postal code', 'easy-digital-downloads' )
- );
-
- $fields['billing_country'] = array(
- 'error_id' => 'invalid_country',
- 'error_message' => __( 'Please select your billing country', 'easy-digital-downloads' )
- );
-
- return $fields;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/utils/class-edd-stripe-mandates.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/utils/class-edd-stripe-mandates.php
deleted file mode 100644
index 75b17239..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/utils/class-edd-stripe-mandates.php
+++ /dev/null
@@ -1,225 +0,0 @@
-purchase_data = $purchase_data;
- $this->intent_type = $intent_type;
-
- $this->amount = $this->format_amount();
- $this->currency = edd_get_currency();
- $this->reference = $purchase_data['purchase_key'];
-
- // Generate the interval and interval count.
- $this->get_interval_and_count( $purchase_data );
-
- // Now that all the data has been determined, generate the mandate options.
- $this->generate_mandate_arguments();
- }
-
- /**
- * Formats the amount into a Stripe-friendly format.
- *
- * @since 2.9.2.2
- *
- * @return int The formatted amount.
- */
- private function format_amount() {
- $amount = $this->purchase_data['price'];
-
- if ( edds_is_zero_decimal_currency() ) {
- return $amount;
- }
-
- return round( $amount * 100, 0 );
- }
-
- /**
- * Gets the interval and interval count for the mandate.
- *
- * @since 2.9.2.2
- */
- private function get_interval_and_count() {
- /**
- * Setup intervals based on the Recurring Payment periods.
- *
- * We use a foreach here, but with Payment Elements, it's only a single subscription, we just
- * want to properly itterate on them.
- */
- $period = false;
- foreach ( $this->purchase_data['downloads'] as $download ) {
-
- // This is a non-recurring download. Move along.
- if ( ! isset( $download['options']['recurring'] ) ) {
- continue;
- }
-
- $period = $download['options']['recurring']['period'];
- break;
- }
-
- // Setup intervals for the mandate based on the Recurring Payment periods.
- switch ( $period ) {
- case 'day':
- $interval = 'day';
- $interval_count = 1;
- break;
- case 'week':
- $interval = 'week';
- $interval_count = 1;
- break;
- case 'month':
- $interval = 'month';
- $interval_count = 1;
- break;
- case 'quarter':
- $interval = 'month';
- $interval_count = 3;
- break;
- case 'semi-year':
- $interval = 'month';
- $interval_count = 6;
- break;
- case 'year':
- $interval = 'year';
- $interval_count = 1;
- break;
- default:
- $interval = 'sporadic';
- $interval_count = false;
- break;
- }
-
- $this->interval = $interval;
-
- if ( false !== $interval_count ) {
- $this->interval_count = $interval_count;
- }
- }
-
- /**
- * Generates the mandate options for use with an intent.
- *
- * @since 2.9.2.2
- */
- private function generate_mandate_arguments() {
- $mandate_options = array(
- 'reference' => $this->reference,
- 'amount' => $this->amount,
- 'start_date' => current_time( 'timestamp' ),
- 'amount_type' => 'maximum',
- 'supported_types' => array( 'india' ),
- 'interval' => $this->interval,
- );
-
- if ( false !== $this->interval_count ) {
- $mandate_options['interval_count'] = $this->interval_count;
- }
-
- // SetupIntent types require the currency to be passed with the mandate_options.
- if ( 'SetupIntent' === $this->intent_type ) {
- $mandate_options['currency'] = edd_get_currency();
- }
-
- /**
- * Alllows further customization of the mandate options sent with the intent.
- *
- * @since 2.9.2.2
- *
- * @param array $mandate_options The set of mandate options we've generated.
- * @param array $purchase_data The purchase data being processed.
- * @param string $intent_type The intent type (either SetupIntent or PaymentIntent).
- */
- $mandate_options = apply_filters( 'edds_mandate_options', $mandate_options, $this->purchase_data, $this->intent_type );
-
- $this->mandate_options = $mandate_options;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/utils/class-registry.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/utils/class-registry.php
deleted file mode 100644
index df2c413b..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/utils/class-registry.php
+++ /dev/null
@@ -1,139 +0,0 @@
-offsetSet( $item_id, $attributes );
-
- $result = true;
- } else {
- $message = sprintf(
- 'The attributes were missing when attempting to add the \'%1$s\' %2$s.',
- $item_id,
- static::$item_error_label
- );
-
- throw new Exception( $message );
- }
-
- return $result;
- }
-
- /**
- * Removes an item from the registry by ID.
- *
- * @since 2.6.19
- *
- * @param string $item_id Item ID.
- */
- public function remove_item( $item_id ) {
- if ( $this->offsetExists( $item_id ) ) {
- $this->offsetUnset( $item_id );
- }
- }
-
- /**
- * Retrieves an item and its associated attributes.
- *
- * @since 2.6.19
- *
- * @throws Exception if the item does not exist.
- *
- * @param string $item_id Item ID.
- * @return array Array of attributes for the item if the item is set,
- * otherwise an empty array.
- */
- public function get_item( $item_id ) {
- $item = array();
-
- if ( $this->offsetExists( $item_id ) ) {
- $item = $this->offsetGet( $item_id );
- } else {
- $message = sprintf(
- 'The \'%1$s\' %2$s does not exist.',
- $item_id,
- static::$item_error_label
- );
-
- throw new Exception( $message );
- }
-
- return $item;
- }
-
- /**
- * Retrieves registered items.
- *
- * @since 2.6.19
- *
- * @return array The list of registered items.
- */
- public function get_items() {
- return $this->getArrayCopy();
- }
-
- /**
- * Retrieves the value of a given attribute for a given item.
- *
- * @since 2.6.19
- *
- * @throws Exception if the item does not exist.
- * @throws EDD_Stripe_Exceptions_Attribute_Not_Found if the attribute and/or item does not exist.
- *
- * @param string $key Key of the attribute to retrieve.
- * @param string $item_id Collection to retrieve the attribute from.
- * @return mixed|null The attribute value if set, otherwise null.
- */
- public function get_attribute( $key, $item_id ) {
- $attribute = null;
- $item = $this->get_item( $item_id );
-
- if ( ! empty( $item[ $key ] ) ) {
- $attribute = $item[ $key ];
- } else {
- throw EDD_Stripe_Utils_Exceptions_Attribute_Not_Found::from_attr( $key, $item_id );
- }
-
- return $attribute;
- }
-
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/utils/exceptions/class-attribute-not-found.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/utils/exceptions/class-attribute-not-found.php
deleted file mode 100644
index 9194e984..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/utils/exceptions/class-attribute-not-found.php
+++ /dev/null
@@ -1,40 +0,0 @@
-log_message = $log_message;
- }
- }
-
- /**
- * Determines if an admin-facing message is set.
- *
- * @since 2.8.1
- *
- * @return bool
- */
- public function hasLogMessage() {
- return ! empty( $this->log_message );
- }
-
- /**
- * Returns the admin-facing log message.
- *
- * @since 2.8.1
- *
- * @return string
- */
- public function getLogMessage() {
- if ( false === $this->hasLogMessage() ) {
- return '';
- }
-
- return $this->log_message;
- }
-
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/utils/exceptions/class-stripe-api-unmet-requirements.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/utils/exceptions/class-stripe-api-unmet-requirements.php
deleted file mode 100644
index 21fa1d20..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/utils/exceptions/class-stripe-api-unmet-requirements.php
+++ /dev/null
@@ -1,18 +0,0 @@
- '',
- 'class' => array(),
- 'title' => '',
- 'content' => ''
- );
-
- $args = wp_parse_args( $args, $defaults );
-
- // ID is required for any Javascript interaction
- // and accessibility.
- if ( empty( $args['id'] ) ) {
- return;
- }
-
- $classnames = implode( ' ', array_map( 'trim', (array) $args['class'] ) );
-
- ob_start();
-?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-setup_filters();
- }
-
- /**
- * Applies various filters.
- */
- protected function setup_filters() {
- // Possibly add a message above the address fields if they are required.
- add_filter( 'edd_settings_gateways', array( $this, 'add_billing_address_message' ), 30 );
- }
-
- /**
- * Inserts a descriptive text setting prior to the address fields setting if a region requires card address.
- *
- * @since 2.9.2.2
- *
- * @param array $settings The current registered settings.
- *
- * @return array The settings with the new descriptive text, if necessary.
- */
- public function add_billing_address_message( $settings ) {
- // The current region does not require card address.
- if ( ! $this->requires_card_address ) {
- return $settings;
- }
-
- $current_billing_fields_option = edd_get_option( 'stripe_billing_fields' );
- // The current region requires card address, but the billing fields option is set to "full" already.
- if ( 'full' === $current_billing_fields_option ) {
- return $settings;
- }
-
- $setting = array(
- 'id' => 'stripe_billing_address_message',
- 'name' => '',
- 'desc' => $this->get_billing_fields_message_output(),
- 'type' => 'descriptive_text',
- 'class' => 'edd-stripe-connect-row',
- );
-
- $position = array_search(
- 'stripe_billing_fields',
- array_keys(
- $settings['edd-stripe']
- ),
- true
- );
-
- array_splice(
- $settings['edd-stripe'],
- $position,
- 0,
- array(
- 'stripe_billing_address_message' => $setting,
- )
- );
-
- return $settings;
- }
-
- /**
- * Output a message concerning regions that should collect 'full address' information.
- *
- * @since 2.9.2.2
- */
- protected function get_billing_fields_message_output() {
- ob_start();
- ?>
-
-
-
-
-
- country_code = 'IN';
- $this->requires_card_name = true;
- $this->requires_card_address = true;
-
- parent::__construct();
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/webhooks.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/webhooks.php
deleted file mode 100644
index 6929a022..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/includes/webhooks.php
+++ /dev/null
@@ -1,181 +0,0 @@
-id ) ) {
- $event = edds_api_request( 'Event', 'retrieve', $event->id );
- } else {
- throw new \Exception( esc_html__( 'Unable to find Event', 'easy-digital-downloads' ) );
- }
-
- // Handle events.
- //
- switch ( $event->type ) {
-
- // Charge succeeded. Update EDD Payment address.
- case 'charge.succeeded' :
- $charge = $event->data->object;
- $payment_id = edd_get_purchase_id_by_transaction_id( $charge->id );
- $payment = new EDD_Payment( $payment_id );
-
- if ( $payment && $payment->ID > 0 ) {
- $payment->address = array(
- 'line1' => $charge->billing_details->address->line1,
- 'line2' => $charge->billing_details->address->line2,
- 'state' => $charge->billing_details->address->state,
- 'city' => $charge->billing_details->address->city,
- 'zip' => $charge->billing_details->address->postal_code,
- 'country' => $charge->billing_details->address->country,
- );
-
- $payment->save();
- }
-
- break;
-
- // Charge refunded. Ensure EDD Payment status is correct.
- case 'charge.refunded':
- $charge = $event->data->object;
- $payment_id = edd_get_purchase_id_by_transaction_id( $charge->id );
- $payment = new EDD_Payment( $payment_id );
-
- // This is an uncaptured PaymentIntent, not a true refund.
- if ( ! $charge->captured ) {
- return;
- }
-
- if ( $payment && $payment->ID > 0 ) {
-
- // If this was completely refunded, set the status to refunded.
- if ( $charge->refunded ) {
- $payment->status = 'refunded';
- $payment->save();
- // Translators: The charge ID from Stripe that is being refunded.
- $payment->add_note( sprintf( __( 'Charge %s has been fully refunded in Stripe.', 'easy-digital-downloads' ), $charge->id ) );
-
- // If this was partially refunded, don't change the status.
- } else {
- // Translators: The charge ID from Stripe that is being partially refunded.
- $payment->add_note( sprintf( __( 'Charge %s partially refunded in Stripe.', 'easy-digital-downloads' ), $charge->id ) );
- }
- }
-
- break;
-
- // Review started.
- case 'review.opened' :
- $is_live = ! edd_is_test_mode();
- $review = $event->data->object;
-
- // Make sure the modes match.
- if ( $is_live !== $review->livemode ) {
- return;
- }
-
- $charge = $review->charge;
-
- // Get the charge from the PaymentIntent.
- if ( ! $charge ) {
- $payment_intent = $review->payment_intent;
-
- if ( ! $payment_intent ) {
- return;
- }
-
- $payment_intent = edds_api_request( 'PaymentIntent', 'retrieve', $payment_intent );
- $charge = $payment_intent->charges->data[0]->id;
- }
-
- $payment_id = edd_get_purchase_id_by_transaction_id( $charge );
- $payment = new EDD_Payment( $payment_id );
-
- if ( $payment && $payment->ID > 0 ) {
- $payment->add_note(
- sprintf(
- /* translators: %s Stripe Radar review opening reason. */
- __( 'Stripe Radar review opened with a reason of %s.', 'easy-digital-downloads' ),
- $review->reason
- )
- );
- $payment->save();
-
- do_action( 'edd_stripe_review_opened', $review, $payment_id );
- }
-
- break;
-
- // Review closed.
- case 'review.closed' :
- $is_live = ! edd_is_test_mode();
- $review = $event->data->object;
-
- // Make sure the modes match
- if ( $is_live !== $review->livemode ) {
- return;
- }
-
- $charge = $review->charge;
-
- // Get the charge from the PaymentIntent.
- if ( ! $charge ) {
- $payment_intent = $review->payment_intent;
-
- if ( ! $payment_intent ) {
- return;
- }
-
- $payment_intent = edds_api_request( 'PaymentIntent', 'retrieve', $payment_intent );
- $charge = $payment_intent->charges->data[0]->id;
- }
-
- $payment_id = edd_get_purchase_id_by_transaction_id( $charge );
- $payment = new EDD_Payment( $payment_id );
-
- if ( $payment && $payment->ID > 0 ) {
- $payment->add_note(
- sprintf(
- /* translators: %s Stripe Radar review closing reason. */
- __( 'Stripe Radar review closed with a reason of %s.', 'easy-digital-downloads' ),
- $review->reason
- )
- );
- $payment->save();
-
- do_action( 'edd_stripe_review_closed', $review, $payment_id );
- }
-
- break;
- }
-
- do_action( 'edds_stripe_event_' . $event->type, $event );
-
- // Nothing failed, mark complete.
- status_header( 200 );
- die( esc_html( 'EDD Stripe: ' . $event->type ) );
-
- // Fail, allow a retry.
- } catch ( \Exception $e ) {
- status_header( 500 );
- die( '-2' );
- }
-}
-add_action( 'init', 'edds_stripe_event_listener' );
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/autoload.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/autoload.php
deleted file mode 100644
index 9cbc7f3f..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/autoload.php
+++ /dev/null
@@ -1,25 +0,0 @@
-
- * Jordi Boggiano
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Composer\Autoload;
-
-/**
- * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
- *
- * $loader = new \Composer\Autoload\ClassLoader();
- *
- * // register classes with namespaces
- * $loader->add('Symfony\Component', __DIR__.'/component');
- * $loader->add('Symfony', __DIR__.'/framework');
- *
- * // activate the autoloader
- * $loader->register();
- *
- * // to enable searching the include path (eg. for PEAR packages)
- * $loader->setUseIncludePath(true);
- *
- * In this example, if you try to use a class in the Symfony\Component
- * namespace or one of its children (Symfony\Component\Console for instance),
- * the autoloader will first look for the class under the component/
- * directory, and it will then fallback to the framework/ directory if not
- * found before giving up.
- *
- * This class is loosely based on the Symfony UniversalClassLoader.
- *
- * @author Fabien Potencier
- * @author Jordi Boggiano
- * @see https://www.php-fig.org/psr/psr-0/
- * @see https://www.php-fig.org/psr/psr-4/
- */
-class ClassLoader
-{
- /** @var \Closure(string):void */
- private static $includeFile;
-
- /** @var ?string */
- private $vendorDir;
-
- // PSR-4
- /**
- * @var array[]
- * @psalm-var array>
- */
- private $prefixLengthsPsr4 = array();
- /**
- * @var array[]
- * @psalm-var array>
- */
- private $prefixDirsPsr4 = array();
- /**
- * @var array[]
- * @psalm-var array
- */
- private $fallbackDirsPsr4 = array();
-
- // PSR-0
- /**
- * @var array[]
- * @psalm-var array>
- */
- private $prefixesPsr0 = array();
- /**
- * @var array[]
- * @psalm-var array
- */
- private $fallbackDirsPsr0 = array();
-
- /** @var bool */
- private $useIncludePath = false;
-
- /**
- * @var string[]
- * @psalm-var array
- */
- private $classMap = array();
-
- /** @var bool */
- private $classMapAuthoritative = false;
-
- /**
- * @var bool[]
- * @psalm-var array
- */
- private $missingClasses = array();
-
- /** @var ?string */
- private $apcuPrefix;
-
- /**
- * @var self[]
- */
- private static $registeredLoaders = array();
-
- /**
- * @param ?string $vendorDir
- */
- public function __construct($vendorDir = null)
- {
- $this->vendorDir = $vendorDir;
- self::initializeIncludeClosure();
- }
-
- /**
- * @return string[]
- */
- public function getPrefixes()
- {
- if (!empty($this->prefixesPsr0)) {
- return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
- }
-
- return array();
- }
-
- /**
- * @return array[]
- * @psalm-return array>
- */
- public function getPrefixesPsr4()
- {
- return $this->prefixDirsPsr4;
- }
-
- /**
- * @return array[]
- * @psalm-return array
- */
- public function getFallbackDirs()
- {
- return $this->fallbackDirsPsr0;
- }
-
- /**
- * @return array[]
- * @psalm-return array
- */
- public function getFallbackDirsPsr4()
- {
- return $this->fallbackDirsPsr4;
- }
-
- /**
- * @return string[] Array of classname => path
- * @psalm-return array
- */
- public function getClassMap()
- {
- return $this->classMap;
- }
-
- /**
- * @param string[] $classMap Class to filename map
- * @psalm-param array $classMap
- *
- * @return void
- */
- public function addClassMap(array $classMap)
- {
- if ($this->classMap) {
- $this->classMap = array_merge($this->classMap, $classMap);
- } else {
- $this->classMap = $classMap;
- }
- }
-
- /**
- * Registers a set of PSR-0 directories for a given prefix, either
- * appending or prepending to the ones previously set for this prefix.
- *
- * @param string $prefix The prefix
- * @param string[]|string $paths The PSR-0 root directories
- * @param bool $prepend Whether to prepend the directories
- *
- * @return void
- */
- public function add($prefix, $paths, $prepend = false)
- {
- if (!$prefix) {
- if ($prepend) {
- $this->fallbackDirsPsr0 = array_merge(
- (array) $paths,
- $this->fallbackDirsPsr0
- );
- } else {
- $this->fallbackDirsPsr0 = array_merge(
- $this->fallbackDirsPsr0,
- (array) $paths
- );
- }
-
- return;
- }
-
- $first = $prefix[0];
- if (!isset($this->prefixesPsr0[$first][$prefix])) {
- $this->prefixesPsr0[$first][$prefix] = (array) $paths;
-
- return;
- }
- if ($prepend) {
- $this->prefixesPsr0[$first][$prefix] = array_merge(
- (array) $paths,
- $this->prefixesPsr0[$first][$prefix]
- );
- } else {
- $this->prefixesPsr0[$first][$prefix] = array_merge(
- $this->prefixesPsr0[$first][$prefix],
- (array) $paths
- );
- }
- }
-
- /**
- * Registers a set of PSR-4 directories for a given namespace, either
- * appending or prepending to the ones previously set for this namespace.
- *
- * @param string $prefix The prefix/namespace, with trailing '\\'
- * @param string[]|string $paths The PSR-4 base directories
- * @param bool $prepend Whether to prepend the directories
- *
- * @throws \InvalidArgumentException
- *
- * @return void
- */
- public function addPsr4($prefix, $paths, $prepend = false)
- {
- if (!$prefix) {
- // Register directories for the root namespace.
- if ($prepend) {
- $this->fallbackDirsPsr4 = array_merge(
- (array) $paths,
- $this->fallbackDirsPsr4
- );
- } else {
- $this->fallbackDirsPsr4 = array_merge(
- $this->fallbackDirsPsr4,
- (array) $paths
- );
- }
- } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
- // Register directories for a new namespace.
- $length = strlen($prefix);
- if ('\\' !== $prefix[$length - 1]) {
- throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
- }
- $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
- $this->prefixDirsPsr4[$prefix] = (array) $paths;
- } elseif ($prepend) {
- // Prepend directories for an already registered namespace.
- $this->prefixDirsPsr4[$prefix] = array_merge(
- (array) $paths,
- $this->prefixDirsPsr4[$prefix]
- );
- } else {
- // Append directories for an already registered namespace.
- $this->prefixDirsPsr4[$prefix] = array_merge(
- $this->prefixDirsPsr4[$prefix],
- (array) $paths
- );
- }
- }
-
- /**
- * Registers a set of PSR-0 directories for a given prefix,
- * replacing any others previously set for this prefix.
- *
- * @param string $prefix The prefix
- * @param string[]|string $paths The PSR-0 base directories
- *
- * @return void
- */
- public function set($prefix, $paths)
- {
- if (!$prefix) {
- $this->fallbackDirsPsr0 = (array) $paths;
- } else {
- $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
- }
- }
-
- /**
- * Registers a set of PSR-4 directories for a given namespace,
- * replacing any others previously set for this namespace.
- *
- * @param string $prefix The prefix/namespace, with trailing '\\'
- * @param string[]|string $paths The PSR-4 base directories
- *
- * @throws \InvalidArgumentException
- *
- * @return void
- */
- public function setPsr4($prefix, $paths)
- {
- if (!$prefix) {
- $this->fallbackDirsPsr4 = (array) $paths;
- } else {
- $length = strlen($prefix);
- if ('\\' !== $prefix[$length - 1]) {
- throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
- }
- $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
- $this->prefixDirsPsr4[$prefix] = (array) $paths;
- }
- }
-
- /**
- * Turns on searching the include path for class files.
- *
- * @param bool $useIncludePath
- *
- * @return void
- */
- public function setUseIncludePath($useIncludePath)
- {
- $this->useIncludePath = $useIncludePath;
- }
-
- /**
- * Can be used to check if the autoloader uses the include path to check
- * for classes.
- *
- * @return bool
- */
- public function getUseIncludePath()
- {
- return $this->useIncludePath;
- }
-
- /**
- * Turns off searching the prefix and fallback directories for classes
- * that have not been registered with the class map.
- *
- * @param bool $classMapAuthoritative
- *
- * @return void
- */
- public function setClassMapAuthoritative($classMapAuthoritative)
- {
- $this->classMapAuthoritative = $classMapAuthoritative;
- }
-
- /**
- * Should class lookup fail if not found in the current class map?
- *
- * @return bool
- */
- public function isClassMapAuthoritative()
- {
- return $this->classMapAuthoritative;
- }
-
- /**
- * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
- *
- * @param string|null $apcuPrefix
- *
- * @return void
- */
- public function setApcuPrefix($apcuPrefix)
- {
- $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
- }
-
- /**
- * The APCu prefix in use, or null if APCu caching is not enabled.
- *
- * @return string|null
- */
- public function getApcuPrefix()
- {
- return $this->apcuPrefix;
- }
-
- /**
- * Registers this instance as an autoloader.
- *
- * @param bool $prepend Whether to prepend the autoloader or not
- *
- * @return void
- */
- public function register($prepend = false)
- {
- spl_autoload_register(array($this, 'loadClass'), true, $prepend);
-
- if (null === $this->vendorDir) {
- return;
- }
-
- if ($prepend) {
- self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
- } else {
- unset(self::$registeredLoaders[$this->vendorDir]);
- self::$registeredLoaders[$this->vendorDir] = $this;
- }
- }
-
- /**
- * Unregisters this instance as an autoloader.
- *
- * @return void
- */
- public function unregister()
- {
- spl_autoload_unregister(array($this, 'loadClass'));
-
- if (null !== $this->vendorDir) {
- unset(self::$registeredLoaders[$this->vendorDir]);
- }
- }
-
- /**
- * Loads the given class or interface.
- *
- * @param string $class The name of the class
- * @return true|null True if loaded, null otherwise
- */
- public function loadClass($class)
- {
- if ($file = $this->findFile($class)) {
- $includeFile = self::$includeFile;
- $includeFile($file);
-
- return true;
- }
-
- return null;
- }
-
- /**
- * Finds the path to the file where the class is defined.
- *
- * @param string $class The name of the class
- *
- * @return string|false The path if found, false otherwise
- */
- public function findFile($class)
- {
- // class map lookup
- if (isset($this->classMap[$class])) {
- return $this->classMap[$class];
- }
- if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
- return false;
- }
- if (null !== $this->apcuPrefix) {
- $file = apcu_fetch($this->apcuPrefix.$class, $hit);
- if ($hit) {
- return $file;
- }
- }
-
- $file = $this->findFileWithExtension($class, '.php');
-
- // Search for Hack files if we are running on HHVM
- if (false === $file && defined('HHVM_VERSION')) {
- $file = $this->findFileWithExtension($class, '.hh');
- }
-
- if (null !== $this->apcuPrefix) {
- apcu_add($this->apcuPrefix.$class, $file);
- }
-
- if (false === $file) {
- // Remember that this class does not exist.
- $this->missingClasses[$class] = true;
- }
-
- return $file;
- }
-
- /**
- * Returns the currently registered loaders indexed by their corresponding vendor directories.
- *
- * @return self[]
- */
- public static function getRegisteredLoaders()
- {
- return self::$registeredLoaders;
- }
-
- /**
- * @param string $class
- * @param string $ext
- * @return string|false
- */
- private function findFileWithExtension($class, $ext)
- {
- // PSR-4 lookup
- $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
-
- $first = $class[0];
- if (isset($this->prefixLengthsPsr4[$first])) {
- $subPath = $class;
- while (false !== $lastPos = strrpos($subPath, '\\')) {
- $subPath = substr($subPath, 0, $lastPos);
- $search = $subPath . '\\';
- if (isset($this->prefixDirsPsr4[$search])) {
- $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
- foreach ($this->prefixDirsPsr4[$search] as $dir) {
- if (file_exists($file = $dir . $pathEnd)) {
- return $file;
- }
- }
- }
- }
- }
-
- // PSR-4 fallback dirs
- foreach ($this->fallbackDirsPsr4 as $dir) {
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
- return $file;
- }
- }
-
- // PSR-0 lookup
- if (false !== $pos = strrpos($class, '\\')) {
- // namespaced class name
- $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
- . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
- } else {
- // PEAR-like class name
- $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
- }
-
- if (isset($this->prefixesPsr0[$first])) {
- foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
- if (0 === strpos($class, $prefix)) {
- foreach ($dirs as $dir) {
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
- return $file;
- }
- }
- }
- }
- }
-
- // PSR-0 fallback dirs
- foreach ($this->fallbackDirsPsr0 as $dir) {
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
- return $file;
- }
- }
-
- // PSR-0 include paths.
- if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
- return $file;
- }
-
- return false;
- }
-
- /**
- * @return void
- */
- private static function initializeIncludeClosure()
- {
- if (self::$includeFile !== null) {
- return;
- }
-
- /**
- * Scope isolated include.
- *
- * Prevents access to $this/self from included files.
- *
- * @param string $file
- * @return void
- */
- self::$includeFile = \Closure::bind(static function($file) {
- include $file;
- }, null, null);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/InstalledVersions.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/InstalledVersions.php
deleted file mode 100644
index c6b54af7..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/InstalledVersions.php
+++ /dev/null
@@ -1,352 +0,0 @@
-
- * Jordi Boggiano
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Composer;
-
-use Composer\Autoload\ClassLoader;
-use Composer\Semver\VersionParser;
-
-/**
- * This class is copied in every Composer installed project and available to all
- *
- * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
- *
- * To require its presence, you can require `composer-runtime-api ^2.0`
- *
- * @final
- */
-class InstalledVersions
-{
- /**
- * @var mixed[]|null
- * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null
- */
- private static $installed;
-
- /**
- * @var bool|null
- */
- private static $canGetVendors;
-
- /**
- * @var array[]
- * @psalm-var array}>
- */
- private static $installedByVendor = array();
-
- /**
- * Returns a list of all package names which are present, either by being installed, replaced or provided
- *
- * @return string[]
- * @psalm-return list
- */
- public static function getInstalledPackages()
- {
- $packages = array();
- foreach (self::getInstalled() as $installed) {
- $packages[] = array_keys($installed['versions']);
- }
-
- if (1 === \count($packages)) {
- return $packages[0];
- }
-
- return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
- }
-
- /**
- * Returns a list of all package names with a specific type e.g. 'library'
- *
- * @param string $type
- * @return string[]
- * @psalm-return list
- */
- public static function getInstalledPackagesByType($type)
- {
- $packagesByType = array();
-
- foreach (self::getInstalled() as $installed) {
- foreach ($installed['versions'] as $name => $package) {
- if (isset($package['type']) && $package['type'] === $type) {
- $packagesByType[] = $name;
- }
- }
- }
-
- return $packagesByType;
- }
-
- /**
- * Checks whether the given package is installed
- *
- * This also returns true if the package name is provided or replaced by another package
- *
- * @param string $packageName
- * @param bool $includeDevRequirements
- * @return bool
- */
- public static function isInstalled($packageName, $includeDevRequirements = true)
- {
- foreach (self::getInstalled() as $installed) {
- if (isset($installed['versions'][$packageName])) {
- return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
- }
- }
-
- return false;
- }
-
- /**
- * Checks whether the given package satisfies a version constraint
- *
- * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
- *
- * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
- *
- * @param VersionParser $parser Install composer/semver to have access to this class and functionality
- * @param string $packageName
- * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
- * @return bool
- */
- public static function satisfies(VersionParser $parser, $packageName, $constraint)
- {
- $constraint = $parser->parseConstraints($constraint);
- $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
-
- return $provided->matches($constraint);
- }
-
- /**
- * Returns a version constraint representing all the range(s) which are installed for a given package
- *
- * It is easier to use this via isInstalled() with the $constraint argument if you need to check
- * whether a given version of a package is installed, and not just whether it exists
- *
- * @param string $packageName
- * @return string Version constraint usable with composer/semver
- */
- public static function getVersionRanges($packageName)
- {
- foreach (self::getInstalled() as $installed) {
- if (!isset($installed['versions'][$packageName])) {
- continue;
- }
-
- $ranges = array();
- if (isset($installed['versions'][$packageName]['pretty_version'])) {
- $ranges[] = $installed['versions'][$packageName]['pretty_version'];
- }
- if (array_key_exists('aliases', $installed['versions'][$packageName])) {
- $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
- }
- if (array_key_exists('replaced', $installed['versions'][$packageName])) {
- $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
- }
- if (array_key_exists('provided', $installed['versions'][$packageName])) {
- $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
- }
-
- return implode(' || ', $ranges);
- }
-
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
- }
-
- /**
- * @param string $packageName
- * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
- */
- public static function getVersion($packageName)
- {
- foreach (self::getInstalled() as $installed) {
- if (!isset($installed['versions'][$packageName])) {
- continue;
- }
-
- if (!isset($installed['versions'][$packageName]['version'])) {
- return null;
- }
-
- return $installed['versions'][$packageName]['version'];
- }
-
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
- }
-
- /**
- * @param string $packageName
- * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
- */
- public static function getPrettyVersion($packageName)
- {
- foreach (self::getInstalled() as $installed) {
- if (!isset($installed['versions'][$packageName])) {
- continue;
- }
-
- if (!isset($installed['versions'][$packageName]['pretty_version'])) {
- return null;
- }
-
- return $installed['versions'][$packageName]['pretty_version'];
- }
-
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
- }
-
- /**
- * @param string $packageName
- * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
- */
- public static function getReference($packageName)
- {
- foreach (self::getInstalled() as $installed) {
- if (!isset($installed['versions'][$packageName])) {
- continue;
- }
-
- if (!isset($installed['versions'][$packageName]['reference'])) {
- return null;
- }
-
- return $installed['versions'][$packageName]['reference'];
- }
-
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
- }
-
- /**
- * @param string $packageName
- * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
- */
- public static function getInstallPath($packageName)
- {
- foreach (self::getInstalled() as $installed) {
- if (!isset($installed['versions'][$packageName])) {
- continue;
- }
-
- return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
- }
-
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
- }
-
- /**
- * @return array
- * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
- */
- public static function getRootPackage()
- {
- $installed = self::getInstalled();
-
- return $installed[0]['root'];
- }
-
- /**
- * Returns the raw installed.php data for custom implementations
- *
- * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
- * @return array[]
- * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}
- */
- public static function getRawData()
- {
- @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
-
- if (null === self::$installed) {
- // only require the installed.php file if this file is loaded from its dumped location,
- // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
- if (substr(__DIR__, -8, 1) !== 'C') {
- self::$installed = include __DIR__ . '/installed.php';
- } else {
- self::$installed = array();
- }
- }
-
- return self::$installed;
- }
-
- /**
- * Returns the raw data of all installed.php which are currently loaded for custom implementations
- *
- * @return array[]
- * @psalm-return list}>
- */
- public static function getAllRawData()
- {
- return self::getInstalled();
- }
-
- /**
- * Lets you reload the static array from another file
- *
- * This is only useful for complex integrations in which a project needs to use
- * this class but then also needs to execute another project's autoloader in process,
- * and wants to ensure both projects have access to their version of installed.php.
- *
- * A typical case would be PHPUnit, where it would need to make sure it reads all
- * the data it needs from this class, then call reload() with
- * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
- * the project in which it runs can then also use this class safely, without
- * interference between PHPUnit's dependencies and the project's dependencies.
- *
- * @param array[] $data A vendor/composer/installed.php data set
- * @return void
- *
- * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data
- */
- public static function reload($data)
- {
- self::$installed = $data;
- self::$installedByVendor = array();
- }
-
- /**
- * @return array[]
- * @psalm-return list}>
- */
- private static function getInstalled()
- {
- if (null === self::$canGetVendors) {
- self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
- }
-
- $installed = array();
-
- if (self::$canGetVendors) {
- foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
- if (isset(self::$installedByVendor[$vendorDir])) {
- $installed[] = self::$installedByVendor[$vendorDir];
- } elseif (is_file($vendorDir.'/composer/installed.php')) {
- $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
- if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
- self::$installed = $installed[count($installed) - 1];
- }
- }
- }
- }
-
- if (null === self::$installed) {
- // only require the installed.php file if this file is loaded from its dumped location,
- // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
- if (substr(__DIR__, -8, 1) !== 'C') {
- self::$installed = require __DIR__ . '/installed.php';
- } else {
- self::$installed = array();
- }
- }
- $installed[] = self::$installed;
-
- return $installed;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/LICENSE b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/LICENSE
deleted file mode 100644
index f27399a0..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-
-Copyright (c) Nils Adermann, Jordi Boggiano
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/autoload_classmap.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/autoload_classmap.php
deleted file mode 100644
index 0fb0a2c1..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/autoload_classmap.php
+++ /dev/null
@@ -1,10 +0,0 @@
- $vendorDir . '/composer/InstalledVersions.php',
-);
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/autoload_namespaces.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/autoload_namespaces.php
deleted file mode 100644
index 15a2ff3a..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/autoload_namespaces.php
+++ /dev/null
@@ -1,9 +0,0 @@
- array($vendorDir . '/stripe/stripe-php/lib'),
-);
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/autoload_real.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/autoload_real.php
deleted file mode 100644
index 79e59f2b..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/autoload_real.php
+++ /dev/null
@@ -1,36 +0,0 @@
-register(true);
-
- return $loader;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/autoload_static.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/autoload_static.php
deleted file mode 100644
index f8e9bb74..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/autoload_static.php
+++ /dev/null
@@ -1,36 +0,0 @@
-
- array (
- 'Stripe\\' => 7,
- ),
- );
-
- public static $prefixDirsPsr4 = array (
- 'Stripe\\' =>
- array (
- 0 => __DIR__ . '/..' . '/stripe/stripe-php/lib',
- ),
- );
-
- public static $classMap = array (
- 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
- );
-
- public static function getInitializer(ClassLoader $loader)
- {
- return \Closure::bind(function () use ($loader) {
- $loader->prefixLengthsPsr4 = ComposerStaticInit52360df2f3d60779e5a0ff48f14462b7::$prefixLengthsPsr4;
- $loader->prefixDirsPsr4 = ComposerStaticInit52360df2f3d60779e5a0ff48f14462b7::$prefixDirsPsr4;
- $loader->classMap = ComposerStaticInit52360df2f3d60779e5a0ff48f14462b7::$classMap;
-
- }, null, ClassLoader::class);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/installed.json b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/installed.json
deleted file mode 100644
index 40395c2a..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/installed.json
+++ /dev/null
@@ -1,69 +0,0 @@
-{
- "packages": [
- {
- "name": "stripe/stripe-php",
- "version": "v7.128.0",
- "version_normalized": "7.128.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/stripe/stripe-php.git",
- "reference": "c704949c49b72985c76cc61063aa26fefbd2724e"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/stripe/stripe-php/zipball/c704949c49b72985c76cc61063aa26fefbd2724e",
- "reference": "c704949c49b72985c76cc61063aa26fefbd2724e",
- "shasum": ""
- },
- "require": {
- "ext-curl": "*",
- "ext-json": "*",
- "ext-mbstring": "*",
- "php": ">=5.6.0"
- },
- "require-dev": {
- "friendsofphp/php-cs-fixer": "3.5.0",
- "phpstan/phpstan": "^1.2",
- "phpunit/phpunit": "^5.7 || ^9.0",
- "squizlabs/php_codesniffer": "^3.3"
- },
- "time": "2022-05-05T17:18:02+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Stripe\\": "lib/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Stripe and contributors",
- "homepage": "https://github.com/stripe/stripe-php/contributors"
- }
- ],
- "description": "Stripe PHP Library",
- "homepage": "https://stripe.com/",
- "keywords": [
- "api",
- "payment processing",
- "stripe"
- ],
- "support": {
- "issues": "https://github.com/stripe/stripe-php/issues",
- "source": "https://github.com/stripe/stripe-php/tree/v7.128.0"
- },
- "install-path": "../stripe/stripe-php"
- }
- ],
- "dev": false,
- "dev-package-names": []
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/installed.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/installed.php
deleted file mode 100644
index 87dd81cb..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/composer/installed.php
+++ /dev/null
@@ -1,32 +0,0 @@
- array(
- 'name' => 'easy-digital-downloads/edd-stripe',
- 'pretty_version' => 'dev-master',
- 'version' => 'dev-master',
- 'reference' => '53b4520542b33c13127f604da77f09f7cf9cf902',
- 'type' => 'wordpress-plugin',
- 'install_path' => __DIR__ . '/../../',
- 'aliases' => array(),
- 'dev' => false,
- ),
- 'versions' => array(
- 'easy-digital-downloads/edd-stripe' => array(
- 'pretty_version' => 'dev-master',
- 'version' => 'dev-master',
- 'reference' => '53b4520542b33c13127f604da77f09f7cf9cf902',
- 'type' => 'wordpress-plugin',
- 'install_path' => __DIR__ . '/../../',
- 'aliases' => array(),
- 'dev_requirement' => false,
- ),
- 'stripe/stripe-php' => array(
- 'pretty_version' => 'v7.128.0',
- 'version' => '7.128.0.0',
- 'reference' => 'c704949c49b72985c76cc61063aa26fefbd2724e',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../stripe/stripe-php',
- 'aliases' => array(),
- 'dev_requirement' => false,
- ),
- ),
-);
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/CHANGELOG.md b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/CHANGELOG.md
deleted file mode 100644
index fd20f5d8..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/CHANGELOG.md
+++ /dev/null
@@ -1,1648 +0,0 @@
-# Changelog
-
-## 7.128.0 - 2022-05-05
-* [#1282](https://github.com/stripe/stripe-php/pull/1282) API Updates
- * Add support for `default_price` on `Product`
- * Add support for `instructions_email` on `Refund`
-
-
-## 7.127.0 - 2022-05-05
-* [#1281](https://github.com/stripe/stripe-php/pull/1281) API Updates
- * Add support for new resources `FinancialConnections.AccountOwner`, `FinancialConnections.AccountOwnership`, `FinancialConnections.Account`, and `FinancialConnections.Session`
-
-* [#1278](https://github.com/stripe/stripe-php/pull/1278) Pin setup-php action version.
-* [#1277](https://github.com/stripe/stripe-php/pull/1277) API Updates
- * Add support for `registered_address` on `Person`
-
-## 7.126.0 - 2022-05-03
-* [#1276](https://github.com/stripe/stripe-php/pull/1276) API Updates
- * Add support for new resource `CashBalance`
- * Change type of `BillingPortal.Configuration.application` from `$Application` to `deletable($Application)`
- * Add support for `cash_balance` on `Customer`
- * Add support for `application` on `Invoice`, `Quote`, `SubscriptionSchedule`, and `Subscription`
- * Add support for new value `eu_oss_vat` on enum `TaxId.type`
-* [#1274](https://github.com/stripe/stripe-php/pull/1274) Fix PHPDoc on Discount for nullable properties
-* [#1272](https://github.com/stripe/stripe-php/pull/1272) Allow users to pass a custom IPRESOLVE cURL option.
-
-## 7.125.0 - 2022-04-21
-* [#1270](https://github.com/stripe/stripe-php/pull/1270) API Updates
- * Add support for `expire` test helper method on resource `Refund`
-
-## 7.124.0 - 2022-04-18
-* [#1265](https://github.com/stripe/stripe-php/pull/1265) API Updates
- * Add support for new resources `FundingInstructions` and `Terminal.Configuration`
- * Add support for `create_funding_instructions` method on resource `Customer`
- * Add support for `amount_details` on `PaymentIntent`
- * Add support for `customer_balance` on `PaymentMethod`
- * Add support for new value `customer_balance` on enum `PaymentMethod.type`
- * Add support for `configuration_overrides` on `Terminal.Location`
-
-
-## 7.123.0 - 2022-04-13
-* [#1263](https://github.com/stripe/stripe-php/pull/1263) API Updates
- * Add support for `increment_authorization` method on resource `PaymentIntent`
-* [#1262](https://github.com/stripe/stripe-php/pull/1262) Add support for updating the version of the repo
-* [#1230](https://github.com/stripe/stripe-php/pull/1230) Add PHPDoc return types
-* [#1242](https://github.com/stripe/stripe-php/pull/1242) Fix some PHPDoc in tests
-
-## 7.122.0 - 2022-04-08
-* [#1261](https://github.com/stripe/stripe-php/pull/1261) API Updates
- * Add support for `apply_customer_balance` method on resource `PaymentIntent`
-* [#1259](https://github.com/stripe/stripe-php/pull/1259) API Updates
-
- * Add `payment_intent.partially_funded`, `terminal.reader.action_failed`, and `terminal.reader.action_succeeded` events.
-
-## 7.121.0 - 2022-03-30
-* [#1258](https://github.com/stripe/stripe-php/pull/1258) API Updates
- * Add support for `cancel_action`, `process_payment_intent`, `process_setup_intent`, and `set_reader_display` methods on resource `Terminal.Reader`
- * Add support for `action` on `Terminal.Reader`
-
-## 7.120.0 - 2022-03-29
-* [#1257](https://github.com/stripe/stripe-php/pull/1257) API Updates
- * Add support for Search API
- * Add support for `search` method on resources `Charge`, `Customer`, `Invoice`, `PaymentIntent`, `Price`, `Product`, and `Subscription`
-
-## 7.119.0 - 2022-03-25
-* [#1256](https://github.com/stripe/stripe-php/pull/1256) API Updates
- * Add support for PayNow and US Bank Accounts Debits payments
- * Add support for `paynow` and `us_bank_account` on `PaymentMethod`
- * Add support for new values `paynow` and `us_bank_account` on enum `PaymentMethod.type`
- * Add support for `failure_balance_transaction` on `Charge`
-
-## 7.118.0 - 2022-03-23
-* [#1255](https://github.com/stripe/stripe-php/pull/1255) API Updates
- * Add support for `cancel` method on resource `Refund`
- * Add support for new values `bg_uic`, `hu_tin`, and `si_tin` on enum `TaxId.type`
- * Add `test_helpers.test_clock.advancing`, `test_helpers.test_clock.created`, `test_helpers.test_clock.deleted`, `test_helpers.test_clock.internal_failure`, and `test_helpers.test_clock.ready` events.
-
-
-## 7.117.0 - 2022-03-18
-* [#1254](https://github.com/stripe/stripe-php/pull/1254) API Updates
- * Add support for `status` on `Card`
-* [#1251](https://github.com/stripe/stripe-php/pull/1251) Add support for SearchResult objects.
-* [#1249](https://github.com/stripe/stripe-php/pull/1249) Add missing constant for payment_behavior
-
-## 7.116.0 - 2022-03-02
-* [#1248](https://github.com/stripe/stripe-php/pull/1248) API Updates
- * Add support for `proration_details` on `InvoiceLineItem`
-
-
-## 7.115.0 - 2022-03-01
-* [#1245](https://github.com/stripe/stripe-php/pull/1245) [#1247](https://github.com/stripe/stripe-php/pull/1247) API Updates
- * Add support for new resource `TestHelpers.TestClock`
- * Add support for `test_clock` on `Customer`, `Invoice`, `InvoiceItem`, `Quote`, `Subscription`, and `SubscriptionSchedule`
- * Add support for `next_action` on `Refund`
- * Add support for `konbini` on `PaymentMethod`
-* [#1244](https://github.com/stripe/stripe-php/pull/1244) API Updates
- * Add support for new values `bbpos_wisepad3` and `stripe_m2` on enum `Terminal.Reader.device_type`
-
-## 7.114.0 - 2022-02-15
-* [#1243](https://github.com/stripe/stripe-php/pull/1243) Add test
-* [#1240](https://github.com/stripe/stripe-php/pull/1240) API Updates
- * Add support for `verify_microdeposits` method on resources `PaymentIntent` and `SetupIntent`
-* [#1241](https://github.com/stripe/stripe-php/pull/1241) Add generic parameter to \Stripe\Collection usages
-
-## 7.113.0 - 2022-02-03
-* [#1239](https://github.com/stripe/stripe-php/pull/1239) API Updates
- * Add `REASON_EXPIRED_UNCAPTURED_CHARGE` enum value on `Refund`.
-
-## 7.112.0 - 2022-01-25
-* [#1235](https://github.com/stripe/stripe-php/pull/1235) API Updates
- * Add support for `phone_number_collection` on `PaymentLink`
- * Add support for new value `is_vat` on enum `TaxId.type`
-
-
-## 7.111.0 - 2022-01-20
-* [#1233](https://github.com/stripe/stripe-php/pull/1233) API Updates
- * Add support for new resource `PaymentLink`
- * Add support for `payment_link` on `Checkout.Session`
-
-## 7.110.0 - 2022-01-13
-* [#1232](https://github.com/stripe/stripe-php/pull/1232) API Updates
- * Add support for `paid_out_of_band` on `Invoice`
-
-## 7.109.0 - 2022-01-12
-* [#1231](https://github.com/stripe/stripe-php/pull/1231) API Updates
- * Add support for `customer_creation` on `Checkout.Session`
-* [#1227](https://github.com/stripe/stripe-php/pull/1227) Update docs URLs
-
-## 7.108.0 - 2021-12-22
-* [#1226](https://github.com/stripe/stripe-php/pull/1226) Upgrade php-cs-fixer to 3.4.0.
-* [#1222](https://github.com/stripe/stripe-php/pull/1222) API Updates
- * Add support for `processing` on `PaymentIntent`
-* [#1220](https://github.com/stripe/stripe-php/pull/1220) API Updates
-
-## 7.107.0 - 2021-12-09
-* [#1219](https://github.com/stripe/stripe-php/pull/1219) API Updates
- * Add support for `metadata` on `BillingPortal.Configuration`
- * Add support for `wallets` on `Issuing.Card`
-
-## 7.106.0 - 2021-12-09
-* [#1218](https://github.com/stripe/stripe-php/pull/1218) API Updates
- * Add support for new values `ge_vat` and `ua_vat` on enum `TaxId.type`
-* [#1216](https://github.com/stripe/stripe-php/pull/1216) Fix namespaced classes in @return PHPDoc.
-* [#1214](https://github.com/stripe/stripe-php/pull/1214) Announce PHP8 support in CHANGELOG.md
-
-## 7.105.0 - 2021-12-06
-* [#1213](https://github.com/stripe/stripe-php/pull/1213) PHP 8.1 missing ReturnTypeWillChange annotations.
-* As of this version, PHP 8.1 is officially supported.
-
-## 7.104.0 - 2021-12-01
-* [#1211](https://github.com/stripe/stripe-php/pull/1211) PHPStan compatibility with PHP8.x
-* [#1209](https://github.com/stripe/stripe-php/pull/1209) PHPUnit compatibility with PHP 8.x
-
-## 7.103.0 - 2021-11-19
-* [#1206](https://github.com/stripe/stripe-php/pull/1206) API Updates
- * Add support for new value `jct` on enum `TaxRate.tax_type`
-
-## 7.102.0 - 2021-11-17
-* [#1205](https://github.com/stripe/stripe-php/pull/1205) API Updates
- * Add support for `automatic_payment_methods` on `PaymentIntent`
-
-## 7.101.0 - 2021-11-16
-* [#1203](https://github.com/stripe/stripe-php/pull/1203) API Updates
- * Add support for new resource `ShippingRate`
- * Add support for `shipping_options` and `shipping_rate` on `Checkout.Session`
- * Add support for `expire` method on resource `Checkout.Session`
- * Add support for `status` on `Checkout.Session`
-
-## 7.100.0 - 2021-10-11
-* [#1190](https://github.com/stripe/stripe-php/pull/1190) API Updates
- * Add support for `klarna` on `PaymentMethod`.
-
-## 7.99.0 - 2021-10-11
-* [#1188](https://github.com/stripe/stripe-php/pull/1188) API Updates
- * Add support for `list_payment_methods` method on resource `Customer`
-
-## 7.98.0 - 2021-10-07
-* [#1187](https://github.com/stripe/stripe-php/pull/1187) API Updates
- * Add support for `phone_number_collection` on `Checkout.Session`
- * Add support for new value `customer_id` on enum `Radar.ValueList.item_type`
- * Add support for new value `bbpos_wisepos_e` on enum `Terminal.Reader.device_type`
-
-## 7.97.0 - 2021-09-16
-* [#1181](https://github.com/stripe/stripe-php/pull/1181) API Updates
- * Add support for `full_name_aliases` on `Person`
-
-## 7.96.0 - 2021-09-15
-* [#1178](https://github.com/stripe/stripe-php/pull/1178) API Updates
- * Add support for livemode on Reporting.ReportType
- * Add support for new value `rst` on enum `TaxRate.tax_type`
-
-## 7.95.0 - 2021-09-01
-* [#1177](https://github.com/stripe/stripe-php/pull/1177) API Updates
- * Add support for `future_requirements` on `Account`, `Capability`, and `Person`
- * Add support for `after_expiration`, `consent`, `consent_collection`, `expires_at`, and `recovered_from` on `Checkout.Session`
-
-## 7.94.0 - 2021-08-19
-* [#1173](https://github.com/stripe/stripe-php/pull/1173) API Updates
- * Add support for new value `fil` on enum `Checkout.Session.locale`
- * Add support for new value `au_arn` on enum `TaxId.type`
-
-## 7.93.0 - 2021-08-11
-* [#1172](https://github.com/stripe/stripe-php/pull/1172) API Updates
- * Add support for `locale` on `BillingPortal.Session`
-
-* [#1171](https://github.com/stripe/stripe-php/pull/1171) Fix typo in docblock `CurlClient::executeStreamingRequestWithRetries`
-
-## 7.92.0 - 2021-07-28
-* [#1167](https://github.com/stripe/stripe-php/pull/1167) API Updates
- * Add support for `account_type` on `BankAccount`
- * Add support for new value `redacted` on enum `Review.closed_reason`
-
-## 7.91.0 - 2021-07-22
-* [#1164](https://github.com/stripe/stripe-php/pull/1164) API Updates
- * Add support for new values `hr`, `ko`, and `vi` on enum `Checkout.Session.locale`
- * Add support for `payment_settings` on `Subscription`
-
-## 7.90.0 - 2021-07-20
-* [#1163](https://github.com/stripe/stripe-php/pull/1163) API Updates
- * Add support for `wallet` on `Issuing.Transaction`
-* [#1160](https://github.com/stripe/stripe-php/pull/1160) Remove unused API error types from docs.
-
-## 7.89.0 - 2021-07-14
-* [#1158](https://github.com/stripe/stripe-php/pull/1158) API Updates
- * Add support for `list_computed_upfront_line_items` method on resource `Quote`
-* [#1157](https://github.com/stripe/stripe-php/pull/1157) Improve readme for old PHP versions
-
-## 7.88.0 - 2021-07-09
-* [#1152](https://github.com/stripe/stripe-php/pull/1152) API Updates
- * Add support for new resource `Quote`
- * Add support for `quote` on `Invoice`
- * Add support for new value `quote_accept` on enum `Invoice.billing_reason`
-* [#1155](https://github.com/stripe/stripe-php/pull/1155) Add streaming methods to Service infra
- * Add support for `setStreamingHttpClient` and `streamingHttpClient` to `ApiRequestor`
- * Add support for `getStreamingClient` and `requestStream` to `AbstractService`
- * Add support for `requestStream` to `BaseStripeClient`
- * `\Stripe\RequestOptions::parse` now clones its input if it is already a `RequestOptions` object, to prevent accidental mutation.
-* [#1151](https://github.com/stripe/stripe-php/pull/1151) Add `mode` constants into Checkout\Session
-
-## 7.87.0 - 2021-06-30
-* [#1149](https://github.com/stripe/stripe-php/pull/1149) API Updates
- * Add support for `wechat_pay` on `PaymentMethod`
-* [#1143](https://github.com/stripe/stripe-php/pull/1143) Streaming requests
-* [#1138](https://github.com/stripe/stripe-php/pull/1138) Deprecate travis
-
-## 7.86.0 - 2021-06-25
-* [#1145](https://github.com/stripe/stripe-php/pull/1145) API Updates
- * Add support for `boleto` on `PaymentMethod`.
- * Add support for `il_vat` as a member of the `TaxID.Type` enum.
-
-## 7.85.0 - 2021-06-18
-* [#1142](https://github.com/stripe/stripe-php/pull/1142) API Updates
- * Add support for new TaxId types: `ca_pst_mb`, `ca_pst_bc`, `ca_gst_hst`, and `ca_pst_sk`.
-
-## 7.84.0 - 2021-06-16
-* [#1141](https://github.com/stripe/stripe-php/pull/1141) Update PHPDocs
- * Add support for `url` on `Checkout\Session`
-
-
-## 7.83.0 - 2021-06-07
-* [#1140](https://github.com/stripe/stripe-php/pull/1140) API Updates
- * Added support for `tax_id_collection` on `Checkout\Session` and `Checkout\Session#create`
- * Update `Location` to be expandable on `Terminal\Reader`
-
-## 7.82.0 - 2021-06-04
-* [#1136](https://github.com/stripe/stripe-php/pull/1136) Update PHPDocs
- * Add support for `controller` on `Account`.
-
-## 7.81.0 - 2021-06-04
-* [#1135](https://github.com/stripe/stripe-php/pull/1135) API Updates
- * Add support for new resource `TaxCode`
- * Add support for `automatic_tax` `Invoice` and`Checkout.Session`.
- * Add support for `tax_behavior` on `Price`
- * Add support for `tax_code` on `Product`
- * Add support for `tax` on `Customer`
- * Add support for `tax_type` enum on `TaxRate`
-
-## 7.80.0 - 2021-05-26
-* [#1130](https://github.com/stripe/stripe-php/pull/1130) Update PHPDocs
-
-## 7.79.0 - 2021-05-19
-* [#1126](https://github.com/stripe/stripe-php/pull/1126) API Updates
- * Added support for new resource `Identity.VerificationReport`
- * Added support for new resource `Identity.VerificationSession`
- * `File#list.purpose` and `File.purpose` added new enum members: `identity_document_downloadable` and `selfie`.
-
-## 7.78.0 - 2021-05-05
-* [#1120](https://github.com/stripe/stripe-php/pull/1120) Update PHPDocs
- * Add support for `Radar.EarlyFraudWarning.payment_intent`
-
-## 7.77.0 - 2021-04-12
-* [#1110](https://github.com/stripe/stripe-php/pull/1110) Update PHPDocs
- * Add support for `acss_debit` on `PaymentMethod`
- * Add support for `payment_method_options` on `Checkout\Session`
-* [#1107](https://github.com/stripe/stripe-php/pull/1107) Remove duplicate object phpdoc
-
-## 7.76.0 - 2021-03-22
-* [#1100](https://github.com/stripe/stripe-php/pull/1100) Update PHPDocs
- * Added support for `amount_shipping` on `Checkout.Session.total_details`
-* [#1088](https://github.com/stripe/stripe-php/pull/1088) Make possibility to extend CurlClient
-
-## 7.75.0 - 2021-02-22
-* [#1094](https://github.com/stripe/stripe-php/pull/1094) Add support for Billing Portal Configuration API
-
-## 7.74.0 - 2021-02-17
-* [#1093](https://github.com/stripe/stripe-php/pull/1093) Update PHPDocs
- * Add support for on_behalf_of to Invoice
-
-## 7.73.0 - 2021-02-16
-* [#1091](https://github.com/stripe/stripe-php/pull/1091) Update PHPDocs
- * Add support for `afterpay_clearpay` on `PaymentMethod`.
-
-## 7.72.0 - 2021-02-08
-* [#1089](https://github.com/stripe/stripe-php/pull/1089) Update PHPDocs
- * Add support for `afterpay_clearpay_payments` on `Account.capabilities`
- * Add support for `payment_settings` on `Invoice`
-
-## 7.71.0 - 2021-02-05
-* [#1087](https://github.com/stripe/stripe-php/pull/1087) Update PHPDocs
-* [#1086](https://github.com/stripe/stripe-php/pull/1086) Update CA cert bundle URL
-
-## 7.70.0 - 2021-02-03
-* [#1085](https://github.com/stripe/stripe-php/pull/1085) Update PHPDocs
- * Add support for `nationality` on `Person`
- * Add member `gb_vat` of `TaxID` enum
-
-
-## 7.69.0 - 2021-01-21
-* [#1079](https://github.com/stripe/stripe-php/pull/1079) Update PHPDocs
-
-## 7.68.0 - 2021-01-14
-* [#1063](https://github.com/stripe/stripe-php/pull/1063) Multiple API changes
-* [#1061](https://github.com/stripe/stripe-php/pull/1061) Bump phpDocumentor to 3.0.0
-
-## 7.67.0 - 2020-12-09
-* [#1060](https://github.com/stripe/stripe-php/pull/1060) Improve PHPDocs for `Discount`
-* [#1059](https://github.com/stripe/stripe-php/pull/1059) Upgrade PHPStan to 0.12.59
-* [#1057](https://github.com/stripe/stripe-php/pull/1057) Bump PHP-CS-Fixer and update code
-
-## 7.66.1 - 2020-12-01
-* [#1054](https://github.com/stripe/stripe-php/pull/1054) Improve error message for invalid keys in StripeClient
-
-## 7.66.0 - 2020-11-24
-* [#1053](https://github.com/stripe/stripe-php/pull/1053) Update PHPDocs
-
-## 7.65.0 - 2020-11-19
-* [#1050](https://github.com/stripe/stripe-php/pull/1050) Added constants for `proration_behavior` on `Subscription`
-
-## 7.64.0 - 2020-11-18
-* [#1049](https://github.com/stripe/stripe-php/pull/1049) Update PHPDocs
-
-## 7.63.0 - 2020-11-17
-* [#1048](https://github.com/stripe/stripe-php/pull/1048) Update PHPDocs
-* [#1046](https://github.com/stripe/stripe-php/pull/1046) Force IPv4 resolving
-
-## 7.62.0 - 2020-11-09
-* [#1041](https://github.com/stripe/stripe-php/pull/1041) Add missing constants on `Event`
-* [#1038](https://github.com/stripe/stripe-php/pull/1038) Update PHPDocs
-
-## 7.61.0 - 2020-10-20
-* [#1030](https://github.com/stripe/stripe-php/pull/1030) Add support for `jp_rn` and `ru_kpp` as a `type` on `TaxId`
-
-## 7.60.0 - 2020-10-15
-* [#1027](https://github.com/stripe/stripe-php/pull/1027) Warn if opts are in params
-
-## 7.58.0 - 2020-10-14
-* [#1026](https://github.com/stripe/stripe-php/pull/1026) Add support for the Payout Reverse API
-
-## 7.57.0 - 2020-09-29
-* [#1020](https://github.com/stripe/stripe-php/pull/1020) Add support for the `SetupAttempt` resource and List API
-
-## 7.56.0 - 2020-09-25
-* [#1019](https://github.com/stripe/stripe-php/pull/1019) Update PHPDocs
-
-## 7.55.0 - 2020-09-24
-* [#1018](https://github.com/stripe/stripe-php/pull/1018) Multiple API changes
- * Updated PHPDocs
- * Added `TYPE_CONTRIBUTION` as a constant on `BalanceTransaction`
-
-## 7.54.0 - 2020-09-23
-* [#1017](https://github.com/stripe/stripe-php/pull/1017) Updated PHPDoc
-
-## 7.53.1 - 2020-09-22
-* [#1015](https://github.com/stripe/stripe-php/pull/1015) Bugfix: don't error on systems with php_uname in disablefunctions with whitespace
-
-## 7.53.0 - 2020-09-21
-* [#1016](https://github.com/stripe/stripe-php/pull/1016) Updated PHPDocs
-
-## 7.52.0 - 2020-09-08
-* [#1010](https://github.com/stripe/stripe-php/pull/1010) Update PHPDocs
-
-## 7.51.0 - 2020-09-02
-* [#1007](https://github.com/stripe/stripe-php/pull/1007) Multiple API changes
- * Add support for the Issuing Dispute Submit API
- * Add constants for `payment_status` on Checkout `Session`
-* [#1003](https://github.com/stripe/stripe-php/pull/1003) Add trim to getSignatures to allow for leading whitespace.
-
-## 7.50.0 - 2020-08-28
-* [#1005](https://github.com/stripe/stripe-php/pull/1005) Updated PHPDocs
-
-## 7.49.0 - 2020-08-19
-* [#998](https://github.com/stripe/stripe-php/pull/998) PHPDocs updated
-
-## 7.48.0 - 2020-08-17
-* [#997](https://github.com/stripe/stripe-php/pull/997) PHPDocs updated
-* [#996](https://github.com/stripe/stripe-php/pull/996) Fixing telemetry
-
-## 7.47.0 - 2020-08-13
-* [#994](https://github.com/stripe/stripe-php/pull/994) Nullable balance_transactions on issuing disputes
-* [#991](https://github.com/stripe/stripe-php/pull/991) Fix invalid return types in OAuthService
-
-## 7.46.1 - 2020-08-07
-* [#990](https://github.com/stripe/stripe-php/pull/990) PHPdoc changes
-
-## 7.46.0 - 2020-08-05
-* [#989](https://github.com/stripe/stripe-php/pull/989) Add support for the `PromotionCode` resource and APIs
-
-## 7.45.0 - 2020-07-28
-* [#981](https://github.com/stripe/stripe-php/pull/981) PHPdoc updates
-
-## 7.44.0 - 2020-07-20
-* [#948](https://github.com/stripe/stripe-php/pull/948) Add `first()` and `last()` functions to `Collection`
-
-## 7.43.0 - 2020-07-17
-* [#975](https://github.com/stripe/stripe-php/pull/975) Add support for `political_exposure` on `Person`
-
-## 7.42.0 - 2020-07-15
-* [#974](https://github.com/stripe/stripe-php/pull/974) Add new constants for `purpose` on `File`
-
-## 7.41.1 - 2020-07-15
-* [#973](https://github.com/stripe/stripe-php/pull/973) Multiple PHPDoc fixes
-
-## 7.41.0 - 2020-07-14
-* [#971](https://github.com/stripe/stripe-php/pull/971) Adds enum values for `billing_address_collection` on Checkout `Session`
-
-## 7.40.0 - 2020-07-06
-* [#964](https://github.com/stripe/stripe-php/pull/964) Add OAuthService
-
-## 7.39.0 - 2020-06-25
-* [#960](https://github.com/stripe/stripe-php/pull/960) Add constants for `payment_behavior` on `Subscription`
-
-## 7.38.0 - 2020-06-24
-* [#959](https://github.com/stripe/stripe-php/pull/959) Add multiple constants missing for `Event`
-
-## 7.37.2 - 2020-06-23
-* [#957](https://github.com/stripe/stripe-php/pull/957) Updated PHPDocs
-
-## 7.37.1 - 2020-06-11
-* [#952](https://github.com/stripe/stripe-php/pull/952) Improve PHPDoc
-
-## 7.37.0 - 2020-06-09
-* [#950](https://github.com/stripe/stripe-php/pull/950) Add support for `id_npwp` and `my_frp` as `type` on `TaxId`
-
-## 7.36.2 - 2020-06-03
-* [#946](https://github.com/stripe/stripe-php/pull/946) Update PHPDoc
-
-## 7.36.1 - 2020-05-28
-* [#938](https://github.com/stripe/stripe-php/pull/938) Remove extra array_keys() call.
-* [#942](https://github.com/stripe/stripe-php/pull/942) fix autopagination for service methods
-
-## 7.36.0 - 2020-05-21
-* [#937](https://github.com/stripe/stripe-php/pull/937) Add support for `ae_trn`, `cl_tin` and `sa_vat` as `type` on `TaxId`
-
-## 7.35.0 - 2020-05-20
-* [#936](https://github.com/stripe/stripe-php/pull/936) Add `anticipation_repayment` as a `type` on `BalanceTransaction`
-
-## 7.34.0 - 2020-05-18
-* [#934](https://github.com/stripe/stripe-php/pull/934) Add support for `issuing_dispute` as a `type` on `BalanceTransaction`
-
-## 7.33.1 - 2020-05-15
-* [#933](https://github.com/stripe/stripe-php/pull/933) Services bugfix: convert nested null params to empty strings
-
-## 7.33.0 - 2020-05-14
-* [#771](https://github.com/stripe/stripe-php/pull/771) Introduce client/services API. The [migration guide](https://github.com/stripe/stripe-php/wiki/Migration-to-StripeClient-and-services-in-7.33.0) contains before & after examples of the backwards-compatible changes.
-
-## 7.32.1 - 2020-05-13
-* [#932](https://github.com/stripe/stripe-php/pull/932) Fix multiple PHPDoc
-
-## 7.32.0 - 2020-05-11
-* [#931](https://github.com/stripe/stripe-php/pull/931) Add support for the `LineItem` resource and APIs
-
-## 7.31.0 - 2020-05-01
-* [#927](https://github.com/stripe/stripe-php/pull/927) Add support for new tax IDs
-
-## 7.30.0 - 2020-04-29
-* [#924](https://github.com/stripe/stripe-php/pull/924) Add support for the `Price` resource and APIs
-
-## 7.29.0 - 2020-04-22
-* [#920](https://github.com/stripe/stripe-php/pull/920) Add support for the `Session` resource and APIs on the `BillingPortal` namespace
-
-## 7.28.1 - 2020-04-10
-* [#915](https://github.com/stripe/stripe-php/pull/915) Improve PHPdocs for many classes
-
-## 7.28.0 - 2020-04-03
-* [#912](https://github.com/stripe/stripe-php/pull/912) Preserve backwards compatibility for typoed `TYPE_ADJUSTEMENT` enum.
-* [#911](https://github.com/stripe/stripe-php/pull/911) Codegenerated PHPDoc for nested resources
-* [#902](https://github.com/stripe/stripe-php/pull/902) Update docstrings for nested resources
-
-## 7.27.3 - 2020-03-18
-* [#899](https://github.com/stripe/stripe-php/pull/899) Convert keys to strings in `StripeObject::toArray()`
-
-## 7.27.2 - 2020-03-13
-* [#894](https://github.com/stripe/stripe-php/pull/894) Multiple PHPDocs changes
-
-## 7.27.1 - 2020-03-03
-* [#890](https://github.com/stripe/stripe-php/pull/890) Update PHPdoc
-
-## 7.27.0 - 2020-02-28
-* [#889](https://github.com/stripe/stripe-php/pull/889) Add new constants for `type` on `TaxId`
-
-## 7.26.0 - 2020-02-26
-* [#886](https://github.com/stripe/stripe-php/pull/886) Add support for listing Checkout `Session`
-* [#883](https://github.com/stripe/stripe-php/pull/883) Add PHPDoc class descriptions
-
-## 7.25.0 - 2020-02-14
-* [#879](https://github.com/stripe/stripe-php/pull/879) Make `\Stripe\Collection` implement `\Countable`
-* [#875](https://github.com/stripe/stripe-php/pull/875) Last set of PHP-CS-Fixer updates
-* [#874](https://github.com/stripe/stripe-php/pull/874) Enable php_unit_internal_class rule
-* [#873](https://github.com/stripe/stripe-php/pull/873) Add support for phpDocumentor in Makefile
-* [#872](https://github.com/stripe/stripe-php/pull/872) Another batch of PHP-CS-Fixer rule updates
-* [#871](https://github.com/stripe/stripe-php/pull/871) Fix a few PHPDoc comments
-* [#870](https://github.com/stripe/stripe-php/pull/870) More PHP-CS-Fixer tweaks
-
-## 7.24.0 - 2020-02-10
-* [#862](https://github.com/stripe/stripe-php/pull/862) Better PHPDoc
-* [#865](https://github.com/stripe/stripe-php/pull/865) Get closer to `@PhpCsFixer` standard ruleset
-
-## 7.23.0 - 2020-02-05
-* [#860](https://github.com/stripe/stripe-php/pull/860) Add PHPDoc types for expandable fields
-* [#858](https://github.com/stripe/stripe-php/pull/858) Use `native_function_invocation` PHPStan rule
-* [#857](https://github.com/stripe/stripe-php/pull/857) Update PHPDoc on nested resources
-* [#855](https://github.com/stripe/stripe-php/pull/855) PHPDoc: `StripeObject` -> `ErrorObject` where appropriate
-* [#837](https://github.com/stripe/stripe-php/pull/837) Autogen diff
-* [#854](https://github.com/stripe/stripe-php/pull/854) Upgrade PHPStan and fix settings
-* [#850](https://github.com/stripe/stripe-php/pull/850) Yet more PHPDoc updates
-
-## 7.22.0 - 2020-01-31
-* [#849](https://github.com/stripe/stripe-php/pull/849) Add new constants for `type` on `TaxId`
-* [#843](https://github.com/stripe/stripe-php/pull/843) Even more PHPDoc fixes
-* [#841](https://github.com/stripe/stripe-php/pull/841) More PHPDoc fixes
-
-## 7.21.1 - 2020-01-29
-* [#840](https://github.com/stripe/stripe-php/pull/840) Update phpdocs across multiple resources.
-
-## 7.21.0 - 2020-01-28
-* [#839](https://github.com/stripe/stripe-php/pull/839) Add support for `TYPE_ES_CIF` on `TaxId`
-
-## 7.20.0 - 2020-01-23
-* [#836](https://github.com/stripe/stripe-php/pull/836) Add new type values for `TaxId`
-
-## 7.19.1 - 2020-01-14
-* [#831](https://github.com/stripe/stripe-php/pull/831) Fix incorrect `UnexpectedValueException` instantiation
-
-## 7.19.0 - 2020-01-14
-* [#830](https://github.com/stripe/stripe-php/pull/830) Add support for `CreditNoteLineItem`
-
-## 7.18.0 - 2020-01-13
-* [#829](https://github.com/stripe/stripe-php/pull/829) Don't call php_uname function if disabled by php.ini
-
-## 7.17.0 - 2020-01-08
-* [#821](https://github.com/stripe/stripe-php/pull/821) Improve PHPDoc types for `ApiErrorException.get/setJsonBody()` methods
-
-## 7.16.0 - 2020-01-06
-* [#826](https://github.com/stripe/stripe-php/pull/826) Rename remaining `$options` to `$opts`
-* [#825](https://github.com/stripe/stripe-php/pull/825) Update PHPDoc
-
-## 7.15.0 - 2020-01-06
-* [#824](https://github.com/stripe/stripe-php/pull/824) Add constant `TYPE_SG_UEN` to `TaxId`
-
-## 7.14.2 - 2019-12-04
-* [#816](https://github.com/stripe/stripe-php/pull/816) Disable autoloader when checking for `Throwable`
-
-## 7.14.1 - 2019-11-26
-* [#812](https://github.com/stripe/stripe-php/pull/812) Fix invalid PHPdoc on `Subscription`
-
-## 7.14.0 - 2019-11-26
-* [#811](https://github.com/stripe/stripe-php/pull/811) Add support for `CreditNote` preview.
-
-## 7.13.0 - 2019-11-19
-* [#808](https://github.com/stripe/stripe-php/pull/808) Add support for listing lines on an Invoice directly via `Invoice::allLines()`
-
-## 7.12.0 - 2019-11-08
-
-- [#805](https://github.com/stripe/stripe-php/pull/805) Add Source::allSourceTransactions and SubscriptionItem::allUsageRecordSummaries
-- [#798](https://github.com/stripe/stripe-php/pull/798) The argument of `array_key_exists` cannot be `null`
-- [#803](https://github.com/stripe/stripe-php/pull/803) Removed unwanted got
-
-## 7.11.0 - 2019-11-06
-
-- [#797](https://github.com/stripe/stripe-php/pull/797) Add support for reverse pagination
-
-## 7.10.0 - 2019-11-05
-
-- [#795](https://github.com/stripe/stripe-php/pull/795) Add support for `Mandate`
-
-## 7.9.0 - 2019-11-05
-
-- [#794](https://github.com/stripe/stripe-php/pull/794) Add PHPDoc to `ApiResponse`
-- [#792](https://github.com/stripe/stripe-php/pull/792) Use single quotes for `OBJECT_NAME` constants
-
-## 7.8.0 - 2019-11-05
-
-- [#790](https://github.com/stripe/stripe-php/pull/790) Mark nullable fields in PHPDoc
-- [#788](https://github.com/stripe/stripe-php/pull/788) Early codegen fixes
-- [#787](https://github.com/stripe/stripe-php/pull/787) Use PHPStan in Travis CI
-
-## 7.7.1 - 2019-10-25
-
-- [#781](https://github.com/stripe/stripe-php/pull/781) Fix telemetry header
-- [#780](https://github.com/stripe/stripe-php/pull/780) Contributor Convenant
-
-## 7.7.0 - 2019-10-23
-
-- [#776](https://github.com/stripe/stripe-php/pull/776) Add `CAPABILITY_TRANSFERS` to `Account`
-- [#778](https://github.com/stripe/stripe-php/pull/778) Add support for `TYPE_MX_RFC` type on `TaxId`
-
-## 7.6.0 - 2019-10-22
-
-- [#770](https://github.com/stripe/stripe-php/pull/770) Add missing constants for Customer's `TaxId`
-
-## 7.5.0 - 2019-10-18
-
-- [#768](https://github.com/stripe/stripe-php/pull/768) Redact API key in `RequestOptions` debug info
-
-## 7.4.0 - 2019-10-15
-
-- [#764](https://github.com/stripe/stripe-php/pull/764) Add support for HTTP request monitoring callback
-
-## 7.3.1 - 2019-10-07
-
-- [#755](https://github.com/stripe/stripe-php/pull/755) Respect Stripe-Should-Retry and Retry-After headers
-
-## 7.3.0 - 2019-10-02
-
-- [#752](https://github.com/stripe/stripe-php/pull/752) Add `payment_intent.canceled` and `setup_intent.canceled` events
-- [#749](https://github.com/stripe/stripe-php/pull/749) Call `toArray()` on objects only
-
-## 7.2.2 - 2019-09-24
-
-- [#746](https://github.com/stripe/stripe-php/pull/746) Add missing decline codes
-
-## 7.2.1 - 2019-09-23
-
-- [#744](https://github.com/stripe/stripe-php/pull/744) Added new PHPDoc
-
-## 7.2.0 - 2019-09-17
-
-- [#738](https://github.com/stripe/stripe-php/pull/738) Added missing constants for `SetupIntent` events
-
-## 7.1.1 - 2019-09-16
-
-- [#737](https://github.com/stripe/stripe-php/pull/737) Added new PHPDoc
-
-## 7.1.0 - 2019-09-13
-
-- [#736](https://github.com/stripe/stripe-php/pull/736) Make `CaseInsensitiveArray` countable and traversable
-
-## 7.0.2 - 2019-09-06
-
-- [#729](https://github.com/stripe/stripe-php/pull/729) Fix usage of `SignatureVerificationException` in PHPDoc blocks
-
-## 7.0.1 - 2019-09-05
-
-- [#728](https://github.com/stripe/stripe-php/pull/728) Clean up Collection
-
-## 7.0.0 - 2019-09-03
-
-Major version release. The [migration guide](https://github.com/stripe/stripe-php/wiki/Migration-guide-for-v7) contains a detailed list of backwards-incompatible changes with upgrade instructions.
-
-Pull requests included in this release (cf. [#552](https://github.com/stripe/stripe-php/pull/552)) (⚠️ = breaking changes):
-
-- ⚠️ Drop support for PHP 5.4 ([#551](https://github.com/stripe/stripe-php/pull/551))
-- ⚠️ Drop support for PHP 5.5 ([#554](https://github.com/stripe/stripe-php/pull/554))
-- Bump dependencies ([#553](https://github.com/stripe/stripe-php/pull/553))
-- Remove `CURLFile` check ([#555](https://github.com/stripe/stripe-php/pull/555))
-- Update constant definitions for PHP >= 5.6 ([#556](https://github.com/stripe/stripe-php/pull/556))
-- ⚠️ Remove `FileUpload` alias ([#557](https://github.com/stripe/stripe-php/pull/557))
-- Remove `curl_reset` check ([#570](https://github.com/stripe/stripe-php/pull/570))
-- Use `\Stripe\::class` constant instead of strings ([#643](https://github.com/stripe/stripe-php/pull/643))
-- Use `array_column` to flatten params ([#686](https://github.com/stripe/stripe-php/pull/686))
-- ⚠️ Remove deprecated methods ([#692](https://github.com/stripe/stripe-php/pull/692))
-- ⚠️ Remove `IssuerFraudRecord` ([#696](https://github.com/stripe/stripe-php/pull/696))
-- Update constructors of Stripe exception classes ([#559](https://github.com/stripe/stripe-php/pull/559))
-- Fix remaining TODOs ([#700](https://github.com/stripe/stripe-php/pull/700))
-- Use yield for autopagination ([#703](https://github.com/stripe/stripe-php/pull/703))
-- ⚠️ Rename fake magic methods and rewrite array conversion ([#704](https://github.com/stripe/stripe-php/pull/704))
-- Add `ErrorObject` to Stripe exceptions ([#705](https://github.com/stripe/stripe-php/pull/705))
-- Start using PHP CS Fixer ([#706](https://github.com/stripe/stripe-php/pull/706))
-- Update error messages for nested resource operations ([#708](https://github.com/stripe/stripe-php/pull/708))
-- Upgrade retry logic ([#707](https://github.com/stripe/stripe-php/pull/707))
-- ⚠️ `Collection` improvements / fixes ([#715](https://github.com/stripe/stripe-php/pull/715))
-- ⚠️ Modernize exceptions ([#709](https://github.com/stripe/stripe-php/pull/709))
-- Add constants for error codes ([#716](https://github.com/stripe/stripe-php/pull/716))
-- Update certificate bundle ([#717](https://github.com/stripe/stripe-php/pull/717))
-- Retry requests on a 429 that's a lock timeout ([#718](https://github.com/stripe/stripe-php/pull/718))
-- Fix `toArray()` calls ([#719](https://github.com/stripe/stripe-php/pull/719))
-- Couple of fixes for PHP 7.4 ([#725](https://github.com/stripe/stripe-php/pull/725))
-
-## 6.43.1 - 2019-08-29
-
-- [#722](https://github.com/stripe/stripe-php/pull/722) Make `LoggerInterface::error` compatible with its PSR-3 counterpart
-- [#714](https://github.com/stripe/stripe-php/pull/714) Add `pending_setup_intent` property in `Subscription`
-- [#713](https://github.com/stripe/stripe-php/pull/713) Add typehint to `ApiResponse`
-- [#712](https://github.com/stripe/stripe-php/pull/712) Fix comment
-- [#701](https://github.com/stripe/stripe-php/pull/701) Start testing PHP 7.3
-
-## 6.43.0 - 2019-08-09
-
-- [#694](https://github.com/stripe/stripe-php/pull/694) Add `SubscriptionItem::createUsageRecord` method
-
-## 6.42.0 - 2019-08-09
-
-- [#688](https://github.com/stripe/stripe-php/pull/688) Remove `SubscriptionScheduleRevision`
- - Note that this is technically a breaking change, however we've chosen to release it as a minor version in light of the fact that this resource and its API methods were virtually unused.
-
-## 6.41.0 - 2019-07-31
-
-- [#683](https://github.com/stripe/stripe-php/pull/683) Move the List Balance History API to `/v1/balance_transactions`
-
-## 6.40.0 - 2019-06-27
-
-- [#675](https://github.com/stripe/stripe-php/pull/675) Add support for `SetupIntent` resource and APIs
-
-## 6.39.2 - 2019-06-26
-
-- [#676](https://github.com/stripe/stripe-php/pull/676) Fix exception message in `CustomerBalanceTransaction::update()`
-
-## 6.39.1 - 2019-06-25
-
-- [#674](https://github.com/stripe/stripe-php/pull/674) Add new constants for `collection_method` on `Invoice`
-
-## 6.39.0 - 2019-06-24
-
-- [#673](https://github.com/stripe/stripe-php/pull/673) Enable request latency telemetry by default
-
-## 6.38.0 - 2019-06-17
-
-- [#649](https://github.com/stripe/stripe-php/pull/649) Add support for `CustomerBalanceTransaction` resource and APIs
-
-## 6.37.2 - 2019-06-17
-
-- [#671](https://github.com/stripe/stripe-php/pull/671) Add new PHPDoc
-- [#672](https://github.com/stripe/stripe-php/pull/672) Add constants for `submit_type` on Checkout `Session`
-
-## 6.37.1 - 2019-06-14
-
-- [#670](https://github.com/stripe/stripe-php/pull/670) Add new PHPDoc
-
-## 6.37.0 - 2019-05-23
-
-- [#663](https://github.com/stripe/stripe-php/pull/663) Add support for `radar.early_fraud_warning` resource
-
-## 6.36.0 - 2019-05-22
-
-- [#661](https://github.com/stripe/stripe-php/pull/661) Add constants for new TaxId types
-- [#662](https://github.com/stripe/stripe-php/pull/662) Add constants for BalanceTransaction types
-
-## 6.35.2 - 2019-05-20
-
-- [#655](https://github.com/stripe/stripe-php/pull/655) Add constants for payment intent statuses
-- [#659](https://github.com/stripe/stripe-php/pull/659) Fix PHPDoc for various nested Account actions
-- [#660](https://github.com/stripe/stripe-php/pull/660) Fix various PHPDoc
-
-## 6.35.1 - 2019-05-20
-
-- [#658](https://github.com/stripe/stripe-php/pull/658) Use absolute value when checking timestamp tolerance
-
-## 6.35.0 - 2019-05-14
-
-- [#651](https://github.com/stripe/stripe-php/pull/651) Add support for the Capability resource and APIs
-
-## 6.34.6 - 2019-05-13
-
-- [#654](https://github.com/stripe/stripe-php/pull/654) Fix typo in definition of `Event::PAYMENT_METHOD_ATTACHED` constant
-
-## 6.34.5 - 2019-05-06
-
-- [#647](https://github.com/stripe/stripe-php/pull/647) Set the return type to static for more operations
-
-## 6.34.4 - 2019-05-06
-
-- [#650](https://github.com/stripe/stripe-php/pull/650) Add missing constants for Event types
-
-## 6.34.3 - 2019-05-01
-
-- [#644](https://github.com/stripe/stripe-php/pull/644) Update return type to `static` to improve static analysis
-- [#645](https://github.com/stripe/stripe-php/pull/645) Fix constant for `payment_intent.payment_failed`
-
-## 6.34.2 - 2019-04-26
-
-- [#642](https://github.com/stripe/stripe-php/pull/642) Fix an issue where existing idempotency keys would be overwritten when using automatic retries
-
-## 6.34.1 - 2019-04-25
-
-- [#640](https://github.com/stripe/stripe-php/pull/640) Add missing phpdocs
-
-## 6.34.0 - 2019-04-24
-
-- [#626](https://github.com/stripe/stripe-php/pull/626) Add support for the `TaxRate` resource and APIs
-- [#639](https://github.com/stripe/stripe-php/pull/639) Fix multiple phpdoc issues
-
-## 6.33.0 - 2019-04-22
-
-- [#630](https://github.com/stripe/stripe-php/pull/630) Add support for the `TaxId` resource and APIs
-
-## 6.32.1 - 2019-04-19
-
-- [#636](https://github.com/stripe/stripe-php/pull/636) Correct type of `$personId` in PHPDoc
-
-## 6.32.0 - 2019-04-18
-
-- [#621](https://github.com/stripe/stripe-php/pull/621) Add support for `CreditNote`
-
-## 6.31.5 - 2019-04-12
-
-- [#628](https://github.com/stripe/stripe-php/pull/628) Add constants for `person.*` event types
-- [#628](https://github.com/stripe/stripe-php/pull/628) Add missing constants for `Account` and `Person`
-
-## 6.31.4 - 2019-04-05
-
-- [#624](https://github.com/stripe/stripe-php/pull/624) Fix encoding of nested parameters in multipart requests
-
-## 6.31.3 - 2019-04-02
-
-- [#623](https://github.com/stripe/stripe-php/pull/623) Only use HTTP/2 with curl >= 7.60.0
-
-## 6.31.2 - 2019-03-25
-
-- [#619](https://github.com/stripe/stripe-php/pull/619) Fix PHPDoc return types for list methods for nested resources
-
-## 6.31.1 - 2019-03-22
-
-- [#612](https://github.com/stripe/stripe-php/pull/612) Add a lot of constants
-- [#614](https://github.com/stripe/stripe-php/pull/614) Add missing subscription status constants
-
-## 6.31.0 - 2019-03-18
-
-- [#600](https://github.com/stripe/stripe-php/pull/600) Add support for the `PaymentMethod` resource and APIs
-- [#606](https://github.com/stripe/stripe-php/pull/606) Add support for retrieving a Checkout `Session`
-- [#611](https://github.com/stripe/stripe-php/pull/611) Add support for deleting a Terminal `Location` and `Reader`
-
-## 6.30.5 - 2019-03-11
-
-- [#607](https://github.com/stripe/stripe-php/pull/607) Correctly handle case where a metadata key is called `metadata`
-
-## 6.30.4 - 2019-02-27
-
-- [#602](https://github.com/stripe/stripe-php/pull/602) Add `subscription_schedule` to `Subscription` for PHPDoc.
-
-## 6.30.3 - 2019-02-26
-
-- [#603](https://github.com/stripe/stripe-php/pull/603) Improve PHPDoc on the `Source` object to cover all types of Sources currently supported.
-
-## 6.30.2 - 2019-02-25
-
-- [#601](https://github.com/stripe/stripe-php/pull/601) Fix PHPDoc across multiple resources and add support for new events.
-
-## 6.30.1 - 2019-02-16
-
-- [#599](https://github.com/stripe/stripe-php/pull/599) Fix PHPDoc for `SubscriptionSchedule` and `SubscriptionScheduleRevision`
-
-## 6.30.0 - 2019-02-12
-
-- [#590](https://github.com/stripe/stripe-php/pull/590) Add support for `SubscriptionSchedule` and `SubscriptionScheduleRevision`
-
-## 6.29.3 - 2019-01-31
-
-- [#592](https://github.com/stripe/stripe-php/pull/592) Some more PHPDoc fixes
-
-## 6.29.2 - 2019-01-31
-
-- [#591](https://github.com/stripe/stripe-php/pull/591) Fix PHPDoc for nested resources
-
-## 6.29.1 - 2019-01-25
-
-- [#566](https://github.com/stripe/stripe-php/pull/566) Fix dangling message contents
-- [#586](https://github.com/stripe/stripe-php/pull/586) Don't overwrite `CURLOPT_HTTP_VERSION` option
-
-## 6.29.0 - 2019-01-23
-
-- [#579](https://github.com/stripe/stripe-php/pull/579) Rename `CheckoutSession` to `Session` and move it under the `Checkout` namespace. This is a breaking change, but we've reached out to affected merchants and all new merchants would use the new approach.
-
-## 6.28.1 - 2019-01-21
-
-- [#580](https://github.com/stripe/stripe-php/pull/580) Properly serialize `individual` on `Account` objects
-
-## 6.28.0 - 2019-01-03
-
-- [#576](https://github.com/stripe/stripe-php/pull/576) Add support for iterating directly over `Collection` instances
-
-## 6.27.0 - 2018-12-21
-
-- [#571](https://github.com/stripe/stripe-php/pull/571) Add support for the `CheckoutSession` resource
-
-## 6.26.0 - 2018-12-11
-
-- [#568](https://github.com/stripe/stripe-php/pull/568) Enable persistent connections
-
-## 6.25.0 - 2018-12-10
-
-- [#567](https://github.com/stripe/stripe-php/pull/567) Add support for account links
-
-## 6.24.0 - 2018-11-28
-
-- [#562](https://github.com/stripe/stripe-php/pull/562) Add support for the Review resource
-- [#564](https://github.com/stripe/stripe-php/pull/564) Add event name constants for subscription schedule aborted/expiring
-
-## 6.23.0 - 2018-11-27
-
-- [#542](https://github.com/stripe/stripe-php/pull/542) Add support for `ValueList` and `ValueListItem` for Radar
-
-## 6.22.1 - 2018-11-20
-
-- [#561](https://github.com/stripe/stripe-php/pull/561) Add cast and some docs to telemetry introduced in 6.22.0/549
-
-## 6.22.0 - 2018-11-15
-
-- [#549](https://github.com/stripe/stripe-php/pull/549) Add support for client telemetry
-
-## 6.21.1 - 2018-11-12
-
-- [#548](https://github.com/stripe/stripe-php/pull/548) Don't mutate `Exception` class properties from `OAuthBase` error
-
-## 6.21.0 - 2018-11-08
-
-- [#537](https://github.com/stripe/stripe-php/pull/537) Add new API endpoints for the `Invoice` resource.
-
-## 6.20.1 - 2018-11-07
-
-- [#546](https://github.com/stripe/stripe-php/pull/546) Drop files from the Composer package that aren't needed in the release
-
-## 6.20.0 - 2018-10-30
-
-- [#536](https://github.com/stripe/stripe-php/pull/536) Add support for the `Person` resource
-- [#541](https://github.com/stripe/stripe-php/pull/541) Add support for the `WebhookEndpoint` resource
-
-## 6.19.5 - 2018-10-17
-
-- [#539](https://github.com/stripe/stripe-php/pull/539) Fix methods on `\Stripe\PaymentIntent` to properly pass arguments to the API.
-
-## 6.19.4 - 2018-10-11
-
-- [#534](https://github.com/stripe/stripe-php/pull/534) Fix PSR-4 autoloading for `\Stripe\FileUpload` class alias
-
-## 6.19.3 - 2018-10-09
-
-- [#530](https://github.com/stripe/stripe-php/pull/530) Add constants for `flow` (`FLOW_*`), `status` (`STATUS_*`) and `usage` (`USAGE_*`) on `\Stripe\Source`
-
-## 6.19.2 - 2018-10-08
-
-- [#531](https://github.com/stripe/stripe-php/pull/531) Store HTTP response headers in case-insensitive array
-
-## 6.19.1 - 2018-09-25
-
-- [#526](https://github.com/stripe/stripe-php/pull/526) Ignore null values in request parameters
-
-## 6.19.0 - 2018-09-24
-
-- [#523](https://github.com/stripe/stripe-php/pull/523) Add support for Stripe Terminal
-
-## 6.18.0 - 2018-09-24
-
-- [#520](https://github.com/stripe/stripe-php/pull/520) Rename `\Stripe\FileUpload` to `\Stripe\File`
-
-## 6.17.2 - 2018-09-18
-
-- [#522](https://github.com/stripe/stripe-php/pull/522) Fix warning when adding a new additional owner to an existing array
-
-## 6.17.1 - 2018-09-14
-
-- [#517](https://github.com/stripe/stripe-php/pull/517) Integer-index encode all sequential arrays
-
-## 6.17.0 - 2018-09-05
-
-- [#514](https://github.com/stripe/stripe-php/pull/514) Add support for reporting resources
-
-## 6.16.0 - 2018-08-23
-
-- [#509](https://github.com/stripe/stripe-php/pull/509) Add support for usage record summaries
-
-## 6.15.0 - 2018-08-03
-
-- [#504](https://github.com/stripe/stripe-php/pull/504) Add cancel support for topups
-
-## 6.14.0 - 2018-08-02
-
-- [#505](https://github.com/stripe/stripe-php/pull/505) Add support for file links
-
-## 6.13.0 - 2018-07-31
-
-- [#502](https://github.com/stripe/stripe-php/pull/502) Add `isDeleted()` method to `\Stripe\StripeObject`
-
-## 6.12.0 - 2018-07-28
-
-- [#501](https://github.com/stripe/stripe-php/pull/501) Add support for scheduled query runs (`\Stripe\Sigma\ScheduledQueryRun`) for Sigma
-
-## 6.11.0 - 2018-07-26
-
-- [#500](https://github.com/stripe/stripe-php/pull/500) Add support for Stripe Issuing
-
-## 6.10.4 - 2018-07-19
-
-- [#498](https://github.com/stripe/stripe-php/pull/498) Internal improvements to the `\Stripe\ApiResource.classUrl()` method
-
-## 6.10.3 - 2018-07-16
-
-- [#497](https://github.com/stripe/stripe-php/pull/497) Use HTTP/2 only for HTTPS requests
-
-## 6.10.2 - 2018-07-11
-
-- [#494](https://github.com/stripe/stripe-php/pull/494) Enable HTTP/2 support
-
-## 6.10.1 - 2018-07-10
-
-- [#493](https://github.com/stripe/stripe-php/pull/493) Add PHPDoc for `auto_advance` on `\Stripe\Invoice`
-
-## 6.10.0 - 2018-06-28
-
-- [#488](https://github.com/stripe/stripe-php/pull/488) Add support for `$appPartnerId` to `Stripe::setAppInfo()`
-
-## 6.9.0 - 2018-06-28
-
-- [#487](https://github.com/stripe/stripe-php/pull/487) Add support for payment intents
-
-## 6.8.2 - 2018-06-24
-
-- [#486](https://github.com/stripe/stripe-php/pull/486) Make `Account.deauthorize()` return the `StripeObject` from the API
-
-## 6.8.1 - 2018-06-13
-
-- [#472](https://github.com/stripe/stripe-php/pull/472) Added phpDoc for `ApiRequestor` and others, especially regarding thrown errors
-
-## 6.8.0 - 2018-06-13
-
-- [#481](https://github.com/stripe/stripe-php/pull/481) Add new `\Stripe\Discount` and `\Stripe\OrderItem` classes, add more PHPDoc describing object attributes
-
-## 6.7.4 - 2018-05-29
-
-- [#480](https://github.com/stripe/stripe-php/pull/480) PHPDoc changes for API version 2018-05-21 and the addition of the new `CHARGE_EXPIRED` event type
-
-## 6.7.3 - 2018-05-28
-
-- [#479](https://github.com/stripe/stripe-php/pull/479) Fix unnecessary traits on `\Stripe\InvoiceLineItem`
-
-## 6.7.2 - 2018-05-28
-
-- [#471](https://github.com/stripe/stripe-php/pull/471) Add `OBJECT_NAME` constant to all API resource classes, add `\Stripe\InvoiceLineItem` class
-
-## 6.7.1 - 2018-05-13
-
-- [#468](https://github.com/stripe/stripe-php/pull/468) Update fields in PHP docs for accuracy
-
-## 6.7.0 - 2018-05-09
-
-- [#466](https://github.com/stripe/stripe-php/pull/466) Add support for issuer fraud records
-
-## 6.6.0 - 2018-04-11
-
-- [#460](https://github.com/stripe/stripe-php/pull/460) Add support for flexible billing primitives
-
-## 6.5.0 - 2018-04-05
-
-- [#461](https://github.com/stripe/stripe-php/pull/461) Don't zero keys on non-`metadata` subobjects
-
-## 6.4.2 - 2018-03-17
-
-- [#458](https://github.com/stripe/stripe-php/pull/458) Add PHPDoc for `account` on `\Stripe\Event`
-
-## 6.4.1 - 2018-03-02
-
-- [#455](https://github.com/stripe/stripe-php/pull/455) Fix namespaces in PHPDoc
-- [#456](https://github.com/stripe/stripe-php/pull/456) Fix namespaces for some exceptions
-
-## 6.4.0 - 2018-02-28
-
-- [#453](https://github.com/stripe/stripe-php/pull/453) Add constants for `reason` (`REASON_*`) and `status` (`STATUS_*`) on `\Stripe\Dispute`
-
-## 6.3.2 - 2018-02-27
-
-- [#452](https://github.com/stripe/stripe-php/pull/452) Add PHPDoc for `amount_paid` and `amount_remaining` on `\Stripe\Invoice`
-
-## 6.3.1 - 2018-02-26
-
-- [#443](https://github.com/stripe/stripe-php/pull/443) Add event types as constants to `\Stripe\Event` class
-
-## 6.3.0 - 2018-02-23
-
-- [#450](https://github.com/stripe/stripe-php/pull/450) Add support for `code` attribute on all Stripe exceptions
-
-## 6.2.0 - 2018-02-21
-
-- [#440](https://github.com/stripe/stripe-php/pull/440) Add support for topups
-- [#442](https://github.com/stripe/stripe-php/pull/442) Fix PHPDoc for `\Stripe\Error\SignatureVerification`
-
-## 6.1.0 - 2018-02-12
-
-- [#435](https://github.com/stripe/stripe-php/pull/435) Fix header persistence on `Collection` objects
-- [#436](https://github.com/stripe/stripe-php/pull/436) Introduce new `Idempotency` error class
-
-## 6.0.0 - 2018-02-07
-
-Major version release. List of backwards incompatible changes to watch out for:
-
-- The minimum PHP version is now 5.4.0. If you're using PHP 5.3 or older, consider upgrading to a more recent version.
-
-* `\Stripe\AttachedObject` no longer exists. Attributes that used to be instances of `\Stripe\AttachedObject` (such as `metadata`) are now instances of `\Stripe\StripeObject`.
-
-- Attributes that used to be PHP arrays (such as `legal_entity->additional_owners` on `\Stripe\Account` instances) are now instances of `\Stripe\StripeObject`, except when they are empty. `\Stripe\StripeObject` has array semantics so this should not be an issue unless you are actively checking types.
-
-* `\Stripe\Collection` now derives from `\Stripe\StripeObject` rather than from `\Stripe\ApiResource`.
-
-Pull requests included in this release:
-
-- [#410](https://github.com/stripe/stripe-php/pull/410) Drop support for PHP 5.3
-- [#411](https://github.com/stripe/stripe-php/pull/411) Use traits for common API operations
-- [#414](https://github.com/stripe/stripe-php/pull/414) Use short array syntax
-- [#404](https://github.com/stripe/stripe-php/pull/404) Fix serialization logic
-- [#417](https://github.com/stripe/stripe-php/pull/417) Remove `ExternalAccount` class
-- [#418](https://github.com/stripe/stripe-php/pull/418) Increase test coverage
-- [#421](https://github.com/stripe/stripe-php/pull/421) Update CA bundle and add script for future updates
-- [#422](https://github.com/stripe/stripe-php/pull/422) Use vendored CA bundle for all requests
-- [#428](https://github.com/stripe/stripe-php/pull/428) Support for automatic request retries
-
-## 5.9.2 - 2018-02-07
-
-- [#431](https://github.com/stripe/stripe-php/pull/431) Update PHPDoc @property tags for latest API version
-
-## 5.9.1 - 2018-02-06
-
-- [#427](https://github.com/stripe/stripe-php/pull/427) Add and update PHPDoc @property tags on all API resources
-
-## 5.9.0 - 2018-01-17
-
-- [#421](https://github.com/stripe/stripe-php/pull/421) Updated bundled CA certificates
-- [#423](https://github.com/stripe/stripe-php/pull/423) Escape unsanitized input in OAuth example
-
-## 5.8.0 - 2017-12-20
-
-- [#403](https://github.com/stripe/stripe-php/pull/403) Add `__debugInfo()` magic method to `StripeObject`
-
-## 5.7.0 - 2017-11-28
-
-- [#390](https://github.com/stripe/stripe-php/pull/390) Remove some unsupported API methods
-- [#391](https://github.com/stripe/stripe-php/pull/391) Alphabetize the list of API resources in `Util::convertToStripeObject()` and add missing resources
-- [#393](https://github.com/stripe/stripe-php/pull/393) Fix expiry date update for card sources
-
-## 5.6.0 - 2017-10-31
-
-- [#386](https://github.com/stripe/stripe-php/pull/386) Support for exchange rates APIs
-
-## 5.5.1 - 2017-10-30
-
-- [#387](https://github.com/stripe/stripe-php/pull/387) Allow `personal_address_kana` and `personal_address_kanji` to be updated on an account
-
-## 5.5.0 - 2017-10-27
-
-- [#385](https://github.com/stripe/stripe-php/pull/385) Support for listing source transactions
-
-## 5.4.0 - 2017-10-24
-
-- [#383](https://github.com/stripe/stripe-php/pull/383) Add static methods to manipulate resources from parent
- - `Account` gains methods for external accounts and login links (e.g. `createExternalAccount`, `createLoginLink`)
- - `ApplicationFee` gains methods for refunds
- - `Customer` gains methods for sources
- - `Transfer` gains methods for reversals
-
-## 5.3.0 - 2017-10-11
-
-- [#378](https://github.com/stripe/stripe-php/pull/378) Rename source `delete` to `detach` (and deprecate the former)
-
-## 5.2.3 - 2017-09-27
-
-- Add PHPDoc for `Card`
-
-## 5.2.2 - 2017-09-20
-
-- Fix deserialization mapping of `FileUpload` objects
-
-## 5.2.1 - 2017-09-14
-
-- Serialized `shipping` nested attribute
-
-## 5.2.0 - 2017-08-29
-
-- Add support for `InvalidClient` OAuth error
-
-## 5.1.3 - 2017-08-14
-
-- Allow `address_kana` and `address_kanji` to be updated for custom accounts
-
-## 5.1.2 - 2017-08-01
-
-- Fix documented return type of `autoPagingIterator()` (was missing namespace)
-
-## 5.1.1 - 2017-07-03
-
-- Fix order returns to use the right URL `/v1/order_returns`
-
-## 5.1.0 - 2017-06-30
-
-- Add support for OAuth
-
-## 5.0.0 - 2017-06-27
-
-- `pay` on invoice now takes params as well as opts
-
-## 4.13.0 - 2017-06-19
-
-- Add support for ephemeral keys
-
-## 4.12.0 - 2017-06-05
-
-- Clients can implement `getUserAgentInfo()` to add additional user agent information
-
-## 4.11.0 - 2017-06-05
-
-- Implement `Countable` for `AttachedObject` (`metadata` and `additional_owners`)
-
-## 4.10.0 - 2017-05-25
-
-- Add support for login links
-
-## 4.9.1 - 2017-05-10
-
-- Fix docs to include arrays on `$id` parameter for retrieve methods
-
-## 4.9.0 - 2017-04-28
-
-- Support for checking webhook signatures
-
-## 4.8.1 - 2017-04-24
-
-- Allow nested field `payout_schedule` to be updated
-
-## 4.8.0 - 2017-04-20
-
-- Add `\Stripe\Stripe::setLogger()` to support an external PSR-3 compatible logger
-
-## 4.7.0 - 2017-04-10
-
-- Add support for payouts and recipient transfers
-
-## 4.6.0 - 2017-04-06
-
-- Please see 4.7.0 instead (no-op release)
-
-## 4.5.1 - 2017-03-22
-
-- Remove hard dependency on cURL
-
-## 4.5.0 - 2017-03-20
-
-- Support for detaching sources from customers
-
-## 4.4.2 - 2017-02-27
-
-- Correct handling of `owner` parameter when updating sources
-
-## 4.4.1 - 2017-02-24
-
-- Correct the error check on a bad JSON decoding
-
-## 4.4.0 - 2017-01-18
-
-- Add support for updating sources
-
-## 4.3.0 - 2016-11-30
-
-- Add support for verifying sources
-
-## 4.2.0 - 2016-11-21
-
-- Add retrieve method for 3-D Secure resources
-
-## 4.1.1 - 2016-10-21
-
-- Add docblock with model properties for `Plan`
-
-## 4.1.0 - 2016-10-18
-
-- Support for 403 status codes (permission denied)
-
-## 4.0.1 - 2016-10-17
-
-- Fix transfer reversal materialization
-- Fixes for some property definitions in docblocks
-
-## 4.0.0 - 2016-09-28
-
-- Support for subscription items
-- Drop attempt to force TLS 1.2: please note that this could be breaking if you're using old OS distributions or packages and upgraded recently (so please make sure to test your integration!)
-
-## 3.23.0 - 2016-09-15
-
-- Add support for Apple Pay domains
-
-## 3.22.0 - 2016-09-13
-
-- Add `Stripe::setAppInfo` to allow plugins to register user agent information
-
-## 3.21.0 - 2016-08-25
-
-- Add `Source` model for generic payment sources
-
-## 3.20.0 - 2016-08-08
-
-- Add `getDeclineCode` to card errors
-
-## 3.19.0 - 2016-07-29
-
-- Opt requests directly into TLS 1.2 where OpenSSL >= 1.0.1 (see #277 for context)
-
-## 3.18.0 - 2016-07-28
-
-- Add new `STATUS_` constants for subscriptions
-
-## 3.17.1 - 2016-07-28
-
-- Fix auto-paging iterator so that it plays nicely with `iterator_to_array`
-
-## 3.17.0 - 2016-07-14
-
-- Add field annotations to model classes for better editor hinting
-
-## 3.16.0 - 2016-07-12
-
-- Add `ThreeDSecure` model for 3-D secure payments
-
-## 3.15.0 - 2016-06-29
-
-- Add static `update` method to all resources that can be changed.
-
-## 3.14.3 - 2016-06-20
-
-- Make sure that cURL never sends `Expects: 100-continue`, even on large request bodies
-
-## 3.14.2 - 2016-06-03
-
-- Add `inventory` under `SKU` to list of keys that have nested data and can be updated
-
-## 3.14.1 - 2016-05-27
-
-- Fix some inconsistencies in PHPDoc
-
-## 3.14.0 - 2016-05-25
-
-- Add support for returning Relay orders
-
-## 3.13.0 - 2016-05-04
-
-- Add `list`, `create`, `update`, `retrieve`, and `delete` methods to the Subscription class
-
-## 3.12.1 - 2016-04-07
-
-- Additional check on value arrays for some extra safety
-
-## 3.12.0 - 2016-03-31
-
-- Fix bug `refreshFrom` on `StripeObject` would not take an `$opts` array
-- Fix bug where `$opts` not passed to parent `save` method in `Account`
-- Fix bug where non-existent variable was referenced in `reverse` in `Transfer`
-- Update CA cert bundle for compatibility with OpenSSL versions below 1.0.1
-
-## 3.11.0 - 2016-03-22
-
-- Allow `CurlClient` to be initialized with default `CURLOPT_*` options
-
-## 3.10.1 - 2016-03-22
-
-- Fix bug where request params and options were ignored in `ApplicationFee`'s `refund.`
-
-## 3.10.0 - 2016-03-15
-
-- Add `reject` on `Account` to support the new API feature
-
-## 3.9.2 - 2016-03-04
-
-- Fix error when an object's metadata is set more than once
-
-## 3.9.1 - 2016-02-24
-
-- Fix encoding behavior of nested arrays for requests (see #227)
-
-## 3.9.0 - 2016-02-09
-
-- Add automatic pagination mechanism with `autoPagingIterator()`
-- Allow global account ID to be set with `Stripe::setAccountId()`
-
-## 3.8.0 - 2016-02-08
-
-- Add `CountrySpec` model for looking up country payment information
-
-## 3.7.1 - 2016-02-01
-
-- Update bundled CA certs
-
-## 3.7.0 - 2016-01-27
-
-- Support deleting Relay products and SKUs
-
-## 3.6.0 - 2016-01-05
-
-- Allow configuration of HTTP client timeouts
-
-## 3.5.0 - 2015-12-01
-
-- Add a verification routine for external accounts
-
-## 3.4.0 - 2015-09-14
-
-- Products, SKUs, and Orders -- https://stripe.com/relay
-
-## 3.3.0 - 2015-09-11
-
-- Add support for 429 Rate Limit response
-
-## 3.2.0 - 2015-08-17
-
-- Add refund listing and retrieval without an associated charge
-
-## 3.1.0 - 2015-08-03
-
-- Add dispute listing and retrieval
-- Add support for manage account deletion
-
-## 3.0.0 - 2015-07-28
-
-- Rename `\Stripe\Object` to `\Stripe\StripeObject` (PHP 7 compatibility)
-- Rename `getCode` and `getParam` in exceptions to `getStripeCode` and `getStripeParam`
-- Add support for calling `json_encode` on Stripe objects in PHP 5.4+
-- Start supporting/testing PHP 7
-
-## 2.3.0 - 2015-07-06
-
-- Add request ID to all Stripe exceptions
-
-## 2.2.0 - 2015-06-01
-
-- Add support for Alipay accounts as sources
-- Add support for bank accounts as sources (private beta)
-- Add support for bank accounts and cards as external_accounts on Account objects
-
-## 2.1.4 - 2015-05-13
-
-- Fix CA certificate file path (thanks @lphilps & @matthewarkin)
-
-## 2.1.3 - 2015-05-12
-
-- Fix to account updating to permit `tos_acceptance` and `personal_address` to be set properly
-- Fix to Transfer reversal creation (thanks @neatness!)
-- Network requests are now done through a swappable class for easier mocking
-
-## 2.1.2 - 2015-04-10
-
-- Remove SSL cert revokation checking (all pre-Heartbleed certs have expired)
-- Bug fixes to account updating
-
-## 2.1.1 - 2015-02-27
-
-- Support transfer reversals
-
-## 2.1.0 - 2015-02-19
-
-- Support new API version (2015-02-18)
-- Added Bitcoin Receiever update and delete actions
-- Edited tests to prefer "source" over "card" as per new API version
-
-## 2.0.1 - 2015-02-16
-
-- Fix to fetching endpoints that use a non-default baseUrl (`FileUpload`)
-
-## 2.0.0 - 2015-02-14
-
-- Bumped minimum version to 5.3.3
-- Switched to Stripe namespace instead of Stripe\_ class name prefiexes (thanks @chadicus!)
-- Switched tests to PHPUnit (thanks @chadicus!)
-- Switched style guide to PSR2 (thanks @chadicus!)
-- Added \$opts hash to the end of most methods: this permits passing 'idempotency_key', 'stripe_account', or 'stripe_version'. The last 2 will persist across multiple object loads.
-- Added support for retrieving Account by ID
-
-## 1.18.0 - 2015-01-21
-
-- Support making bitcoin charges through BitcoinReceiver source object
-
-## 1.17.5 - 2014-12-23
-
-- Adding support for creating file uploads.
-
-## 1.17.4 - 2014-12-15
-
-- Saving objects fetched with a custom key now works (thanks @JustinHook & @jpasilan)
-- Added methods for reporting charges as safe or fraudulent and for specifying the reason for refunds
-
-## 1.17.3 - 2014-11-06
-
-- Better handling of HHVM support for SSL certificate blacklist checking.
-
-## 1.17.2 - 2014-09-23
-
-- Coupons now are backed by a `Stripe_Coupon` instead of `Stripe_Object`, and support updating metadata
-- Running operations (`create`, `retrieve`, `all`) on upcoming invoice items now works
-
-## 1.17.1 - 2014-07-31
-
-- Requests now send Content-Type header
-
-## 1.17.0 - 2014-07-29
-
-- Application Fee refunds now a list instead of array
-- HHVM now works
-- Small bug fixes (thanks @bencromwell & @fastest963)
-- `__toString` now returns the name of the object in addition to its JSON representation
-
-## 1.16.0 - 2014-06-17
-
-- Add metadata for refunds and disputes
-
-## 1.15.0 - 2014-05-28
-
-- Support canceling transfers
-
-## 1.14.1 - 2014-05-21
-
-- Support cards for recipients.
-
-## 1.13.1 - 2014-05-15
-
-- Fix bug in account resource where `id` wasn't in the result
-
-## 1.13.0 - 2014-04-10
-
-- Add support for certificate blacklisting
-- Update ca bundle
-- Drop support for HHVM (Temporarily)
-
-## 1.12.0 - 2014-04-01
-
-- Add Stripe_RateLimitError for catching rate limit errors.
-- Update to Zend coding style (thanks, @jpiasetz)
-
-## 1.11.0 - 2014-01-29
-
-- Add support for multiple subscriptions per customer
-
-## 1.10.1 - 2013-12-02
-
-- Add new ApplicationFee
-
-## 1.9.1 - 2013-11-08
-
-- Fix a bug where a null nestable object causes warnings to fire.
-
-## 1.9.0 - 2013-10-16
-
-- Add support for metadata API.
-
-## 1.8.4 - 2013-09-18
-
-- Add support for closing disputes.
-
-## 1.8.3 - 2013-08-13
-
-- Add new Balance and BalanceTransaction
-
-## 1.8.2 - 2013-08-12
-
-- Add support for unsetting attributes by updating to NULL. Setting properties to a blank string is now an error.
-
-## 1.8.1 - 2013-07-12
-
-- Add support for multiple cards API (Stripe API version 2013-07-12: https://stripe.com/docs/upgrades#2013-07-05)
-
-## 1.8.0 - 2013-04-11
-
-- Allow Transfers to be creatable
-- Add new Recipient resource
-
-## 1.7.15 - 2013-02-21
-
-- Add 'id' to the list of permanent object attributes
-
-## 1.7.14 - 2013-02-20
-
-- Don't re-encode strings that are already encoded in UTF-8. If you were previously using plan or coupon objects with UTF-8 IDs, they may have been treated as ISO-8859-1 (Latin-1) and encoded to UTF-8 a 2nd time. You may now need to pass the IDs to utf8_encode before passing them to Stripe_Plan::retrieve or Stripe_Coupon::retrieve.
-- Ensure that all input is encoded in UTF-8 before submitting it to Stripe's servers. (github issue #27)
-
-## 1.7.13 - 2013-02-01
-
-- Add support for passing options when retrieving Stripe objects e.g., Stripe_Charge::retrieve(array("id"=>"foo", "expand" => array("customer"))); Stripe_Charge::retrieve("foo") will continue to work
-
-## 1.7.12 - 2013-01-15
-
-- Add support for setting a Stripe API version override
-
-## 1.7.11 - 2012-12-30
-
-- Version bump to cleanup constants and such (fix issue #26)
-
-## 1.7.10 - 2012-11-08
-
-- Add support for updating charge disputes.
-- Fix bug preventing retrieval of null attributes
-
-## 1.7.9 - 2012-11-08
-
-- Fix usage under autoloaders such as the one generated by composer (fix issue #22)
-
-## 1.7.8 - 2012-10-30
-
-- Add support for creating invoices.
-- Add support for new invoice lines return format
-- Add support for new list objects
-
-## 1.7.7 - 2012-09-14
-
-- Get all of the various version numbers in the repo in sync (no other changes)
-
-## 1.7.6 - 2012-08-31
-
-- Add update and pay methods to Invoice resource
-
-## 1.7.5 - 2012-08-23
-
-- Change internal function names so that Stripe_SingletonApiRequest is E_STRICT-clean (github issue #16)
-
-## 1.7.4 - 2012-08-21
-
-- Bugfix so that Stripe objects (e.g. Customer, Charge objects) used in API calls are transparently converted to their object IDs
-
-## 1.7.3 - 2012-08-15
-
-- Add new Account resource
-
-## 1.7.2 - 2012-06-26
-
-- Make clearer that you should be including lib/Stripe.php, not test/Stripe.php (github issue #14)
-
-## 1.7.1 - 2012-05-24
-
-- Add missing argument to Stripe_InvalidRequestError constructor in Stripe_ApiResource::instanceUrl. Fixes a warning when Stripe_ApiResource::instanceUrl is called on a resource with no ID (fix issue #12)
-
-## 1.7.0 - 2012-05-17
-
-- Support Composer and Packagist (github issue #9)
-- Add new deleteDiscount method to Stripe_Customer
-- Add new Transfer resource
-- Switch from using HTTP Basic auth to Bearer auth. (Note: Stripe will support Basic auth for the indefinite future, but recommends Bearer auth when possible going forward)
-- Numerous test suite improvements
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/CODE_OF_CONDUCT.md b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/CODE_OF_CONDUCT.md
deleted file mode 100644
index 349f5a0b..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,77 +0,0 @@
-# Contributor Covenant Code of Conduct
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as
-contributors and maintainers pledge to make participation in our project and
-our community a harassment-free experience for everyone, regardless of age, body
-size, disability, ethnicity, sex characteristics, gender identity and expression,
-level of experience, education, socio-economic status, nationality, personal
-appearance, race, religion, or sexual identity and orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment
-include:
-
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery and unwelcome sexual attention or
- advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic
- address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a
- professional setting
-
-## Our Responsibilities
-
-Project maintainers are responsible for clarifying the standards of acceptable
-behavior and are expected to take appropriate and fair corrective action in
-response to any instances of unacceptable behavior.
-
-Project maintainers have the right and responsibility to remove, edit, or
-reject comments, commits, code, wiki edits, issues, and other contributions
-that are not aligned to this Code of Conduct, or to ban temporarily or
-permanently any contributor for other behaviors that they deem inappropriate,
-threatening, offensive, or harmful.
-
-## Scope
-
-This Code of Conduct applies within all project spaces, and it also applies when
-an individual is representing the project or its community in public spaces.
-Examples of representing a project or community include using an official
-project e-mail address, posting via an official social media account, or acting
-as an appointed representative at an online or offline event. Representation of
-a project may be further defined and clarified by project maintainers.
-
-## Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported by contacting the project team at conduct@stripe.com. All
-complaints will be reviewed and investigated and will result in a response that
-is deemed necessary and appropriate to the circumstances. The project team is
-obligated to maintain confidentiality with regard to the reporter of an incident.
-Further details of specific enforcement policies may be posted separately.
-
-Project maintainers who do not follow or enforce the Code of Conduct in good
-faith may face temporary or permanent repercussions as determined by other
-members of the project's leadership.
-
-## Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
-available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
-
-[homepage]: https://www.contributor-covenant.org
-
-For answers to common questions about this code of conduct, see
-https://www.contributor-covenant.org/faq
-
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/LICENSE b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/LICENSE
deleted file mode 100644
index 847c705a..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License
-
-Copyright (c) 2010-2019 Stripe, Inc. (https://stripe.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/Makefile b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/Makefile
deleted file mode 100644
index 88673387..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-export PHPDOCUMENTOR_VERSION := v3.0.0
-
-vendor: composer.json
- composer install
-
-vendor/bin/phpdoc: vendor
- curl -sfL https://github.com/phpDocumentor/phpDocumentor/releases/download/$(PHPDOCUMENTOR_VERSION)/phpDocumentor.phar -o vendor/bin/phpdoc
- chmod +x vendor/bin/phpdoc
-
-test: vendor
- vendor/bin/phpunit
-.PHONY: test
-
-fmt: vendor
- vendor/bin/php-cs-fixer fix -v --using-cache=no .
-.PHONY: fmt
-
-fmtcheck: vendor
- vendor/bin/php-cs-fixer fix -v --dry-run --using-cache=no .
-.PHONY: fmtcheck
-
-phpdoc: vendor/bin/phpdoc
- vendor/bin/phpdoc
-
-phpstan: vendor
- php -d memory_limit=512M vendor/bin/phpstan analyse lib tests
-.PHONY: phpstan
-
-phpstan-baseline: vendor/bin/phpstan
- php -d memory_limit=512M vendor/bin/phpstan analyse lib tests --generate-baseline
-.PHONY: phpstan-baseline
-
-update-version:
- @echo "$(VERSION)" > VERSION
- @perl -pi -e 's|VERSION = '\''[.\d]+'\''|VERSION = '\''$(VERSION)'\''|' lib/Stripe.php
-.PHONY: update-version
-
-codegen-format: fmt
-.PHONY: codegen-format
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/README.md b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/README.md
deleted file mode 100644
index e9d25ad9..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/README.md
+++ /dev/null
@@ -1,270 +0,0 @@
-# Stripe PHP bindings
-
-[![Build Status](https://travis-ci.org/stripe/stripe-php.svg?branch=master)](https://travis-ci.org/stripe/stripe-php)
-[![Latest Stable Version](https://poser.pugx.org/stripe/stripe-php/v/stable.svg)](https://packagist.org/packages/stripe/stripe-php)
-[![Total Downloads](https://poser.pugx.org/stripe/stripe-php/downloads.svg)](https://packagist.org/packages/stripe/stripe-php)
-[![License](https://poser.pugx.org/stripe/stripe-php/license.svg)](https://packagist.org/packages/stripe/stripe-php)
-
-The Stripe PHP library provides convenient access to the Stripe API from
-applications written in the PHP language. It includes a pre-defined set of
-classes for API resources that initialize themselves dynamically from API
-responses which makes it compatible with a wide range of versions of the Stripe
-API.
-
-## Requirements
-
-PHP 5.6.0 and later.
-
-## Composer
-
-You can install the bindings via [Composer](http://getcomposer.org/). Run the following command:
-
-```bash
-composer require stripe/stripe-php
-```
-
-To use the bindings, use Composer's [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading):
-
-```php
-require_once('vendor/autoload.php');
-```
-
-## Manual Installation
-
-If you do not wish to use Composer, you can download the [latest release](https://github.com/stripe/stripe-php/releases). Then, to use the bindings, include the `init.php` file.
-
-```php
-require_once('/path/to/stripe-php/init.php');
-```
-
-## Dependencies
-
-The bindings require the following extensions in order to work properly:
-
-- [`curl`](https://secure.php.net/manual/en/book.curl.php), although you can use your own non-cURL client if you prefer
-- [`json`](https://secure.php.net/manual/en/book.json.php)
-- [`mbstring`](https://secure.php.net/manual/en/book.mbstring.php) (Multibyte String)
-
-If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available.
-
-## Getting Started
-
-Simple usage looks like:
-
-```php
-$stripe = new \Stripe\StripeClient('sk_test_BQokikJOvBiI2HlWgH4olfQ2');
-$customer = $stripe->customers->create([
- 'description' => 'example customer',
- 'email' => 'email@example.com',
- 'payment_method' => 'pm_card_visa',
-]);
-echo $customer;
-```
-
-### Client/service patterns vs legacy patterns
-
-You can continue to use the legacy integration patterns used prior to version [7.33.0](https://github.com/stripe/stripe-php/blob/master/CHANGELOG.md#7330---2020-05-14). Review the [migration guide](https://github.com/stripe/stripe-php/wiki/Migration-to-StripeClient-and-services-in-7.33.0) for the backwards-compatible client/services pattern changes.
-
-## Documentation
-
-See the [PHP API docs](https://stripe.com/docs/api/?lang=php#intro).
-
-See [video demonstrations][youtube-playlist] covering how to use the library.
-
-## Legacy Version Support
-
-### PHP 5.4 & 5.5
-
-If you are using PHP 5.4 or 5.5, you should consider upgrading your environment as those versions have been past end of life since September 2015 and July 2016 respectively.
-Otherwise, you can still use Stripe by downloading stripe-php v6.43.1 ([zip](https://github.com/stripe/stripe-php/archive/v6.43.1.zip), [tar.gz](https://github.com/stripe/stripe-php/archive/6.43.1.tar.gz)) from our [releases page](https://github.com/stripe/stripe-php/releases). This version will work but might not support recent features we added since the version was released and upgrading PHP is the best course of action.
-
-### PHP 5.3
-
-If you are using PHP 5.3, you should upgrade your environment as this version has been past end of life since August 2014.
-Otherwise, you can download v5.9.2 ([zip](https://github.com/stripe/stripe-php/archive/v5.9.2.zip), [tar.gz](https://github.com/stripe/stripe-php/archive/v5.9.2.tar.gz)) from our [releases page](https://github.com/stripe/stripe-php/releases). This version will continue to work with new versions of the Stripe API for all common uses.
-
-## Custom Request Timeouts
-
-_NOTE:_ We do not recommend decreasing the timeout for non-read-only calls (e.g. charge creation), since even if you locally timeout, the request on Stripe's side can still complete. If you are decreasing timeouts on these calls, make sure to use [idempotency tokens](https://stripe.com/docs/api/?lang=php#idempotent_requests) to avoid executing the same transaction twice as a result of timeout retry logic.
-
-To modify request timeouts (connect or total, in seconds) you'll need to tell the API client to use a CurlClient other than its default. You'll set the timeouts in that CurlClient.
-
-```php
-// set up your tweaked Curl client
-$curl = new \Stripe\HttpClient\CurlClient();
-$curl->setTimeout(10); // default is \Stripe\HttpClient\CurlClient::DEFAULT_TIMEOUT
-$curl->setConnectTimeout(5); // default is \Stripe\HttpClient\CurlClient::DEFAULT_CONNECT_TIMEOUT
-
-echo $curl->getTimeout(); // 10
-echo $curl->getConnectTimeout(); // 5
-
-// tell Stripe to use the tweaked client
-\Stripe\ApiRequestor::setHttpClient($curl);
-
-// use the Stripe API client as you normally would
-```
-
-## Custom cURL Options (e.g. proxies)
-
-Need to set a proxy for your requests? Pass in the requisite `CURLOPT_*` array to the CurlClient constructor, using the same syntax as `curl_stopt_array()`. This will set the default cURL options for each HTTP request made by the SDK, though many more common options (e.g. timeouts; see above on how to set those) will be overridden by the client even if set here.
-
-```php
-// set up your tweaked Curl client
-$curl = new \Stripe\HttpClient\CurlClient([CURLOPT_PROXY => 'proxy.local:80']);
-// tell Stripe to use the tweaked client
-\Stripe\ApiRequestor::setHttpClient($curl);
-```
-
-Alternately, a callable can be passed to the CurlClient constructor that returns the above array based on request inputs. See `testDefaultOptions()` in `tests/CurlClientTest.php` for an example of this behavior. Note that the callable is called at the beginning of every API request, before the request is sent.
-
-### Configuring a Logger
-
-The library does minimal logging, but it can be configured
-with a [`PSR-3` compatible logger][psr3] so that messages
-end up there instead of `error_log`:
-
-```php
-\Stripe\Stripe::setLogger($logger);
-```
-
-### Accessing response data
-
-You can access the data from the last API response on any object via `getLastResponse()`.
-
-```php
-$customer = $stripe->customers->create([
- 'description' => 'example customer',
-]);
-echo $customer->getLastResponse()->headers['Request-Id'];
-```
-
-### SSL / TLS compatibility issues
-
-Stripe's API now requires that [all connections use TLS 1.2](https://stripe.com/blog/upgrading-tls). Some systems (most notably some older CentOS and RHEL versions) are capable of using TLS 1.2 but will use TLS 1.0 or 1.1 by default. In this case, you'd get an `invalid_request_error` with the following error message: "Stripe no longer supports API requests made with TLS 1.0. Please initiate HTTPS connections with TLS 1.2 or later. You can learn more about this at [https://stripe.com/blog/upgrading-tls](https://stripe.com/blog/upgrading-tls).".
-
-The recommended course of action is to [upgrade your cURL and OpenSSL packages](https://support.stripe.com/questions/how-do-i-upgrade-my-stripe-integration-from-tls-1-0-to-tls-1-2#php) so that TLS 1.2 is used by default, but if that is not possible, you might be able to solve the issue by setting the `CURLOPT_SSLVERSION` option to either `CURL_SSLVERSION_TLSv1` or `CURL_SSLVERSION_TLSv1_2`:
-
-```php
-$curl = new \Stripe\HttpClient\CurlClient([CURLOPT_SSLVERSION => CURL_SSLVERSION_TLSv1]);
-\Stripe\ApiRequestor::setHttpClient($curl);
-```
-
-### Per-request Configuration
-
-For apps that need to use multiple keys during the lifetime of a process, like
-one that uses [Stripe Connect][connect], it's also possible to set a
-per-request key and/or account:
-
-```php
-$customers = $stripe->customers->all([],[
- 'api_key' => 'sk_test_...',
- 'stripe_account' => 'acct_...'
-]);
-
-$stripe->customers->retrieve('cus_123456789', [], [
- 'api_key' => 'sk_test_...',
- 'stripe_account' => 'acct_...'
-]);
-```
-
-### Configuring CA Bundles
-
-By default, the library will use its own internal bundle of known CA
-certificates, but it's possible to configure your own:
-
-```php
-\Stripe\Stripe::setCABundlePath("path/to/ca/bundle");
-```
-
-### Configuring Automatic Retries
-
-The library can be configured to automatically retry requests that fail due to
-an intermittent network problem:
-
-```php
-\Stripe\Stripe::setMaxNetworkRetries(2);
-```
-
-[Idempotency keys][idempotency-keys] are added to requests to guarantee that
-retries are safe.
-
-### Request latency telemetry
-
-By default, the library sends request latency telemetry to Stripe. These
-numbers help Stripe improve the overall latency of its API for all users.
-
-You can disable this behavior if you prefer:
-
-```php
-\Stripe\Stripe::setEnableTelemetry(false);
-```
-
-## Development
-
-Get [Composer][composer]. For example, on Mac OS:
-
-```bash
-brew install composer
-```
-
-Install dependencies:
-
-```bash
-composer install
-```
-
-The test suite depends on [stripe-mock], so make sure to fetch and run it from a
-background terminal ([stripe-mock's README][stripe-mock] also contains
-instructions for installing via Homebrew and other methods):
-
-```bash
-go get -u github.com/stripe/stripe-mock
-stripe-mock
-```
-
-Install dependencies as mentioned above (which will resolve [PHPUnit](http://packagist.org/packages/phpunit/phpunit)), then you can run the test suite:
-
-```bash
-./vendor/bin/phpunit
-```
-
-Or to run an individual test file:
-
-```bash
-./vendor/bin/phpunit tests/Stripe/UtilTest.php
-```
-
-Update bundled CA certificates from the [Mozilla cURL release][curl]:
-
-```bash
-./update_certs.php
-```
-
-The library uses [PHP CS Fixer][php-cs-fixer] for code formatting. Code must be formatted before PRs are submitted, otherwise CI will fail. Run the formatter with:
-
-```bash
-./vendor/bin/php-cs-fixer fix -v .
-```
-
-## Attention plugin developers
-
-Are you writing a plugin that integrates Stripe and embeds our library? Then please use the `setAppInfo` function to identify your plugin. For example:
-
-```php
-\Stripe\Stripe::setAppInfo("MyAwesomePlugin", "1.2.34", "https://myawesomeplugin.info");
-```
-
-The method should be called once, before any request is sent to the API. The second and third parameters are optional.
-
-### SSL / TLS configuration option
-
-See the "SSL / TLS compatibility issues" paragraph above for full context. If you want to ensure that your plugin can be used on all systems, you should add a configuration option to let your users choose between different values for `CURLOPT_SSLVERSION`: none (default), `CURL_SSLVERSION_TLSv1` and `CURL_SSLVERSION_TLSv1_2`.
-
-[composer]: https://getcomposer.org/
-[connect]: https://stripe.com/connect
-[curl]: http://curl.haxx.se/docs/caextract.html
-[idempotency-keys]: https://stripe.com/docs/api/?lang=php#idempotent_requests
-[php-cs-fixer]: https://github.com/FriendsOfPHP/PHP-CS-Fixer
-[psr3]: http://www.php-fig.org/psr/psr-3/
-[stripe-mock]: https://github.com/stripe/stripe-mock
-[youtube-playlist]: https://www.youtube.com/playlist?list=PLy1nL-pvL2M6cUbiHrfMkXxZ9j9SGBxFE
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/VERSION b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/VERSION
deleted file mode 100644
index 5a14c98b..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-7.128.0
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/build.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/build.php
deleted file mode 100644
index 37360ffe..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/build.php
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env php
-=5.6.0",
- "ext-curl": "*",
- "ext-json": "*",
- "ext-mbstring": "*"
- },
- "require-dev": {
- "phpunit/phpunit": "^5.7 || ^9.0",
- "squizlabs/php_codesniffer": "^3.3",
- "friendsofphp/php-cs-fixer": "3.5.0",
- "phpstan/phpstan": "^1.2"
- },
- "autoload": {
- "psr-4": {
- "Stripe\\": "lib/"
- }
- },
- "autoload-dev": {
- "psr-4": {
- "Stripe\\": [
- "tests/",
- "tests/Stripe/"
- ]
- }
- },
- "extra": {
- "branch-alias": {
- "dev-master": "2.0-dev"
- }
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/data/ca-certificates.crt b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/data/ca-certificates.crt
deleted file mode 100644
index 65be2181..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/data/ca-certificates.crt
+++ /dev/null
@@ -1,3476 +0,0 @@
-##
-## Bundle of CA Root Certificates
-##
-## Certificate data from Mozilla as of: Wed Aug 28 03:12:10 2019 GMT
-##
-## This is a bundle of X.509 certificates of public Certificate Authorities
-## (CA). These were automatically extracted from Mozilla's root certificates
-## file (certdata.txt). This file can be found in the mozilla source tree:
-## https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt
-##
-## It contains the certificates in PEM format and therefore
-## can be directly used with curl / libcurl / php_curl, or with
-## an Apache+mod_ssl webserver for SSL client authentication.
-## Just configure this file as the SSLCACertificateFile.
-##
-## Conversion done with mk-ca-bundle.pl version 1.27.
-## SHA256: fffa309937c3be940649293f749b8207fabc6eb224e50e4bb3f2c5e44e0d6a6b
-##
-
-
-GlobalSign Root CA
-==================
------BEGIN CERTIFICATE-----
-MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkGA1UEBhMCQkUx
-GTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jvb3QgQ0ExGzAZBgNVBAMTEkds
-b2JhbFNpZ24gUm9vdCBDQ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BrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu
-01yiPqFbQfXf5WRDLenVOavSot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG7
-9G+dwfCMNYxdAfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7
-TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==
------END CERTIFICATE-----
-
-Verisign Class 3 Public Primary Certification Authority - G3
-============================================================
------BEGIN CERTIFICATE-----
-MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV
-UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
-cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
-IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh
-dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw
-CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy
-dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv
-cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkg
-Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
-ggEBAMu6nFL8eB8aHm8bN3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1
-EUGO+i2tKmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGukxUc
-cLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBmCC+Vk7+qRy+oRpfw
-EuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJXwzw3sJ2zq/3avL6QaaiMxTJ5Xpj
-055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWuimi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA
-ERSWwauSCPc/L8my/uRan2Te2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5f
-j267Cz3qWhMeDGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC
-/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565pF4ErWjfJXir0
-xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDa
-t20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
------END CERTIFICATE-----
-
-Entrust.net Premium 2048 Secure Server CA
-=========================================
------BEGIN CERTIFICATE-----
-MIIEKjCCAxKgAwIBAgIEOGPe+DANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5u
-ZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJlZi4gKGxp
-bWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV
-BAMTKkVudHJ1c3QubmV0IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQx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QLCIt+jerXmCHG8+c8eS9e
-nNFMFY3h7CI3zJpDC5fcgJCNs2ebb0gIFVbPv/ErfF6adulZkMV8gzURZVE=
------END CERTIFICATE-----
-
-Baltimore CyberTrust Root
-=========================
------BEGIN CERTIFICATE-----
-MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE
-ChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3li
-ZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMC
-SUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFs
-dGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKME
-uyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsB
-UnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/C
-G9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9
-XbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjpr
-l3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI
-VDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEB
-BQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRh
-cL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5
-hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsa
-Y71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H
-RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp
------END CERTIFICATE-----
-
-AddTrust External Root
-======================
------BEGIN CERTIFICATE-----
-MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
-QWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYD
-VQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEw
-NDgzOFowbzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRU
-cnVzdCBFeHRlcm5hbCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0Eg
-Um9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvtH7xsD821
-+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9uMq/NzgtHj6RQa1wVsfw
-Tz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzXmk6vBbOmcZSccbNQYArHE504B4YCqOmo
-aSYYkKtMsE8jqzpPhNjfzp/haW+710LXa0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy
-2xSoRcRdKn23tNbE7qzNE0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv7
-7+ldU9U0WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYDVR0P
-BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0Jvf6xCZU7wO94CTL
-VBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEmMCQGA1UECxMdQWRk
-VHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsxIjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENB
-IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZl
-j7DYd7usQWxHYINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
-6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvCNr4TDea9Y355
-e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEXc4g/VhsxOBi0cQ+azcgOno4u
-G+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5amnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
------END CERTIFICATE-----
-
-Entrust Root Certification Authority
-====================================
------BEGIN CERTIFICATE-----
-MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAUBgNV
-BAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0Lm5ldC9DUFMgaXMgaW5jb3Jw
-b3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMWKGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsG
-A1UEAxMkRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9ya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kHon24QRiSemd1o417+s
-hvzuXYO8BsbRd2sPbSQvS3pspweWyuOEn62Iix2rFo1bZhfZFvSLgNLd+LJ2w/w4E6oM3kJpK27z
-POuAJ9v1pkQNn1pVWQvVDVJIxa6f8i+AxeoyUDUSly7B4f/xI4hROJ/yZlZ25w9Rl6VSDE1JUZU2
-Pb+iSwwQHYaZTKrzchGT5Or2m9qoXadNt54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp
-8kokUvd0/bpO5qgdAm6xDYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBC
-bjPsMZ57k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6szHXu
-g/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0jWy10QJLZYxkNc91p
-vGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeTmJlglFwjz1onl14LBQaTNx47aTbr
-qZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK4SVhM7JZG+Ju1zdXtg2pEto=
------END CERTIFICATE-----
-
-Security Communication Root CA
-==============================
------BEGIN CERTIFICATE-----
-MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP
-U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw
-HhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP
-U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw
-ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7or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xMQU29uZXJh
-IENsYXNzMiBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3
-/Ei9vX+ALTU74W+oZ6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybT
-dXnt5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s3TmVToMG
-f+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2EjvOr7nQKV0ba5cTppCD8P
-tOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu8nYybieDwnPz3BjotJPqdURrBGAgcVeH
-nfO+oJAjPYok4doh28MCAwEAAaMzMDEwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITT
-XjwwCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt
-0jSv9zilzqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/3DEI
-cbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvDFNr450kkkdAdavph
-Oe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6Tk6ezAyNlNzZRZxe7EJQY670XcSx
-EtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLH
-llpwrN9M
------END CERTIFICATE-----
-
-XRamp Global CA Root
-====================
------BEGIN CERTIFICATE-----
-MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UE
-BhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhb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/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0O
-BBYEFNLEsNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h/t2o
-atTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMu
-MTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwG
-A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wim
-PQoZ+YeAEW5p5JYXMP80kWNyOO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKt
-I3lpjbi2Tc7PTMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ
-HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mERdEr/VxqHD3VI
-Ls9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5CufReYNnyicsbkqWletNw+vHX/b
-vZ8=
------END CERTIFICATE-----
-
-Starfield Class 2 CA
-====================
------BEGIN CERTIFICATE-----
-MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzElMCMGA1UEChMc
-U3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENsYXNzIDIg
-Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQwNjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBo
-MQswCQYDVQQGEwJVUzElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAG
-A1UECxMpU3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBd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hvcNAQEF
-BQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr
-EbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt
-tep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886
-UAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk
-CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=
------END CERTIFICATE-----
-
-DigiCert High Assurance EV Root CA
-==================================
------BEGIN CERTIFICATE-----
-MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQG
-EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSsw
-KQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5jZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAw
-MFoXDTMxMTExMDAwMDAwMFowbDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZ
-MBcGA1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFu
-Y2UgRVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm+9S75S0t
-Mqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTWPNt0OKRKzE0lgvdKpVMS
-OO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEMxChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3
-MRuNs8ckRZqnrG0AFFoEt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/EY5LsRxmd6+ZrzsECAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUw
-AwEB/zAdBgNVHQ4EFgQUWyV7lqRlUX64OfPAeGZe6Drn8O4wHwYDVR0jBBgwFoAUWyV7lqRlUX64
-OfPAeGZe6Drn8O4wRgYDVR0gBD8wPTA7BglghXQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov
-L3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe645R88a7A3hfm
-5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczOUYrHUDFu4Up+GC9pWbY9ZIEr
-44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOf
-Mke6UiI0HTJ6CVanfCU2qT1L2sCCbwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6m
-Gu6uLftIdxf+u+yvGPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxp
-mo/a77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCChdiDyyJk
-vC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid392qgQmwLOM7XdVAyksLf
-KzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEppLd6leNcG2mqeSz53OiATIgHQv2ieY2Br
-NU0LbbqhPcCT4H8js1WtciVORvnSFu+wZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6Lqj
-viOvrv1vA+ACOzB2+httQc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ
------END CERTIFICATE-----
-
-SwissSign Silver CA - G2
-========================
------BEGIN CERTIFICATE-----
-MIIFvTCCA6WgAwIBAgIITxvUL1S7L0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dBgNVHQ4EFgQUF6DNweRBtjpbO8tFnb0cwpj6hlgwHwYDVR0jBBgwFoAUF6DNweRB
-tjpbO8tFnb0cwpj6hlgwRgYDVR0gBD8wPTA7BglghXQBWQEDAQEwLjAsBggrBgEFBQcCARYgaHR0
-cDovL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBAHPGgeAn0i0P
-4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShpWJHckRE1qTodvBqlYJ7YH39F
-kWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L
-3XWgwF15kIwb4FDm3jH+mHtwX6WQ2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx
-/uNncqCxv1yL5PqZIseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFa
-DGi8aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2Xem1ZqSqP
-e97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+Ssuu
-WxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJ
-DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub
-DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u
------END CERTIFICATE-----
-
-GeoTrust Primary Certification Authority
-========================================
------BEGIN CERTIFICATE-----
-MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQG
-EwJVUzEWMBQGA1UEChM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5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYD
-VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XPr87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUF
-AAOCAQEAeRHAS7ORtvzw6WfUDW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeE
-uzLlQRHAd9mzYJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX
-xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2/qxAeeWsEG89
-jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/LHbTY5xZ3Y+m4Q6gLkH3LpVH
-z7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7jVaMaA==
------END CERTIFICATE-----
-
-VeriSign Class 3 Public Primary Certification Authority - G5
-============================================================
------BEGIN CERTIFICATE-----
-MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE
-BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
-ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
-IHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRp
-ZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCB
-yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2ln
-biBUcnVzdCBOZX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XBkqPFwqcIYA1gBBCWeZ4WNOaptvolRTnIHmX5k/Wq8VLcmZg9pYYaDDUz+kulBAYV
-HDGA76oYa8J719rO+TMg1fW9ajMtgQT7sFzUnKPiXB3jqUJ1XnvUd+85VLrJChgbEplJL4hL/VBi
-0XPnj3pDAgMBAAGjgZ0wgZowEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud
-EwEB/wQFMAMBAf8wHQYDVR0OBBYEFK9EBMJBfkiD2045AuzshHrmzsmkMDQGA1UdHwQtMCswKaAn
-oCWGI2h0dHA6Ly9jcmwuc2VjdXJldHJ1c3QuY29tL1NHQ0EuY3JsMBAGCSsGAQQBgjcVAQQDAgEA
-MA0GCSqGSIb3DQEBBQUAA4IBAQBjGghAfaReUw132HquHw0LURYD7xh8yOOvaliTFGCRsoTciE6+
-OYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXOH0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cn
-CDpOGR86p1hcF895P4vkp9MmI50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/5
-3CYNv6ZHdAbYiNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc
-f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW
------END CERTIFICATE-----
-
-COMODO Certification Authority
-==============================
------BEGIN CERTIFICATE-----
-MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCBgTELMAkGA1UE
-BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG
-A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNVBAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1
-dGhvcml0eTAeFw0wNjEyMD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Vmc
-IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN
-+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ==
------END CERTIFICATE-----
-
-Network Solutions Certificate Authority
-=======================================
------BEGIN CERTIFICATE-----
-MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQG
-EwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydOZXR3b3Jr
-IFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMx
-MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu
-MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G
-CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwzc7MEL7xx
-jOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPPOCwGJgl6cvf6UDL4wpPT
-aaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rlmGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXT
-crA/vGp97Eh/jcOrqnErU2lBUzS1sLnFBgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc
-/Qzpf14Dl847ABSHJ3A4qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMB
-AAGjgZcwgZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIBBjAP
-BgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwubmV0c29sc3NsLmNv
-bS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3JpdHkuY3JsMA0GCSqGSIb3DQEBBQUA
-A4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc86fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q
-4LqILPxFzBiwmZVRDuwduIj/h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/
-GGUsyfJj4akH/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv
-wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHNpGxlaKFJdlxD
-ydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey
------END CERTIFICATE-----
-
-COMODO ECC Certification Authority
-==================================
------BEGIN CERTIFICATE-----
-MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTELMAkGA1UEBhMC
-R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE
-ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBB
-dXRob3JpdHkwHhcNMDgwMzA2MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0Ix
-GzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR
-Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRo
-b3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSRFtSrYpn1PlILBs5BAH+X
-4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0JcfRK9ChQtP6IHG4/bC8vCVlbpVsLM5ni
-wz2J+Wos77LTBumjQjBAMB0GA1UdDgQWBBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8E
-BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VG
-FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA
-U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY=
------END CERTIFICATE-----
-
-OISTE WISeKey Global Root GA CA
-===============================
------BEGIN CERTIFICATE-----
-MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCBijELMAkGA1UE
-BhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHlyaWdodCAoYykgMjAwNTEiMCAG
-A1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBH
-bG9iYWwgUm9vdCBHQSBDQTAeFw0wNTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYD
-VQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIw
-IAYDVQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5
-IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy0+zAJs9
-Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxRVVuuk+g3/ytr6dTqvirdqFEr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+tYcNthEeFpaIzpXl/V6ME+un2pMSyuOoAPjPuCp1NJ70rOo4nI8
-rZ7/gFnkm0W09juwzTkZmDLl6iFhkOQxIY40sfcvNUqFENrnijchvllj4PKFiDFT1FQUhXB59C4G
-dyd1Lx+4ivn+xbrYNuSD7Odlt79jWvNGr4GUN9RBjNYj1h7P9WgbRGOiWrqnNVmh5XAFmw4jV5mU
-Cm26OWMohpLzGITY+9HPBVZkVw==
------END CERTIFICATE-----
-
-Cybertrust Global Root
-======================
------BEGIN CERTIFICATE-----
-MIIDoTCCAomgAwIBAgILBAAAAAABD4WqLUgwDQYJKoZIhvcNAQEFBQAwOzEYMBYGA1UEChMPQ3li
-ZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2JhbCBSb290MB4XDTA2MTIxNTA4
-MDAwMFoXDTIxMTIxNTA4MDAwMFowOzEYMBYGA1UEChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQD
-ExZDeWJlcnRydXN0IEdsb2JhbCBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
-+Mi8vRRQZhP/8NN57CPytxrHjoXxEnOmGaoQ25yiZXRadz5RfVb23CO21O1fWLE3TdVJDm71aofW
-0ozSJ8bi/zafmGWgE07GKmSb1ZASzxQG9Dvj1Ci+6A74q05IlG2OlTEQXO2iLb3VOm2yHLtgwEZL
-AfVJrn5GitB0jaEMAs7u/OePuGtm839EAL9mJRQr3RAwHQeWP032a7iPt3sMpTjr3kfb1V05/Iin
-89cqdPHoWqI7n1C6poxFNcJQZZXcY4Lv3b93TZxiyWNzFtApD0mpSPCzqrdsxacwOUBdrsTiXSZT
-8M4cIwhhqJQZugRiQOwfOHB3EgZxpzAYXSUnpQIDAQABo4GlMIGiMA4GA1UdDwEB/wQEAwIBBjAP
-BgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBS2CHsNesysIEyGVjJez6tuhS1wVzA/BgNVHR8EODA2
-MDSgMqAwhi5odHRwOi8vd3d3Mi5wdWJsaWMtdHJ1c3QuY29tL2NybC9jdC9jdHJvb3QuY3JsMB8G
-A1UdIwQYMBaAFLYIew16zKwgTIZWMl7Pq26FLXBXMA0GCSqGSIb3DQEBBQUAA4IBAQBW7wojoFRO
-lZfJ+InaRcHUowAl9B8Tq7ejhVhpwjCt2BWKLePJzYFa+HMjWqd8BfP9IjsO0QbE2zZMcwSO5bAi
-5MXzLqXZI+O4Tkogp24CJJ8iYGd7ix1yCcUxXOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2
-hO0j9n0Hq0V+09+zv+mKts2oomcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+T
-X3EJIrduPuocA06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW
-WL1WMRJOEcgh4LMRkWXbtKaIOM5V
------END CERTIFICATE-----
-
-ePKI Root Certification Authority
-=================================
------BEGIN CERTIFICATE-----
-MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBeMQswCQYDVQQG
-EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xKjAoBgNVBAsMIWVQS0kg
-Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMx
-MjdaMF4xCzAJBgNVBAYTAlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEq
-MCgGA1UECwwhZVBLSSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0B
-AQEFAAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAHSyZbCUNs
-IZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/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vJoIQ4uNllAoEwF73XVv4EOLQunpL+943
-AAAaWyjj0pxzPjKHmKHJUS/X3qwzs08CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8B
-Af8EBAMCAcYwHQYDVR0OBBYEFOCMm9slSbPxfIbWskKHC9BroNnkMA0GCSqGSIb3DQEBBQUAA4IB
-AQA+0hyJLjX8+HXd5n9liPRyTMks1zJO890ZeUe9jjtbkw9QSSQTaxQGcu8J06Gh40CEyecYMnQ8
-SG4Pn0vU9x7Tk4ZkVJdjclDVVc/6IJMCopvDI5NOFlV2oHB5bc0hH88vLbwZ44gx+FkagQnIl6Z0
-x2DEW8xXjrJ1/RsCCdtZb3KTafcxQdaIOL+Hsr0Wefmq5L6IJd1hJyMctTEHBDa0GpC9oHRxUIlt
-vBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNwi/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7Nz
-TogVZ96edhBiIL5VaZVDADlN9u6wWk5JRFRYX0KD
------END CERTIFICATE-----
-
-GeoTrust Primary Certification Authority - G3
-=============================================
------BEGIN CERTIFICATE-----
-MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UE
-BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA4IEdlb1RydXN0
-IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFy
-eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEczMB4XDTA4MDQwMjAwMDAwMFoXDTM3MTIwMTIz
-NTk1OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAo
-YykgMjAwOCBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMT
-LUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZI
-hvcNAQEBBQADggEPADCCAQoCggEBANziXmJYHTNXOTIz+uvLh4yn1ErdBojqZI4xmKU4kB6Yzy5j
-K/BGvESyiaHAKAxJcCGVn2TAppMSAmUmhsalifD614SgcK9PGpc/BkTVyetyEH3kMSj7HGHmKAdE
-c5IiaacDiGydY8hS2pgn5whMcD60yRLBxWeDXTPzAxHsatBT4tG6NmCUgLthY2xbF37fQJQeqw3C
-IShwiP/WJmxsYAQlTlV+fe+/lEjetx3dcI0FX4ilm/LC7urRQEFtYjgdVgbFA0dRIBn8exALDmKu
-dlW/X3e+PkkBUz2YJQN2JFodtNuJ6nnltrM7P7pMKEF/BqxqjsHQ9gUdfeZChuOl1UcCAwEAAaNC
-MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMR5yo6hTgMdHNxr
-2zFblD4/MH8tMA0GCSqGSIb3DQEBCwUAA4IBAQAtxRPPVoB7eni9n64smefv2t+UXglpp+duaIy9
-cr5HqQ6XErhK8WTTOd8lNNTBzU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbE
-Ap7aDHdlDkQNkv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD
-AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUHSJsMC8tJP33s
-t/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2Gspki4cErx5z481+oghLrGREt
------END CERTIFICATE-----
-
-thawte Primary Root CA - G2
-===========================
------BEGIN CERTIFICATE-----
-MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDELMAkGA1UEBhMC
-VVMxFTATBg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JnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7cKUGRIjxpp7sC
-8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fMm7v/OeZWYdMKp8RcTGB7BXcm
-er/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZuMdRAGmI0Nj81Aa6sY6A=
------END CERTIFICATE-----
-
-GeoTrust Primary Certification Authority - G2
-=============================================
------BEGIN CERTIFICATE-----
-MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDELMAkGA1UEBhMC
-VVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA3IEdlb1RydXN0IElu
-Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBD
-ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1
-OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg
-MjAwNyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMTLUdl
-b1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjB2MBAGByqGSM49AgEG
-BSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcLSo17VDs6bl8VAsBQps8lL33KSLjHUGMc
-KiEIfJo22Av+0SbFWDEwKCXzXV2juLaltJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYD
-VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+
-EVXVMAoGCCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGTqQ7m
-ndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBuczrD6ogRLQy7rQkgu2
-npaqBA+K
------END CERTIFICATE-----
-
-VeriSign Universal Root Certification Authority
-===============================================
------BEGIN CERTIFICATE-----
-MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCBvTELMAkGA1UE
-BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
-ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
-IHVzZSBvbmx5MTgwNgYDVQQDEy9WZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9u
-IEF1dGhvcml0eTAeFw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJV
-UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
-cmsxOjA4BgNVBAsTMShjKSAyMDA4IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
-IG9ubHkxODA2BgNVBAMTL1ZlcmlTaWduIFVuaXZlcnNhbCBSb290IENlcnRpZmljYXRpb24gQXV0
-aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx2E3XrEBNNti1xWb/1hajCMj
-1mCOkdeQmIN65lgZOIzF9uVkhbSicfvtvbnazU0AtMgtc6XHaXGVHzk8skQHnOgO+k1KxCHfKWGP
-MiJhgsWHH26MfF8WIFFE0XBPV+rjHOPMee5Y2A7Cs0WTwCznmhcrewA3ekEzeOEz4vMQGn+HLL72
-9fdC4uW/h2KJXwBL38Xd5HVEMkE6HnFuacsLdUYI0crSK5XQz/u5QGtkjFdN/BMReYTtXlT2NJ8I
-AfMQJQYXStrxHXpma5hgZqTZ79IugvHw7wnqRMkVauIDbjPTrJ9VAMf2CGqUuV/c4DPxhGD5WycR
-tPwW8rtWaoAljQIDAQABo4GyMIGvMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMG0G
-CCsGAQUFBwEMBGEwX6FdoFswWTBXMFUWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFI/l0xqGrI2O
-a8PPgGrUSBgsexkuMCUWI2h0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28uZ2lmMB0GA1Ud
-DgQWBBS2d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4sAPmLGd75JR3
-Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+seQxIcaBlVZaDrHC1LGmWazx
-Y8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTx
-P/jgdFcrGJ2BtMQo2pSXpXDrrB2+BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+P
-wGZsY6rp2aQW9IHRlRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4
-mJO37M2CYfE45k+XmCpajQ==
------END CERTIFICATE-----
-
-VeriSign Class 3 Public Primary Certification Authority - G4
-============================================================
------BEGIN CERTIFICATE-----
-MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjELMAkGA1UEBhMC
-VVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3
-b3JrMTowOAYDVQQL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sqotp9iGKt0uEA==
------END CERTIFICATE-----
-
-NetLock Arany (Class Gold) Főtanúsítvány
-========================================
------BEGIN CERTIFICATE-----
-MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQGEwJIVTERMA8G
-A1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3MDUGA1UECwwuVGFuw7pzw610
-dsOhbnlraWFkw7NrIChDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzKTE1MDMGA1UEAwwsTmV0TG9jayBB
-cmFueSAoQ2xhc3MgR29sZCkgRsWRdGFuw7pzw610dsOhbnkwHhcNMDgxMjExMTUwODIxWhcNMjgx
-MjA2MTUwODIxWjCBpzELMAkGA1UEBhMCSFUxETAPBgNVBAcMCEJ1ZGFwZXN0MRUwEwYDVQQKDAxO
-ZXRMb2NrIEtmdC4xNzA1BgNVBAsMLlRhbsO6c8OtdHbDoW55a2lhZMOzayAoQ2VydGlmaWNhdGlv
-biBTZXJ2aWNlcykxNTAzBgNVBAMMLE5ldExvY2sgQXJhbnkgKENsYXNzIEdvbGQpIEbFkXRhbsO6
-c8OtdHbDoW55MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxCRec75LbRTDofTjl5Bu
-0jBFHjzuZ9lk4BqKf8owyoPjIMHj9DrTlF8afFttvzBPhCf2nx9JvMaZCpDyD/V/Q4Q3Y1GLeqVw
-/HpYzY6b7cNGbIRwXdrzAZAj/E4wqX7hJ2Pn7WQ8oLjJM2P+FpD/sLj916jAwJRDC7bVWaaeVtAk
-H3B5r9s5VA1lddkVQZQBr17s9o3x/61k/iCa11zr/qYfCGSji3ZVrR47KGAuhyXoqq8fxmRGILdw
-fzzeSNuWU7c5d+Qa4scWhHaXWy+7GRWF+GmF9ZmnqfI0p6m2pgP8b4Y9VHx2BJtr+UBdADTHLpl1
-neWIA6pN+APSQnbAGwIDAKiLo0UwQzASBgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIB
-BjAdBgNVHQ4EFgQUzPpnk/C2uNClwB7zU/2MU9+D15YwDQYJKoZIhvcNAQELBQADggEBAKt/7hwW
-qZw8UQCgwBEIBaeZ5m8BiFRhbvG5GK1Krf6BQCOUL/t1fC8oS2IkgYIL9WHxHG64YTjrgfpioTta
-YtOUZcTh5m2C+C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC
-bLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2FuLjbvrW5Kfna
-NwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2XjG4Kvte9nHfRCaexOYNkbQu
-dZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E=
------END CERTIFICATE-----
-
-Staat der Nederlanden Root CA - G2
-==================================
------BEGIN CERTIFICATE-----
-MIIFyjCCA7KgAwIBAgIEAJiWjDANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE
-CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g
-Um9vdCBDQSAtIEcyMB4XDTA4MDMyNjExMTgxN1oXDTIwMDMyNTExMDMxMFowWjELMAkGA1UEBhMC
-TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l
-ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMVZ
-5291qj5LnLW4rJ4L5PnZyqtdj7U5EILXr1HgO+EASGrP2uEGQxGZqhQlEq0i6ABtQ8SpuOUfiUtn
-vWFI7/3S4GCI5bkYYCjDdyutsDeqN95kWSpGV+RLufg3fNU254DBtvPUZ5uW6M7XxgpT0G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J8EThFk9nnV0ttgCXjqQesBCNnLsak3c78QA3xMY
-V18meMjWCnl3v/evt3a5pQuEF10Q6m/hq5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNV
-HRMBAf8ECDAGAQH/AgEDMA4GA1UdDwEB/wQEAwIBxjANBgkqhkiG9w0BAQUFAAOCAQEADkbVPK7i
-h9legYsCmEEIjEy82tvuJxuC52pF7BaLT4Wg87JwvVqWuspube5Gi27nKi6Wsxkz67SfqLI37pio
-l7Yutmcn1KZJ/RyTZXaeQi/cImyaT/JaFTmxcdcrUehtHJjA2Sr0oYJ71clBoiMBdDhViw+5Lmei
-IAQ32pwL0xch4I+XeTRvhEgCIDMb5jREn5Fw9IBehEPCKdJsEhTkYY2sEJCehFC78JZvRZ+K88ps
-T/oROhUVRsPNH4NbLUES7VBnQRM9IauUiqpOfMGx+6fWtScvl6tu4B3i0RwsH0Ti/L6RoZz71ilT
-c4afU9hDDl3WY4JxHYB0yvbiAmvZWg==
------END CERTIFICATE-----
-
-SecureSign RootCA11
-===================
------BEGIN CERTIFICATE-----
-MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDErMCkGA1UEChMi
-SmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoGA1UEAxMTU2VjdXJlU2lnbiBS
-b290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0yOTA0MDgwNDU2NDdaMFgxCzAJBgNVBAYTAkpQMSsw
-KQYDVQQKEyJKYXBhbiBDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzLCBJbmMuMRwwGgYDVQQDExNTZWN1
-cmVTaWduIFJvb3RDQTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/XeqpRyQBTvL
-TJszi1oURaTnkBbR31fSIRCkF/3frNYfp+TbfPfs37gD2pRY/V1yfIw/XwFndBWW4wI8h9uuywGO
-wvNmxoVF9ALGOrV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
-EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK6fBdRoyV3XpYKBovHd7NADdBj+1E
-bddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQXmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18
-YIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7r
-kpeDMdmztcpHWD9f
------END CERTIFICATE-----
-
-Autoridad de Certificacion Firmaprofesional CIF A62634068
-=========================================================
------BEGIN CERTIFICATE-----
-MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UEBhMCRVMxQjBA
-BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2
-MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEyMzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIw
-QAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBB
-NjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDD
-Utd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQMcas9UX4P
-B99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefGL9ItWY16Ck6WaVICqjaY
-7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15iNA9wBj4gGFrO93IbJWyTdBSTo3OxDqqH
-ECNZXyAFGUftaI6SEspd/NYrspI8IM/hX68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyI
-plD9amML9ZMWGxmPsu2bm8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO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YWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJbUjWumDqtujWTI6cfSN01RpiyEGjkpTHC
-ClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZo
-Q0iy2+tzJOeRf1SktoA+naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1Z
-WrOZyGlsQyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw==
------END CERTIFICATE-----
-
-Chambers of Commerce Root - 2008
-================================
------BEGIN CERTIFICATE-----
-MIIHTzCCBTegAwIBAgIJAKPaQn6ksa7aMA0GCSqGSIb3DQEBBQUAMIGuMQswCQYDVQQGEwJFVTFD
-MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv
-bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu
-QS4xKTAnBgNVBAMTIENoYW1iZXJzIG9mIENvbW1lcmNlIFJvb3QgLSAyMDA4MB4XDTA4MDgwMTEy
-Mjk1MFoXDTM4MDczMTEyMjk1MFowga4xCzAJBgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNl
-ZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNhbWVyZmlybWEuY29tL2FkZHJlc3MpMRIwEAYDVQQF
-EwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENhbWVyZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJl
-cnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC
-AQCvAMtwNyuAWko6bHiUfaN/Gh/2NdW928sNRHI+JrKQUrpjOyhYb6WzbZSm891kDFX29ufyIiKA
-XuFixrYp4YFs8r/l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AMCowKAYIKwYBBQUH
-AgEWHGh0dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZIhvcNAQEFBQADggIBAJASryI1
-wqM58C7e6bXpeHxIvj99RZJe6dqxGfwWPJ+0W2aeaufDuV2I6A+tzyMP3iU6XsxPpcG1Lawk0lgH
-3qLPaYRgM+gQDROpI9CF5Y57pp49chNyM/WqfcZjHwj0/gF/JM8rLFQJ3uIrbZLGOU8W6jx+ekbU
-RWpGqOt1glanq6B8aBMz9p0w8G8nOSQjKpD9kCk18pPfNKXG9/jvjA9iSnyu0/VU+I22mlaHFoI6
-M6taIgj3grrqLuBHmrS1RaMFO9ncLkVAO+rcf+g769HsJtg1pDDFOqxXnrN2pSB7+R5KBWIBpih1
-YJeSDW4+TTdDDZIVnBgizVGZoCkaPF+KMjNbMMeJL0eYD6MDxvbxrN8y8NmBGuScvfaAFPDRLLmF
-9dijscilIeUcE5fuDr3fKanvNFNb0+RqE4QGtjICxFKuItLcsiFCGtpA8CnJ7AoMXOLQusxI0zcK
-zBIKinmwPQN/aUv0NCB9szTqjktk9T79syNnFQ0EuPAtwQlRPLJsFfClI9eDdOTlLsn+mCdCxqvG
-nrDQWzilm1DefhiYtUU79nm06PcaewaD+9CL2rvHvRirCG88gGtAPxkZumWK5r7VXNM21+9AUiRg
-OGcEMeyP84LG3rlV8zsxkVrctQgVrXYlCg17LofiDKYGvCYQbTed7N14jHyAxfDZd0jQ
------END CERTIFICATE-----
-
-Global Chambersign Root - 2008
-==============================
------BEGIN CERTIFICATE-----
-MIIHSTCCBTGgAwIBAgIJAMnN0+nVfSPOMA0GCSqGSIb3DQEBBQUAMIGsMQswCQYDVQQGEwJFVTFD
-MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv
-bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu
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GeS/Fghl9CYl8slR2iK7ewfPM4W7bMdaTrpmg7yVq
-c5iJWzouE4gev8CSlDQb4ye3ix5vQv/n6TebUB0tovkC7stYWDpxvGjjqsGvHCgfotwjZT+B6q6Z
-09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B
------END CERTIFICATE-----
-
-Go Daddy Root Certificate Authority - G2
-========================================
------BEGIN CERTIFICATE-----
-MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
-B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoTEUdvRGFkZHkuY29tLCBJbmMu
-MTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5
-MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6
-b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8G
-A1UEAxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI
-hvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKDE6bFIEMBO4Tx5oVJnyfq
-9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD
-+qK+ihVqf94Lw7YZFAXK6sOoBJQ7RnwyDfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutd
-fMh8+7ArU6SSYmlRJQVhGkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMl
-NAJWJwGRtDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEAAaNC
-MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFDqahQcQZyi27/a9
-BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmXWWcDYfF+OwYxdS2hII5PZYe096ac
-vNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r
-5N9ss4UXnT3ZJE95kTXWXwTrgIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYV
-N8Gb5DKj7Tjo2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO
-LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI4uJEvlz36hz1
------END CERTIFICATE-----
-
-Starfield Root Certificate Authority - G2
-=========================================
------BEGIN CERTIFICATE-----
-MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
-B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s
-b2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVsZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0
-eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAw
-DgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQg
-VGVjaG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZpY2F0ZSBB
-dXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3twQP89o/8ArFv
-W59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMgnLRJdzIpVv257IzdIvpy3Cdhl+72WoTs
-bhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNk
-N3mSwOxGXn/hbVNMYq/NHwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7Nf
-ZTD4p7dNdloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0HZbU
-JtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
-AQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0GCSqGSIb3DQEBCwUAA4IBAQARWfol
-TwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjUsHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx
-4mcujJUDJi5DnUox9g61DLu34jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUw
-F5okxBDgBPfg8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K
-pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1mMpYjn0q7pBZ
-c2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0
------END CERTIFICATE-----
-
-Starfield Services Root Certificate Authority - G2
-==================================================
------BEGIN CERTIFICATE-----
-MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
-B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s
-b2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJma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7YpFzUf1GO7RgBsZNjvbz4YYCanrHOQnDi
-qX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivtZ8SOyUOyXGsViQK8YvxO8rUzqrJv
-0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9gN53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0kh
-sUlHRUe072o0EclNmsxZt9YCnlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8=
------END CERTIFICATE-----
-
-AffirmTrust Networking
-======================
------BEGIN CERTIFICATE-----
-MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UEBhMCVVMxFDAS
-BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMB4XDTEw
-MDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly
-bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEF
-AAOCAQ8AMIIBCgKCAQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SE
-Hi3yYJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbuakCNrmreI
-dIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRLQESxG9fhwoXA3hA/Pe24
-/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gb
-h+0t+nvujArjqWaJGctB+d1ENmHP4ndGyH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNV
-HQ4EFgQUBx/S55zawm6iQLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/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otZrWyuOQ9PLLvTIzq6we/qzWaVYa8GKa1qF60
-g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaORtGdFNrHF+QFlozEJLUb
-zxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6eKeC2uAloGRwYQw==
------END CERTIFICATE-----
-
-AffirmTrust Premium ECC
-=======================
------BEGIN CERTIFICATE-----
-MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMCVVMxFDASBgNV
-BAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQcmVtaXVtIEVDQzAeFw0xMDAx
-MjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1U
-cnVzdDEgMB4GA1UEAwwXQWZmaXJtVHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQA
-IgNiAAQNMF4bFZ0D0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQ
-N8O9ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0GA1UdDgQW
-BBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAK
-BggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/VsaobgxCd05DhT1wV/GzTjxi+zygk8N53X
-57hG8f2h4nECMEJZh0PUUd+60wkyWs6Iflc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKM
-eQ==
------END CERTIFICATE-----
-
-Certum Trusted Network CA
-=========================
------BEGIN CERTIFICATE-----
-MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBMMSIwIAYDV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kMcScKHQDNP8zGSal6Q10tz6XxnboJ5aj
-Zt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI
-03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw=
------END CERTIFICATE-----
-
-TWCA Root Certification Authority
-=================================
------BEGIN CERTIFICATE-----
-MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJ
-VEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlmaWNh
-dGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMzWhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQG
-EwJUVzESMBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NB
-IFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
-AoIBAQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFEAcK0HMMx
-QhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HHK3XLfJ+utdGdIzdjp9xC
-oi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeXRfwZVzsrb+RH9JlF/h3x+JejiB03HFyP
-4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/zrX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1r
-y+UPizgN7gr8/g+YnzAx3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIB
-BjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkqhkiG
-9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeCMErJk/9q56YAf4lC
-mtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdlsXebQ79NqZp4VKIV66IIArB6nCWlW
-QtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62Dlhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVY
-T0bf+215WfKEIlKuD8z7fDvnaspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocny
-Yh0igzyXxfkZYiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw==
------END CERTIFICATE-----
-
-Security Communication RootCA2
-==============================
------BEGIN CERTIFICATE-----
-MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDElMCMGA1UEChMc
-U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMeU2VjdXJpdHkgQ29tbXVuaWNh
-dGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoXDTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMC
-SlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3Vy
-aXR5IENvbW11bmljYXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
-ANAVOVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGrzbl+dp++
-+T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVMVAX3NuRFg3sUZdbcDE3R
-3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQhNBqyjoGADdH5H5XTz+L62e4iKrFvlNV
-spHEfbmwhRkGeC7bYRr6hfV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AwDQYJKoZIhvcNAQEFBQADggEBAKBIW4IB9k1IuDlVNZyAelOZ1Vr/sXE7zDkJ
-lF7W2u++AVtd0x7Y/X1PzaBB4DSTv8vihpw3kpBWHNzrKQXlxJ7HNd+KDM3FIUPpqojlNcAZQmNa
-Al6kSBg6hW/cnbw/nZzBh7h6YQjpdwt/cKt63dmXLGQehb+8dJahw3oS7AwaboMMPOhyRp/7SNVe
-l+axofjk70YllJyJ22k4vuxcDlbHZVHlUIiIv0LVKz3l+bqeLrPK9HOSAgu+TGbrIP65y7WZf+a2
-E/rKS03Z7lNGBjvGTq2TWoF+bCpLagVFjPIhpDGQh2xlnJ2lYJU6Un/10asIbvPuW/mIPX64b24D
-5EI=
------END CERTIFICATE-----
-
-Hellenic Academic and Research Institutions RootCA 2011
-=======================================================
------BEGIN CERTIFICATE-----
-MIIEMTCCAxmgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBlTELMAkGA1UEBhMCR1IxRDBCBgNVBAoT
-O0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9y
-aXR5MUAwPgYDVQQDEzdIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z
-IFJvb3RDQSAyMDExMB4XDTExMTIwNjEzNDk1MloXDTMxMTIwMTEzNDk1MlowgZUxCzAJBgNVBAYT
-AkdSMUQwQgYDVQQKEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z
-IENlcnQuIEF1dGhvcml0eTFAMD4GA1UEAxM3SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNo
-IEluc3RpdHV0aW9ucyBSb290Q0EgMjAxMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
-AKlTAOMupvaO+mDYLZU++CwqVE7NuYRhlFhPjz2L5EPzdYmNUeTDN9KKiE15HrcS3UN4SoqS5tdI
-1Q+kOilENbgH9mgdVc04UfCMJDGFr4PJfel3r+0ae50X+bOdOFAPplp5kYCvN66m0zH7tSYJnTxa
-71HFK9+WXesyHgLacEnsbgzImjeN9/E2YEsmLIKe0HjzDQ9jpFEw4fkrJxIH2Oq9GGKYsFk3fb7u
-8yBRQlqD75O6aRXxYp2fmTmCobd0LovUxQt7L/DICto9eQqakxylKHJzkUOap9FNhYS5qXSPFEDH
-3N6sQWRstBmbAmNtJGSPRLIl6s5ddAxjMlyNh+UCAwEAAaOBiTCBhjAPBgNVHRMBAf8EBTADAQH/
-MAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQUppFC/RNhSiOeCKQp5dgTBCPuQSUwRwYDVR0eBEAwPqA8
-MAWCAy5ncjAFggMuZXUwBoIELmVkdTAGggQub3JnMAWBAy5ncjAFgQMuZXUwBoEELmVkdTAGgQQu
-b3JnMA0GCSqGSIb3DQEBBQUAA4IBAQAf73lB4XtuP7KMhjdCSk4cNx6NZrokgclPEg8hwAOXhiVt
-XdMiKahsog2p6z0GW5k6x8zDmjR/qw7IThzh+uTczQ2+vyT+bOdrwg3IBp5OjWEopmr95fZi6hg8
-TqBTnbI6nOulnJEWtk2C4AwFSKls9cz4y51JtPACpf1wA+2KIaWuE4ZJwzNzvoc7dIsXRSZMFpGD
-/md9zU1jZ/rzAxKWeAaNsWftjj++n08C9bMJL/NMh98qy5V8AcysNnq/onN694/BtZqhFLKPM58N
-7yLcZnuEvUUXBj08yrl3NI/K6s8/MT7jiOOASSXIl7WdmplNsDz4SgCbZN2fOUvRJ9e4
------END CERTIFICATE-----
-
-Actalis Authentication Root CA
-==============================
------BEGIN CERTIFICATE-----
-MIIFuzCCA6OgAwIBAgIIVwoRl0LE48wwDQYJKoZIhvcNAQELBQAwazELMAkGA1UEBhMCSVQxDjAM
-BgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UE
-AwweQWN0YWxp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MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF
-AAOCAgEAU18h9bqwOlI5LJKwbADJ784g7wbylp7ppHR/ehb8t/W2+xUbP6umwHJdELFx7rxP462s
-A20ucS6vxOOto70MEae0/0qyexAQH6dXQbLArvQsWdZHEIjzIVEpMMpghq9Gqx3tOluwlN5E40EI
-osHsHdb9T7bWR9AUC8rmyrV7d35BH16Dx7aMOZawP5aBQW9gkOLo+fsicdl9sz1Gv7SEr5AcD48S
-aq/v7h56rgJKihcrdv6sVIkkLE8/trKnToyokZf7KcZ7XC25y2a2t6hbElGFtQl+Ynhw/qlqYLYd
-DnkM/crqJIByw5c/8nerQyIKx+u2DISCLIBrQYoIwOula9+ZEsuK1V6ADJHgJgg2SMX6OBE1/yWD
-LfJ6v9r9jv6ly0UsH8SIU653DtmadsWOLB2jutXsMq7Aqqz30XpN69QH4kj3Io6wpJ9qzo6ysmD0
-oyLQI+uUWnpp3Q+/QFesa1lQ2aOZ4W7+jQF5JyMV3pKdewlNWudLSDBaGOYKbeaP4NK75t98biGC
-wWg5TbSYWGZizEqQXsP6JwSxeRV0mcy+rSDeJmAc61ZRpqPq5KM/p/9h3PFaTWwyI0PurKju7koS
-CTxdccK+efrCh2gdC/1cacwG0Jp9VJkqyTkaGa9LKkPzY11aWOIv4x3kqdbQCtCev9eBCfHJxyYN
-rJgWVqA=
------END CERTIFICATE-----
-
-Buypass Class 3 Root CA
-=======================
------BEGIN CERTIFICATE-----
-MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU
-QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMyBSb290IENBMB4X
-DTEwMTAyNjA4Mjg1OFoXDTQwMTAyNjA4Mjg1OFowTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1
-eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQ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HnfzSgCHEy9BHcEGhyoMZCCxt8l13nIoUE9Q2HJLw5QY33KbmkJs4j1xrG0aG
-Q0JfPgEHU1RdZX33inOhmlRaHylDFCfChQ+1iHsaO5S3HWCntZznKWlXWpuTekMwGwPXYshApqr8
-ZORK15FTAaggiG6cX0S5y2CBNOxv033aSF/rtJC8LakcC6wc1aJoIIAE1vyxjy+7SjENSoYc6+I2
-KSb12tjE8nVhz36udmNKekBlk4f4HoCMhuWG1o8O/FMsYOgWYRqiPkN7zTlgVGr18okmAWiDSKIz
-6MkEkbIRNBE+6tBDGR8Dk5AM/1E9V/RBbuHLoL7ryWPNbczk+DaqaJ3tvV2XcEQNtg413OEMXbug
-UZTLfhbrES+jkkXITHHZvMmZUldGL1DPvTVp9D0VzgalLA8+9oG6lLvDu79leNKGef9JOxqDDPDe
-eOzI8k1MGt6CKfjBWtrt7uYnXuhF0J0cUahoq0Tj0Itq4/g7u9xN12TyUb7mqqta6THuBrxzvxNi
-Cp/HuZc=
------END CERTIFICATE-----
-
-T-TeleSec GlobalRoot Class 3
-============================
------BEGIN CERTIFICATE-----
-MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM
-IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU
-cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwHhcNMDgx
-MDAxMTAyOTU2WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz
-dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD
-ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwggEiMA0GCSqGSIb3
-DQEBAQUAA4IBDwAwggEKAoIBAQC9dZPwYiJvJK7genasfb3ZJNW4t/zN8ELg63iIVl6bmlQdTQyK
-9tPPcPRStdiTBONGhnFBSivwKixVA9ZIw+A5OO3yXDw/RLyTPWGrTs0NvvAgJ1gORH8EGoel15YU
-NpDQSXuhdfsaa3Ox+M6pCSzyU9XDFES4hqX2iys52qMzVNn6chr3IhUciJFrf2blw2qAsCTz34ZF
-iP0Zf3WHHx+xGwpzJFu5ZeAsVMhg02YXP+HMVDNzkQI6pn97djmiH5a2OK61yJN0HZ65tOVgnS9W
-0eDrXltMEnAMbEQgqxHY9Bn20pxSN+f6tsIxO0rUFJmtxxr1XV/6B7h8DR/Wgx6zAgMBAAGjQjBA
-MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS1A/d2O2GCahKqGFPr
-AyGUv/7OyjANBgkqhkiG9w0BAQsFAAOCAQEAVj3vlNW92nOyWL6ukK2YJ5f+AbGwUgC4TeQbIXQb
-fsDuXmkqJa9c1h3a0nnJ85cp4IaH3gRZD/FZ1GSFS5mvJQQeyUapl96Cshtwn5z2r3Ex3XsFpSzT
-ucpH9sry9uetuUg/vBa3wW306gmv7PO15wWeph6KU1HWk4HMdJP2udqmJQV0eVp+QD6CSyYRMG7h
-P0HHRwA11fXT91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml
-e9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4pTpPDpFQUWw==
------END CERTIFICATE-----
-
-EE Certification Centre Root CA
-===============================
------BEGIN CERTIFICATE-----
-MIIEAzCCAuugAwIBAgIQVID5oHPtPwBMyonY43HmSjANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQG
-EwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1czEoMCYGA1UEAwwfRUUgQ2Vy
-dGlmaWNhd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7cBqklrkar4dBGmoYDQZPxz5u
-uSlNDUmJEYcyW+ZLBMjkXOZ0c5RdFpgTlf7727FE5TpwrDdr5rMzcijJs1eg9gIWiAYLtqZLICjU
-3j2LrTcFU3T+bsy8QxdxXvnFzBqpYe73dgzzcvRyrc9yAjYHR8/vGVCJYMzpJJUPwssd8m92kMfM
-dcGWxZ0=
------END CERTIFICATE-----
-
-D-TRUST Root Class 3 CA 2 2009
-==============================
------BEGIN CERTIFICATE-----
-MIIEMzCCAxugAwIBAgIDCYPzMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQK
-DAxELVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTAe
-Fw0wOTExMDUwODM1NThaFw0yOTExMDUwODM1NThaME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxE
-LVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTCCASIw
-DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANOySs96R+91myP6Oi/WUEWJNTrGa9v+2wBoqOAD
-ER03UAifTUpolDWzU9GUY6cgVq/eUXjsKj3zSEhQPgrfRlWLJ23DEE0NkVJD2IfgXU42tSHKXzlA
-BF9bfsyjxiupQB7ZNoTWSPOSHjRGICTBpFGOShrvUD9pXRl/RcPHAY9RySPocq60vFYJfxLLHLGv
-KZAKyVXMD9O0Gu1HNVpK7ZxzBCHQqr0ME7UAyiZsxGsMlFqVlNpQmvH/pStmMaTJOKDfHR+4CS7z
-p+hnUquVH+BGPtikw8paxTGA6Eian5Rp/hnd2HN8gcqW3o7tszIFZYQ05ub9VxC1X3a/L7AQDcUC
-AwEAAaOCARowggEWMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFP3aFMSfMN4hvR5COfyrYyNJ
-4PGEMA4GA1UdDwEB/wQEAwIBBjCB0wYDVR0fBIHLMIHIMIGAoH6gfIZ6bGRhcDovL2RpcmVjdG9y
-eS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwUm9vdCUyMENsYXNzJTIwMyUyMENBJTIwMiUyMDIw
-MDksTz1ELVRydXN0JTIwR21iSCxDPURFP2NlcnRpZmljYXRlcmV2b2NhdGlvbmxpc3QwQ6BBoD+G
-PWh0dHA6Ly93d3cuZC10cnVzdC5uZXQvY3JsL2QtdHJ1c3Rfcm9vdF9jbGFzc18zX2NhXzJfMjAw
-OS5jcmwwDQYJKoZIhvcNAQELBQADggEBAH+X2zDI36ScfSF6gHDOFBJpiBSVYEQBrLLpME+bUMJm
-2H6NMLVwMeniacfzcNsgFYbQDfC+rAF1hM5+n02/t2A7nPPKHeJeaNijnZflQGDSNiH+0LS4F9p0
-o3/U37CYAqxva2ssJSRyoWXuJVrl5jLn8t+rSfrzkGkj2wTZ51xY/GXUl77M/C4KzCUqNQT4YJEV
-dT1B/yMfGchs64JTBKbkTCJNjYy6zltz7GRUUG3RnFX7acM2w4y8PIWmawomDeCTmGCufsYkl4ph
-X5GOZpIJhzbNi5stPvZR1FDUWSi9g/LMKHtThm3YJohw1+qRzT65ysCQblrGXnRl11z+o+I=
------END CERTIFICATE-----
-
-D-TRUST Root Class 3 CA 2 EV 2009
-=================================
------BEGIN CERTIFICATE-----
-MIIEQzCCAyugAwIBAgIDCYP0MA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK
-DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw
-OTAeFw0wOTExMDUwODUwNDZaFw0yOTExMDUwODUwNDZaMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK
-DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw
-OTCCASIwDQYJKoZIhvcNAQEBBQADggEPAD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vZt5y11ubQ2egZixVxSK236thZiNSQvxaz2ems
-WWFUyBy6ysHK4bkgTI86k4mloMy/0/Z1pHWWbVY=
------END CERTIFICATE-----
-
-E-Tugra Certification Authority
-===============================
------BEGIN CERTIFICATE-----
-MIIGSzCCBDOgAwIBAgIIamg+nFGby1MwDQYJKoZIhvcNAQELBQAwgbIxCzAJBgNVBAYTAlRSMQ8w
-DQYDVQQHDAZBbmthcmExQDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamls
-ZXJpIHZlIEhpem1ldGxlcmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBN
-ZXJrZXppMSgwJgYDVQQDDB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTEzMDMw
-NTEyMDk0OFoXDTIzMDMwMzEyMDk0OFowgbIxCzAJBgNVBAYTAlRSMQ8wDQYDVQQHDAZBbmthcmEx
-QDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamlsZXJpIHZlIEhpem1ldGxl
-cmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBNZXJrZXppMSgwJgYDVQQD
-DB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
-MIICCgKCAgEA4vU/kwVRHoViVF56C/UYB4Oufq9899SKa6VjQzm5S/fDxmSJPZQuVIBSOTkHS0vd
-hQd2h8y/L5VMzH2nPbxHD5hw+IyFHnSOkm0bQNGZDbt1bsipa5rAhDGvykPL6ys06I+XawGb1Q5K
-CKpbknSFQ9OArqGIW66z6l7LFpp3RMih9lRozt6Plyu6W0ACDGQXwLWTzeHxE2bODHnv0ZEoq1+g
-ElIwcxmOj+GMB6LDu0rw6h8VqO4lzKRG+Bsi77MOQ7osJLjFLFzUHPhdZL3Dk14opz8n8Y4e0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wI18gfNycJ5v/hqO2V81xrJvNHy+SE/iWjnX2J14np+GPgNeGYtEotXHAgMBAAGjQjBA
-MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS/WSA2AHmgoCJrjNXy
-YdK4LMuCSjANBgkqhkiG9w0BAQsFAAOCAQEAMQOiYQsfdOhyNsZt+U2e+iKo4YFWz827n+qrkRk4
-r6p8FU3ztqONpfSO9kSpp+ghla0+AGIWiPACuvxhI+YzmzB6azZie60EI4RYZeLbK4rnJVM3YlNf
-vNoBYimipidx5joifsFvHZVwIEoHNN/q/xWA5brXethbdXwFeilHfkCoMRN3zUA7tFFHei4R40cR
-3p1m0IvVVGb6g1XqfMIpiRvpb7PO4gWEyS8+eIVibslfwXhjdFjASBgMmTnrpMwatXlajRWc2BQN
-9noHV8cigwUtPJslJj0Ys6lDfMjIq2SPDqO/nBudMNva0Bkuqjzx+zOAduTNrRlPBSeOE6Fuwg==
------END CERTIFICATE-----
-
-Atos TrustedRoot 2011
-=====================
------BEGIN CERTIFICATE-----
-MIIDdzCCAl+gAwIBAgIIXDPLYixfszIwDQYJKoZIhvcNAQELBQAwPDEeMBwGA1UEAwwVQXRvcyBU
-cnVzdGVkUm9vdCAyMDExMQ0wCwYDVQQKDARBdG9zMQswCQYDVQQGEwJERTAeFw0xMTA3MDcxNDU4
-MzBaFw0zMDEyMzEyMzU5NTlaMDwxHjAcBgNVBAMMFUF0b3MgVHJ1c3RlZFJvb3QgMjAxMTENMAsG
-A1UECgwEQXRvczELMAkGA1UEBhMCREUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCV
-hTuXbyo7LjvPpvMpNb7PGKw+qtn4TaA+Gke5vJrf8v7MPkfoepbCJI419KkM/IL9bcFyYie96mvr
-54rMVD6QUM+A1JX76LWC1BTFtqlVJVfbsVD2sGBkWXppzwO3bw2+yj5vdHLqqjAqc2K+SZFhyBH+
-DgMq92og3AIVDV4VavzjgsG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jRqHH3Y8iKuu2n0M7SmSFXRDw4m6Oy2Cy2nhTXN/VnIn9HNPlopNLk9hM6xZdRZkZFW
-dSHBd575euFgndOtBBj0fOtek49TSiIp+EgrPk2GrFt/ywaZWWDYWGWVjUTR939+J399roD1B0y2
-PpxxVJkES/1Y+Zj0
------END CERTIFICATE-----
-
-DigiCert Assured ID Root G2
-===========================
------BEGIN CERTIFICATE-----
-MIIDljCCAn6gAwIBAgIQC5McOtY5Z+pnI7/Dr5r0SzANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQG
-EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw
-IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIwHhcNMTMwODAxMTIwMDAwWhcNMzgw
-MTE1MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL
-ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIw
-ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDZ5ygvUj82ckmIkzTz+GoeMVSAn61UQbVH
-35ao1K+ALbkKz3X9iaV9JPrjIgwrvJUXCzO/GU1BBpAAvQxNEP4HteccbiJVMWWXvdMX0h5i89vq
-bFCMP4QMls+3ywPgym2hFEwbid3tALBSfK+RbLE4E9HpEgjAALAcKxHad3A2m67OeYfcgnDmCXRw
-VWmvo2ifv922ebPynXApVfSr/5Vh88lAbx3RvpO704gqu52/clpWcTs/1PPRCv4o76Pu2ZmvA9OP
-YLfykqGxvYmJHzDNw6YuYjOuFgJ3RFrngQo8p0Quebg/BLxcoIfhG69Rjs3sLPr4/m3wOnyqi+Rn
-lTGNAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdD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aDk52
-7RH89elWsn2/x20Kk4yl0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7I
-LaZRfyHBNVOFBkpdn627G190
------END CERTIFICATE-----
-
-USERTrust RSA Certification Authority
-=====================================
------BEGIN CERTIFICATE-----
-MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCBiDELMAkGA1UE
-BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK
-ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh
-dGlvbiBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UE
-BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK
-ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh
-dGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCAEmUXNg7D2wiz
-0KxXDXbtzSfTTK1Qg2HiqiBNCS1kCdzOiZ/MPans9s/B3PHTsdZ7NygRK0faOca8Ohm0X6a9fZ2j
-Y0K2dvKpOyuR+OJv0OwWIJAJPuLodMkYtJHUYmTbf6MG8YgYapAiPLz+E/CHFHv25B+O1ORRxhFn
-RghRy4YUVD+8M/5+bJz/Fp0YvVGONaanZshyZ9shZrHUm3gDwFA66Mzw3LyeTP6vBZY1H1dat//O
-+T23LLb2VN3I5xI6Ta5MirdcmrS3ID3KfyI0rn47aGYBROcBTkZTmzNg95S+UzeQc0PzMsNT79uq
-/nROacdrjGCT3sTHDN/hMq7MkztReJVni+49Vv4M0GkPGw/z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aBL6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gx
-Q+6IHdfGjjxDah2nGN59PRbxYvnKkKj9
------END CERTIFICATE-----
-
-USERTrust ECC Certification Authority
-=====================================
------BEGIN CERTIFICATE-----
-MIICjzCCAhWgAwIBAgIQXIuZxVqUxdJxVt7NiYDMJjAKBggqhkjOPQQDAzCBiDELMAkGA1UEBhMC
-VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU
-aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv
-biBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMC
-VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU
-aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv
-biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQarFRaqfloI+d61SRvU8Za2EurxtW2
-0eZzca7dnNYMYf3boIkDuAUU7FfO7l0/4iGzzvfUinngo4N+LZfQYcTxmdwlkWOrfzCjtHDix6Ez
-nPO/LlxTsV+zfTJ/ijTjeXmjQjBAMB0GA1UdDgQWBBQ64QmG1M8ZwpZ2dEl23OA1xmNjmjAOBgNV
-HQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjA2Z6EWCNzklwBB
-HU6+4WMBzzuqQhFkoJ2UOQIReVx7Hfpkue4WQrO/isIJxOzksU0CMQDpKmFHjFJKS04YcPbWRNZu
-9YO6bVi9JNlWSOrvxKJGgYhqOkbRqZtNyWHa0V1Xahg=
------END CERTIFICATE-----
-
-GlobalSign ECC Root CA - R4
-===========================
------BEGIN CERTIFICATE-----
-MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEkMCIGA1UECxMb
-R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD
-EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb
-R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD
-EwpHbG9iYWxTaWduMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEuMZ5049sJQ6fLjkZHAOkrprl
-OQcJFspjsbmG+IpXwVfOQvpzofdlQv8ewQCybnMO/8ch5RikqtlxP6jUuc6MHaNCMEAwDgYDVR0P
-AQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFFSwe61FuOJAf/sKbvu+M8k8o4TV
-MAoGCCqGSM49BAMCA0gAMEUCIQDckqGgE6bPA7DmxCGXkPoUVy0D7O48027KqGx2vKLeuwIgJ6iF
-JzWbVsaj8kfSt24bAgAXqmemFZHe+pTsewv4n4Q=
------END CERTIFICATE-----
-
-GlobalSign ECC Root CA - R5
-===========================
------BEGIN CERTIFICATE-----
-MIICHjCCAaSgAwIBAgIRYFlJ4CYuu1X5CneKcflK2GwwCgYIKoZIzj0EAwMwUDEkMCIGA1UECxMb
-R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD
-EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb
-R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD
-EwpHbG9iYWxTaWduMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAER0UOlvt9Xb/pOdEh+J8LttV7HpI6
-SFkc8GIxLcB6KP4ap1yztsyX50XUWPrRd21DosCHZTQKH3rd6zwzocWdTaRvQZU4f8kehOvRnkmS
-h5SHDDqFSmafnVmTTZdhBoZKo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd
-BgNVHQ4EFgQUPeYpSJvqB8ohREom3m7e0oPQn1kwCgYIKoZIzj0EAwMDaAAwZQIxAOVpEslu28Yx
-uglB4Zf4+/2a4n0Sye18ZNPLBSWLVtmg515dTguDnFt2KaAJJiFqYgIwcdK1j1zqO+F4CYWodZI7
-yFz9SO8NdCKoCOJuxUnOxwy8p2Fp8fc74SrL+SvzZpA3
------END CERTIFICATE-----
-
-Staat der Nederlanden Root CA - G3
-==================================
------BEGIN CERTIFICATE-----
-MIIFdDCCA1ygAwIBAgIEAJiiOTANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE
-CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g
-Um9vdCBDQSAtIEczMB4XDTEzMTExNDExMjg0MloXDTI4MTExMzIzMDAwMFowWjELMAkGA1UEBhMC
-TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l
-ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAL4y
-olQPcPssXFnrbMSkUeiFKrPMSjTysF/zDsccPVMeiAho2G89rcKezIJnByeHaHE6n3WWIkYFsO2t
-x1ueKt6c/DrGlaf1F2cY5y9JCAxcz+bMNO14+1Cx3Gsy8KL+tjzk7FqXxz8ecAgwoNzF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ko+gE4uZbqKmxnl4mUnrzhVNXkanjvSr0r
-mj1AfsbAddJu+2gw7OyLnflJNZoaLNmzlTnVHpL3prllL+U9bTpITAjc5CgSKL59NVzq4BZ+Extq
-1z7XnvwtdbLBFNUjA9tbbws+eC8N3jONFrdI54OagQ97wUNNVQQXOEpR1VmiiXTTn74eS9fGbbeI
-JG9gkaSChVtWQbzQRKtqE77RLFi3EjNYsjdj3BP1lB0/QFH1T/U67cjF68IeHRaVesd+QnGTbksV
-tzDfqu1XhUisHWrdOWnk4Xl4vs4Fv6EM94B7IWcnMFk=
------END CERTIFICATE-----
-
-Staat der Nederlanden EV Root CA
-================================
------BEGIN CERTIFICATE-----
-MIIFcDCCA1igAwIBAgIEAJiWjTANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQGEwJOTDEeMBwGA1UE
-CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSkwJwYDVQQDDCBTdGFhdCBkZXIgTmVkZXJsYW5kZW4g
-RVYgUm9vdCBDQTAeFw0xMDEyMDgxMTE5MjlaFw0yMjEyMDgxMTEwMjhaMFgxCzAJBgNVBAYTAk5M
-MR4wHAYDVQQKDBVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xKTAnBgNVBAMMIFN0YWF0IGRlciBOZWRl
-cmxhbmRlbiBFViBSb290IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA48d+ifkk
-SzrSM4M1LGns3Amk41GoJSt5uAg94JG6hIXGhaTK5skuU6TJJB79VWZxXSzFYGgEt9nCUiY4iKTW
-O0Cmws0/zZiTs1QUWJZV1VD+hq2kY39ch/aO5ieSZxeSAgMs3NZmdO3dZ//BYY1jTw+bbRcwJu+r
-0h8QoPnFfxZpgQNH7R5ojXKhTbImxrpsX23Wr9GxE46prfNeaXUmGD5BKyF/7otdBwadQ8QpCiv8
-Kj6GyzyDOvnJDdrFmeK8eEEzduG/L13lpJhQDBXd4Pqcfzho0LKmeqfRMb1+ilgnQ7O6M5HTp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xZMzG0IQOeLeG9QgkRQP2YGiqtDhFZK
-DyAthg710tvSeopLzaXoTvFeJiUBWSOgftL2fiFX1ye8FVdMpEbB4IMeDExNH08GGeL5qPQ6gqGy
-eUN51q1veieQA6TqJIc/2b3Z6fJfUEkc7uzXLg==
------END CERTIFICATE-----
-
-IdenTrust Commercial Root CA 1
-==============================
------BEGIN CERTIFICATE-----
-MIIFYDCCA0igAwIBAgIQCgFCgAAAAUUjyES1AAAAAjANBgkqhkiG9w0BAQsFADBKMQswCQYDVQQG
-EwJVUzESMBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBS
-b290IENBIDEwHhcNMTQwMTE2MTgxMjIzWhcNMzQwMTE2MTgxMjIzWjBKMQswCQYDVQQGEwJVUzES
-MBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBSb290IENB
-IDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnUBneP5k91DNG8W9RYYKyqU+PZ4ld
-hNlT3Qwo2dfw/66VQ3KZ+bVdfIrBQuExUHTRgQ18zZshq0PirK1ehm7zCYofWjK9ouuU+ehcCuz/
-mNKvcbO0U59Oh++SvL3sTzIwiEsXXlfEU8L2ApeN2WIrvyQfYo3fw7gpS0l4PJNgiCL8mdo2yMKi
-1CxUAGc1bnO/AljwpN3lsKImesrgNqUZFvX9t++uP0D1bVoE/c40yiTcdCMbXTMTEl3EASX2MN0C
-XZ/g1Ue9tOsbobtJSdifWwLziuQkkORiT0/Br4sOdBeo0XKIanoBScy0RnnGF7HamB4HWfp1IYVl
-3ZBWzvurpWCdxJ35UrCLvYf5jysjCiN2O/cz4ckA82n5S6LgTrx+kzmEB/dEcH7+B1rlsazRGMzy
-NeVJSQjKVsk9+w8YfYs7wRPCTY/JTw436R+hDmrfYi7LNQZReSzIJTj0+kuniVyc0uMNOYZKdHzV
-WYfCP04MXFL0P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wIDAQABo0IwQDAOBgNVHQ8B
-Af8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU43HgntinQtnbcZFrlJPrw6PRFKMw
-DQYJKoZIhvcNAQELBQADggIBAEf63QqwEZE4rU1d9+UOl1QZgkiHVIyqZJnYWv6IAcVYpZmxI1Qj
-t2odIFflAWJBF9MJ23XLblSQdf4an4EKwt3X9wnQW3IV5B4Jaj0z8yGa5hV+rVHVDRDtfULAj+7A
-mgjVQdZcDiFpboBhDhXAuM/FSRJSzL46zNQuOAXeNf0fb7iAaJg9TaDKQGXSc3z1i9kKlT/YPyNt
-GtEqJBnZhbMX73huqVjRI9PHE+1yJX9dsXNw0H8GlwmEKYBhHfpe/3OsoOOJuBxxFcbeMX8S3OFt
-m6/n6J91eEyrRjuazr8FGF1NFTwWmhlQBJqymm9li1JfPFgEKCXAZmExfrngdbkaqIHWchezxQMx
-NRF4eKLg6TCMf4DfWN88uieW4oA0beOY02QnrEh+KHdcxiVhJfiFDGX6xDIvpZgF5PgLZxYWxoK4
-Mhn5+bl53B/N66+rDt0b20XkeucC4pVd/GnwU2lhlXV5C15V5jgclKlZM57IcXR5f1GJtshquDDI
-ajjDbp7hNxbqBWJMWxJH7ae0s1hWx0nzfxJoCTFx8G34Tkf71oXuxVhAGaQdp/lLQzfcaFpPz+vC
-ZHTetBXZ9FRUGi8c15dxVJCO2SCdUyt/q4/i6jC8UDfv8Ue1fXwsBOxonbRJRBD0ckscZOf85muQ
-3Wl9af0AVqW3rLatt8o+Ae+c
------END CERTIFICATE-----
-
-Entrust Root Certification Authority - G2
-=========================================
------BEGIN CERTIFICATE-----
-MIIEPjCCAyagAwIBAgIESlOMKDANBgkqhkiG9w0BAQsFADCBvjELMAkGA1UEBhMCVVMxFjAUBgNV
-BAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVy
-bXMxOTA3BgNVBAsTMChjKSAyMD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/djwUAFQKXSt/S1mja/qYh2iARVBCuch38aNzx+LaUa2NSJXsq9rD1s2G2v1fN2D807iDgi
-nWyTmsQ9v4IbZT+mD12q/OWyFcq1rca8PdCE6OoGcrBNOTJ4vz4RnAuknZoh8/CbCzB428Hch0P+
-vGOaysXCHMnHjf87ElgI5rY97HosTvuDls4MPGmHVHOkc8KT/1EQrBVUAdj8BbGJoX90g5pJ19xO
-e4pIb4tF9g==
------END CERTIFICATE-----
-
-Entrust Root Certification Authority - EC1
-==========================================
------BEGIN CERTIFICATE-----
-MIIC+TCCAoCgAwIBAgINAKaLeSkAAAAAUNCR+TAKBggqhkjOPQQDAzCBvzELMAkGA1UEBhMCVVMx
-FjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVn
-YWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDEyIEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXpl
-ZCB1c2Ugb25seTEzMDEGA1UEAxMqRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5
-IC0gRUMxMB4XDTEyMTIxODE1MjUzNloXDTM3MTIxODE1NTUzNlowgb8xCzAJBgNVBAYTAlVTMRYw
-FAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0L2xlZ2Fs
-LXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxMiBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhvcml6ZWQg
-dXNlIG9ubHkxMzAxBgNVBAMTKkVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt
-IEVDMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABIQTydC6bUF74mzQ61VfZgIaJPRbiWlH47jCffHy
-AsWfoPZb1YsGGYZPUxBtByQnoaD41UcZYUx9ypMn6nQM72+WCf5j7HBdNq1nd67JnXxVRDq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Kw9cTXPhyQN9Ky8+ZAAoACxGV2lZFA4gKn2fQ1XmxqI1AbQ3C
-ekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su
------END CERTIFICATE-----
-
-OISTE WISeKey Global Root GB CA
-===============================
------BEGIN CERTIFICATE-----
-MIIDtTCCAp2gAwIBAgIQdrEgUnTwhYdGs/gjGvbCwDANBgkqhkiG9w0BAQsFADBtMQswCQYDVQQG
-EwJDSDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNl
-ZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQiBDQTAeFw0xNDEyMDExNTAw
-MzJaFw0zOTEyMDExNTEwMzFaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYD
-VQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEds
-b2JhbCBSb290IEdCIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2Be3HEokKtaX
-scriHvt9OO+Y9bI5mE4nuBFde9IllIiCFSZqGzG7qFshISvYD06fWvGxWuR51jIjK+FTzJlFXHtP
-rby/h0oLS5daqPZI7H17Dc0hBt+eFf1Biki3IPShehtX1F1Q/7pn2COZH8g/497/b1t3sWtuuMlk
-9+HKQUYOKXHQuSP8yYFfTvdv37+ErXNku7dCjmn21HYdfp2nuFeKUWdy19SouJVUQHMD9ur06/4o
-Qnc/nSMbsrY9gBQHTC5P99UKFg29ZkM3fiNDecNAhvVMKdqOmq0NpQSHiB6F4+lT1ZvIiwNjeOvg
-GUpuuy9rM2RYk61pv48b74JIxwIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB
-/zAdBgNVHQ4EFgQUN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+TW9NL++IDWr63fE9biCloBK0TXC5ztdyO4mTp4CEHCdJ
-ckm1/zuVnsHMyAHs6A6KCpbns6aH5db5BSsNl0BwPLqsdVqc1U2dAgrSS5tmS0YHF2Wtn2yIANwi
-ieDhZNRnvDF5YTy7ykHNXGoAyDw4jlivAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0P
-AQH/BAQDAgEGMB0GA1UdDgQWBBQuFqlKGLXLzPVvUPMjX/hd56zwyDANBgkqhkiG9w0BAQsFAAOC
-AQEAtXP4A9xZWx126aMqe5Aosk3AM0+qmrHUuOQn/6mWmc5G4G18TKI4pAZw8PRBEew/R40/cof5
-O/2kbytTAOD/OblqBw7rHRz2onKQy4I9EYKL0rufKq8h5mOGnXkZ7/e7DDWQw4rtTw/1zBLZpD67
-oPwglV9PJi8RI4NOdQcPv5vRtB3pEAT+ymCPoky4rc/hkA/NrgrHXXu3UNLUYfrVFdvXn4dRVOul
-4+vJhaAlIDf7js4MNIThPIGyd05DpYhfhmehPea0XGG2Ptv+tyjFogeutcrKjSoS75ftwjCkySp6
-+/NNIxuZMzSgLvWpCz/UXeHPhJ/iGcJfitYgHuNztw==
------END CERTIFICATE-----
-
-Certum Trusted Network CA 2
-===========================
------BEGIN CERTIFICATE-----
-MIIF0jCCA7qgAwIBAgIQIdbQSk8lD8kyN/yqXhKN6TANBgkqhkiG9w0BAQ0FADCBgDELMAkGA1UE
-BhMCUEwxIjAgBgNVBAoTGVVuaXpldG8gVGVjaG5vbG9naWVzIFMuQS4xJzAlBgNVBAsTHkNlcnR1
-bSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEkMCIGA1UEAxMbQ2VydHVtIFRydXN0ZWQgTmV0d29y
-ayBDQSAyMCIYDzIwMTExMDA2MDgzOTU2WhgPMjA0NjEwMDYwODM5NTZaMIGAMQswCQYDVQQGEwJQ
-TDEiMCAGA1UEChMZVW5pemV0byBUZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMe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cLN+mLIMb4Ck4uWBzrM9DPhmDJ2vuA
-L55MYIR4PSFk1vtBHxgP58l1cb29XN40hz5BsA72udY/CROWFC/emh1auVbONTqwX3BNXuMp8SMo
-clm2q8KMZiYcdywmdjWLKKdpoPk79SPdhRB0yZADVpHnr7pH1BKXESLjokmUbOe3lEu6LaTaM4tM
-pkT/WjzGHWTYtTHkpjx6qFcL2+1hGsvxznN3Y6SHb0xRONbkX8eftoEq5IVIeVheO/jbAoJnwTnb
-w3RLPTYe+SmTiGhbqEQZIfCn6IENLOiTNrQ3ssqwGyZ6miUfmpqAnksqP/ujmv5zMnHCnsZy4Ypo
-J/HkD7TETKVhk/iXEAcqMCWpuchxuO9ozC1+9eB+D4Kob7a6bINDd82Kkhehnlt4Fj1F4jNy3eFm
-ypnTycUm/Q1oBEauttmbjL4ZvrHG8hnjXALKLNhvSgfZyTXaQHXyxKcZb55CEJh15pWLYLztxRLX
-is7VmFxWlgPF7ncGNf/P5O4/E2Hu29othfDNrp2yGAlFw5Khchf8R7agCyzxxN5DaAhqXzvwdmP7
-zAYspsbiDrW5viSP
------END CERTIFICATE-----
-
-Hellenic Academic and Research Institutions RootCA 2015
-=======================================================
------BEGIN CERTIFICATE-----
-MIIGCzCCA/OgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcT
-BkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0
-aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNVBAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNl
-YXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIwMTUwHhcNMTUwNzA3MTAxMTIxWhcNNDAwNjMwMTAx
-MTIxWjCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMg
-QWNhZGVtaWMgYW5kIFJlc2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BKg2mF+
-D1hYc2Ryx+hFjtyp8iY/xnmMsVMIM4GwVhO+5lFc2JsKT0ucVlMC6U/2DWDqTUJV6HwbISHTGzrM
-d/K4kPFox/la/vot9L/J9UUbzjgQKjeKeaO04wlshYaT/4mWJ3iBj2fjRnRUjtkNaeJK9E10A/+y
-d+2VZ5fkscWrv2oj6NSU4kQoYsRL4vDY4ilrGnB+JGGTe08DMiUNRSQrlrRGar9KC/eaj8GsGsVn
-82800vpzY4zvFrCopEYq+OsS7HK07/grfoxSwIuEVPkvPuNVqNxmsdnhX9izjFk0WaSrT2y7Hxjb
-davYy5LNlDhhDgcGH0tGEPEVvo2FXDtKK4F5D7Rpn0lQl033DlZdwJVqwjbDG2jJ9SrcR5q+ss7F
-Jej6A7na+RZukYT1HCjI/CbM1xyQVqdfbzoEvM14iQuODy+jqk+iGxI9FghAD/FGTNeqewjBCvVt
-J94Cj8rDtSvK6evIIVM4pcw72Hc3MKJP2W/R8kCtQXoXxdZKNYm3QdV8hn9VTYNKpXMgwDqvkPGa
-JI7ZjnHKe7iG2rKPmT4dEw0SEe7Uq/DpFXYC5ODfqiAeW2GFZECpkJcNrVPSWh2HagCXZWK0vm9q
-p/UsQu0yrbYhnr68
------END CERTIFICATE-----
-
-Hellenic Academic and Research Institutions ECC RootCA 2015
-===========================================================
------BEGIN CERTIFICATE-----
-MIICwzCCAkqgAwIBAgIBADAKBggqhkjOPQQDAjCBqjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0
-aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9u
-cyBDZXJ0LiBBdXRob3JpdHkxRDBCBgNVBAMTO0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJj
-aCBJbnN0aXR1dGlvbnMgRUNDIFJvb3RDQSAyMDE1MB4XDTE1MDcwNzEwMzcxMloXDTQwMDYzMDEw
-MzcxMlowgaoxCzAJBgNVBAYTAkdSMQ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8lgQGVMDMBu4Gon2nL2XA46jCfMdiyHxtN/kHNGfZQIG6lzWE7OE76KlXIx3
-KadowGuuQNKotOrN8I1LOJwZmhsoVLiJkO/KdYE+HvJkJMcYr07/R54H9jVlpNMKVv/1F2Rs76gi
-JUmTtt8AF9pYfl3uxRuw0dFfIRDH+fO6AgonB8Xx1sfT4PsJYGw=
------END CERTIFICATE-----
-
-Amazon Root CA 3
-================
------BEGIN CERTIFICATE-----
-MIIBtjCCAVugAwIBAgITBmyf1XSXNmY/Owua2eiedgPySjAKBggqhkjOPQQDAjA5MQswCQYDVQQG
-EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAzMB4XDTE1MDUy
-NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ
-MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCmXp8ZB
-f8ANm+gBG1bG8lKlui2yEujSLtf6ycXYqm0fc4E7O5hrOXwzpcVOho6AF2hiRVd9RFgdszflZwjr
-Zt6jQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSrttvXBp43
-rDCGB5Fwx5zEGbF4wDAKBggqhkjOPQQDAgNJADBGAiEA4IWSoxe3jfkrBqWTrBqYaGFy+uGh0Psc
-eGCmQ5nFuMQCIQCcAu/xlJyzlvnrxir4tiz+OpAUFteMYyRIHN8wfdVoOw==
------END CERTIFICATE-----
-
-Amazon Root CA 4
-================
------BEGIN CERTIFICATE-----
-MIIB8jCCAXigAwIBAgITBmyf18G7EEwpQ+Vxe3ssyBrBDjAKBggqhkjOPQQDAzA5MQswCQYDVQQG
-EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSA0MB4XDTE1MDUy
-NjAwMDAwMFo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u
-ZY+kt9J/Z93I055cqqmkoCUUBpvsT34tC38ddfEz2O3OuHVtPlu5mB0xDVbYQw8wkbIEa91WvpWA
-VWe+2M2D2RjuLg+GLZKecBPs3lHJQ3gCpU3I+V/EkVhGFndadKpAvAefMLmx9xIX3eP/JEAdemrR
-TxgKqpAd60Ae36EeRJIQmvKN4dFLRp7oRUKX6kWZ8+xm1QL68qZKJKrezrnK+T+Tb/mjuuqlPpmt
-/f97mfVl7vBZKGfXkJWkE4SphMHozs51k2MavDzq1WQfLSoSOcbDWjLtR5EWDrw4wVDej8oqkDQc
-7kGUnF4ZLvhFSZl0kbAEb+MEWrGrKqv+x9CWttrhSmQGbmBNvUJO/3jaJMobtNeWOWyu8Q6qp31I
-iyBMz2TWuJdGsE7RKlY6oJO9r4Ak4Ap+58rVyuiFVdw2KuGUaJPHZnJED4AhMmwlxyOAgwrr
------END CERTIFICATE-----
-
-TUBITAK Kamu SM SSL Kok Sertifikasi - Surum 1
-=============================================
------BEGIN CERTIFICATE-----
-MIIEYzCCA0ugAwIBAgIBATANBgkqhkiG9w0BAQsFADCB0jELMAkGA1UEBhMCVFIxGDAWBgNVBAcT
-D0dlYnplIC0gS29jYWVsaTFCMEAGA1UEChM5VHVya2l5ZSBCaWxpbXNlbCB2ZSBUZWtub2xvamlr
-IEFyYXN0aXJtYSBLdXJ1bXUgLSBUVUJJVEFLMS0wKwYDVQQLEyRLYW11IFNlcnRpZmlrYXN5b24g
-TWVya2V6aSAtIEthbXUgU00xNjA0BgNVBAMTLVRVQklUQUsgS2FtdSBTTSBTU0wgS29rIFNlcnRp
-ZmlrYXNpIC0gU3VydW0gMTAeFw0xMzExMjUwODI1NTVaFw00MzEwMjUwODI1NTVaMIHSMQswCQYD
-VQQGEwJUUjEYMBYGA1UEBxMPR2ViemUgLSBLb2NhZWxpMUIwQAYDVQQKEzlUdXJraXllIEJpbGlt
-c2VsIHZlIFRla25vbG9qaWsgQXJhc3Rpcm1hIEt1cnVtdSAtIFRVQklUQU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w9U73NjKYKtR8aja+3+XzP4Q1HpGjOR
-MRegdMTUpwHmspI+ap3tDvl0mEDTPwOABoJA6LHip1GnHYMma6ve+heRK9jGrB6xnhkB1Zem6g23
-xFUfJ3zSCNV2HykVh0A53ThFEXXQmqc04L/NyFIduUd+Dbi7xgz2c1cWWn5DkR9VOsZtRASqnKmc
-p0yJF4OuowReUoCLHhIlERnXDH19MURB6tuvsBzvgdAsxZohmz3tQjtQJvLsznFhBmIhVE5/wZ0+
-fyCMgMsq2JdiyIMzkX2woloPV+g7zPIlstR8L+xNxqE6FXrntl019fZISjZFZtS6mFjBAgMBAAGj
-YzBhMB0GA1UdDgQWBBREnkj1zG1I1KBLf/5ZJC+Dl5mahjAfBgNVHSMEGDAWgBREnkj1zG1I1KBL
-f/5ZJC+Dl5mahjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF
-AAOCAQEABT41XBVwm8nHc2FvcivUwo/yQ10CzsSUuZQRg2dd4mdsdXa/uwyqNsatR5Nj3B5+1t4u
-/ukZMjgDfxT2AHMsWbEhBuH7rBiVDKP/mZb3Kyeb1STMHd3BOuCYRLDE5D53sXOpZCz2HAF8P11F
-hcCF5yWPldwX8zyfGm6wyuMdKulMY/okYWLW2n62HGz1Ah3UKt1VkOsqEUc8Ll50soIipX1TH0Xs
-J5F95yIW6MBoNtjG8U+ARDL54dHRHareqKucBK+tIA5kmE2la8BIWJZpTdwHjFGTot+fDz2LYLSC
-jaoITmJF4PkL0uDgPFveXHEnJcLmA4GLEFPjx1WitJ/X5g==
------END CERTIFICATE-----
-
-SSL.com Root Certification Authority RSA
-========================================
------BEGIN CERTIFICATE-----
-MIIF3TCCA8WgAwIBAgIIeyyb0xaAMpkwDQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxDjAM
-BgNVBAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24x
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DgQWBBTdBAkHovV6fVJTEpKV7jiAJQ2mWTAPBgNV
-HRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFN0ECQei9Xp9UlMSkpXuOIAlDaZZMA4GA1UdDwEB/wQE
-AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAIBgRlCn7Jp0cHh5wYfGVcpNxJK1ok1iOMq8bs3AD/CUr
-dIWQPXhq9LmLpZc7tRiRux6n+UBbkflVma8eEdBcHadm47GUBwwyOabqG7B52B2ccETjit3E+ZUf
-ijhDPwGFpUenPUayvOUiaPd7nNgsPgohyC0zrL/FgZkxdMF1ccW+sfAjRfSda/wZY52jvATGGAsl
-u1OJD7OAUN5F7kR/q5R4ZJjT9ijdh9hwZXT7DrkT66cPYakylszeu+1jTBi7qUD3oFRuIIhxdRjq
-erQ0cuAjJ3dctpDqhiVAq+8zD8ufgr6iIPv2tS0a5sKFsXQP+8hlAqRSAUfdSSLBv9jra6x+3uxj
-MxW3IwiPxg+NQVrdjsW5j+VFP3jbutIbQLH+cU0/4IGiul607BXgk90IH37hVZkLId6Tngr75qNJ
-vTYw/ud3sqB1l7UtgYgXZSD32pAAn8lSzDLKNXz1PQ/YK9f1JmzJBjSWFupwWRoyeXkLtoh/D1JI
-Pb9s2KJELtFOt3JY04kTlf5Eq/jXixtunLwsoFvVagCvXzfh1foQC5ichucmj87w7G6KVwuA406y
-wKBjYZC6VWg3dGq2ktufoYYitmUnDuy2n0Jg5GfCtdpBC8TTi2EbvPofkSvXRAdeuims2cXp71NI
-WuuA8ShYIc2wBlX7Jz9TkHCpBB5XJ7k=
------END CERTIFICATE-----
-
-SSL.com Root Certification Authority ECC
-========================================
------BEGIN CERTIFICATE-----
-MIICjTCCAhSgAwIBAgIIdebfy8FoW6gwCgYIKoZIzj0EAwIwfDELMAkGA1UEBhMCVVMxDjAMBgNV
-BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xMTAv
-BgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYwMjEy
-MTgxNDAzWhcNNDEwMjEyMTgxNDAzWjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAO
-BgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NMLmNv
-bSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuBBAAiA2IA
-BEVuqVDEpiM2nl8ojRfLliJkP9x6jh3MCLOicSS6jkm5BBtHllirLZXI7Z4INcgn64mMU1jrYor+
-8FsPazFSY0E7ic3s7LaNGdM0B9y7xgZ/wkWV7Mt/qCPgCemB+vNH06NjMGEwHQYDVR0OBBYEFILR
-hXMw5zUE044CkvvlpNHEIejNMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUgtGFczDnNQTT
-jgKS++Wk0cQh6M0wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2cAMGQCMG/n61kRpGDPYbCW
-e+0F+S8Tkdzt5fxQaxFGRrMcIQBiu77D5+jNB5n5DQtdcj7EqgIwH7y6C+IwJPt8bYBVCpk+gA0z
-5Wajs6O7pdWLjwkspl1+4vAHCGht0nxpbl/f5Wpl
------END CERTIFICATE-----
-
-SSL.com EV Root Certification Authority RSA R2
-==============================================
------BEGIN CERTIFICATE-----
-MIIF6zCCA9OgAwIBAgIIVrYpzTS8ePYwDQYJKoZIhvcNAQELBQAwgYIxCzAJBgNVBAYTAlVTMQ4w
-DAYDVQQIDAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9u
-MTcwNQYDVQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIy
-MB4XDTE3MDUzMTE4MT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DgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQBWs47LCp1Jjr+kxJG7ZhcFUZh1
-++VQLHqe8RT6q9OKPv+RKY9ji9i0qVQBDb6Thi/5Sm3HXvVX+cpVHBK+Rw82xd9qt9t1wkclf7nx
-Y/hoLVUE0fKNsKTPvDxeH3jnpaAgcLAExbf3cqfeIg29MyVGjGSSJuM+LmOW2puMPfgYCdcDzH2G
-guDKBAdRUNf/ktUM79qGn5nX67evaOI5JpS6aLe/g9Pqemc9YmeuJeVy6OLk7K4S9ksrPJ/psEDz
-OFSz/bdoyNrGj1E8svuR3Bznm53htw1yj+KkxKl4+esUrMZDBcJlOSgYAsOCsp0FvmXtll9ldDz7
-CTUue5wT/RsPXcdtgTpWD8w74a8CLyKsRspGPKAcTNZEtF4uXBVmCeEmKf7GUmG6sXP/wwyc5Wxq
-lD8UykAWlYTzWamsX0xhk23RO8yilQwipmdnRC652dKKQbNmC1r7fSOl8hqw/96bg5Qu0T/fkreR
-rwU7ZcegbLHNYhLDkBvjJc40vG93drEQw/cFGsDWr3RiSBd3kmmQYRzelYB0VI8YHMPzA9C/pEN1
-hlMYegouCRw2n5H9gooiS9EOUCXdywMMF8mDAAhONU2Ki+3wApRmLER/y5UnlhetCTCstnEXbosX
-9hwJ1C07mKVx01QT2WDz9UtmT/rx7iASjbSsV7FFY6GsdqnC+w==
------END CERTIFICATE-----
-
-SSL.com EV Root Certification Authority ECC
-===========================================
------BEGIN CERTIFICATE-----
-MIIClDCCAhqgAwIBAgIILCmcWxbtBZUwCgYIKoZIzj0EAwIwfzELMAkGA1UEBhMCVVMxDjAMBgNV
-BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xNDAy
-BgNVBAMMK1NTTC5jb20gRVYgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYw
-MjEyMTgxNTIzWhcNNDEwMj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m0CuiVdjaExUd1URhxN25mW7xocBFym
-Fe944Hn+Xds+qkxV/ZoVqW/hpvvfcDDpw+5CRu3CkwWJ+n1jez/QcYF8AOiYrg54NMMl+68KnyBr
-3TsTjxKM4kEaSHpzoHdpx7Zcf4LIHv5YGygrqGytXm3ABdJ7t+uA/iU3/gKbaKxCXcPu9czc8FB1
-0jZpnOZ7BN9uBmm23goJSFmH63sUYHpkqmlD75HHTOwY3WzvUy2MmeFe8nI+z1TIvWfspA9MRf/T
-uTAjB0yPEL+GltmZWrSZVxykzLsViVO6LAUP5MSeGbEYNNVMnbrt9x+vJJUEeKgDu+6B5dpffItK
-oZB0JaezPkvILFa9x8jvOOJckvB595yEunQtYQEgfn7R8k8HWV+LLUNS60YMlOH1Zkd5d9VUWx+t
-JDfLRVpOoERIyNiwmcUVhAn21klJwGW45hpxbqCo8YLoRT5s1gLXCmeDBVrJpBA=
------END CERTIFICATE-----
-
-OISTE WISeKey Global Root GC CA
-===============================
------BEGIN CERTIFICATE-----
-MIICaTCCAe+gAwIBAgIQISpWDK7aDKtARb8roi066jAKBggqhkjOPQQDAzBtMQswCQYDVQQGEwJD
-SDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEo
-MCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQyBDQTAeFw0xNzA1MDkwOTQ4MzRa
-Fw00MjA1MDkwOTU4MzNaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYDVQQL
-ExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEdsb2Jh
-bCBSb290IEdDIENBMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAETOlQwMYPchi82PG6s4nieUqjFqdr
-VCTbUf/q9Akkwwsin8tqJ4KBDdLArzHkdIJuyiXZjHWd8dvQmqJLIX4Wp2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+x
-ygKJBJYoaMVLuCaJu9YzL1DV/pqJuhgyklTGW+Cd+V7lDSKb9triyCGyYiGqhkCyLmTTX8jjfhFn
-RR8F/uOi77Oos/N9j/gMHyIfLXC0uAE0djAA5SN4p1bXUB+K+wb1whnw0A==
------END CERTIFICATE-----
-
-UCA Extended Validation Root
-============================
------BEGIN CERTIFICATE-----
-MIIFWjCCA0KgAwIBAgIQT9Irj/VkyDOeTzRYZiNwYDANBgkqhkiG9w0BAQsFADBHMQswCQYDVQQG
-EwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9u
-IFJvb3QwHhcNMTUwMzEzMDAwMDAwWhcNMzgxMjMxMDAwMDAwWjBHMQswCQYDVQQGEwJDTjERMA8G
-A1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9uIFJvb3QwggIi
-MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCpCQcoEwKwmeBkqh5DFnpzsZGgdT6o+uM4AHrs
-iWogD4vFsJszA1qGxliG1cGFu0/GnEBNyr7uaZa4rYEwmnySBesFK5pI0Lh2PpbIILvSsPGP2KxF
-Rv+qZ2C0d35qHzwaUnoEPQc8hQ2E0B92CvdqFN9y4zR8V05WAT558aopO2z6+I9tTcg1367r3CTu
-eUWnhbYFiN6IXSV8l2RnCdm/WhUFhvMJHuxYMjMR83dksHYf5BA1FxvyDrFspCqjc/wJHx4yGVMR
-59mzLC52LqGj3n5qiAno8geK+LLNEOfic0CTuwjRP+H8C5SzJe98ptfRr5//lpr1kXuYC3fUfugH
-0mK1lTnj8/FtDw5lhIpjVMWAtuCeS31HJqcBCF3RiJ7XwzJE+oJKCmhUfzhTA8ykADNkUVkLo4KR
-el7sFsLzKuZi2irbWWIQJUoqgQtHB0MGcIfS+pMRKXpITeuUx3BNr2fVUbGAIAEBtHoIppB/TuDv
-B0GHr2qlXov7z1C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ix0PZ7mddrXuqe8QhfnPZHr5X3dPpzxz5KsbEjMwiI/aTvFthUvozXGaCocV685743Q
-NcMYDHsAVhzNixl03r4PEuDQqqE/AjSxcM6dGNYIAwlG7mDgfrbESQRRfXBgvKqy/3lyeqYdPV8q
-+Mri/Tm3R7nrft8EI6/6nAYH6ftjk4BAtcZsCjEozgyfz7MjNYBBjWzEN3uBL4ChQEKF6dk4jeih
-U80Bv2noWgbyRQuQ+q7hv53yrlc8pa6yVvSLZUDp/TGBLPQ5Cdjua6e0ph0VpZj3AYHYhX3zUVxx
-iN66zB+Afko=
------END CERTIFICATE-----
-
-emSign ECC Root CA - G3
-=======================
------BEGIN CERTIFICATE-----
-MIICTjCCAdOgAwIBAgIKPPYHqWhwDtqLhDAKBggqhkjOPQQDAzBrMQswCQYDVQQGEwJJTjETMBEG
-A1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEg
-MB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0gRzMwHhcNMTgwMjE4MTgzMDAwWhcNNDMwMjE4
-MTgzMDAwWjBrMQswCQYDVQQGEwJJTjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11
-ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEgMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0g
-RzMwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQjpQy4LRL1KPOxst3iAhKAnjlfSU2fySU0WXTsuwYc
-58Byr+iuL+FBVIcUqEqy6HyC5ltqtdyzdc6LBtCGI79G1Y4PPwT01xySfvalY8L1X44uT6EYGQIr
-MgqCZH0Wk9GjQjBAMB0GA1UdDgQWBBR8XQKEE9TMipuBzhccLikenEhjQjAOBgNVHQ8BAf8EBAMC
-AQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNpADBmAjEAvvNhzwIQHWSVB7gYboiFBS+D
-CBeQy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mC+M2sO87/kOXSTKZEhVb3xEp
-/6tT+LvBeA+snFOvV71ojD1pM/CjoCNjO2RnIkSt1XHLVip4kqNPEjE2NuLe/gDEo2APJ62gsIq1
-NnpSob0n9CAnYuhNlCQT5AoE6TyrLshDCUrGYQTlSTR+08TI9Q/Aqum6VF7zYytPT1DU/rl7mYw9
-wC68AivTxEDkigcxHpvOJpkT+xHqmiIMERnHXhuBUDDIlhJu58tBf5E7oke3VIAb3ADMmpDqw8NQ
-BmIMMMAVSKeoWXzhriKi4gp6D/piq1JM4fHfyr6DDUI=
------END CERTIFICATE-----
-
-emSign ECC Root CA - C3
-=======================
------BEGIN CERTIFICATE-----
-MIICKzCCAbGgAwIBAgIKe3G2gla4EnycqDAKBggqhkjOPQQDAzBaMQswCQYDVQQGEwJVUzETMBEG
-A1UECxMKZW1TaWduIFBLSTEUMBIGA1UEChMLZU11ZGhyYSBJbmMxIDAeBgNVBAMTF2VtU2lnbiBF
-Q0MgUm9vdCBDQSAtIEMzMB4XDTE4MDIxODE4MzAwMFoXDTQzMDIxODE4MzAwMFowWjELMAkGA1UE
-BhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMSAwHgYDVQQD
-ExdlbVNpZ24gRUNDIFJvb3QgQ0EgLSBDMzB2MBAGByqGSM49AgEGBSuBBAAiA2IABP2lYa57JhAd
-6bciMK4G9IGzsUJxlTm801Ljr6/58pc1kjZGDoeVjbk5Wum739D+yAdBPLtVb4OjavtisIGJAnB9
-SMVK4+kiVCJNk7tCDK93nCOmfddhEc5lx/h//vXyqaNCMEAwHQYDVR0OBBYEFPtaSNCAIEDyqOkA
-B2kZd6fmw/TPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49BAMDA2gA
-MGUCMQC02C8Cif22TGK6Q04ThHK1rt0c3ta13FaPWEBaLd4gTCKDypOofu4SQMfWh0/434UCMBwU
-ZOR8loMRnLDRWmFLpg9J0wD8ofzkpf9/rdcw0Md3f76BB1UwUCAU9Vc4CqgxUQ==
------END CERTIFICATE-----
-
-Hongkong Post Root CA 3
-=======================
------BEGIN CERTIFICATE-----
-MIIFzzCCA7egAwIBAgIUCBZfikyl7ADJk0DfxMauI7gcWqQwDQYJKoZIhvcNAQELBQAwbzELMAkG
-A1UEBhMCSEsxEjAQBgNVBAgTCUhvbmcgS29uZzESMBAGA1UEBxMJSG9uZyBLb25nMRYwFAYDVQQK
-Ew1Ib25na29uZyBQb3N0MSAwHgYDVQQDExdIb25na29uZyBQb3N0IFJvb3QgQ0EgMzAeFw0xNzA2
-MDMwMjI5NDZaFw00MjA2MDMwMjI5NDZaMG8xCzAJBgNVBAYTAkhLMRIwEAYDVQQIEwlIb25nIEtv
-bmcxEjAQBgNVBAcTCUhvbmcgS29uZzEWMBQGA1UEChMNSG9uZ2tvbmcgUG9zdDEgMB4GA1UEAxMX
-SG9uZ2tvbmcgUG9zdCBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCz
-iNfqzg8gTr7m1gNt7ln8wlffKWihgw4+aMdoWJwcYEuJQwy51BWy7sFOdem1p+/l6TWZ5Mwc50tf
-jTMwIDNT2aa71T4Tjukfh0mtUC1Qyhi+AViiE3CWu4mIVoBc+L0sPOFMV4i707mV78vH9toxdCim
-5lSJ9UExyuUmGs2C4HDaOym71QP1mbpV9WTRYA6ziUm4ii8F0oRFKHyPaFASePwLtVPLwpgchKOe
-sL4jpNrcyCse2m5FHomY2vkALgbpDDtw1VAliJnLzXNg99X/NWfFobxeq81KuEXryGgeDQ0URhLj
-0mRiikKYvLTGCAj4/ahMZJx2Ab0vqWwzD9g/KLg8aQFChn5pwckGyuV6RmXpwtZQQS4/t+TtbNe/
-JgERohYpSms0BpDsE9K2+2p20jzt8NYt3eEV7KObLyzJPivkaTv/ciWxNoZbx39ri1UbSsUgYT2u
-y1DhCDq+sI9jQVMwCFk8mB13umOResoQUGC/8Ne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diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/init.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/init.php
deleted file mode 100644
index e611aa5c..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/init.php
+++ /dev/null
@@ -1,274 +0,0 @@
-create and manage Express or
- * Custom accounts.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|\Stripe\StripeObject $business_profile Business information about the account.
- * @property null|string $business_type The business type.
- * @property \Stripe\StripeObject $capabilities
- * @property bool $charges_enabled Whether the account can create live charges.
- * @property \Stripe\StripeObject $company
- * @property \Stripe\StripeObject $controller
- * @property string $country The account's country.
- * @property int $created Time at which the account was connected. Measured in seconds since the Unix epoch.
- * @property string $default_currency Three-letter ISO currency code representing the default currency for the account. This must be a currency that Stripe supports in the account's country.
- * @property bool $details_submitted Whether account details have been submitted. Standard accounts cannot receive payouts before this is true.
- * @property null|string $email An email address associated with the account. You can treat this as metadata: it is not used for authentication or messaging account holders.
- * @property \Stripe\Collection<\Stripe\BankAccount|\Stripe\Card> $external_accounts External accounts (bank accounts and debit cards) currently attached to this account
- * @property \Stripe\StripeObject $future_requirements
- * @property \Stripe\Person $individual
This is an object representing a person associated with a Stripe account.
A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. See the Standard onboarding or Express onboarding documentation for information about platform pre-filling and account onboarding steps.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property bool $payouts_enabled Whether Stripe can send payouts to this account.
- * @property \Stripe\StripeObject $requirements
- * @property null|\Stripe\StripeObject $settings Options for customizing how the account functions within Stripe.
- * @property \Stripe\StripeObject $tos_acceptance
- * @property string $type The Stripe account type. Can be standard, express, or custom.
- */
-class Account extends ApiResource
-{
- const OBJECT_NAME = 'account';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Delete;
- use ApiOperations\NestedResource;
- use ApiOperations\Update;
-
- const BUSINESS_TYPE_COMPANY = 'company';
- const BUSINESS_TYPE_GOVERNMENT_ENTITY = 'government_entity';
- const BUSINESS_TYPE_INDIVIDUAL = 'individual';
- const BUSINESS_TYPE_NON_PROFIT = 'non_profit';
-
- const CAPABILITY_CARD_PAYMENTS = 'card_payments';
- const CAPABILITY_LEGACY_PAYMENTS = 'legacy_payments';
- const CAPABILITY_PLATFORM_PAYMENTS = 'platform_payments';
- const CAPABILITY_TRANSFERS = 'transfers';
-
- const CAPABILITY_STATUS_ACTIVE = 'active';
- const CAPABILITY_STATUS_INACTIVE = 'inactive';
- const CAPABILITY_STATUS_PENDING = 'pending';
-
- const TYPE_CUSTOM = 'custom';
- const TYPE_EXPRESS = 'express';
- const TYPE_STANDARD = 'standard';
-
- use ApiOperations\Retrieve {
- retrieve as protected _retrieve;
- }
-
- public static function getSavedNestedResources()
- {
- static $savedNestedResources = null;
- if (null === $savedNestedResources) {
- $savedNestedResources = new Util\Set([
- 'external_account',
- 'bank_account',
- ]);
- }
-
- return $savedNestedResources;
- }
-
- public function instanceUrl()
- {
- if (null === $this['id']) {
- return '/v1/account';
- }
-
- return parent::instanceUrl();
- }
-
- public function serializeParameters($force = false)
- {
- $update = parent::serializeParameters($force);
- if (isset($this->_values['legal_entity'])) {
- $entity = $this['legal_entity'];
- if (isset($entity->_values['additional_owners'])) {
- $owners = $entity['additional_owners'];
- $entityUpdate = isset($update['legal_entity']) ? $update['legal_entity'] : [];
- $entityUpdate['additional_owners'] = $this->serializeAdditionalOwners($entity, $owners);
- $update['legal_entity'] = $entityUpdate;
- }
- }
- if (isset($this->_values['individual'])) {
- $individual = $this['individual'];
- if (($individual instanceof Person) && !isset($update['individual'])) {
- $update['individual'] = $individual->serializeParameters($force);
- }
- }
-
- return $update;
- }
-
- private function serializeAdditionalOwners($legalEntity, $additionalOwners)
- {
- if (isset($legalEntity->_originalValues['additional_owners'])) {
- $originalValue = $legalEntity->_originalValues['additional_owners'];
- } else {
- $originalValue = [];
- }
- if (($originalValue) && (\count($originalValue) > \count($additionalOwners))) {
- throw new Exception\InvalidArgumentException(
- 'You cannot delete an item from an array, you must instead set a new array'
- );
- }
-
- $updateArr = [];
- foreach ($additionalOwners as $i => $v) {
- $update = ($v instanceof StripeObject) ? $v->serializeParameters() : $v;
-
- if ([] !== $update) {
- if (!$originalValue
- || !\array_key_exists($i, $originalValue)
- || ($update !== $legalEntity->serializeParamsValue($originalValue[$i], null, false, true))) {
- $updateArr[$i] = $update;
- }
- }
- }
-
- return $updateArr;
- }
-
- /**
- * @param null|array|string $id the ID of the account to retrieve, or an
- * options array containing an `id` key
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Account
- */
- public static function retrieve($id = null, $opts = null)
- {
- if (!$opts && \is_string($id) && 'sk_' === \substr($id, 0, 3)) {
- $opts = $id;
- $id = null;
- }
-
- return self::_retrieve($id, $opts);
- }
-
- /**
- * @param null|array $clientId
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\StripeObject object containing the response from the API
- */
- public function deauthorize($clientId = null, $opts = null)
- {
- $params = [
- 'client_id' => $clientId,
- 'stripe_user_id' => $this->id,
- ];
-
- return OAuth::deauthorize($params, $opts);
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Person> the list of persons
- */
- public function persons($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/persons';
- list($response, $opts) = $this->_request('get', $url, $params, $opts);
- $obj = Util\Util::convertToStripeObject($response, $opts);
- $obj->setLastResponse($response);
-
- return $obj;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Account the rejected account
- */
- public function reject($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/reject';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /*
- * Capabilities methods
- * We can not add the capabilities() method today as the Account object already has a
- * capabilities property which is a hash and not the sub-list of capabilities.
- */
-
- const PATH_CAPABILITIES = '/capabilities';
-
- /**
- * @param string $id the ID of the account on which to retrieve the capabilities
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Capability> the list of capabilities
- */
- public static function allCapabilities($id, $params = null, $opts = null)
- {
- return self::_allNestedResources($id, static::PATH_CAPABILITIES, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the account to which the capability belongs
- * @param string $capabilityId the ID of the capability to retrieve
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Capability
- */
- public static function retrieveCapability($id, $capabilityId, $params = null, $opts = null)
- {
- return self::_retrieveNestedResource($id, static::PATH_CAPABILITIES, $capabilityId, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the account to which the capability belongs
- * @param string $capabilityId the ID of the capability to update
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Capability
- */
- public static function updateCapability($id, $capabilityId, $params = null, $opts = null)
- {
- return self::_updateNestedResource($id, static::PATH_CAPABILITIES, $capabilityId, $params, $opts);
- }
- const PATH_EXTERNAL_ACCOUNTS = '/external_accounts';
-
- /**
- * @param string $id the ID of the account on which to retrieve the external accounts
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\BankAccount|\Stripe\Card> the list of external accounts (BankAccount or Card)
- */
- public static function allExternalAccounts($id, $params = null, $opts = null)
- {
- return self::_allNestedResources($id, static::PATH_EXTERNAL_ACCOUNTS, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the account on which to create the external account
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\BankAccount|\Stripe\Card
- */
- public static function createExternalAccount($id, $params = null, $opts = null)
- {
- return self::_createNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the account to which the external account belongs
- * @param string $externalAccountId the ID of the external account to delete
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\BankAccount|\Stripe\Card
- */
- public static function deleteExternalAccount($id, $externalAccountId, $params = null, $opts = null)
- {
- return self::_deleteNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the account to which the external account belongs
- * @param string $externalAccountId the ID of the external account to retrieve
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\BankAccount|\Stripe\Card
- */
- public static function retrieveExternalAccount($id, $externalAccountId, $params = null, $opts = null)
- {
- return self::_retrieveNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the account to which the external account belongs
- * @param string $externalAccountId the ID of the external account to update
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\BankAccount|\Stripe\Card
- */
- public static function updateExternalAccount($id, $externalAccountId, $params = null, $opts = null)
- {
- return self::_updateNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts);
- }
- const PATH_LOGIN_LINKS = '/login_links';
-
- /**
- * @param string $id the ID of the account on which to create the login link
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\LoginLink
- */
- public static function createLoginLink($id, $params = null, $opts = null)
- {
- return self::_createNestedResource($id, static::PATH_LOGIN_LINKS, $params, $opts);
- }
- const PATH_PERSONS = '/persons';
-
- /**
- * @param string $id the ID of the account on which to retrieve the persons
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Person> the list of persons
- */
- public static function allPersons($id, $params = null, $opts = null)
- {
- return self::_allNestedResources($id, static::PATH_PERSONS, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the account on which to create the person
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Person
- */
- public static function createPerson($id, $params = null, $opts = null)
- {
- return self::_createNestedResource($id, static::PATH_PERSONS, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the account to which the person belongs
- * @param string $personId the ID of the person to delete
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Person
- */
- public static function deletePerson($id, $personId, $params = null, $opts = null)
- {
- return self::_deleteNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the account to which the person belongs
- * @param string $personId the ID of the person to retrieve
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Person
- */
- public static function retrievePerson($id, $personId, $params = null, $opts = null)
- {
- return self::_retrieveNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the account to which the person belongs
- * @param string $personId the ID of the person to update
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Person
- */
- public static function updatePerson($id, $personId, $params = null, $opts = null)
- {
- return self::_updateNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/AccountLink.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/AccountLink.php
deleted file mode 100644
index 24a9e68a..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/AccountLink.php
+++ /dev/null
@@ -1,26 +0,0 @@
-Connect
- * Onboarding.
- *
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property int $expires_at The timestamp at which this account link will expire.
- * @property string $url The URL for the account link.
- */
-class AccountLink extends ApiResource
-{
- const OBJECT_NAME = 'account_link';
-
- use ApiOperations\Create;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/AlipayAccount.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/AlipayAccount.php
deleted file mode 100644
index 1d6a5096..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/AlipayAccount.php
+++ /dev/null
@@ -1,75 +0,0 @@
-json, $opts);
- if (!($obj instanceof \Stripe\Collection)) {
- throw new \Stripe\Exception\UnexpectedValueException(
- 'Expected type ' . \Stripe\Collection::class . ', got "' . \get_class($obj) . '" instead.'
- );
- }
- $obj->setLastResponse($response);
- $obj->setFilters($params);
-
- return $obj;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiOperations/Create.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiOperations/Create.php
deleted file mode 100644
index c4351321..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiOperations/Create.php
+++ /dev/null
@@ -1,31 +0,0 @@
-json, $opts);
- $obj->setLastResponse($response);
-
- return $obj;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiOperations/Delete.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiOperations/Delete.php
deleted file mode 100644
index c6082ff9..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiOperations/Delete.php
+++ /dev/null
@@ -1,30 +0,0 @@
-instanceUrl();
- list($response, $opts) = $this->_request('delete', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiOperations/NestedResource.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiOperations/NestedResource.php
deleted file mode 100644
index 180cacd2..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiOperations/NestedResource.php
+++ /dev/null
@@ -1,135 +0,0 @@
-json, $opts);
- $obj->setLastResponse($response);
-
- return $obj;
- }
-
- /**
- * @param string $id
- * @param string $nestedPath
- * @param null|string $nestedId
- *
- * @return string
- */
- protected static function _nestedResourceUrl($id, $nestedPath, $nestedId = null)
- {
- $url = static::resourceUrl($id) . $nestedPath;
- if (null !== $nestedId) {
- $url .= "/{$nestedId}";
- }
-
- return $url;
- }
-
- /**
- * @param string $id
- * @param string $nestedPath
- * @param null|array $params
- * @param null|array|string $options
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\StripeObject
- */
- protected static function _createNestedResource($id, $nestedPath, $params = null, $options = null)
- {
- $url = static::_nestedResourceUrl($id, $nestedPath);
-
- return self::_nestedResourceOperation('post', $url, $params, $options);
- }
-
- /**
- * @param string $id
- * @param string $nestedPath
- * @param null|string $nestedId
- * @param null|array $params
- * @param null|array|string $options
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\StripeObject
- */
- protected static function _retrieveNestedResource($id, $nestedPath, $nestedId, $params = null, $options = null)
- {
- $url = static::_nestedResourceUrl($id, $nestedPath, $nestedId);
-
- return self::_nestedResourceOperation('get', $url, $params, $options);
- }
-
- /**
- * @param string $id
- * @param string $nestedPath
- * @param null|string $nestedId
- * @param null|array $params
- * @param null|array|string $options
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\StripeObject
- */
- protected static function _updateNestedResource($id, $nestedPath, $nestedId, $params = null, $options = null)
- {
- $url = static::_nestedResourceUrl($id, $nestedPath, $nestedId);
-
- return self::_nestedResourceOperation('post', $url, $params, $options);
- }
-
- /**
- * @param string $id
- * @param string $nestedPath
- * @param null|string $nestedId
- * @param null|array $params
- * @param null|array|string $options
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\StripeObject
- */
- protected static function _deleteNestedResource($id, $nestedPath, $nestedId, $params = null, $options = null)
- {
- $url = static::_nestedResourceUrl($id, $nestedPath, $nestedId);
-
- return self::_nestedResourceOperation('delete', $url, $params, $options);
- }
-
- /**
- * @param string $id
- * @param string $nestedPath
- * @param null|array $params
- * @param null|array|string $options
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\StripeObject
- */
- protected static function _allNestedResources($id, $nestedPath, $params = null, $options = null)
- {
- $url = static::_nestedResourceUrl($id, $nestedPath);
-
- return self::_nestedResourceOperation('get', $url, $params, $options);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiOperations/Request.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiOperations/Request.php
deleted file mode 100644
index a60ca796..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiOperations/Request.php
+++ /dev/null
@@ -1,100 +0,0 @@
- 100, "
- . "'currency' => 'usd', 'source' => 'tok_1234'])\")";
-
- throw new \Stripe\Exception\InvalidArgumentException($message);
- }
- }
-
- /**
- * @param string $method HTTP method ('get', 'post', etc.)
- * @param string $url URL for the request
- * @param array $params list of parameters for the request
- * @param null|array|string $options
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return array tuple containing (the JSON response, $options)
- */
- protected function _request($method, $url, $params = [], $options = null)
- {
- $opts = $this->_opts->merge($options);
- list($resp, $options) = static::_staticRequest($method, $url, $params, $opts);
- $this->setLastResponse($resp);
-
- return [$resp->json, $options];
- }
-
- /**
- * @param string $method HTTP method ('get', 'post', etc.)
- * @param string $url URL for the request
- * @param callable $readBodyChunk function that will receive chunks of data from a successful request body
- * @param array $params list of parameters for the request
- * @param null|array|string $options
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- */
- protected function _requestStream($method, $url, $readBodyChunk, $params = [], $options = null)
- {
- $opts = $this->_opts->merge($options);
- static::_staticStreamingRequest($method, $url, $readBodyChunk, $params, $opts);
- }
-
- /**
- * @param string $method HTTP method ('get', 'post', etc.)
- * @param string $url URL for the request
- * @param array $params list of parameters for the request
- * @param null|array|string $options
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return array tuple containing (the JSON response, $options)
- */
- protected static function _staticRequest($method, $url, $params, $options)
- {
- $opts = \Stripe\Util\RequestOptions::parse($options);
- $baseUrl = isset($opts->apiBase) ? $opts->apiBase : static::baseUrl();
- $requestor = new \Stripe\ApiRequestor($opts->apiKey, $baseUrl);
- list($response, $opts->apiKey) = $requestor->request($method, $url, $params, $opts->headers);
- $opts->discardNonPersistentHeaders();
-
- return [$response, $opts];
- }
-
- /**
- * @param string $method HTTP method ('get', 'post', etc.)
- * @param string $url URL for the request
- * @param callable $readBodyChunk function that will receive chunks of data from a successful request body
- * @param array $params list of parameters for the request
- * @param null|array|string $options
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- */
- protected static function _staticStreamingRequest($method, $url, $readBodyChunk, $params, $options)
- {
- $opts = \Stripe\Util\RequestOptions::parse($options);
- $baseUrl = isset($opts->apiBase) ? $opts->apiBase : static::baseUrl();
- $requestor = new \Stripe\ApiRequestor($opts->apiKey, $baseUrl);
- $requestor->requestStream($method, $url, $readBodyChunk, $params, $opts->headers);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiOperations/Retrieve.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiOperations/Retrieve.php
deleted file mode 100644
index 5170afb3..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiOperations/Retrieve.php
+++ /dev/null
@@ -1,30 +0,0 @@
-refresh();
-
- return $instance;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiOperations/Search.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiOperations/Search.php
deleted file mode 100644
index 09472eba..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiOperations/Search.php
+++ /dev/null
@@ -1,37 +0,0 @@
-json, $opts);
- if (!($obj instanceof \Stripe\SearchResult)) {
- throw new \Stripe\Exception\UnexpectedValueException(
- 'Expected type ' . \Stripe\SearchResult::class . ', got "' . \get_class($obj) . '" instead.'
- );
- }
- $obj->setLastResponse($response);
- $obj->setFilters($params);
-
- return $obj;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiOperations/Update.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiOperations/Update.php
deleted file mode 100644
index 688f0808..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiOperations/Update.php
+++ /dev/null
@@ -1,52 +0,0 @@
-json, $opts);
- $obj->setLastResponse($response);
-
- return $obj;
- }
-
- /**
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return static the saved resource
- */
- public function save($opts = null)
- {
- $params = $this->serializeParameters();
- if (\count($params) > 0) {
- $url = $this->instanceUrl();
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
- }
-
- return $this;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiRequestor.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiRequestor.php
deleted file mode 100644
index b2fa1923..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiRequestor.php
+++ /dev/null
@@ -1,619 +0,0 @@
-_apiKey = $apiKey;
- if (!$apiBase) {
- $apiBase = Stripe::$apiBase;
- }
- $this->_apiBase = $apiBase;
- }
-
- /**
- * Creates a telemetry json blob for use in 'X-Stripe-Client-Telemetry' headers.
- *
- * @static
- *
- * @param RequestTelemetry $requestTelemetry
- *
- * @return string
- */
- private static function _telemetryJson($requestTelemetry)
- {
- $payload = [
- 'last_request_metrics' => [
- 'request_id' => $requestTelemetry->requestId,
- 'request_duration_ms' => $requestTelemetry->requestDuration,
- ],
- ];
-
- $result = \json_encode($payload);
- if (false !== $result) {
- return $result;
- }
- Stripe::getLogger()->error('Serializing telemetry payload failed!');
-
- return '{}';
- }
-
- /**
- * @static
- *
- * @param ApiResource|array|bool|mixed $d
- *
- * @return ApiResource|array|mixed|string
- */
- private static function _encodeObjects($d)
- {
- if ($d instanceof ApiResource) {
- return Util\Util::utf8($d->id);
- }
- if (true === $d) {
- return 'true';
- }
- if (false === $d) {
- return 'false';
- }
- if (\is_array($d)) {
- $res = [];
- foreach ($d as $k => $v) {
- $res[$k] = self::_encodeObjects($v);
- }
-
- return $res;
- }
-
- return Util\Util::utf8($d);
- }
-
- /**
- * @param string $method
- * @param string $url
- * @param null|array $params
- * @param null|array $headers
- *
- * @throws Exception\ApiErrorException
- *
- * @return array tuple containing (ApiReponse, API key)
- */
- public function request($method, $url, $params = null, $headers = null)
- {
- $params = $params ?: [];
- $headers = $headers ?: [];
- list($rbody, $rcode, $rheaders, $myApiKey) =
- $this->_requestRaw($method, $url, $params, $headers);
- $json = $this->_interpretResponse($rbody, $rcode, $rheaders);
- $resp = new ApiResponse($rbody, $rcode, $rheaders, $json);
-
- return [$resp, $myApiKey];
- }
-
- /**
- * @param string $method
- * @param string $url
- * @param callable $readBodyChunkCallable
- * @param null|array $params
- * @param null|array $headers
- *
- * @throws Exception\ApiErrorException
- */
- public function requestStream($method, $url, $readBodyChunkCallable, $params = null, $headers = null)
- {
- $params = $params ?: [];
- $headers = $headers ?: [];
- list($rbody, $rcode, $rheaders, $myApiKey) =
- $this->_requestRawStreaming($method, $url, $params, $headers, $readBodyChunkCallable);
- if ($rcode >= 300) {
- $this->_interpretResponse($rbody, $rcode, $rheaders);
- }
- }
-
- /**
- * @param string $rbody a JSON string
- * @param int $rcode
- * @param array $rheaders
- * @param array $resp
- *
- * @throws Exception\UnexpectedValueException
- * @throws Exception\ApiErrorException
- */
- public function handleErrorResponse($rbody, $rcode, $rheaders, $resp)
- {
- if (!\is_array($resp) || !isset($resp['error'])) {
- $msg = "Invalid response object from API: {$rbody} "
- . "(HTTP response code was {$rcode})";
-
- throw new Exception\UnexpectedValueException($msg);
- }
-
- $errorData = $resp['error'];
-
- $error = null;
- if (\is_string($errorData)) {
- $error = self::_specificOAuthError($rbody, $rcode, $rheaders, $resp, $errorData);
- }
- if (!$error) {
- $error = self::_specificAPIError($rbody, $rcode, $rheaders, $resp, $errorData);
- }
-
- throw $error;
- }
-
- /**
- * @static
- *
- * @param string $rbody
- * @param int $rcode
- * @param array $rheaders
- * @param array $resp
- * @param array $errorData
- *
- * @return Exception\ApiErrorException
- */
- private static function _specificAPIError($rbody, $rcode, $rheaders, $resp, $errorData)
- {
- $msg = isset($errorData['message']) ? $errorData['message'] : null;
- $param = isset($errorData['param']) ? $errorData['param'] : null;
- $code = isset($errorData['code']) ? $errorData['code'] : null;
- $type = isset($errorData['type']) ? $errorData['type'] : null;
- $declineCode = isset($errorData['decline_code']) ? $errorData['decline_code'] : null;
-
- switch ($rcode) {
- case 400:
- // 'rate_limit' code is deprecated, but left here for backwards compatibility
- // for API versions earlier than 2015-09-08
- if ('rate_limit' === $code) {
- return Exception\RateLimitException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code, $param);
- }
- if ('idempotency_error' === $type) {
- return Exception\IdempotencyException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code);
- }
-
- // no break
- case 404:
- return Exception\InvalidRequestException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code, $param);
-
- case 401:
- return Exception\AuthenticationException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code);
-
- case 402:
- return Exception\CardException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code, $declineCode, $param);
-
- case 403:
- return Exception\PermissionException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code);
-
- case 429:
- return Exception\RateLimitException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code, $param);
-
- default:
- return Exception\UnknownApiErrorException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code);
- }
- }
-
- /**
- * @static
- *
- * @param bool|string $rbody
- * @param int $rcode
- * @param array $rheaders
- * @param array $resp
- * @param string $errorCode
- *
- * @return Exception\OAuth\OAuthErrorException
- */
- private static function _specificOAuthError($rbody, $rcode, $rheaders, $resp, $errorCode)
- {
- $description = isset($resp['error_description']) ? $resp['error_description'] : $errorCode;
-
- switch ($errorCode) {
- case 'invalid_client':
- return Exception\OAuth\InvalidClientException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode);
-
- case 'invalid_grant':
- return Exception\OAuth\InvalidGrantException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode);
-
- case 'invalid_request':
- return Exception\OAuth\InvalidRequestException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode);
-
- case 'invalid_scope':
- return Exception\OAuth\InvalidScopeException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode);
-
- case 'unsupported_grant_type':
- return Exception\OAuth\UnsupportedGrantTypeException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode);
-
- case 'unsupported_response_type':
- return Exception\OAuth\UnsupportedResponseTypeException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode);
-
- default:
- return Exception\OAuth\UnknownOAuthErrorException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode);
- }
- }
-
- /**
- * @static
- *
- * @param null|array $appInfo
- *
- * @return null|string
- */
- private static function _formatAppInfo($appInfo)
- {
- if (null !== $appInfo) {
- $string = $appInfo['name'];
- if (null !== $appInfo['version']) {
- $string .= '/' . $appInfo['version'];
- }
- if (null !== $appInfo['url']) {
- $string .= ' (' . $appInfo['url'] . ')';
- }
-
- return $string;
- }
-
- return null;
- }
-
- /**
- * @static
- *
- * @param string $disabledFunctionsOutput - String value of the 'disable_function' setting, as output by \ini_get('disable_functions')
- * @param string $functionName - Name of the function we are interesting in seeing whether or not it is disabled
- * @param mixed $disableFunctionsOutput
- *
- * @return bool
- */
- private static function _isDisabled($disableFunctionsOutput, $functionName)
- {
- $disabledFunctions = \explode(',', $disableFunctionsOutput);
- foreach ($disabledFunctions as $disabledFunction) {
- if (\trim($disabledFunction) === $functionName) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * @static
- *
- * @param string $apiKey
- * @param null $clientInfo
- *
- * @return array
- */
- private static function _defaultHeaders($apiKey, $clientInfo = null)
- {
- $uaString = 'Stripe/v1 PhpBindings/' . Stripe::VERSION;
-
- $langVersion = \PHP_VERSION;
- $uname_disabled = static::_isDisabled(\ini_get('disable_functions'), 'php_uname');
- $uname = $uname_disabled ? '(disabled)' : \php_uname();
-
- $appInfo = Stripe::getAppInfo();
- $ua = [
- 'bindings_version' => Stripe::VERSION,
- 'lang' => 'php',
- 'lang_version' => $langVersion,
- 'publisher' => 'stripe',
- 'uname' => $uname,
- ];
- if ($clientInfo) {
- $ua = \array_merge($clientInfo, $ua);
- }
- if (null !== $appInfo) {
- $uaString .= ' ' . self::_formatAppInfo($appInfo);
- $ua['application'] = $appInfo;
- }
-
- return [
- 'X-Stripe-Client-User-Agent' => \json_encode($ua),
- 'User-Agent' => $uaString,
- 'Authorization' => 'Bearer ' . $apiKey,
- ];
- }
-
- private function _prepareRequest($method, $url, $params, $headers)
- {
- $myApiKey = $this->_apiKey;
- if (!$myApiKey) {
- $myApiKey = Stripe::$apiKey;
- }
-
- if (!$myApiKey) {
- $msg = 'No API key provided. (HINT: set your API key using '
- . '"Stripe::setApiKey()". You can generate API keys from '
- . 'the Stripe web interface. See https://stripe.com/api for '
- . 'details, or email support@stripe.com if you have any questions.';
-
- throw new Exception\AuthenticationException($msg);
- }
-
- // Clients can supply arbitrary additional keys to be included in the
- // X-Stripe-Client-User-Agent header via the optional getUserAgentInfo()
- // method
- $clientUAInfo = null;
- if (\method_exists($this->httpClient(), 'getUserAgentInfo')) {
- $clientUAInfo = $this->httpClient()->getUserAgentInfo();
- }
-
- if ($params && \is_array($params)) {
- $optionKeysInParams = \array_filter(
- static::$OPTIONS_KEYS,
- function ($key) use ($params) {
- return \array_key_exists($key, $params);
- }
- );
- if (\count($optionKeysInParams) > 0) {
- $message = \sprintf('Options found in $params: %s. Options should '
- . 'be passed in their own array after $params. (HINT: pass an '
- . 'empty array to $params if you do not have any.)', \implode(', ', $optionKeysInParams));
- \trigger_error($message, \E_USER_WARNING);
- }
- }
-
- $absUrl = $this->_apiBase . $url;
- $params = self::_encodeObjects($params);
- $defaultHeaders = $this->_defaultHeaders($myApiKey, $clientUAInfo);
- if (Stripe::$apiVersion) {
- $defaultHeaders['Stripe-Version'] = Stripe::$apiVersion;
- }
-
- if (Stripe::$accountId) {
- $defaultHeaders['Stripe-Account'] = Stripe::$accountId;
- }
-
- if (Stripe::$enableTelemetry && null !== self::$requestTelemetry) {
- $defaultHeaders['X-Stripe-Client-Telemetry'] = self::_telemetryJson(self::$requestTelemetry);
- }
-
- $hasFile = false;
- foreach ($params as $k => $v) {
- if (\is_resource($v)) {
- $hasFile = true;
- $params[$k] = self::_processResourceParam($v);
- } elseif ($v instanceof \CURLFile) {
- $hasFile = true;
- }
- }
-
- if ($hasFile) {
- $defaultHeaders['Content-Type'] = 'multipart/form-data';
- } else {
- $defaultHeaders['Content-Type'] = 'application/x-www-form-urlencoded';
- }
-
- $combinedHeaders = \array_merge($defaultHeaders, $headers);
- $rawHeaders = [];
-
- foreach ($combinedHeaders as $header => $value) {
- $rawHeaders[] = $header . ': ' . $value;
- }
-
- return [$absUrl, $rawHeaders, $params, $hasFile, $myApiKey];
- }
-
- /**
- * @param string $method
- * @param string $url
- * @param array $params
- * @param array $headers
- *
- * @throws Exception\AuthenticationException
- * @throws Exception\ApiConnectionException
- *
- * @return array
- */
- private function _requestRaw($method, $url, $params, $headers)
- {
- list($absUrl, $rawHeaders, $params, $hasFile, $myApiKey) = $this->_prepareRequest($method, $url, $params, $headers);
-
- $requestStartMs = Util\Util::currentTimeMillis();
-
- list($rbody, $rcode, $rheaders) = $this->httpClient()->request(
- $method,
- $absUrl,
- $rawHeaders,
- $params,
- $hasFile
- );
-
- if (isset($rheaders['request-id'])
- && \is_string($rheaders['request-id'])
- && '' !== $rheaders['request-id']) {
- self::$requestTelemetry = new RequestTelemetry(
- $rheaders['request-id'],
- Util\Util::currentTimeMillis() - $requestStartMs
- );
- }
-
- return [$rbody, $rcode, $rheaders, $myApiKey];
- }
-
- /**
- * @param string $method
- * @param string $url
- * @param array $params
- * @param array $headers
- * @param callable $readBodyChunk
- * @param mixed $readBodyChunkCallable
- *
- * @throws Exception\AuthenticationException
- * @throws Exception\ApiConnectionException
- *
- * @return array
- */
- private function _requestRawStreaming($method, $url, $params, $headers, $readBodyChunkCallable)
- {
- list($absUrl, $rawHeaders, $params, $hasFile, $myApiKey) = $this->_prepareRequest($method, $url, $params, $headers);
-
- $requestStartMs = Util\Util::currentTimeMillis();
-
- list($rbody, $rcode, $rheaders) = $this->streamingHttpClient()->requestStream(
- $method,
- $absUrl,
- $rawHeaders,
- $params,
- $hasFile,
- $readBodyChunkCallable
- );
-
- if (isset($rheaders['request-id'])
- && \is_string($rheaders['request-id'])
- && '' !== $rheaders['request-id']) {
- self::$requestTelemetry = new RequestTelemetry(
- $rheaders['request-id'],
- Util\Util::currentTimeMillis() - $requestStartMs
- );
- }
-
- return [$rbody, $rcode, $rheaders, $myApiKey];
- }
-
- /**
- * @param resource $resource
- *
- * @throws Exception\InvalidArgumentException
- *
- * @return \CURLFile|string
- */
- private function _processResourceParam($resource)
- {
- if ('stream' !== \get_resource_type($resource)) {
- throw new Exception\InvalidArgumentException(
- 'Attempted to upload a resource that is not a stream'
- );
- }
-
- $metaData = \stream_get_meta_data($resource);
- if ('plainfile' !== $metaData['wrapper_type']) {
- throw new Exception\InvalidArgumentException(
- 'Only plainfile resource streams are supported'
- );
- }
-
- // We don't have the filename or mimetype, but the API doesn't care
- return new \CURLFile($metaData['uri']);
- }
-
- /**
- * @param string $rbody
- * @param int $rcode
- * @param array $rheaders
- *
- * @throws Exception\UnexpectedValueException
- * @throws Exception\ApiErrorException
- *
- * @return array
- */
- private function _interpretResponse($rbody, $rcode, $rheaders)
- {
- $resp = \json_decode($rbody, true);
- $jsonError = \json_last_error();
- if (null === $resp && \JSON_ERROR_NONE !== $jsonError) {
- $msg = "Invalid response body from API: {$rbody} "
- . "(HTTP response code was {$rcode}, json_last_error() was {$jsonError})";
-
- throw new Exception\UnexpectedValueException($msg, $rcode);
- }
-
- if ($rcode < 200 || $rcode >= 300) {
- $this->handleErrorResponse($rbody, $rcode, $rheaders, $resp);
- }
-
- return $resp;
- }
-
- /**
- * @static
- *
- * @param HttpClient\ClientInterface $client
- */
- public static function setHttpClient($client)
- {
- self::$_httpClient = $client;
- }
-
- /**
- * @static
- *
- * @param HttpClient\StreamingClientInterface $client
- */
- public static function setStreamingHttpClient($client)
- {
- self::$_streamingHttpClient = $client;
- }
-
- /**
- * @static
- *
- * Resets any stateful telemetry data
- */
- public static function resetTelemetry()
- {
- self::$requestTelemetry = null;
- }
-
- /**
- * @return HttpClient\ClientInterface
- */
- private function httpClient()
- {
- if (!self::$_httpClient) {
- self::$_httpClient = HttpClient\CurlClient::instance();
- }
-
- return self::$_httpClient;
- }
-
- /**
- * @return HttpClient\StreamingClientInterface
- */
- private function streamingHttpClient()
- {
- if (!self::$_streamingHttpClient) {
- self::$_streamingHttpClient = HttpClient\CurlClient::instance();
- }
-
- return self::$_streamingHttpClient;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiResource.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiResource.php
deleted file mode 100644
index 25c6b84a..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiResource.php
+++ /dev/null
@@ -1,122 +0,0 @@
-{$k};
- if ((static::getSavedNestedResources()->includes($k))
- && ($v instanceof ApiResource)) {
- $v->saveWithParent = true;
- }
- }
-
- /**
- * @throws Exception\ApiErrorException
- *
- * @return ApiResource the refreshed resource
- */
- public function refresh()
- {
- $requestor = new ApiRequestor($this->_opts->apiKey, static::baseUrl());
- $url = $this->instanceUrl();
-
- list($response, $this->_opts->apiKey) = $requestor->request(
- 'get',
- $url,
- $this->_retrieveOptions,
- $this->_opts->headers
- );
- $this->setLastResponse($response);
- $this->refreshFrom($response->json, $this->_opts);
-
- return $this;
- }
-
- /**
- * @return string the base URL for the given class
- */
- public static function baseUrl()
- {
- return Stripe::$apiBase;
- }
-
- /**
- * @return string the endpoint URL for the given class
- */
- public static function classUrl()
- {
- // Replace dots with slashes for namespaced resources, e.g. if the object's name is
- // "foo.bar", then its URL will be "/v1/foo/bars".
-
- /** @phpstan-ignore-next-line */
- $base = \str_replace('.', '/', static::OBJECT_NAME);
-
- return "/v1/{$base}s";
- }
-
- /**
- * @param null|string $id the ID of the resource
- *
- * @throws Exception\UnexpectedValueException if $id is null
- *
- * @return string the instance endpoint URL for the given class
- */
- public static function resourceUrl($id)
- {
- if (null === $id) {
- $class = static::class;
- $message = 'Could not determine which URL to request: '
- . "{$class} instance has invalid ID: {$id}";
-
- throw new Exception\UnexpectedValueException($message);
- }
- $id = Util\Util::utf8($id);
- $base = static::classUrl();
- $extn = \urlencode($id);
-
- return "{$base}/{$extn}";
- }
-
- /**
- * @return string the full API URL for this API resource
- */
- public function instanceUrl()
- {
- return static::resourceUrl($this['id']);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiResponse.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiResponse.php
deleted file mode 100644
index e7ee2e9a..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApiResponse.php
+++ /dev/null
@@ -1,45 +0,0 @@
-body = $body;
- $this->code = $code;
- $this->headers = $headers;
- $this->json = $json;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApplePayDomain.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApplePayDomain.php
deleted file mode 100644
index 5f9489d4..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApplePayDomain.php
+++ /dev/null
@@ -1,31 +0,0 @@
-true if the object exists in live mode or the value false if the object exists in test mode.
- */
-class ApplePayDomain extends ApiResource
-{
- const OBJECT_NAME = 'apple_pay_domain';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Delete;
- use ApiOperations\Retrieve;
-
- /**
- * @return string The class URL for this resource. It needs to be special
- * cased because it doesn't fit into the standard resource pattern.
- */
- public static function classUrl()
- {
- return '/v1/apple_pay/domains';
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApplicationFee.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApplicationFee.php
deleted file mode 100644
index 2a53204a..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApplicationFee.php
+++ /dev/null
@@ -1,90 +0,0 @@
-ISO currency code, in lowercase. Must be a supported currency.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|string|\Stripe\Charge $originating_transaction ID of the corresponding charge on the platform account, if this fee was the result of a charge using the destination parameter.
- * @property bool $refunded Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false.
- * @property \Stripe\Collection<\Stripe\StripeObject> $refunds A list of refunds that have been applied to the fee.
- */
-class ApplicationFee extends ApiResource
-{
- const OBJECT_NAME = 'application_fee';
-
- use ApiOperations\All;
- use ApiOperations\NestedResource;
- use ApiOperations\Retrieve;
-
- const PATH_REFUNDS = '/refunds';
-
- /**
- * @param string $id the ID of the application fee on which to retrieve the fee refunds
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\ApplicationFeeRefund> the list of fee refunds
- */
- public static function allRefunds($id, $params = null, $opts = null)
- {
- return self::_allNestedResources($id, static::PATH_REFUNDS, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the application fee on which to create the fee refund
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\ApplicationFeeRefund
- */
- public static function createRefund($id, $params = null, $opts = null)
- {
- return self::_createNestedResource($id, static::PATH_REFUNDS, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the application fee to which the fee refund belongs
- * @param string $refundId the ID of the fee refund to retrieve
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\ApplicationFeeRefund
- */
- public static function retrieveRefund($id, $refundId, $params = null, $opts = null)
- {
- return self::_retrieveNestedResource($id, static::PATH_REFUNDS, $refundId, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the application fee to which the fee refund belongs
- * @param string $refundId the ID of the fee refund to update
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\ApplicationFeeRefund
- */
- public static function updateRefund($id, $refundId, $params = null, $opts = null)
- {
- return self::_updateNestedResource($id, static::PATH_REFUNDS, $refundId, $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApplicationFeeRefund.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApplicationFeeRefund.php
deleted file mode 100644
index dc7c34ba..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ApplicationFeeRefund.php
+++ /dev/null
@@ -1,66 +0,0 @@
-Application Fee Refund objects allow you to refund an application
- * fee that has previously been created but not yet refunded. Funds will be
- * refunded to the Stripe account from which the fee was originally collected.
- *
- * Related guide: Refunding
- * Application Fees.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount Amount, in %s.
- * @property null|string|\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact on your account balance.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property string|\Stripe\ApplicationFee $fee ID of the application fee that was refunded.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- */
-class ApplicationFeeRefund extends ApiResource
-{
- const OBJECT_NAME = 'fee_refund';
-
- use ApiOperations\Update {
- save as protected _save;
- }
-
- /**
- * @return string the API URL for this Stripe refund
- */
- public function instanceUrl()
- {
- $id = $this['id'];
- $fee = $this['fee'];
- if (!$id) {
- throw new Exception\UnexpectedValueException(
- 'Could not determine which URL to request: ' .
- "class instance has invalid ID: {$id}",
- null
- );
- }
- $id = Util\Util::utf8($id);
- $fee = Util\Util::utf8($fee);
-
- $base = ApplicationFee::classUrl();
- $feeExtn = \urlencode($fee);
- $extn = \urlencode($id);
-
- return "{$base}/{$feeExtn}/refunds/{$extn}";
- }
-
- /**
- * @param null|array|string $opts
- *
- * @return ApplicationFeeRefund the saved refund
- */
- public function save($opts = null)
- {
- return $this->_save($opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Balance.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Balance.php
deleted file mode 100644
index 0fdc2850..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Balance.php
+++ /dev/null
@@ -1,45 +0,0 @@
-transactions
- * that contributed to the balance (charges, payouts, and so forth).
- *
- * The available and pending amounts for each currency are broken down further by
- * payment source types.
- *
- * Related guide: Understanding Connect
- * Account Balances.
- *
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property \Stripe\StripeObject[] $available Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the Transfers API or Payouts API. The available balance for each currency and payment type can be found in the source_types property.
- * @property \Stripe\StripeObject[] $connect_reserved Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the source_types property.
- * @property \Stripe\StripeObject[] $instant_available Funds that can be paid out using Instant Payouts.
- * @property \Stripe\StripeObject $issuing
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject[] $pending Funds that are not yet available in the balance, due to the 7-day rolling pay cycle. The pending balance for each currency, and for each payment type, can be found in the source_types property.
- */
-class Balance extends SingletonApiResource
-{
- const OBJECT_NAME = 'balance';
-
- /**
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Balance
- */
- public static function retrieve($opts = null)
- {
- return self::_singletonRetrieve($opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/BalanceTransaction.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/BalanceTransaction.php
deleted file mode 100644
index d7ddea43..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/BalanceTransaction.php
+++ /dev/null
@@ -1,71 +0,0 @@
-Balance
- * Transaction Types.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount Gross amount of the transaction, in %s.
- * @property int $available_on The date the transaction's net funds will become available in the Stripe balance.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
- * @property null|float $exchange_rate The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the amount in currency A, times exchange_rate, would be the amount in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's amount would be 1000 and currency would be eur. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's amount would be 1234, currency would be usd, and exchange_rate would be 1.234.
- * @property int $fee Fees (in %s) paid for this transaction.
- * @property \Stripe\StripeObject[] $fee_details Detailed breakdown of fees (in %s) paid for this transaction.
- * @property int $net Net amount of the transaction, in %s.
- * @property string $reporting_category Learn more about how reporting categories can help you understand balance transactions from an accounting perspective.
- * @property null|string|\Stripe\StripeObject $source The Stripe object to which this transaction is related.
- * @property string $status If the transaction's net funds are available in the Stripe balance yet. Either available or pending.
- * @property string $type Transaction type: adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge, connect_collection_transfer, contribution, issuing_authorization_hold, issuing_authorization_release, issuing_dispute, issuing_transaction, payment, payment_failure_refund, payment_refund, payout, payout_cancel, payout_failure, refund, refund_failure, reserve_transaction, reserved_funds, stripe_fee, stripe_fx_fee, tax_fee, topup, topup_reversal, transfer, transfer_cancel, transfer_failure, or transfer_refund. Learn more about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider reporting_category instead.
- */
-class BalanceTransaction extends ApiResource
-{
- const OBJECT_NAME = 'balance_transaction';
-
- use ApiOperations\All;
- use ApiOperations\Retrieve;
-
- const TYPE_ADJUSTMENT = 'adjustment';
- const TYPE_ADVANCE = 'advance';
- const TYPE_ADVANCE_FUNDING = 'advance_funding';
- const TYPE_ANTICIPATION_REPAYMENT = 'anticipation_repayment';
- const TYPE_APPLICATION_FEE = 'application_fee';
- const TYPE_APPLICATION_FEE_REFUND = 'application_fee_refund';
- const TYPE_CHARGE = 'charge';
- const TYPE_CONNECT_COLLECTION_TRANSFER = 'connect_collection_transfer';
- const TYPE_CONTRIBUTION = 'contribution';
- const TYPE_ISSUING_AUTHORIZATION_HOLD = 'issuing_authorization_hold';
- const TYPE_ISSUING_AUTHORIZATION_RELEASE = 'issuing_authorization_release';
- const TYPE_ISSUING_DISPUTE = 'issuing_dispute';
- const TYPE_ISSUING_TRANSACTION = 'issuing_transaction';
- const TYPE_PAYMENT = 'payment';
- const TYPE_PAYMENT_FAILURE_REFUND = 'payment_failure_refund';
- const TYPE_PAYMENT_REFUND = 'payment_refund';
- const TYPE_PAYOUT = 'payout';
- const TYPE_PAYOUT_CANCEL = 'payout_cancel';
- const TYPE_PAYOUT_FAILURE = 'payout_failure';
- const TYPE_REFUND = 'refund';
- const TYPE_REFUND_FAILURE = 'refund_failure';
- const TYPE_RESERVE_TRANSACTION = 'reserve_transaction';
- const TYPE_RESERVED_FUNDS = 'reserved_funds';
- const TYPE_STRIPE_FEE = 'stripe_fee';
- const TYPE_STRIPE_FX_FEE = 'stripe_fx_fee';
- const TYPE_TAX_FEE = 'tax_fee';
- const TYPE_TOPUP = 'topup';
- const TYPE_TOPUP_REVERSAL = 'topup_reversal';
- const TYPE_TRANSFER = 'transfer';
- const TYPE_TRANSFER_CANCEL = 'transfer_cancel';
- const TYPE_TRANSFER_FAILURE = 'transfer_failure';
- const TYPE_TRANSFER_REFUND = 'transfer_refund';
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/BankAccount.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/BankAccount.php
deleted file mode 100644
index 57fd19be..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/BankAccount.php
+++ /dev/null
@@ -1,133 +0,0 @@
-Customer objects.
- *
- * On the other hand External Accounts are
- * transfer destinations on Account objects for Custom accounts. They
- * can be bank accounts or debit cards as well, and are documented in the links
- * above.
- *
- * Related guide: Bank Debits and
- * Transfers.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|string|\Stripe\Account $account The ID of the account that the bank account is associated with.
- * @property null|string $account_holder_name The name of the person or business that owns the bank account.
- * @property null|string $account_holder_type The type of entity that holds the account. This can be either individual or company.
- * @property null|string $account_type The bank account type. This can only be checking or savings in most countries. In Japan, this can only be futsu or toza.
- * @property null|string[] $available_payout_methods A set of available payout methods for this bank account. Only values from this set should be passed as the method when creating a payout.
- * @property null|string $bank_name Name of the bank associated with the routing number (e.g., WELLS FARGO).
- * @property string $country Two-letter ISO code representing the country the bank account is located in.
- * @property string $currency Three-letter ISO code for the currency paid out to the bank account.
- * @property null|string|\Stripe\Customer $customer The ID of the customer that the bank account is associated with.
- * @property null|bool $default_for_currency Whether this bank account is the default external account for its currency.
- * @property null|string $fingerprint Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
- * @property string $last4 The last four digits of the bank account number.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|string $routing_number The routing transit number for the bank account.
- * @property string $status
For bank accounts, possible values are new, validated, verified, verification_failed, or errored. A bank account that hasn't had any activity or validation performed is new. If Stripe can determine that the bank account exists, its status will be validated. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be verified. If the verification failed for any reason, such as microdeposit failure, the status will be verification_failed. If a transfer sent to this bank account fails, we'll set the status to errored and will not continue to send transfers until the bank details are updated.
For external accounts, possible values are new and errored. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to errored and transfers are stopped until account details are updated.
- */
-class BankAccount extends ApiResource
-{
- const OBJECT_NAME = 'bank_account';
-
- use ApiOperations\Delete;
- use ApiOperations\Update;
-
- /**
- * Possible string representations of the bank verification status.
- *
- * @see https://stripe.com/docs/api/external_account_bank_accounts/object#account_bank_account_object-status
- */
- const STATUS_NEW = 'new';
- const STATUS_VALIDATED = 'validated';
- const STATUS_VERIFIED = 'verified';
- const STATUS_VERIFICATION_FAILED = 'verification_failed';
- const STATUS_ERRORED = 'errored';
-
- /**
- * @return string The instance URL for this resource. It needs to be special
- * cased because it doesn't fit into the standard resource pattern.
- */
- public function instanceUrl()
- {
- if ($this['customer']) {
- $base = Customer::classUrl();
- $parent = $this['customer'];
- $path = 'sources';
- } elseif ($this['account']) {
- $base = Account::classUrl();
- $parent = $this['account'];
- $path = 'external_accounts';
- } else {
- $msg = 'Bank accounts cannot be accessed without a customer ID or account ID.';
-
- throw new Exception\UnexpectedValueException($msg, null);
- }
- $parentExtn = \urlencode(Util\Util::utf8($parent));
- $extn = \urlencode(Util\Util::utf8($this['id']));
-
- return "{$base}/{$parentExtn}/{$path}/{$extn}";
- }
-
- /**
- * @param array|string $_id
- * @param null|array|string $_opts
- *
- * @throws \Stripe\Exception\BadMethodCallException
- */
- public static function retrieve($_id, $_opts = null)
- {
- $msg = 'Bank accounts cannot be retrieved without a customer ID or ' .
- 'an account ID. Retrieve a bank account using ' .
- "`Customer::retrieveSource('customer_id', " .
- "'bank_account_id')` or `Account::retrieveExternalAccount(" .
- "'account_id', 'bank_account_id')`.";
-
- throw new Exception\BadMethodCallException($msg);
- }
-
- /**
- * @param string $_id
- * @param null|array $_params
- * @param null|array|string $_options
- *
- * @throws \Stripe\Exception\BadMethodCallException
- */
- public static function update($_id, $_params = null, $_options = null)
- {
- $msg = 'Bank accounts cannot be updated without a customer ID or an ' .
- 'account ID. Update a bank account using ' .
- "`Customer::updateSource('customer_id', 'bank_account_id', " .
- '$updateParams)` or `Account::updateExternalAccount(' .
- "'account_id', 'bank_account_id', \$updateParams)`.";
-
- throw new Exception\BadMethodCallException($msg);
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return BankAccount the verified bank account
- */
- public function verify($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/verify';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/BaseStripeClient.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/BaseStripeClient.php
deleted file mode 100644
index b0b2e7e5..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/BaseStripeClient.php
+++ /dev/null
@@ -1,312 +0,0 @@
- */
- private $config;
-
- /** @var \Stripe\Util\RequestOptions */
- private $defaultOpts;
-
- /**
- * Initializes a new instance of the {@link BaseStripeClient} class.
- *
- * The constructor takes a single argument. The argument can be a string, in which case it
- * should be the API key. It can also be an array with various configuration settings.
- *
- * Configuration settings include the following options:
- *
- * - api_key (null|string): the Stripe API key, to be used in regular API requests.
- * - client_id (null|string): the Stripe client ID, to be used in OAuth requests.
- * - stripe_account (null|string): a Stripe account ID. If set, all requests sent by the client
- * will automatically use the {@code Stripe-Account} header with that account ID.
- * - stripe_version (null|string): a Stripe API verion. If set, all requests sent by the client
- * will include the {@code Stripe-Version} header with that API version.
- *
- * The following configuration settings are also available, though setting these should rarely be necessary
- * (only useful if you want to send requests to a mock server like stripe-mock):
- *
- * - api_base (string): the base URL for regular API requests. Defaults to
- * {@link DEFAULT_API_BASE}.
- * - connect_base (string): the base URL for OAuth requests. Defaults to
- * {@link DEFAULT_CONNECT_BASE}.
- * - files_base (string): the base URL for file creation requests. Defaults to
- * {@link DEFAULT_FILES_BASE}.
- *
- * @param array|string $config the API key as a string, or an array containing
- * the client configuration settings
- */
- public function __construct($config = [])
- {
- if (\is_string($config)) {
- $config = ['api_key' => $config];
- } elseif (!\is_array($config)) {
- throw new \Stripe\Exception\InvalidArgumentException('$config must be a string or an array');
- }
-
- $config = \array_merge($this->getDefaultConfig(), $config);
- $this->validateConfig($config);
-
- $this->config = $config;
-
- $this->defaultOpts = \Stripe\Util\RequestOptions::parse([
- 'stripe_account' => $config['stripe_account'],
- 'stripe_version' => $config['stripe_version'],
- ]);
- }
-
- /**
- * Gets the API key used by the client to send requests.
- *
- * @return null|string the API key used by the client to send requests
- */
- public function getApiKey()
- {
- return $this->config['api_key'];
- }
-
- /**
- * Gets the client ID used by the client in OAuth requests.
- *
- * @return null|string the client ID used by the client in OAuth requests
- */
- public function getClientId()
- {
- return $this->config['client_id'];
- }
-
- /**
- * Gets the base URL for Stripe's API.
- *
- * @return string the base URL for Stripe's API
- */
- public function getApiBase()
- {
- return $this->config['api_base'];
- }
-
- /**
- * Gets the base URL for Stripe's OAuth API.
- *
- * @return string the base URL for Stripe's OAuth API
- */
- public function getConnectBase()
- {
- return $this->config['connect_base'];
- }
-
- /**
- * Gets the base URL for Stripe's Files API.
- *
- * @return string the base URL for Stripe's Files API
- */
- public function getFilesBase()
- {
- return $this->config['files_base'];
- }
-
- /**
- * Sends a request to Stripe's API.
- *
- * @param string $method the HTTP method
- * @param string $path the path of the request
- * @param array $params the parameters of the request
- * @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request
- *
- * @return \Stripe\StripeObject the object returned by Stripe's API
- */
- public function request($method, $path, $params, $opts)
- {
- $opts = $this->defaultOpts->merge($opts, true);
- $baseUrl = $opts->apiBase ?: $this->getApiBase();
- $requestor = new \Stripe\ApiRequestor($this->apiKeyForRequest($opts), $baseUrl);
- list($response, $opts->apiKey) = $requestor->request($method, $path, $params, $opts->headers);
- $opts->discardNonPersistentHeaders();
- $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
- $obj->setLastResponse($response);
-
- return $obj;
- }
-
- /**
- * Sends a request to Stripe's API, passing chunks of the streamed response
- * into a user-provided $readBodyChunkCallable callback.
- *
- * @param string $method the HTTP method
- * @param string $path the path of the request
- * @param callable $readBodyChunkCallable a function that will be called
- * @param array $params the parameters of the request
- * @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request
- * with chunks of bytes from the body if the request is successful
- */
- public function requestStream($method, $path, $readBodyChunkCallable, $params, $opts)
- {
- $opts = $this->defaultOpts->merge($opts, true);
- $baseUrl = $opts->apiBase ?: $this->getApiBase();
- $requestor = new \Stripe\ApiRequestor($this->apiKeyForRequest($opts), $baseUrl);
- list($response, $opts->apiKey) = $requestor->requestStream($method, $path, $readBodyChunkCallable, $params, $opts->headers);
- }
-
- /**
- * Sends a request to Stripe's API.
- *
- * @param string $method the HTTP method
- * @param string $path the path of the request
- * @param array $params the parameters of the request
- * @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request
- *
- * @return \Stripe\Collection of ApiResources
- */
- public function requestCollection($method, $path, $params, $opts)
- {
- $obj = $this->request($method, $path, $params, $opts);
- if (!($obj instanceof \Stripe\Collection)) {
- $received_class = \get_class($obj);
- $msg = "Expected to receive `Stripe\\Collection` object from Stripe API. Instead received `{$received_class}`.";
-
- throw new \Stripe\Exception\UnexpectedValueException($msg);
- }
- $obj->setFilters($params);
-
- return $obj;
- }
-
- /**
- * Sends a request to Stripe's API.
- *
- * @param string $method the HTTP method
- * @param string $path the path of the request
- * @param array $params the parameters of the request
- * @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request
- *
- * @return \Stripe\SearchResult of ApiResources
- */
- public function requestSearchResult($method, $path, $params, $opts)
- {
- $obj = $this->request($method, $path, $params, $opts);
- if (!($obj instanceof \Stripe\SearchResult)) {
- $received_class = \get_class($obj);
- $msg = "Expected to receive `Stripe\\SearchResult` object from Stripe API. Instead received `{$received_class}`.";
-
- throw new \Stripe\Exception\UnexpectedValueException($msg);
- }
- $obj->setFilters($params);
-
- return $obj;
- }
-
- /**
- * @param \Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\AuthenticationException
- *
- * @return string
- */
- private function apiKeyForRequest($opts)
- {
- $apiKey = $opts->apiKey ?: $this->getApiKey();
-
- if (null === $apiKey) {
- $msg = 'No API key provided. Set your API key when constructing the '
- . 'StripeClient instance, or provide it on a per-request basis '
- . 'using the `api_key` key in the $opts argument.';
-
- throw new \Stripe\Exception\AuthenticationException($msg);
- }
-
- return $apiKey;
- }
-
- /**
- * TODO: replace this with a private constant when we drop support for PHP < 5.
- *
- * @return array
- */
- private function getDefaultConfig()
- {
- return [
- 'api_key' => null,
- 'client_id' => null,
- 'stripe_account' => null,
- 'stripe_version' => null,
- 'api_base' => self::DEFAULT_API_BASE,
- 'connect_base' => self::DEFAULT_CONNECT_BASE,
- 'files_base' => self::DEFAULT_FILES_BASE,
- ];
- }
-
- /**
- * @param array $config
- *
- * @throws \Stripe\Exception\InvalidArgumentException
- */
- private function validateConfig($config)
- {
- // api_key
- if (null !== $config['api_key'] && !\is_string($config['api_key'])) {
- throw new \Stripe\Exception\InvalidArgumentException('api_key must be null or a string');
- }
-
- if (null !== $config['api_key'] && ('' === $config['api_key'])) {
- $msg = 'api_key cannot be the empty string';
-
- throw new \Stripe\Exception\InvalidArgumentException($msg);
- }
-
- if (null !== $config['api_key'] && (\preg_match('/\s/', $config['api_key']))) {
- $msg = 'api_key cannot contain whitespace';
-
- throw new \Stripe\Exception\InvalidArgumentException($msg);
- }
-
- // client_id
- if (null !== $config['client_id'] && !\is_string($config['client_id'])) {
- throw new \Stripe\Exception\InvalidArgumentException('client_id must be null or a string');
- }
-
- // stripe_account
- if (null !== $config['stripe_account'] && !\is_string($config['stripe_account'])) {
- throw new \Stripe\Exception\InvalidArgumentException('stripe_account must be null or a string');
- }
-
- // stripe_version
- if (null !== $config['stripe_version'] && !\is_string($config['stripe_version'])) {
- throw new \Stripe\Exception\InvalidArgumentException('stripe_version must be null or a string');
- }
-
- // api_base
- if (!\is_string($config['api_base'])) {
- throw new \Stripe\Exception\InvalidArgumentException('api_base must be a string');
- }
-
- // connect_base
- if (!\is_string($config['connect_base'])) {
- throw new \Stripe\Exception\InvalidArgumentException('connect_base must be a string');
- }
-
- // files_base
- if (!\is_string($config['files_base'])) {
- throw new \Stripe\Exception\InvalidArgumentException('files_base must be a string');
- }
-
- // check absence of extra keys
- $extraConfigKeys = \array_diff(\array_keys($config), \array_keys($this->getDefaultConfig()));
- if (!empty($extraConfigKeys)) {
- // Wrap in single quote to more easily catch trailing spaces errors
- $invalidKeys = "'" . \implode("', '", $extraConfigKeys) . "'";
-
- throw new \Stripe\Exception\InvalidArgumentException('Found unknown key(s) in configuration array: ' . $invalidKeys);
- }
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/BaseStripeClientInterface.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/BaseStripeClientInterface.php
deleted file mode 100644
index 6b004573..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/BaseStripeClientInterface.php
+++ /dev/null
@@ -1,44 +0,0 @@
-overriden when creating the session.
- * @property \Stripe\StripeObject $features
- * @property bool $is_default Whether the configuration is the default. If true, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch.
- */
-class Configuration extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'billing_portal.configuration';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/BillingPortal/Session.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/BillingPortal/Session.php
deleted file mode 100644
index 5cec9a40..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/BillingPortal/Session.php
+++ /dev/null
@@ -1,41 +0,0 @@
-integration
- * guide.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property string|\Stripe\BillingPortal\Configuration $configuration The configuration used by this session, describing the features available.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $customer The ID of the customer for this session.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|string $locale The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s preferred_locales or browser’s locale is used.
- * @property null|string $on_behalf_of The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this on_behalf_of account appear in the portal. For more information, see the docs. Use the Accounts API to modify the on_behalf_of account's branding settings, which the portal displays.
- * @property string $return_url The URL to redirect customers to when they click on the portal's link to return to your website.
- * @property string $url The short-lived URL of the session that gives customers access to the customer portal.
- */
-class Session extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'billing_portal.session';
-
- use \Stripe\ApiOperations\Create;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/BitcoinReceiver.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/BitcoinReceiver.php
deleted file mode 100644
index 1a0353b4..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/BitcoinReceiver.php
+++ /dev/null
@@ -1,71 +0,0 @@
-currency that you are collecting as payment.
- * @property int $amount_received The amount of currency to which bitcoin_amount_received has been converted.
- * @property int $bitcoin_amount The amount of bitcoin that the customer should send to fill the receiver. The bitcoin_amount is denominated in Satoshi: there are 10^8 Satoshi in one bitcoin.
- * @property int $bitcoin_amount_received The amount of bitcoin that has been sent by the customer to this receiver.
- * @property string $bitcoin_uri This URI can be displayed to the customer as a clickable link (to activate their bitcoin client) or as a QR code (for mobile wallets).
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO code for the currency to which the bitcoin will be converted.
- * @property null|string $customer The customer ID of the bitcoin receiver.
- * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
- * @property null|string $email The customer's email address, set by the API call that creates the receiver.
- * @property bool $filled This flag is initially false and updates to true when the customer sends the bitcoin_amount to this receiver.
- * @property string $inbound_address A bitcoin address that is specific to this receiver. The customer can send bitcoin to this address to fill the receiver.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|string $payment The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key.
- * @property null|string $refund_address The refund address of this bitcoin receiver.
- * @property \Stripe\Collection<\Stripe\BitcoinTransaction> $transactions A list with one entry for each time that the customer sent bitcoin to the receiver. Hidden when viewing the receiver with a publishable key.
- * @property bool $uncaptured_funds This receiver contains uncaptured funds that can be used for a payment or refunded.
- * @property null|bool $used_for_payment Indicate if this source is used for payment.
- */
-class BitcoinReceiver extends ApiResource
-{
- const OBJECT_NAME = 'bitcoin_receiver';
-
- use ApiOperations\All;
- use ApiOperations\Retrieve;
-
- /**
- * @return string The class URL for this resource. It needs to be special
- * cased because it doesn't fit into the standard resource pattern.
- */
- public static function classUrl()
- {
- return '/v1/bitcoin/receivers';
- }
-
- /**
- * @return string The instance URL for this resource. It needs to be special
- * cased because it doesn't fit into the standard resource pattern.
- */
- public function instanceUrl()
- {
- if ($this['customer']) {
- $base = Customer::classUrl();
- $parent = $this['customer'];
- $path = 'sources';
- $parentExtn = \urlencode(Util\Util::utf8($parent));
- $extn = \urlencode(Util\Util::utf8($this['id']));
-
- return "{$base}/{$parentExtn}/{$path}/{$extn}";
- }
-
- $base = BitcoinReceiver::classUrl();
- $extn = \urlencode(Util\Util::utf8($this['id']));
-
- return "{$base}/{$extn}";
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/BitcoinTransaction.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/BitcoinTransaction.php
deleted file mode 100644
index 3aa71185..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/BitcoinTransaction.php
+++ /dev/null
@@ -1,19 +0,0 @@
-currency that the transaction was converted to in real-time.
- * @property int $bitcoin_amount The amount of bitcoin contained in the transaction.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO code for the currency to which this transaction was converted.
- * @property string $receiver The receiver to which this transaction was sent.
- */
-class BitcoinTransaction extends ApiResource
-{
- const OBJECT_NAME = 'bitcoin_transaction';
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Capability.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Capability.php
deleted file mode 100644
index f675d719..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Capability.php
+++ /dev/null
@@ -1,88 +0,0 @@
-Account
- * capabilities.
- *
- * @property string $id The identifier for the capability.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property string|\Stripe\Account $account The account for which the capability enables functionality.
- * @property \Stripe\StripeObject $future_requirements
- * @property bool $requested Whether the capability has been requested.
- * @property null|int $requested_at Time at which the capability was requested. Measured in seconds since the Unix epoch.
- * @property \Stripe\StripeObject $requirements
- * @property string $status The status of the capability. Can be active, inactive, pending, or unrequested.
- */
-class Capability extends ApiResource
-{
- const OBJECT_NAME = 'capability';
-
- use ApiOperations\Update;
-
- const STATUS_ACTIVE = 'active';
- const STATUS_INACTIVE = 'inactive';
- const STATUS_PENDING = 'pending';
- const STATUS_UNREQUESTED = 'unrequested';
-
- /**
- * @return string the API URL for this Stripe account reversal
- */
- public function instanceUrl()
- {
- $id = $this['id'];
- $account = $this['account'];
- if (!$id) {
- throw new Exception\UnexpectedValueException(
- 'Could not determine which URL to request: ' .
- "class instance has invalid ID: {$id}",
- null
- );
- }
- $id = Util\Util::utf8($id);
- $account = Util\Util::utf8($account);
-
- $base = Account::classUrl();
- $accountExtn = \urlencode($account);
- $extn = \urlencode($id);
-
- return "{$base}/{$accountExtn}/capabilities/{$extn}";
- }
-
- /**
- * @param array|string $_id
- * @param null|array|string $_opts
- *
- * @throws \Stripe\Exception\BadMethodCallException
- */
- public static function retrieve($_id, $_opts = null)
- {
- $msg = 'Capabilities cannot be retrieved without an account ID. ' .
- 'Retrieve a capability using `Account::retrieveCapability(' .
- "'account_id', 'capability_id')`.";
-
- throw new Exception\BadMethodCallException($msg);
- }
-
- /**
- * @param string $_id
- * @param null|array $_params
- * @param null|array|string $_options
- *
- * @throws \Stripe\Exception\BadMethodCallException
- */
- public static function update($_id, $_params = null, $_options = null)
- {
- $msg = 'Capabilities cannot be updated without an account ID. ' .
- 'Update a capability using `Account::updateCapability(' .
- "'account_id', 'capability_id', \$updateParams)`.";
-
- throw new Exception\BadMethodCallException($msg);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Card.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Card.php
deleted file mode 100644
index ba0e6fed..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Card.php
+++ /dev/null
@@ -1,143 +0,0 @@
-Card Payments
- * with Sources.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|string|\Stripe\Account $account The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead.
- * @property null|string $address_city City/District/Suburb/Town/Village.
- * @property null|string $address_country Billing address country, if provided when creating card.
- * @property null|string $address_line1 Address line 1 (Street address/PO Box/Company name).
- * @property null|string $address_line1_check If address_line1 was provided, results of the check: pass, fail, unavailable, or unchecked.
- * @property null|string $address_line2 Address line 2 (Apartment/Suite/Unit/Building).
- * @property null|string $address_state State/County/Province/Region.
- * @property null|string $address_zip ZIP or postal code.
- * @property null|string $address_zip_check If address_zip was provided, results of the check: pass, fail, unavailable, or unchecked.
- * @property null|string[] $available_payout_methods A set of available payout methods for this card. Only values from this set should be passed as the method when creating a payout.
- * @property string $brand Card brand. Can be American Express, Diners Club, Discover, JCB, MasterCard, UnionPay, Visa, or Unknown.
- * @property null|string $country Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
- * @property null|string $currency Three-letter ISO code for currency. Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency.
- * @property null|string|\Stripe\Customer $customer The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead.
- * @property null|string $cvc_check If a CVC was provided, results of the check: pass, fail, unavailable, or unchecked. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see Check if a card is valid without a charge.
- * @property null|bool $default_for_currency Whether this card is the default external account for its currency.
- * @property null|string $dynamic_last4 (For tokenized numbers only.) The last four digits of the device account number.
- * @property int $exp_month Two-digit number representing the card's expiration month.
- * @property int $exp_year Four-digit number representing the card's expiration year.
- * @property null|string $fingerprint
Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.
- * @property string $funding Card funding type. Can be credit, debit, prepaid, or unknown.
- * @property string $last4 The last four digits of the card.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|string $name Cardholder name.
- * @property null|string|\Stripe\Recipient $recipient The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead.
- * @property null|string $status For external accounts, possible values are new and errored. If a transfer fails, the status is set to errored and transfers are stopped until account details are updated.
- * @property null|string $tokenization_method If the card number is tokenized, this is the method that was used. Can be android_pay (includes Google Pay), apple_pay, masterpass, visa_checkout, or null.
- */
-class Card extends ApiResource
-{
- const OBJECT_NAME = 'card';
-
- use ApiOperations\Delete;
- use ApiOperations\Update;
-
- /**
- * Possible string representations of the CVC check status.
- *
- * @see https://stripe.com/docs/api/cards/object#card_object-cvc_check
- */
- const CVC_CHECK_FAIL = 'fail';
- const CVC_CHECK_PASS = 'pass';
- const CVC_CHECK_UNAVAILABLE = 'unavailable';
- const CVC_CHECK_UNCHECKED = 'unchecked';
-
- /**
- * Possible string representations of the funding of the card.
- *
- * @see https://stripe.com/docs/api/cards/object#card_object-funding
- */
- const FUNDING_CREDIT = 'credit';
- const FUNDING_DEBIT = 'debit';
- const FUNDING_PREPAID = 'prepaid';
- const FUNDING_UNKNOWN = 'unknown';
-
- /**
- * Possible string representations of the tokenization method when using Apple Pay or Google Pay.
- *
- * @see https://stripe.com/docs/api/cards/object#card_object-tokenization_method
- */
- const TOKENIZATION_METHOD_APPLE_PAY = 'apple_pay';
- const TOKENIZATION_METHOD_GOOGLE_PAY = 'google_pay';
-
- /**
- * @return string The instance URL for this resource. It needs to be special
- * cased because cards are nested resources that may belong to different
- * top-level resources.
- */
- public function instanceUrl()
- {
- if ($this['customer']) {
- $base = Customer::classUrl();
- $parent = $this['customer'];
- $path = 'sources';
- } elseif ($this['account']) {
- $base = Account::classUrl();
- $parent = $this['account'];
- $path = 'external_accounts';
- } elseif ($this['recipient']) {
- $base = Recipient::classUrl();
- $parent = $this['recipient'];
- $path = 'cards';
- } else {
- $msg = 'Cards cannot be accessed without a customer ID, account ID or recipient ID.';
-
- throw new Exception\UnexpectedValueException($msg);
- }
- $parentExtn = \urlencode(Util\Util::utf8($parent));
- $extn = \urlencode(Util\Util::utf8($this['id']));
-
- return "{$base}/{$parentExtn}/{$path}/{$extn}";
- }
-
- /**
- * @param array|string $_id
- * @param null|array|string $_opts
- *
- * @throws \Stripe\Exception\BadMethodCallException
- */
- public static function retrieve($_id, $_opts = null)
- {
- $msg = 'Cards cannot be retrieved without a customer ID or an ' .
- 'account ID. Retrieve a card using ' .
- "`Customer::retrieveSource('customer_id', 'card_id')` or " .
- "`Account::retrieveExternalAccount('account_id', 'card_id')`.";
-
- throw new Exception\BadMethodCallException($msg);
- }
-
- /**
- * @param string $_id
- * @param null|array $_params
- * @param null|array|string $_options
- *
- * @throws \Stripe\Exception\BadMethodCallException
- */
- public static function update($_id, $_params = null, $_options = null)
- {
- $msg = 'Cards cannot be updated without a customer ID or an ' .
- 'account ID. Update a card using ' .
- "`Customer::updateSource('customer_id', 'card_id', " .
- '$updateParams)` or `Account::updateExternalAccount(' .
- "'account_id', 'card_id', \$updateParams)`.";
-
- throw new Exception\BadMethodCallException($msg);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/CashBalance.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/CashBalance.php
deleted file mode 100644
index c63f272f..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/CashBalance.php
+++ /dev/null
@@ -1,66 +0,0 @@
-Cash balance represents real funds. Customers can add
- * funds to their cash balance by sending a bank transfer. These funds can be used
- * for payment and can eventually be paid out to your bank account.
- *
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|\Stripe\StripeObject $available A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0.
- * @property string $customer The ID of the customer whose cash balance this object represents.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $settings
- */
-class CashBalance extends ApiResource
-{
- const OBJECT_NAME = 'cash_balance';
-
- /**
- * @return string the API URL for this balance transaction
- */
- public function instanceUrl()
- {
- $customer = $this['customer'];
- $customer = Util\Util::utf8($customer);
-
- $base = Customer::classUrl();
- $customerExtn = \urlencode($customer);
-
- return "{$base}/{$customerExtn}/cash_balance";
- }
-
- /**
- * @param array|string $_id
- * @param null|array|string $_opts
- *
- * @throws \Stripe\Exception\BadMethodCallException
- */
- public static function retrieve($_id, $_opts = null)
- {
- $msg = 'Customer Cash Balance cannot be retrieved without a ' .
- 'customer ID. Retrieve a Customer Cash Balance using ' .
- "`Customer::retrieveCashBalance('customer_id')`.";
-
- throw new Exception\BadMethodCallException($msg);
- }
-
- /**
- * @param string $_id
- * @param null|array $_params
- * @param null|array|string $_options
- *
- * @throws \Stripe\Exception\BadMethodCallException
- */
- public static function update($_id, $_params = null, $_options = null)
- {
- $msg = 'Customer Cash Balance cannot be updated without a ' .
- 'customer ID. Retrieve a Customer Cash Balance using ' .
- "`Customer::updateCashBalance('customer_id')`.";
-
- throw new Exception\BadMethodCallException($msg);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Charge.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Charge.php
deleted file mode 100644
index e9ac3b4a..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Charge.php
+++ /dev/null
@@ -1,163 +0,0 @@
-Charge object. You
- * can retrieve and refund individual charges as well as list all charges. Charges
- * are identified by a unique, random ID.
- *
- * Related guide: Accept a
- * payment with the Charges API.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
- * @property int $amount_captured Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made).
- * @property int $amount_refunded Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued).
- * @property null|string|\Stripe\StripeObject $application ID of the Connect application that created the charge.
- * @property null|string|\Stripe\ApplicationFee $application_fee The application fee (if any) for the charge. See the Connect documentation for details.
- * @property null|int $application_fee_amount The amount of the application fee (if any) requested for the charge. See the Connect documentation for details.
- * @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).
- * @property \Stripe\StripeObject $billing_details
- * @property null|string $calculated_statement_descriptor The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined.
- * @property bool $captured If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property null|string|\Stripe\Customer $customer ID of the customer this charge is for if one exists.
- * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
- * @property null|string|\Stripe\Account $destination ID of an existing, connected Stripe account to transfer funds to if transfer_data was specified in the charge request.
- * @property null|string|\Stripe\Dispute $dispute Details about the dispute if the charge has been disputed.
- * @property bool $disputed Whether the charge has been disputed.
- * @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.
- * @property null|string $failure_code Error code explaining reason for charge failure if available (see the errors section for a list of codes).
- * @property null|string $failure_message Message to user further explaining reason for charge failure if available.
- * @property null|\Stripe\StripeObject $fraud_details Information on fraud assessments for the charge.
- * @property null|string|\Stripe\Invoice $invoice ID of the invoice this charge is for if one exists.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|string|\Stripe\Account $on_behalf_of The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the Connect documentation for details.
- * @property null|string|\Stripe\Order $order ID of the order this charge is for if one exists.
- * @property null|\Stripe\StripeObject $outcome Details about whether the payment was accepted, and why. See understanding declines for details.
- * @property bool $paid true if the charge succeeded, or was successfully authorized for later capture.
- * @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent associated with this charge, if one exists.
- * @property null|string $payment_method ID of the payment method used in this charge.
- * @property null|\Stripe\StripeObject $payment_method_details Details about the payment method at the time of the transaction.
- * @property null|string $receipt_email This is the email address that the receipt for this charge was sent to.
- * @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this charge. This attribute will be null until a receipt has been sent.
- * @property null|string $receipt_url This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt.
- * @property bool $refunded Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false.
- * @property \Stripe\Collection<\Stripe\Refund> $refunds A list of refunds that have been applied to the charge.
- * @property null|string|\Stripe\Review $review ID of the review associated with this charge if one exists.
- * @property null|\Stripe\StripeObject $shipping Shipping information for the charge.
- * @property null|\Stripe\Account|\Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source $source This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to payment_method or payment_method_details instead.
- * @property null|string|\Stripe\Transfer $source_transfer The transfer ID which created this charge. Only present if the charge came from another Stripe account. See the Connect documentation for details.
- * @property null|string $statement_descriptor For card charges, use statement_descriptor_suffix instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters.
- * @property null|string $statement_descriptor_suffix Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
- * @property string $status The status of the payment is either succeeded, pending, or failed.
- * @property string|\Stripe\Transfer $transfer ID of the transfer to the destination account (only applicable if the charge was created using the destination parameter).
- * @property null|\Stripe\StripeObject $transfer_data An optional dictionary including the account to automatically transfer to as part of a destination charge. See the Connect documentation for details.
- * @property null|string $transfer_group A string that identifies this transaction as part of a group. See the Connect documentation for details.
- */
-class Charge extends ApiResource
-{
- const OBJECT_NAME = 'charge';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Search;
- use ApiOperations\Update;
-
- const STATUS_FAILED = 'failed';
- const STATUS_PENDING = 'pending';
- const STATUS_SUCCEEDED = 'succeeded';
-
- /**
- * Possible string representations of decline codes.
- * These strings are applicable to the decline_code property of the \Stripe\Exception\CardException exception.
- *
- * @see https://stripe.com/docs/declines/codes
- */
- const DECLINED_AUTHENTICATION_REQUIRED = 'authentication_required';
- const DECLINED_APPROVE_WITH_ID = 'approve_with_id';
- const DECLINED_CALL_ISSUER = 'call_issuer';
- const DECLINED_CARD_NOT_SUPPORTED = 'card_not_supported';
- const DECLINED_CARD_VELOCITY_EXCEEDED = 'card_velocity_exceeded';
- const DECLINED_CURRENCY_NOT_SUPPORTED = 'currency_not_supported';
- const DECLINED_DO_NOT_HONOR = 'do_not_honor';
- const DECLINED_DO_NOT_TRY_AGAIN = 'do_not_try_again';
- const DECLINED_DUPLICATED_TRANSACTION = 'duplicate_transaction';
- const DECLINED_EXPIRED_CARD = 'expired_card';
- const DECLINED_FRAUDULENT = 'fraudulent';
- const DECLINED_GENERIC_DECLINE = 'generic_decline';
- const DECLINED_INCORRECT_NUMBER = 'incorrect_number';
- const DECLINED_INCORRECT_CVC = 'incorrect_cvc';
- const DECLINED_INCORRECT_PIN = 'incorrect_pin';
- const DECLINED_INCORRECT_ZIP = 'incorrect_zip';
- const DECLINED_INSUFFICIENT_FUNDS = 'insufficient_funds';
- const DECLINED_INVALID_ACCOUNT = 'invalid_account';
- const DECLINED_INVALID_AMOUNT = 'invalid_amount';
- const DECLINED_INVALID_CVC = 'invalid_cvc';
- const DECLINED_INVALID_EXPIRY_YEAR = 'invalid_expiry_year';
- const DECLINED_INVALID_NUMBER = 'invalid_number';
- const DECLINED_INVALID_PIN = 'invalid_pin';
- const DECLINED_ISSUER_NOT_AVAILABLE = 'issuer_not_available';
- const DECLINED_LOST_CARD = 'lost_card';
- const DECLINED_MERCHANT_BLACKLIST = 'merchant_blacklist';
- const DECLINED_NEW_ACCOUNT_INFORMATION_AVAILABLE = 'new_account_information_available';
- const DECLINED_NO_ACTION_TAKEN = 'no_action_taken';
- const DECLINED_NOT_PERMITTED = 'not_permitted';
- const DECLINED_OFFLINE_PIN_REQUIRED = 'offline_pin_required';
- const DECLINED_ONLINE_OR_OFFLINE_PIN_REQUIRED = 'online_or_offline_pin_required';
- const DECLINED_PICKUP_CARD = 'pickup_card';
- const DECLINED_PIN_TRY_EXCEEDED = 'pin_try_exceeded';
- const DECLINED_PROCESSING_ERROR = 'processing_error';
- const DECLINED_REENTER_TRANSACTION = 'reenter_transaction';
- const DECLINED_RESTRICTED_CARD = 'restricted_card';
- const DECLINED_REVOCATION_OF_ALL_AUTHORIZATIONS = 'revocation_of_all_authorizations';
- const DECLINED_REVOCATION_OF_AUTHORIZATION = 'revocation_of_authorization';
- const DECLINED_SECURITY_VIOLATION = 'security_violation';
- const DECLINED_SERVICE_NOT_ALLOWED = 'service_not_allowed';
- const DECLINED_STOLEN_CARD = 'stolen_card';
- const DECLINED_STOP_PAYMENT_ORDER = 'stop_payment_order';
- const DECLINED_TESTMODE_DECLINE = 'testmode_decline';
- const DECLINED_TRANSACTION_NOT_ALLOWED = 'transaction_not_allowed';
- const DECLINED_TRY_AGAIN_LATER = 'try_again_later';
- const DECLINED_WITHDRAWAL_COUNT_LIMIT_EXCEEDED = 'withdrawal_count_limit_exceeded';
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Charge the captured charge
- */
- public function capture($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/capture';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SearchResult the charge search results
- */
- public static function search($params = null, $opts = null)
- {
- $url = '/v1/charges/search';
-
- return self::_searchResource($url, $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Checkout/Session.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Checkout/Session.php
deleted file mode 100644
index aa8b3401..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Checkout/Session.php
+++ /dev/null
@@ -1,133 +0,0 @@
-Checkout or Payment Links. We
- * recommend creating a new Session each time your customer attempts to pay.
- *
- * Once payment is successful, the Checkout Session will contain a reference to the
- * Customer, and either the
- * successful PaymentIntent or an
- * active Subscription.
- *
- * You can create a Checkout Session on your server and pass its ID to the client
- * to begin Checkout.
- *
- * Related guide: Checkout
- * Server Quickstart.
- *
- * @property string $id Unique identifier for the object. Used to pass to redirectToCheckout in Stripe.js.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|\Stripe\StripeObject $after_expiration When set, provides configuration for actions to take if this Checkout Session expires.
- * @property null|bool $allow_promotion_codes Enables user redeemable promotion codes.
- * @property null|int $amount_subtotal Total of all items before discounts or taxes are applied.
- * @property null|int $amount_total Total of all items after discounts and taxes are applied.
- * @property \Stripe\StripeObject $automatic_tax
- * @property null|string $billing_address_collection Describes whether Checkout should collect the customer's billing address.
- * @property string $cancel_url The URL the customer will be directed to if they decide to cancel payment and return to your website.
- * @property null|string $client_reference_id A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the Session with your internal systems.
- * @property null|\Stripe\StripeObject $consent Results of consent_collection for this session.
- * @property null|\Stripe\StripeObject $consent_collection When set, provides configuration for the Checkout Session to gather active consent from customers.
- * @property null|string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property null|string|\Stripe\Customer $customer The ID of the customer for this Session. For Checkout Sessions in payment or subscription mode, Checkout will create a new customer object based on information provided during the payment flow unless an existing customer was provided when the Session was created.
- * @property null|string $customer_creation Configure whether a Checkout Session creates a Customer when the Checkout Session completes.
- * @property null|\Stripe\StripeObject $customer_details The customer details including the customer's tax exempt status and the customer's tax IDs. Only present on Sessions in payment or subscription mode.
- * @property null|string $customer_email If provided, this value will be used when the Customer object is created. If not provided, customers will be asked to enter their email address. Use this parameter to prefill customer data if you already have an email on file. To access information about the customer once the payment flow is complete, use the customer attribute.
- * @property int $expires_at The timestamp at which the Checkout Session will expire.
- * @property \Stripe\Collection<\Stripe\LineItem> $line_items The line items purchased by the customer.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|string $locale The IETF language tag of the locale Checkout is displayed in. If blank or auto, the browser's locale is used.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string $mode The mode of the Checkout Session.
- * @property null|string|\Stripe\PaymentIntent $payment_intent The ID of the PaymentIntent for Checkout Sessions in payment mode.
- * @property null|string|\Stripe\PaymentLink $payment_link The ID of the Payment Link that created this Session.
- * @property null|\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.
- * @property string[] $payment_method_types A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept.
- * @property string $payment_status The payment status of the Checkout Session, one of paid, unpaid, or no_payment_required. You can use this value to decide when to fulfill your customer's order.
- * @property \Stripe\StripeObject $phone_number_collection
- * @property null|string $recovered_from The ID of the original expired Checkout Session that triggered the recovery flow.
- * @property null|string|\Stripe\SetupIntent $setup_intent The ID of the SetupIntent for Checkout Sessions in setup mode.
- * @property null|\Stripe\StripeObject $shipping Shipping information for this Checkout Session.
- * @property null|\Stripe\StripeObject $shipping_address_collection When set, provides configuration for Checkout to collect a shipping address from a customer.
- * @property \Stripe\StripeObject[] $shipping_options The shipping rate options applied to this Session.
- * @property null|string|\Stripe\ShippingRate $shipping_rate The ID of the ShippingRate for Checkout Sessions in payment mode.
- * @property null|string $status The status of the Checkout Session, one of open, complete, or expired.
- * @property null|string $submit_type Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. submit_type can only be specified on Checkout Sessions in payment mode, but not Checkout Sessions in subscription or setup mode.
- * @property null|string|\Stripe\Subscription $subscription The ID of the subscription for Checkout Sessions in subscription mode.
- * @property string $success_url The URL the customer will be directed to after the payment or subscription creation is successful.
- * @property \Stripe\StripeObject $tax_id_collection
- * @property null|\Stripe\StripeObject $total_details Tax and discount details for the computed total amount.
- * @property null|string $url The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using Custom Domains, the URL will use your subdomain. Otherwise, it’ll use checkout.stripe.com.
- */
-class Session extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'checkout.session';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\NestedResource;
- use \Stripe\ApiOperations\Retrieve;
-
- const BILLING_ADDRESS_COLLECTION_AUTO = 'auto';
- const BILLING_ADDRESS_COLLECTION_REQUIRED = 'required';
-
- const CUSTOMER_CREATION_ALWAYS = 'always';
- const CUSTOMER_CREATION_IF_REQUIRED = 'if_required';
-
- const MODE_PAYMENT = 'payment';
- const MODE_SETUP = 'setup';
- const MODE_SUBSCRIPTION = 'subscription';
-
- const PAYMENT_STATUS_NO_PAYMENT_REQUIRED = 'no_payment_required';
- const PAYMENT_STATUS_PAID = 'paid';
- const PAYMENT_STATUS_UNPAID = 'unpaid';
-
- const STATUS_COMPLETE = 'complete';
- const STATUS_EXPIRED = 'expired';
- const STATUS_OPEN = 'open';
-
- const SUBMIT_TYPE_AUTO = 'auto';
- const SUBMIT_TYPE_BOOK = 'book';
- const SUBMIT_TYPE_DONATE = 'donate';
- const SUBMIT_TYPE_PAY = 'pay';
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Checkout\Session the expired session
- */
- public function expire($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/expire';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- const PATH_LINE_ITEMS = '/line_items';
-
- /**
- * @param string $id the ID of the session on which to retrieve the items
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\LineItem> the list of items
- */
- public static function allLineItems($id, $params = null, $opts = null)
- {
- return self::_allNestedResources($id, static::PATH_LINE_ITEMS, $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Collection.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Collection.php
deleted file mode 100644
index 4de2f9d7..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Collection.php
+++ /dev/null
@@ -1,312 +0,0 @@
-
- *
- * @property string $object
- * @property string $url
- * @property bool $has_more
- * @property TStripeObject[] $data
- */
-class Collection extends StripeObject implements \Countable, \IteratorAggregate
-{
- const OBJECT_NAME = 'list';
-
- use ApiOperations\Request;
-
- /** @var array */
- protected $filters = [];
-
- /**
- * @return string the base URL for the given class
- */
- public static function baseUrl()
- {
- return Stripe::$apiBase;
- }
-
- /**
- * Returns the filters.
- *
- * @return array the filters
- */
- public function getFilters()
- {
- return $this->filters;
- }
-
- /**
- * Sets the filters, removing paging options.
- *
- * @param array $filters the filters
- */
- public function setFilters($filters)
- {
- $this->filters = $filters;
- }
-
- #[\ReturnTypeWillChange]
- public function offsetGet($k)
- {
- if (\is_string($k)) {
- return parent::offsetGet($k);
- }
- $msg = "You tried to access the {$k} index, but Collection " .
- 'types only support string keys. (HINT: List calls ' .
- 'return an object with a `data` (which is the data ' .
- "array). You likely want to call ->data[{$k}])";
-
- throw new Exception\InvalidArgumentException($msg);
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws Exception\ApiErrorException
- *
- * @return Collection
- */
- public function all($params = null, $opts = null)
- {
- self::_validateParams($params);
- list($url, $params) = $this->extractPathAndUpdateParams($params);
-
- list($response, $opts) = $this->_request('get', $url, $params, $opts);
- $obj = Util\Util::convertToStripeObject($response, $opts);
- if (!($obj instanceof \Stripe\Collection)) {
- throw new \Stripe\Exception\UnexpectedValueException(
- 'Expected type ' . \Stripe\Collection::class . ', got "' . \get_class($obj) . '" instead.'
- );
- }
- $obj->setFilters($params);
-
- return $obj;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws Exception\ApiErrorException
- *
- * @return TStripeObject
- */
- public function create($params = null, $opts = null)
- {
- self::_validateParams($params);
- list($url, $params) = $this->extractPathAndUpdateParams($params);
-
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
-
- return Util\Util::convertToStripeObject($response, $opts);
- }
-
- /**
- * @param string $id
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws Exception\ApiErrorException
- *
- * @return TStripeObject
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- self::_validateParams($params);
- list($url, $params) = $this->extractPathAndUpdateParams($params);
-
- $id = Util\Util::utf8($id);
- $extn = \urlencode($id);
- list($response, $opts) = $this->_request(
- 'get',
- "{$url}/{$extn}",
- $params,
- $opts
- );
-
- return Util\Util::convertToStripeObject($response, $opts);
- }
-
- /**
- * @return int the number of objects in the current page
- */
- #[\ReturnTypeWillChange]
- public function count()
- {
- return \count($this->data);
- }
-
- /**
- * @return \ArrayIterator an iterator that can be used to iterate
- * across objects in the current page
- */
- #[\ReturnTypeWillChange]
- public function getIterator()
- {
- return new \ArrayIterator($this->data);
- }
-
- /**
- * @return \ArrayIterator an iterator that can be used to iterate
- * backwards across objects in the current page
- */
- public function getReverseIterator()
- {
- return new \ArrayIterator(\array_reverse($this->data));
- }
-
- /**
- * @return \Generator|TStripeObject[] A generator that can be used to
- * iterate across all objects across all pages. As page boundaries are
- * encountered, the next page will be fetched automatically for
- * continued iteration.
- */
- public function autoPagingIterator()
- {
- $page = $this;
-
- while (true) {
- $filters = $this->filters ?: [];
- if (\array_key_exists('ending_before', $filters)
- && !\array_key_exists('starting_after', $filters)) {
- foreach ($page->getReverseIterator() as $item) {
- yield $item;
- }
- $page = $page->previousPage();
- } else {
- foreach ($page as $item) {
- yield $item;
- }
- $page = $page->nextPage();
- }
-
- if ($page->isEmpty()) {
- break;
- }
- }
- }
-
- /**
- * Returns an empty collection. This is returned from {@see nextPage()}
- * when we know that there isn't a next page in order to replicate the
- * behavior of the API when it attempts to return a page beyond the last.
- *
- * @param null|array|string $opts
- *
- * @return Collection
- */
- public static function emptyCollection($opts = null)
- {
- return Collection::constructFrom(['data' => []], $opts);
- }
-
- /**
- * Returns true if the page object contains no element.
- *
- * @return bool
- */
- public function isEmpty()
- {
- return empty($this->data);
- }
-
- /**
- * Fetches the next page in the resource list (if there is one).
- *
- * This method will try to respect the limit of the current page. If none
- * was given, the default limit will be fetched again.
- *
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @return Collection
- */
- public function nextPage($params = null, $opts = null)
- {
- if (!$this->has_more) {
- return static::emptyCollection($opts);
- }
-
- $lastId = \end($this->data)->id;
-
- $params = \array_merge(
- $this->filters ?: [],
- ['starting_after' => $lastId],
- $params ?: []
- );
-
- return $this->all($params, $opts);
- }
-
- /**
- * Fetches the previous page in the resource list (if there is one).
- *
- * This method will try to respect the limit of the current page. If none
- * was given, the default limit will be fetched again.
- *
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @return Collection
- */
- public function previousPage($params = null, $opts = null)
- {
- if (!$this->has_more) {
- return static::emptyCollection($opts);
- }
-
- $firstId = $this->data[0]->id;
-
- $params = \array_merge(
- $this->filters ?: [],
- ['ending_before' => $firstId],
- $params ?: []
- );
-
- return $this->all($params, $opts);
- }
-
- /**
- * Gets the first item from the current page. Returns `null` if the current page is empty.
- *
- * @return null|TStripeObject
- */
- public function first()
- {
- return \count($this->data) > 0 ? $this->data[0] : null;
- }
-
- /**
- * Gets the last item from the current page. Returns `null` if the current page is empty.
- *
- * @return null|TStripeObject
- */
- public function last()
- {
- return \count($this->data) > 0 ? $this->data[\count($this->data) - 1] : null;
- }
-
- private function extractPathAndUpdateParams($params)
- {
- $url = \parse_url($this->url);
- if (!isset($url['path'])) {
- throw new Exception\UnexpectedValueException("Could not parse list url into parts: {$url}");
- }
-
- if (isset($url['query'])) {
- // If the URL contains a query param, parse it out into $params so they
- // don't interact weirdly with each other.
- $query = [];
- \parse_str($url['query'], $query);
- $params = \array_merge($params ?: [], $query);
- }
-
- return [$url['path'], $params];
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/CountrySpec.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/CountrySpec.php
deleted file mode 100644
index 223afb31..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/CountrySpec.php
+++ /dev/null
@@ -1,30 +0,0 @@
-an online guide.
- *
- * @property string $id Unique identifier for the object. Represented as the ISO country code for this country.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property string $default_currency The default currency for this country. This applies to both payment methods and bank accounts.
- * @property \Stripe\StripeObject $supported_bank_account_currencies Currencies that can be accepted in the specific country (for transfers).
- * @property string[] $supported_payment_currencies Currencies that can be accepted in the specified country (for payments).
- * @property string[] $supported_payment_methods Payment methods available in the specified country. You may need to enable some payment methods (e.g., ACH) on your account before they appear in this list. The stripe payment method refers to charging through your platform.
- * @property string[] $supported_transfer_countries Countries that can accept transfers from the specified country.
- * @property \Stripe\StripeObject $verification_fields
- */
-class CountrySpec extends ApiResource
-{
- const OBJECT_NAME = 'country_spec';
-
- use ApiOperations\All;
- use ApiOperations\Retrieve;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Coupon.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Coupon.php
deleted file mode 100644
index 0d84bd4b..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Coupon.php
+++ /dev/null
@@ -1,41 +0,0 @@
-invoices or orders.
- * Coupons do not work with conventional one-off charges.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|int $amount_off Amount (in the currency specified) that will be taken off the subtotal of any invoices for this customer.
- * @property \Stripe\StripeObject $applies_to
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string $currency If amount_off has been set, the three-letter ISO code for the currency of the amount to take off.
- * @property string $duration One of forever, once, and repeating. Describes how long a customer who applies this coupon will get the discount.
- * @property null|int $duration_in_months If duration is repeating, the number of months the coupon applies. Null if coupon duration is forever or once.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|int $max_redemptions Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|string $name Name of the coupon displayed to customers on for instance invoices or receipts.
- * @property null|float $percent_off Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead.
- * @property null|int $redeem_by Date after which the coupon can no longer be redeemed.
- * @property int $times_redeemed Number of times this coupon has been applied to a customer.
- * @property bool $valid Taking account of the above properties, whether this coupon can still be applied to a customer.
- */
-class Coupon extends ApiResource
-{
- const OBJECT_NAME = 'coupon';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Delete;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/CreditNote.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/CreditNote.php
deleted file mode 100644
index 4ee660aa..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/CreditNote.php
+++ /dev/null
@@ -1,111 +0,0 @@
-Credit Notes.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount The integer amount in %s representing the total amount of the credit note, including tax.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property string|\Stripe\Customer $customer ID of the customer.
- * @property null|string|\Stripe\CustomerBalanceTransaction $customer_balance_transaction Customer balance transaction related to this credit note.
- * @property int $discount_amount The integer amount in %s representing the total amount of discount that was credited.
- * @property \Stripe\StripeObject[] $discount_amounts The aggregate amounts calculated per discount for all line items.
- * @property string|\Stripe\Invoice $invoice ID of the invoice.
- * @property \Stripe\Collection<\Stripe\CreditNoteLineItem> $lines Line items that make up the credit note
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|string $memo Customer-facing text that appears on the credit note PDF.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string $number A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.
- * @property null|int $out_of_band_amount Amount that was credited outside of Stripe.
- * @property string $pdf The link to download the PDF of the credit note.
- * @property null|string $reason Reason for issuing this credit note, one of duplicate, fraudulent, order_change, or product_unsatisfactory
- * @property null|string|\Stripe\Refund $refund Refund related to this credit note.
- * @property string $status Status of this credit note, one of issued or void. Learn more about voiding credit notes.
- * @property int $subtotal The integer amount in %s representing the amount of the credit note, excluding tax and invoice level discounts.
- * @property \Stripe\StripeObject[] $tax_amounts The aggregate amounts calculated per tax rate for all line items.
- * @property int $total The integer amount in %s representing the total amount of the credit note, including tax and all discount.
- * @property string $type Type of this credit note, one of pre_payment or post_payment. A pre_payment credit note means it was issued when the invoice was open. A post_payment credit note means it was issued when the invoice was paid.
- * @property null|int $voided_at The time that the credit note was voided.
- */
-class CreditNote extends ApiResource
-{
- const OBJECT_NAME = 'credit_note';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\NestedResource;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-
- const REASON_DUPLICATE = 'duplicate';
- const REASON_FRAUDULENT = 'fraudulent';
- const REASON_ORDER_CHANGE = 'order_change';
- const REASON_PRODUCT_UNSATISFACTORY = 'product_unsatisfactory';
-
- const STATUS_ISSUED = 'issued';
- const STATUS_VOID = 'void';
-
- const TYPE_POST_PAYMENT = 'post_payment';
- const TYPE_PRE_PAYMENT = 'pre_payment';
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\CreditNote the previewed credit note
- */
- public static function preview($params = null, $opts = null)
- {
- $url = static::classUrl() . '/preview';
- list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
- $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
- $obj->setLastResponse($response);
-
- return $obj;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\CreditNote the voided credit note
- */
- public function voidCreditNote($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/void';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- const PATH_LINES = '/lines';
-
- /**
- * @param string $id the ID of the credit note on which to retrieve the credit note line items
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\CreditNoteLineItem> the list of credit note line items
- */
- public static function allLines($id, $params = null, $opts = null)
- {
- return self::_allNestedResources($id, static::PATH_LINES, $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/CreditNoteLineItem.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/CreditNoteLineItem.php
deleted file mode 100644
index 254886b7..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/CreditNoteLineItem.php
+++ /dev/null
@@ -1,26 +0,0 @@
-true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|int $quantity The number of units of product being credited.
- * @property \Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item
- * @property \Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item.
- * @property string $type The type of the credit note line item, one of invoice_line_item or custom_line_item. When the type is invoice_line_item there is an additional invoice_line_item property on the resource the value of which is the id of the credited line item on the invoice.
- * @property null|int $unit_amount The cost of each unit of product being credited.
- * @property null|string $unit_amount_decimal Same as unit_amount, but contains a decimal value with at most 12 decimal places.
- */
-class CreditNoteLineItem extends ApiResource
-{
- const OBJECT_NAME = 'credit_note_line_item';
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Customer.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Customer.php
deleted file mode 100644
index 813ede33..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Customer.php
+++ /dev/null
@@ -1,343 +0,0 @@
-Save a card during
- * payment.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|\Stripe\StripeObject $address The customer's address.
- * @property int $balance Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.
- * @property null|\Stripe\CashBalance $cash_balance The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source "cash_balance".The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string $currency Three-letter ISO code for the currency the customer can be charged in for recurring billing purposes.
- * @property null|string|\Stripe\Account|\Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source $default_source
ID of the default payment source for the customer.
When the customer's latest invoice is billed by charging automatically, delinquent is true if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, delinquent is true if the invoice isn't paid by its due date.
If an invoice is marked uncollectible by dunning, delinquent doesn't get reset to false.
- * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
- * @property null|\Stripe\Discount $discount Describes the current discount active on the customer, if there is one.
- * @property null|string $email The customer's email address.
- * @property null|string $invoice_prefix The prefix for the customer used to generate unique invoice numbers.
- * @property \Stripe\StripeObject $invoice_settings
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|string $name The customer's full name or business name.
- * @property int $next_invoice_sequence The suffix of the customer's next invoice number, e.g., 0001.
- * @property null|string $phone The customer's phone number.
- * @property null|string[] $preferred_locales The customer's preferred locales (languages), ordered by preference.
- * @property null|\Stripe\StripeObject $shipping Mailing and shipping address for the customer. Appears on invoices emailed to this customer.
- * @property \Stripe\Collection<\Stripe\Account|\Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source> $sources The customer's payment sources, if any.
- * @property \Stripe\Collection<\Stripe\Subscription> $subscriptions The customer's current subscriptions, if any.
- * @property \Stripe\StripeObject $tax
- * @property null|string $tax_exempt Describes the customer's tax exemption status. One of none, exempt, or reverse. When set to reverse, invoice and receipt PDFs include the text "Reverse charge".
- * @property \Stripe\Collection<\Stripe\TaxId> $tax_ids The customer's tax IDs.
- * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this customer belongs to.
- */
-class Customer extends ApiResource
-{
- const OBJECT_NAME = 'customer';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Delete;
- use ApiOperations\NestedResource;
- use ApiOperations\Retrieve;
- use ApiOperations\Search;
- use ApiOperations\Update;
-
- const TAX_EXEMPT_EXEMPT = 'exempt';
- const TAX_EXEMPT_NONE = 'none';
- const TAX_EXEMPT_REVERSE = 'reverse';
-
- public static function getSavedNestedResources()
- {
- static $savedNestedResources = null;
- if (null === $savedNestedResources) {
- $savedNestedResources = new Util\Set([
- 'source',
- ]);
- }
-
- return $savedNestedResources;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @return \Stripe\Customer the updated customer
- */
- public function deleteDiscount($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/discount';
- list($response, $opts) = $this->_request('delete', $url, $params, $opts);
- $this->refreshFrom(['discount' => null], $opts, true);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- * @param mixed $id
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Customer> list of PaymentMethods
- */
- public static function allPaymentMethods($id, $params = null, $opts = null)
- {
- $url = static::resourceUrl($id) . '/payment_methods';
- list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
- $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
- $obj->setLastResponse($response);
-
- return $obj;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SearchResult the customer search results
- */
- public static function search($params = null, $opts = null)
- {
- $url = '/v1/customers/search';
-
- return self::_searchResource($url, $params, $opts);
- }
-
- const PATH_CASH_BALANCE = '/cash_balance';
-
- /**
- * @param string $id the ID of the customer to which the cash balance belongs
- * @param null|array $params
- * @param null|array|string $opts
- * @param mixed $cashBalanceId
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\cash_balance
- */
- public static function retrieveCashBalance($id, $cashBalanceId, $params = null, $opts = null)
- {
- return self::_retrieveNestedResource($id, static::PATH_CASH_BALANCE, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the customer to which the cash balance belongs
- * @param null|array $params
- * @param null|array|string $opts
- * @param mixed $cashBalanceId
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\cash_balance
- */
- public static function updateCashBalance($id, $cashBalanceId, $params = null, $opts = null)
- {
- return self::_updateNestedResource($id, static::PATH_CASH_BALANCE, $params, $opts);
- }
- const PATH_BALANCE_TRANSACTIONS = '/balance_transactions';
-
- /**
- * @param string $id the ID of the customer on which to retrieve the customer balance transactions
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\CustomerBalanceTransaction> the list of customer balance transactions
- */
- public static function allBalanceTransactions($id, $params = null, $opts = null)
- {
- return self::_allNestedResources($id, static::PATH_BALANCE_TRANSACTIONS, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the customer on which to create the customer balance transaction
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\CustomerBalanceTransaction
- */
- public static function createBalanceTransaction($id, $params = null, $opts = null)
- {
- return self::_createNestedResource($id, static::PATH_BALANCE_TRANSACTIONS, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the customer to which the customer balance transaction belongs
- * @param string $balanceTransactionId the ID of the customer balance transaction to retrieve
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\CustomerBalanceTransaction
- */
- public static function retrieveBalanceTransaction($id, $balanceTransactionId, $params = null, $opts = null)
- {
- return self::_retrieveNestedResource($id, static::PATH_BALANCE_TRANSACTIONS, $balanceTransactionId, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the customer to which the customer balance transaction belongs
- * @param string $balanceTransactionId the ID of the customer balance transaction to update
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\CustomerBalanceTransaction
- */
- public static function updateBalanceTransaction($id, $balanceTransactionId, $params = null, $opts = null)
- {
- return self::_updateNestedResource($id, static::PATH_BALANCE_TRANSACTIONS, $balanceTransactionId, $params, $opts);
- }
- const PATH_SOURCES = '/sources';
-
- /**
- * @param string $id the ID of the customer on which to retrieve the payment sources
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source> the list of payment sources (AlipayAccount, BankAccount, BitcoinReceiver, Card or Source)
- */
- public static function allSources($id, $params = null, $opts = null)
- {
- return self::_allNestedResources($id, static::PATH_SOURCES, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the customer on which to create the payment source
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source
- */
- public static function createSource($id, $params = null, $opts = null)
- {
- return self::_createNestedResource($id, static::PATH_SOURCES, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the customer to which the payment source belongs
- * @param string $sourceId the ID of the payment source to delete
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source
- */
- public static function deleteSource($id, $sourceId, $params = null, $opts = null)
- {
- return self::_deleteNestedResource($id, static::PATH_SOURCES, $sourceId, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the customer to which the payment source belongs
- * @param string $sourceId the ID of the payment source to retrieve
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source
- */
- public static function retrieveSource($id, $sourceId, $params = null, $opts = null)
- {
- return self::_retrieveNestedResource($id, static::PATH_SOURCES, $sourceId, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the customer to which the payment source belongs
- * @param string $sourceId the ID of the payment source to update
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source
- */
- public static function updateSource($id, $sourceId, $params = null, $opts = null)
- {
- return self::_updateNestedResource($id, static::PATH_SOURCES, $sourceId, $params, $opts);
- }
- const PATH_TAX_IDS = '/tax_ids';
-
- /**
- * @param string $id the ID of the customer on which to retrieve the tax ids
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\TaxId> the list of tax ids
- */
- public static function allTaxIds($id, $params = null, $opts = null)
- {
- return self::_allNestedResources($id, static::PATH_TAX_IDS, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the customer on which to create the tax id
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TaxId
- */
- public static function createTaxId($id, $params = null, $opts = null)
- {
- return self::_createNestedResource($id, static::PATH_TAX_IDS, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the customer to which the tax id belongs
- * @param string $taxIdId the ID of the tax id to delete
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TaxId
- */
- public static function deleteTaxId($id, $taxIdId, $params = null, $opts = null)
- {
- return self::_deleteNestedResource($id, static::PATH_TAX_IDS, $taxIdId, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the customer to which the tax id belongs
- * @param string $taxIdId the ID of the tax id to retrieve
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TaxId
- */
- public static function retrieveTaxId($id, $taxIdId, $params = null, $opts = null)
- {
- return self::_retrieveNestedResource($id, static::PATH_TAX_IDS, $taxIdId, $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/CustomerBalanceTransaction.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/CustomerBalanceTransaction.php
deleted file mode 100644
index 8c306760..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/CustomerBalanceTransaction.php
+++ /dev/null
@@ -1,103 +0,0 @@
-balance
- * value, which denotes a debit or credit that's automatically applied to their
- * next invoice upon finalization. You may modify the value directly by using the
- * update customer API,
- * or by creating a Customer Balance Transaction, which increments or decrements
- * the customer's balance by the specified amount.
- *
- * Related guide: Customer Balance to
- * learn more.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's balance.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string|\Stripe\CreditNote $credit_note The ID of the credit note (if any) related to the transaction.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property string|\Stripe\Customer $customer The ID of the customer the transaction belongs to.
- * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
- * @property int $ending_balance The customer's balance after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice.
- * @property null|string|\Stripe\Invoice $invoice The ID of the invoice (if any) related to the transaction.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string $type Transaction type: adjustment, applied_to_invoice, credit_note, initial, invoice_too_large, invoice_too_small, unspent_receiver_credit, or unapplied_from_invoice. See the Customer Balance page to learn more about transaction types.
- */
-class CustomerBalanceTransaction extends ApiResource
-{
- const OBJECT_NAME = 'customer_balance_transaction';
-
- const TYPE_ADJUSTMENT = 'adjustment';
- const TYPE_APPLIED_TO_INVOICE = 'applied_to_invoice';
- const TYPE_CREDIT_NOTE = 'credit_note';
- const TYPE_INITIAL = 'initial';
- const TYPE_INVOICE_TOO_LARGE = 'invoice_too_large';
- const TYPE_INVOICE_TOO_SMALL = 'invoice_too_small';
- const TYPE_UNSPENT_RECEIVER_CREDIT = 'unspent_receiver_credit';
-
- const TYPE_ADJUSTEMENT = 'adjustment';
-
- /**
- * @return string the API URL for this balance transaction
- */
- public function instanceUrl()
- {
- $id = $this['id'];
- $customer = $this['customer'];
- if (!$id) {
- throw new Exception\UnexpectedValueException(
- "Could not determine which URL to request: class instance has invalid ID: {$id}",
- null
- );
- }
- $id = Util\Util::utf8($id);
- $customer = Util\Util::utf8($customer);
-
- $base = Customer::classUrl();
- $customerExtn = \urlencode($customer);
- $extn = \urlencode($id);
-
- return "{$base}/{$customerExtn}/balance_transactions/{$extn}";
- }
-
- /**
- * @param array|string $_id
- * @param null|array|string $_opts
- *
- * @throws \Stripe\Exception\BadMethodCallException
- */
- public static function retrieve($_id, $_opts = null)
- {
- $msg = 'Customer Balance Transactions cannot be retrieved without a ' .
- 'customer ID. Retrieve a Customer Balance Transaction using ' .
- "`Customer::retrieveBalanceTransaction('customer_id', " .
- "'balance_transaction_id')`.";
-
- throw new Exception\BadMethodCallException($msg);
- }
-
- /**
- * @param string $_id
- * @param null|array $_params
- * @param null|array|string $_options
- *
- * @throws \Stripe\Exception\BadMethodCallException
- */
- public static function update($_id, $_params = null, $_options = null)
- {
- $msg = 'Customer Balance Transactions cannot be updated without a ' .
- 'customer ID. Update a Customer Balance Transaction using ' .
- "`Customer::updateBalanceTransaction('customer_id', " .
- "'balance_transaction_id', \$updateParams)`.";
-
- throw new Exception\BadMethodCallException($msg);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Discount.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Discount.php
deleted file mode 100644
index dbc5d4bb..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Discount.php
+++ /dev/null
@@ -1,23 +0,0 @@
-Disputes and Fraud
- * documentation.
- *
- * Related guide: Disputes and
- * Fraud.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed).
- * @property \Stripe\BalanceTransaction[] $balance_transactions List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.
- * @property string|\Stripe\Charge $charge ID of the charge that was disputed.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property \Stripe\StripeObject $evidence
- * @property \Stripe\StripeObject $evidence_details
- * @property bool $is_charge_refundable If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your Stripe account as a result of this dispute.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|string $network_reason_code Network-dependent reason code for the dispute.
- * @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that was disputed.
- * @property string $reason Reason given by cardholder for dispute. Possible values are bank_cannot_process, check_returned, credit_not_processed, customer_initiated, debit_not_authorized, duplicate, fraudulent, general, incorrect_account_details, insufficient_funds, product_not_received, product_unacceptable, subscription_canceled, or unrecognized. Read more about dispute reasons.
- * @property string $status Current status of dispute. Possible values are warning_needs_response, warning_under_review, warning_closed, needs_response, under_review, charge_refunded, won, or lost.
- */
-class Dispute extends ApiResource
-{
- const OBJECT_NAME = 'dispute';
-
- use ApiOperations\All;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-
- const REASON_BANK_CANNOT_PROCESS = 'bank_cannot_process';
- const REASON_CHECK_RETURNED = 'check_returned';
- const REASON_CREDIT_NOT_PROCESSED = 'credit_not_processed';
- const REASON_CUSTOMER_INITIATED = 'customer_initiated';
- const REASON_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized';
- const REASON_DUPLICATE = 'duplicate';
- const REASON_FRAUDULENT = 'fraudulent';
- const REASON_GENERAL = 'general';
- const REASON_INCORRECT_ACCOUNT_DETAILS = 'incorrect_account_details';
- const REASON_INSUFFICIENT_FUNDS = 'insufficient_funds';
- const REASON_PRODUCT_NOT_RECEIVED = 'product_not_received';
- const REASON_PRODUCT_UNACCEPTABLE = 'product_unacceptable';
- const REASON_SUBSCRIPTION_CANCELED = 'subscription_canceled';
- const REASON_UNRECOGNIZED = 'unrecognized';
-
- const STATUS_CHARGE_REFUNDED = 'charge_refunded';
- const STATUS_LOST = 'lost';
- const STATUS_NEEDS_RESPONSE = 'needs_response';
- const STATUS_UNDER_REVIEW = 'under_review';
- const STATUS_WARNING_CLOSED = 'warning_closed';
- const STATUS_WARNING_NEEDS_RESPONSE = 'warning_needs_response';
- const STATUS_WARNING_UNDER_REVIEW = 'warning_under_review';
- const STATUS_WON = 'won';
-
- /**
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Dispute the closed dispute
- */
- // TODO: add $params to standardize signature
- public function close($opts = null)
- {
- $url = $this->instanceUrl() . '/close';
- list($response, $opts) = $this->_request('post', $url, null, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/EphemeralKey.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/EphemeralKey.php
deleted file mode 100644
index 253256cf..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/EphemeralKey.php
+++ /dev/null
@@ -1,43 +0,0 @@
-true if the object exists in live mode or the value false if the object exists in test mode.
- * @property string $secret The key's secret. You can use this value to make authorized requests to the Stripe API.
- * @property array $associated_objects
- */
-class EphemeralKey extends ApiResource
-{
- const OBJECT_NAME = 'ephemeral_key';
-
- use ApiOperations\Create {
- create as protected _create;
- }
-
- use ApiOperations\Delete;
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\InvalidArgumentException if stripe_version is missing
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\EphemeralKey the created key
- */
- public static function create($params = null, $opts = null)
- {
- if (!$opts || !isset($opts['stripe_version'])) {
- throw new Exception\InvalidArgumentException('stripe_version must be specified to create an ephemeral key');
- }
-
- return self::_create($params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ErrorObject.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ErrorObject.php
deleted file mode 100644
index ae836280..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ErrorObject.php
+++ /dev/null
@@ -1,162 +0,0 @@
- null,
- 'code' => null,
- 'decline_code' => null,
- 'doc_url' => null,
- 'message' => null,
- 'param' => null,
- 'payment_intent' => null,
- 'payment_method' => null,
- 'setup_intent' => null,
- 'source' => null,
- 'type' => null,
- ], $values);
- parent::refreshFrom($values, $opts, $partial);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Event.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Event.php
deleted file mode 100644
index 9bc59eee..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Event.php
+++ /dev/null
@@ -1,255 +0,0 @@
-Event object. For example, when a charge succeeds, we create a
- * charge.succeeded event; and when an invoice payment attempt fails,
- * we create an invoice.payment_failed event. Note that many API
- * requests may cause multiple events to be created. For example, if you create a
- * new subscription for a customer, you will receive both a
- * customer.subscription.created event and a
- * charge.succeeded event.
- *
- * Events occur when the state of another API resource changes. The state of that
- * resource at the time of the change is embedded in the event's data field. For
- * example, a charge.succeeded event will contain a charge, and an
- * invoice.payment_failed event will contain an invoice.
- *
- * As with other API resources, you can use endpoints to retrieve an individual event or a list of events from the API.
- * We also have a separate webhooks system for sending the
- * Event objects directly to an endpoint on your server. Webhooks are
- * managed in your account
- * settings, and our Using
- * Webhooks guide will help you get set up.
- *
- * When using Connect, you can also
- * receive notifications of events that occur in connected accounts. For these
- * events, there will be an additional account attribute in the
- * received Event object.
- *
- * NOTE: Right now, access to events through the Retrieve Event API is
- * guaranteed only for 30 days.
- *
- * This class includes constants for the possible string representations of
- * event types. See https://stripe.com/docs/api#event_types for more details.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property string $account The connected account that originated the event.
- * @property null|string $api_version The Stripe API version used to render data. Note: This property is populated only for events on or after October 31, 2014.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property \Stripe\StripeObject $data
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property int $pending_webhooks Number of webhooks that have yet to be successfully delivered (i.e., to return a 20x response) to the URLs you've specified.
- * @property null|\Stripe\StripeObject $request Information on the API request that instigated the event.
- * @property string $type Description of the event (e.g., invoice.created or charge.refunded).
- */
-class Event extends ApiResource
-{
- const OBJECT_NAME = 'event';
-
- use ApiOperations\All;
- use ApiOperations\Retrieve;
-
- const ACCOUNT_APPLICATION_AUTHORIZED = 'account.application.authorized';
- const ACCOUNT_APPLICATION_DEAUTHORIZED = 'account.application.deauthorized';
- const ACCOUNT_EXTERNAL_ACCOUNT_CREATED = 'account.external_account.created';
- const ACCOUNT_EXTERNAL_ACCOUNT_DELETED = 'account.external_account.deleted';
- const ACCOUNT_EXTERNAL_ACCOUNT_UPDATED = 'account.external_account.updated';
- const ACCOUNT_UPDATED = 'account.updated';
- const APPLICATION_FEE_CREATED = 'application_fee.created';
- const APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated';
- const APPLICATION_FEE_REFUNDED = 'application_fee.refunded';
- const BALANCE_AVAILABLE = 'balance.available';
- const BILLING_PORTAL_CONFIGURATION_CREATED = 'billing_portal.configuration.created';
- const BILLING_PORTAL_CONFIGURATION_UPDATED = 'billing_portal.configuration.updated';
- const CAPABILITY_UPDATED = 'capability.updated';
- const CASH_BALANCE_FUNDS_AVAILABLE = 'cash_balance.funds_available';
- const CHARGE_CAPTURED = 'charge.captured';
- const CHARGE_DISPUTE_CLOSED = 'charge.dispute.closed';
- const CHARGE_DISPUTE_CREATED = 'charge.dispute.created';
- const CHARGE_DISPUTE_FUNDS_REINSTATED = 'charge.dispute.funds_reinstated';
- const CHARGE_DISPUTE_FUNDS_WITHDRAWN = 'charge.dispute.funds_withdrawn';
- const CHARGE_DISPUTE_UPDATED = 'charge.dispute.updated';
- const CHARGE_EXPIRED = 'charge.expired';
- const CHARGE_FAILED = 'charge.failed';
- const CHARGE_PENDING = 'charge.pending';
- const CHARGE_REFUND_UPDATED = 'charge.refund.updated';
- const CHARGE_REFUNDED = 'charge.refunded';
- const CHARGE_SUCCEEDED = 'charge.succeeded';
- const CHARGE_UPDATED = 'charge.updated';
- const CHECKOUT_SESSION_ASYNC_PAYMENT_FAILED = 'checkout.session.async_payment_failed';
- const CHECKOUT_SESSION_ASYNC_PAYMENT_SUCCEEDED = 'checkout.session.async_payment_succeeded';
- const CHECKOUT_SESSION_COMPLETED = 'checkout.session.completed';
- const CHECKOUT_SESSION_EXPIRED = 'checkout.session.expired';
- const COUPON_CREATED = 'coupon.created';
- const COUPON_DELETED = 'coupon.deleted';
- const COUPON_UPDATED = 'coupon.updated';
- const CREDIT_NOTE_CREATED = 'credit_note.created';
- const CREDIT_NOTE_UPDATED = 'credit_note.updated';
- const CREDIT_NOTE_VOIDED = 'credit_note.voided';
- const CUSTOMER_CREATED = 'customer.created';
- const CUSTOMER_DELETED = 'customer.deleted';
- const CUSTOMER_DISCOUNT_CREATED = 'customer.discount.created';
- const CUSTOMER_DISCOUNT_DELETED = 'customer.discount.deleted';
- const CUSTOMER_DISCOUNT_UPDATED = 'customer.discount.updated';
- const CUSTOMER_SOURCE_CREATED = 'customer.source.created';
- const CUSTOMER_SOURCE_DELETED = 'customer.source.deleted';
- const CUSTOMER_SOURCE_EXPIRING = 'customer.source.expiring';
- const CUSTOMER_SOURCE_UPDATED = 'customer.source.updated';
- const CUSTOMER_SUBSCRIPTION_CREATED = 'customer.subscription.created';
- const CUSTOMER_SUBSCRIPTION_DELETED = 'customer.subscription.deleted';
- const CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_APPLIED = 'customer.subscription.pending_update_applied';
- const CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_EXPIRED = 'customer.subscription.pending_update_expired';
- const CUSTOMER_SUBSCRIPTION_TRIAL_WILL_END = 'customer.subscription.trial_will_end';
- const CUSTOMER_SUBSCRIPTION_UPDATED = 'customer.subscription.updated';
- const CUSTOMER_TAX_ID_CREATED = 'customer.tax_id.created';
- const CUSTOMER_TAX_ID_DELETED = 'customer.tax_id.deleted';
- const CUSTOMER_TAX_ID_UPDATED = 'customer.tax_id.updated';
- const CUSTOMER_UPDATED = 'customer.updated';
- const FILE_CREATED = 'file.created';
- const IDENTITY_VERIFICATION_SESSION_CANCELED = 'identity.verification_session.canceled';
- const IDENTITY_VERIFICATION_SESSION_CREATED = 'identity.verification_session.created';
- const IDENTITY_VERIFICATION_SESSION_PROCESSING = 'identity.verification_session.processing';
- const IDENTITY_VERIFICATION_SESSION_REDACTED = 'identity.verification_session.redacted';
- const IDENTITY_VERIFICATION_SESSION_REQUIRES_INPUT = 'identity.verification_session.requires_input';
- const IDENTITY_VERIFICATION_SESSION_VERIFIED = 'identity.verification_session.verified';
- const INVOICE_CREATED = 'invoice.created';
- const INVOICE_DELETED = 'invoice.deleted';
- const INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed';
- const INVOICE_FINALIZED = 'invoice.finalized';
- const INVOICE_MARKED_UNCOLLECTIBLE = 'invoice.marked_uncollectible';
- const INVOICE_PAID = 'invoice.paid';
- const INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required';
- const INVOICE_PAYMENT_FAILED = 'invoice.payment_failed';
- const INVOICE_PAYMENT_SUCCEEDED = 'invoice.payment_succeeded';
- const INVOICE_SENT = 'invoice.sent';
- const INVOICE_UPCOMING = 'invoice.upcoming';
- const INVOICE_UPDATED = 'invoice.updated';
- const INVOICE_VOIDED = 'invoice.voided';
- const INVOICEITEM_CREATED = 'invoiceitem.created';
- const INVOICEITEM_DELETED = 'invoiceitem.deleted';
- const INVOICEITEM_UPDATED = 'invoiceitem.updated';
- const ISSUER_FRAUD_RECORD_CREATED = 'issuer_fraud_record.created';
- const ISSUING_AUTHORIZATION_CREATED = 'issuing_authorization.created';
- const ISSUING_AUTHORIZATION_REQUEST = 'issuing_authorization.request';
- const ISSUING_AUTHORIZATION_UPDATED = 'issuing_authorization.updated';
- const ISSUING_CARD_CREATED = 'issuing_card.created';
- const ISSUING_CARD_UPDATED = 'issuing_card.updated';
- const ISSUING_CARDHOLDER_CREATED = 'issuing_cardholder.created';
- const ISSUING_CARDHOLDER_UPDATED = 'issuing_cardholder.updated';
- const ISSUING_DISPUTE_CLOSED = 'issuing_dispute.closed';
- const ISSUING_DISPUTE_CREATED = 'issuing_dispute.created';
- const ISSUING_DISPUTE_FUNDS_REINSTATED = 'issuing_dispute.funds_reinstated';
- const ISSUING_DISPUTE_SUBMITTED = 'issuing_dispute.submitted';
- const ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated';
- const ISSUING_TRANSACTION_CREATED = 'issuing_transaction.created';
- const ISSUING_TRANSACTION_UPDATED = 'issuing_transaction.updated';
- const MANDATE_UPDATED = 'mandate.updated';
- const ORDER_CREATED = 'order.created';
- const ORDER_PAYMENT_FAILED = 'order.payment_failed';
- const ORDER_PAYMENT_SUCCEEDED = 'order.payment_succeeded';
- const ORDER_UPDATED = 'order.updated';
- const ORDER_RETURN_CREATED = 'order_return.created';
- const PAYMENT_INTENT_AMOUNT_CAPTURABLE_UPDATED = 'payment_intent.amount_capturable_updated';
- const PAYMENT_INTENT_CANCELED = 'payment_intent.canceled';
- const PAYMENT_INTENT_CREATED = 'payment_intent.created';
- const PAYMENT_INTENT_PARTIALLY_FUNDED = 'payment_intent.partially_funded';
- const PAYMENT_INTENT_PAYMENT_FAILED = 'payment_intent.payment_failed';
- const PAYMENT_INTENT_PROCESSING = 'payment_intent.processing';
- const PAYMENT_INTENT_REQUIRES_ACTION = 'payment_intent.requires_action';
- const PAYMENT_INTENT_SUCCEEDED = 'payment_intent.succeeded';
- const PAYMENT_LINK_CREATED = 'payment_link.created';
- const PAYMENT_LINK_UPDATED = 'payment_link.updated';
- const PAYMENT_METHOD_ATTACHED = 'payment_method.attached';
- const PAYMENT_METHOD_AUTOMATICALLY_UPDATED = 'payment_method.automatically_updated';
- const PAYMENT_METHOD_CARD_AUTOMATICALLY_UPDATED = 'payment_method.card_automatically_updated';
- const PAYMENT_METHOD_DETACHED = 'payment_method.detached';
- const PAYMENT_METHOD_UPDATED = 'payment_method.updated';
- const PAYOUT_CANCELED = 'payout.canceled';
- const PAYOUT_CREATED = 'payout.created';
- const PAYOUT_FAILED = 'payout.failed';
- const PAYOUT_PAID = 'payout.paid';
- const PAYOUT_UPDATED = 'payout.updated';
- const PERSON_CREATED = 'person.created';
- const PERSON_DELETED = 'person.deleted';
- const PERSON_UPDATED = 'person.updated';
- const PING = 'ping';
- const PLAN_CREATED = 'plan.created';
- const PLAN_DELETED = 'plan.deleted';
- const PLAN_UPDATED = 'plan.updated';
- const PRICE_CREATED = 'price.created';
- const PRICE_DELETED = 'price.deleted';
- const PRICE_UPDATED = 'price.updated';
- const PRODUCT_CREATED = 'product.created';
- const PRODUCT_DELETED = 'product.deleted';
- const PRODUCT_UPDATED = 'product.updated';
- const PROMOTION_CODE_CREATED = 'promotion_code.created';
- const PROMOTION_CODE_DELETED = 'promotion_code.deleted';
- const PROMOTION_CODE_UPDATED = 'promotion_code.updated';
- const QUOTE_ACCEPTED = 'quote.accepted';
- const QUOTE_CANCELED = 'quote.canceled';
- const QUOTE_CREATED = 'quote.created';
- const QUOTE_FINALIZED = 'quote.finalized';
- const RADAR_EARLY_FRAUD_WARNING_CREATED = 'radar.early_fraud_warning.created';
- const RADAR_EARLY_FRAUD_WARNING_UPDATED = 'radar.early_fraud_warning.updated';
- const RECIPIENT_CREATED = 'recipient.created';
- const RECIPIENT_DELETED = 'recipient.deleted';
- const RECIPIENT_UPDATED = 'recipient.updated';
- const REPORTING_REPORT_RUN_FAILED = 'reporting.report_run.failed';
- const REPORTING_REPORT_RUN_SUCCEEDED = 'reporting.report_run.succeeded';
- const REPORTING_REPORT_TYPE_UPDATED = 'reporting.report_type.updated';
- const REVIEW_CLOSED = 'review.closed';
- const REVIEW_OPENED = 'review.opened';
- const SETUP_INTENT_CANCELED = 'setup_intent.canceled';
- const SETUP_INTENT_CREATED = 'setup_intent.created';
- const SETUP_INTENT_REQUIRES_ACTION = 'setup_intent.requires_action';
- const SETUP_INTENT_SETUP_FAILED = 'setup_intent.setup_failed';
- const SETUP_INTENT_SUCCEEDED = 'setup_intent.succeeded';
- const SIGMA_SCHEDULED_QUERY_RUN_CREATED = 'sigma.scheduled_query_run.created';
- const SKU_CREATED = 'sku.created';
- const SKU_DELETED = 'sku.deleted';
- const SKU_UPDATED = 'sku.updated';
- const SOURCE_CANCELED = 'source.canceled';
- const SOURCE_CHARGEABLE = 'source.chargeable';
- const SOURCE_FAILED = 'source.failed';
- const SOURCE_MANDATE_NOTIFICATION = 'source.mandate_notification';
- const SOURCE_REFUND_ATTRIBUTES_REQUIRED = 'source.refund_attributes_required';
- const SOURCE_TRANSACTION_CREATED = 'source.transaction.created';
- const SOURCE_TRANSACTION_UPDATED = 'source.transaction.updated';
- const SUBSCRIPTION_SCHEDULE_ABORTED = 'subscription_schedule.aborted';
- const SUBSCRIPTION_SCHEDULE_CANCELED = 'subscription_schedule.canceled';
- const SUBSCRIPTION_SCHEDULE_COMPLETED = 'subscription_schedule.completed';
- const SUBSCRIPTION_SCHEDULE_CREATED = 'subscription_schedule.created';
- const SUBSCRIPTION_SCHEDULE_EXPIRING = 'subscription_schedule.expiring';
- const SUBSCRIPTION_SCHEDULE_RELEASED = 'subscription_schedule.released';
- const SUBSCRIPTION_SCHEDULE_UPDATED = 'subscription_schedule.updated';
- const TAX_RATE_CREATED = 'tax_rate.created';
- const TAX_RATE_UPDATED = 'tax_rate.updated';
- const TERMINAL_READER_ACTION_FAILED = 'terminal.reader.action_failed';
- const TERMINAL_READER_ACTION_SUCCEEDED = 'terminal.reader.action_succeeded';
- const TEST_HELPERS_TEST_CLOCK_ADVANCING = 'test_helpers.test_clock.advancing';
- const TEST_HELPERS_TEST_CLOCK_CREATED = 'test_helpers.test_clock.created';
- const TEST_HELPERS_TEST_CLOCK_DELETED = 'test_helpers.test_clock.deleted';
- const TEST_HELPERS_TEST_CLOCK_INTERNAL_FAILURE = 'test_helpers.test_clock.internal_failure';
- const TEST_HELPERS_TEST_CLOCK_READY = 'test_helpers.test_clock.ready';
- const TOPUP_CANCELED = 'topup.canceled';
- const TOPUP_CREATED = 'topup.created';
- const TOPUP_FAILED = 'topup.failed';
- const TOPUP_REVERSED = 'topup.reversed';
- const TOPUP_SUCCEEDED = 'topup.succeeded';
- const TRANSFER_CREATED = 'transfer.created';
- const TRANSFER_FAILED = 'transfer.failed';
- const TRANSFER_PAID = 'transfer.paid';
- const TRANSFER_REVERSED = 'transfer.reversed';
- const TRANSFER_UPDATED = 'transfer.updated';
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Exception/ApiConnectionException.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Exception/ApiConnectionException.php
deleted file mode 100644
index 33f2ede9..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Exception/ApiConnectionException.php
+++ /dev/null
@@ -1,12 +0,0 @@
-setHttpStatus($httpStatus);
- $instance->setHttpBody($httpBody);
- $instance->setJsonBody($jsonBody);
- $instance->setHttpHeaders($httpHeaders);
- $instance->setStripeCode($stripeCode);
-
- $instance->setRequestId(null);
- if ($httpHeaders && isset($httpHeaders['Request-Id'])) {
- $instance->setRequestId($httpHeaders['Request-Id']);
- }
-
- $instance->setError($instance->constructErrorObject());
-
- return $instance;
- }
-
- /**
- * Gets the Stripe error object.
- *
- * @return null|\Stripe\ErrorObject
- */
- public function getError()
- {
- return $this->error;
- }
-
- /**
- * Sets the Stripe error object.
- *
- * @param null|\Stripe\ErrorObject $error
- */
- public function setError($error)
- {
- $this->error = $error;
- }
-
- /**
- * Gets the HTTP body as a string.
- *
- * @return null|string
- */
- public function getHttpBody()
- {
- return $this->httpBody;
- }
-
- /**
- * Sets the HTTP body as a string.
- *
- * @param null|string $httpBody
- */
- public function setHttpBody($httpBody)
- {
- $this->httpBody = $httpBody;
- }
-
- /**
- * Gets the HTTP headers array.
- *
- * @return null|array|\Stripe\Util\CaseInsensitiveArray
- */
- public function getHttpHeaders()
- {
- return $this->httpHeaders;
- }
-
- /**
- * Sets the HTTP headers array.
- *
- * @param null|array|\Stripe\Util\CaseInsensitiveArray $httpHeaders
- */
- public function setHttpHeaders($httpHeaders)
- {
- $this->httpHeaders = $httpHeaders;
- }
-
- /**
- * Gets the HTTP status code.
- *
- * @return null|int
- */
- public function getHttpStatus()
- {
- return $this->httpStatus;
- }
-
- /**
- * Sets the HTTP status code.
- *
- * @param null|int $httpStatus
- */
- public function setHttpStatus($httpStatus)
- {
- $this->httpStatus = $httpStatus;
- }
-
- /**
- * Gets the JSON deserialized body.
- *
- * @return null|array
- */
- public function getJsonBody()
- {
- return $this->jsonBody;
- }
-
- /**
- * Sets the JSON deserialized body.
- *
- * @param null|array $jsonBody
- */
- public function setJsonBody($jsonBody)
- {
- $this->jsonBody = $jsonBody;
- }
-
- /**
- * Gets the Stripe request ID.
- *
- * @return null|string
- */
- public function getRequestId()
- {
- return $this->requestId;
- }
-
- /**
- * Sets the Stripe request ID.
- *
- * @param null|string $requestId
- */
- public function setRequestId($requestId)
- {
- $this->requestId = $requestId;
- }
-
- /**
- * Gets the Stripe error code.
- *
- * Cf. the `CODE_*` constants on {@see \Stripe\ErrorObject} for possible
- * values.
- *
- * @return null|string
- */
- public function getStripeCode()
- {
- return $this->stripeCode;
- }
-
- /**
- * Sets the Stripe error code.
- *
- * @param null|string $stripeCode
- */
- public function setStripeCode($stripeCode)
- {
- $this->stripeCode = $stripeCode;
- }
-
- /**
- * Returns the string representation of the exception.
- *
- * @return string
- */
- public function __toString()
- {
- $statusStr = (null === $this->getHttpStatus()) ? '' : "(Status {$this->getHttpStatus()}) ";
- $idStr = (null === $this->getRequestId()) ? '' : "(Request {$this->getRequestId()}) ";
-
- return "{$statusStr}{$idStr}{$this->getMessage()}";
- }
-
- protected function constructErrorObject()
- {
- if (null === $this->jsonBody || !\array_key_exists('error', $this->jsonBody)) {
- return null;
- }
-
- return \Stripe\ErrorObject::constructFrom($this->jsonBody['error']);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Exception/AuthenticationException.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Exception/AuthenticationException.php
deleted file mode 100644
index 9e5c718b..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Exception/AuthenticationException.php
+++ /dev/null
@@ -1,11 +0,0 @@
-setDeclineCode($declineCode);
- $instance->setStripeParam($stripeParam);
-
- return $instance;
- }
-
- /**
- * Gets the decline code.
- *
- * @return null|string
- */
- public function getDeclineCode()
- {
- return $this->declineCode;
- }
-
- /**
- * Sets the decline code.
- *
- * @param null|string $declineCode
- */
- public function setDeclineCode($declineCode)
- {
- $this->declineCode = $declineCode;
- }
-
- /**
- * Gets the parameter related to the error.
- *
- * @return null|string
- */
- public function getStripeParam()
- {
- return $this->stripeParam;
- }
-
- /**
- * Sets the parameter related to the error.
- *
- * @param null|string $stripeParam
- */
- public function setStripeParam($stripeParam)
- {
- $this->stripeParam = $stripeParam;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Exception/ExceptionInterface.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Exception/ExceptionInterface.php
deleted file mode 100644
index c84f37de..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Exception/ExceptionInterface.php
+++ /dev/null
@@ -1,22 +0,0 @@
-setStripeParam($stripeParam);
-
- return $instance;
- }
-
- /**
- * Gets the parameter related to the error.
- *
- * @return null|string
- */
- public function getStripeParam()
- {
- return $this->stripeParam;
- }
-
- /**
- * Sets the parameter related to the error.
- *
- * @param null|string $stripeParam
- */
- public function setStripeParam($stripeParam)
- {
- $this->stripeParam = $stripeParam;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Exception/OAuth/ExceptionInterface.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Exception/OAuth/ExceptionInterface.php
deleted file mode 100644
index dd426620..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Exception/OAuth/ExceptionInterface.php
+++ /dev/null
@@ -1,10 +0,0 @@
-jsonBody) {
- return null;
- }
-
- return \Stripe\OAuthErrorObject::constructFrom($this->jsonBody);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Exception/OAuth/UnknownOAuthErrorException.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Exception/OAuth/UnknownOAuthErrorException.php
deleted file mode 100644
index c8dba29b..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Exception/OAuth/UnknownOAuthErrorException.php
+++ /dev/null
@@ -1,12 +0,0 @@
-setHttpBody($httpBody);
- $instance->setSigHeader($sigHeader);
-
- return $instance;
- }
-
- /**
- * Gets the HTTP body as a string.
- *
- * @return null|string
- */
- public function getHttpBody()
- {
- return $this->httpBody;
- }
-
- /**
- * Sets the HTTP body as a string.
- *
- * @param null|string $httpBody
- */
- public function setHttpBody($httpBody)
- {
- $this->httpBody = $httpBody;
- }
-
- /**
- * Gets the `Stripe-Signature` HTTP header.
- *
- * @return null|string
- */
- public function getSigHeader()
- {
- return $this->sigHeader;
- }
-
- /**
- * Sets the `Stripe-Signature` HTTP header.
- *
- * @param null|string $sigHeader
- */
- public function setSigHeader($sigHeader)
- {
- $this->sigHeader = $sigHeader;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Exception/UnexpectedValueException.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Exception/UnexpectedValueException.php
deleted file mode 100644
index 0a629edf..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Exception/UnexpectedValueException.php
+++ /dev/null
@@ -1,7 +0,0 @@
-Exchange Rate objects allow you to determine the rates that Stripe
- * is currently using to convert from one currency to another. Since this number is
- * variable throughout the day, there are various reasons why you might want to
- * know the current rate (for example, to dynamically price an item for a user with
- * a default payment in a foreign currency).
- *
- * If you want a guarantee that the charge is made with a certain exchange rate you
- * expect is current, you can pass in exchange_rate to charges
- * endpoints. If the value is no longer up to date, the charge won't go through.
- * Please refer to our Exchange
- * Rates API guide for more details.
- *
- * @property string $id Unique identifier for the object. Represented as the three-letter ISO currency code in lowercase.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property \Stripe\StripeObject $rates Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency.
- */
-class ExchangeRate extends ApiResource
-{
- const OBJECT_NAME = 'exchange_rate';
-
- use ApiOperations\All;
- use ApiOperations\Retrieve;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/File.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/File.php
deleted file mode 100644
index 04646d30..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/File.php
+++ /dev/null
@@ -1,87 +0,0 @@
-create file request (for
- * example, when uploading dispute evidence) or it may have been created by Stripe
- * (for example, the results of a Sigma scheduled
- * query).
- *
- * Related guide: File Upload
- * Guide.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|int $expires_at The time at which the file expires and is no longer available in epoch seconds.
- * @property null|string $filename A filename for the file, suitable for saving to a filesystem.
- * @property null|\Stripe\Collection<\Stripe\FileLink> $links A list of file links that point at this file.
- * @property string $purpose The purpose of the uploaded file.
- * @property int $size The size in bytes of the file object.
- * @property null|string $title A user friendly title for the document.
- * @property null|string $type The type of the file returned (e.g., csv, pdf, jpg, or png).
- * @property null|string $url The URL from which the file can be downloaded using your live secret API key.
- */
-class File extends ApiResource
-{
- const OBJECT_NAME = 'file';
-
- use ApiOperations\All;
- use ApiOperations\Retrieve;
-
- const PURPOSE_ACCOUNT_REQUIREMENT = 'account_requirement';
- const PURPOSE_ADDITIONAL_VERIFICATION = 'additional_verification';
- const PURPOSE_BUSINESS_ICON = 'business_icon';
- const PURPOSE_BUSINESS_LOGO = 'business_logo';
- const PURPOSE_CUSTOMER_SIGNATURE = 'customer_signature';
- const PURPOSE_DISPUTE_EVIDENCE = 'dispute_evidence';
- const PURPOSE_DOCUMENT_PROVIDER_IDENTITY_DOCUMENT = 'document_provider_identity_document';
- const PURPOSE_FINANCE_REPORT_RUN = 'finance_report_run';
- const PURPOSE_IDENTITY_DOCUMENT = 'identity_document';
- const PURPOSE_IDENTITY_DOCUMENT_DOWNLOADABLE = 'identity_document_downloadable';
- const PURPOSE_PCI_DOCUMENT = 'pci_document';
- const PURPOSE_SELFIE = 'selfie';
- const PURPOSE_SIGMA_SCHEDULED_QUERY = 'sigma_scheduled_query';
- const PURPOSE_TAX_DOCUMENT_USER_UPLOAD = 'tax_document_user_upload';
-
- // This resource can have two different object names. In latter API
- // versions, only `file` is used, but since stripe-php may be used with
- // any API version, we need to support deserializing the older
- // `file_upload` object into the same class.
- const OBJECT_NAME_ALT = 'file_upload';
-
- use ApiOperations\Create {
- create as protected _create;
- }
-
- public static function classUrl()
- {
- return '/v1/files';
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\File the created file
- */
- public static function create($params = null, $opts = null)
- {
- $opts = \Stripe\Util\RequestOptions::parse($opts);
- if (null === $opts->apiBase) {
- $opts->apiBase = Stripe::$apiUploadBase;
- }
- // Manually flatten params, otherwise curl's multipart encoder will
- // choke on nested arrays.
- $flatParams = \array_column(\Stripe\Util\Util::flattenParams($params), 1, 0);
-
- return static::_create($flatParams, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/FileLink.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/FileLink.php
deleted file mode 100644
index ce3b10bd..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/FileLink.php
+++ /dev/null
@@ -1,30 +0,0 @@
-File object with non-Stripe users, you
- * can create a FileLink. FileLinks contain a URL that
- * can be used to retrieve the contents of the file without authentication.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property bool $expired Whether this link is already expired.
- * @property null|int $expires_at Time at which the link expires.
- * @property string|\Stripe\File $file The file object this link points to.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|string $url The publicly accessible URL to download the file.
- */
-class FileLink extends ApiResource
-{
- const OBJECT_NAME = 'file_link';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/FinancialConnections/Account.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/FinancialConnections/Account.php
deleted file mode 100644
index f24ef43d..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/FinancialConnections/Account.php
+++ /dev/null
@@ -1,84 +0,0 @@
-subcategory.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string $display_name A human-readable name that has been assigned to this account, either by the account holder or by the institution.
- * @property string $institution_name The name of the institution that holds this account.
- * @property null|string $last4 The last 4 digits of the account number. If present, this will be 4 numeric characters.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|string|\Stripe\FinancialConnections\AccountOwnership $ownership The most recent information about the account's owners.
- * @property null|\Stripe\StripeObject $ownership_refresh The state of the most recent attempt to refresh the account owners.
- * @property null|string[] $permissions The list of permissions granted by this account.
- * @property string $status The status of the link to the account.
- * @property string $subcategory
If category is cash, one of:
- checking - savings - other
If category is credit, one of:
- mortgage - line_of_credit - credit_card - other
If category is investment or other, this will be other.
- * @property string[] $supported_payment_method_types The PaymentMethod type(s) that can be created from this account.
- */
-class Account extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'financial_connections.account';
-
- use \Stripe\ApiOperations\Retrieve;
-
- const CATEGORY_CASH = 'cash';
- const CATEGORY_CREDIT = 'credit';
- const CATEGORY_INVESTMENT = 'investment';
- const CATEGORY_OTHER = 'other';
-
- const STATUS_ACTIVE = 'active';
- const STATUS_DISCONNECTED = 'disconnected';
- const STATUS_INACTIVE = 'inactive';
-
- const SUBCATEGORY_CHECKING = 'checking';
- const SUBCATEGORY_CREDIT_CARD = 'credit_card';
- const SUBCATEGORY_LINE_OF_CREDIT = 'line_of_credit';
- const SUBCATEGORY_MORTGAGE = 'mortgage';
- const SUBCATEGORY_OTHER = 'other';
- const SUBCATEGORY_SAVINGS = 'savings';
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\FinancialConnections\Account the disconnected account
- */
- public function disconnect($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/disconnect';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\FinancialConnections\Account the refreshed account
- */
- public function refresh($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/refresh';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/FinancialConnections/AccountOwner.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/FinancialConnections/AccountOwner.php
deleted file mode 100644
index 53a7f1a4..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/FinancialConnections/AccountOwner.php
+++ /dev/null
@@ -1,20 +0,0 @@
- $owners A paginated list of owners for this account.
- */
-class AccountOwnership extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'financial_connections.account_ownership';
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/FinancialConnections/Session.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/FinancialConnections/Session.php
deleted file mode 100644
index 8d55cd06..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/FinancialConnections/Session.php
+++ /dev/null
@@ -1,27 +0,0 @@
- $accounts The accounts that were collected as part of this Session.
- * @property string $client_secret A value that will be passed to the client to launch the authentication flow.
- * @property \Stripe\StripeObject $filters
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property string[] $permissions Permissions requested for accounts collected during this session.
- * @property string $return_url For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
- */
-class Session extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'financial_connections.session';
-
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Retrieve;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/FundingInstructions.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/FundingInstructions.php
deleted file mode 100644
index af799914..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/FundingInstructions.php
+++ /dev/null
@@ -1,28 +0,0 @@
-balance
- * that is automatically applied to future invoices and payments using the
- * customer_balance payment method. Customers can fund this balance by
- * initiating a bank transfer to any account in the
- * financial_addresses field. Related guide: Customer
- * Balance - Funding Instructions to learn more.
- *
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property \Stripe\StripeObject $bank_transfer
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property string $funding_type The funding_type of the returned instructions
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- */
-class FundingInstructions extends ApiResource
-{
- const OBJECT_NAME = 'funding_instructions';
-
- const FUNDING_TYPE_BANK_TRANSFER = 'bank_transfer';
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/HttpClient/ClientInterface.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/HttpClient/ClientInterface.php
deleted file mode 100644
index 3c7861e5..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/HttpClient/ClientInterface.php
+++ /dev/null
@@ -1,22 +0,0 @@
-defaultOptions = $defaultOptions;
- $this->randomGenerator = $randomGenerator ?: new Util\RandomGenerator();
- $this->initUserAgentInfo();
-
- $this->enableHttp2 = $this->canSafelyUseHttp2();
- }
-
- public function __destruct()
- {
- $this->closeCurlHandle();
- }
-
- public function initUserAgentInfo()
- {
- $curlVersion = \curl_version();
- $this->userAgentInfo = [
- 'httplib' => 'curl ' . $curlVersion['version'],
- 'ssllib' => $curlVersion['ssl_version'],
- ];
- }
-
- public function getDefaultOptions()
- {
- return $this->defaultOptions;
- }
-
- public function getUserAgentInfo()
- {
- return $this->userAgentInfo;
- }
-
- /**
- * @return bool
- */
- public function getEnablePersistentConnections()
- {
- return $this->enablePersistentConnections;
- }
-
- /**
- * @param bool $enable
- */
- public function setEnablePersistentConnections($enable)
- {
- $this->enablePersistentConnections = $enable;
- }
-
- /**
- * @return bool
- */
- public function getEnableHttp2()
- {
- return $this->enableHttp2;
- }
-
- /**
- * @param bool $enable
- */
- public function setEnableHttp2($enable)
- {
- $this->enableHttp2 = $enable;
- }
-
- /**
- * @return null|callable
- */
- public function getRequestStatusCallback()
- {
- return $this->requestStatusCallback;
- }
-
- /**
- * Sets a callback that is called after each request. The callback will
- * receive the following parameters:
- *
- *
string $rbody The response body
- *
integer $rcode The response status code
- *
\Stripe\Util\CaseInsensitiveArray $rheaders The response headers
- *
integer $errno The curl error number
- *
string|null $message The curl error message
- *
boolean $shouldRetry Whether the request will be retried
- *
integer $numRetries The number of the retry attempt
- * .
- *
- * @param null|callable $requestStatusCallback
- */
- public function setRequestStatusCallback($requestStatusCallback)
- {
- $this->requestStatusCallback = $requestStatusCallback;
- }
-
- // USER DEFINED TIMEOUTS
-
- const DEFAULT_TIMEOUT = 80;
- const DEFAULT_CONNECT_TIMEOUT = 30;
-
- private $timeout = self::DEFAULT_TIMEOUT;
- private $connectTimeout = self::DEFAULT_CONNECT_TIMEOUT;
-
- public function setTimeout($seconds)
- {
- $this->timeout = (int) \max($seconds, 0);
-
- return $this;
- }
-
- public function setConnectTimeout($seconds)
- {
- $this->connectTimeout = (int) \max($seconds, 0);
-
- return $this;
- }
-
- public function getTimeout()
- {
- return $this->timeout;
- }
-
- public function getConnectTimeout()
- {
- return $this->connectTimeout;
- }
-
- // END OF USER DEFINED TIMEOUTS
-
- private function constructRequest($method, $absUrl, $headers, $params, $hasFile)
- {
- $method = \strtolower($method);
-
- $opts = [];
- if (\is_callable($this->defaultOptions)) { // call defaultOptions callback, set options to return value
- $opts = \call_user_func_array($this->defaultOptions, \func_get_args());
- if (!\is_array($opts)) {
- throw new Exception\UnexpectedValueException('Non-array value returned by defaultOptions CurlClient callback');
- }
- } elseif (\is_array($this->defaultOptions)) { // set default curlopts from array
- $opts = $this->defaultOptions;
- }
-
- $params = Util\Util::objectsToIds($params);
-
- if ('get' === $method) {
- if ($hasFile) {
- throw new Exception\UnexpectedValueException(
- 'Issuing a GET request with a file parameter'
- );
- }
- $opts[\CURLOPT_HTTPGET] = 1;
- if (\count($params) > 0) {
- $encoded = Util\Util::encodeParameters($params);
- $absUrl = "{$absUrl}?{$encoded}";
- }
- } elseif ('post' === $method) {
- $opts[\CURLOPT_POST] = 1;
- $opts[\CURLOPT_POSTFIELDS] = $hasFile ? $params : Util\Util::encodeParameters($params);
- } elseif ('delete' === $method) {
- $opts[\CURLOPT_CUSTOMREQUEST] = 'DELETE';
- if (\count($params) > 0) {
- $encoded = Util\Util::encodeParameters($params);
- $absUrl = "{$absUrl}?{$encoded}";
- }
- } else {
- throw new Exception\UnexpectedValueException("Unrecognized method {$method}");
- }
-
- // It is only safe to retry network failures on POST requests if we
- // add an Idempotency-Key header
- if (('post' === $method) && (Stripe::$maxNetworkRetries > 0)) {
- if (!$this->hasHeader($headers, 'Idempotency-Key')) {
- $headers[] = 'Idempotency-Key: ' . $this->randomGenerator->uuid();
- }
- }
-
- // By default for large request body sizes (> 1024 bytes), cURL will
- // send a request without a body and with a `Expect: 100-continue`
- // header, which gives the server a chance to respond with an error
- // status code in cases where one can be determined right away (say
- // on an authentication problem for example), and saves the "large"
- // request body from being ever sent.
- //
- // Unfortunately, the bindings don't currently correctly handle the
- // success case (in which the server sends back a 100 CONTINUE), so
- // we'll error under that condition. To compensate for that problem
- // for the time being, override cURL's behavior by simply always
- // sending an empty `Expect:` header.
- $headers[] = 'Expect: ';
-
- $absUrl = Util\Util::utf8($absUrl);
- $opts[\CURLOPT_URL] = $absUrl;
- $opts[\CURLOPT_RETURNTRANSFER] = true;
- $opts[\CURLOPT_CONNECTTIMEOUT] = $this->connectTimeout;
- $opts[\CURLOPT_TIMEOUT] = $this->timeout;
- $opts[\CURLOPT_HTTPHEADER] = $headers;
- $opts[\CURLOPT_CAINFO] = Stripe::getCABundlePath();
- if (!Stripe::getVerifySslCerts()) {
- $opts[\CURLOPT_SSL_VERIFYPEER] = false;
- }
-
- if (!isset($opts[\CURLOPT_HTTP_VERSION]) && $this->getEnableHttp2()) {
- // For HTTPS requests, enable HTTP/2, if supported
- $opts[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2TLS;
- }
-
- // If the user didn't explicitly specify a CURLOPT_IPRESOLVE option, we
- // force IPv4 resolving as Stripe's API servers are only accessible over
- // IPv4 (see. https://github.com/stripe/stripe-php/issues/1045).
- // We let users specify a custom option in case they need to say proxy
- // through an IPv6 proxy.
- if (!isset($opts[\CURLOPT_IPRESOLVE])) {
- $opts[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V4;
- }
-
- return [$opts, $absUrl];
- }
-
- public function request($method, $absUrl, $headers, $params, $hasFile)
- {
- list($opts, $absUrl) = $this->constructRequest($method, $absUrl, $headers, $params, $hasFile);
-
- list($rbody, $rcode, $rheaders) = $this->executeRequestWithRetries($opts, $absUrl);
-
- return [$rbody, $rcode, $rheaders];
- }
-
- public function requestStream($method, $absUrl, $headers, $params, $hasFile, $readBodyChunk)
- {
- list($opts, $absUrl) = $this->constructRequest($method, $absUrl, $headers, $params, $hasFile);
-
- $opts[\CURLOPT_RETURNTRANSFER] = false;
- list($rbody, $rcode, $rheaders) = $this->executeStreamingRequestWithRetries($opts, $absUrl, $readBodyChunk);
-
- return [$rbody, $rcode, $rheaders];
- }
-
- /**
- * Curl permits sending \CURLOPT_HEADERFUNCTION, which is called with lines
- * from the header and \CURLOPT_WRITEFUNCTION, which is called with bytes
- * from the body. You usually want to handle the body differently depending
- * on what was in the header.
- *
- * This function makes it easier to specify different callbacks depending
- * on the contents of the heeder. After the header has been completely read
- * and the body begins to stream, it will call $determineWriteCallback with
- * the array of headers. $determineWriteCallback should, based on the
- * headers it receives, return a "writeCallback" that describes what to do
- * with the incoming HTTP response body.
- *
- * @param array $opts
- * @param callable $determineWriteCallback
- *
- * @return array
- */
- private function useHeadersToDetermineWriteCallback($opts, $determineWriteCallback)
- {
- $rheaders = new Util\CaseInsensitiveArray();
- $headerCallback = function ($curl, $header_line) use (&$rheaders) {
- return self::parseLineIntoHeaderArray($header_line, $rheaders);
- };
-
- $writeCallback = null;
- $writeCallbackWrapper = function ($curl, $data) use (&$writeCallback, &$rheaders, &$determineWriteCallback) {
- if (null === $writeCallback) {
- $writeCallback = \call_user_func_array($determineWriteCallback, [$rheaders]);
- }
-
- return \call_user_func_array($writeCallback, [$curl, $data]);
- };
-
- return [$headerCallback, $writeCallbackWrapper];
- }
-
- private static function parseLineIntoHeaderArray($line, &$headers)
- {
- if (false === \strpos($line, ':')) {
- return \strlen($line);
- }
- list($key, $value) = \explode(':', \trim($line), 2);
- $headers[\trim($key)] = \trim($value);
-
- return \strlen($line);
- }
-
- /**
- * Like `executeRequestWithRetries` except:
- * 1. Does not buffer the body of a successful (status code < 300)
- * response into memory -- instead, calls the caller-provided
- * $readBodyChunk with each chunk of incoming data.
- * 2. Does not retry if a network error occurs while streaming the
- * body of a successful response.
- *
- * @param array $opts cURL options
- * @param string $absUrl
- * @param callable $readBodyChunk
- *
- * @return array
- */
- public function executeStreamingRequestWithRetries($opts, $absUrl, $readBodyChunk)
- {
- /** @var bool */
- $shouldRetry = false;
- /** @var int */
- $numRetries = 0;
-
- // Will contain the bytes of the body of the last request
- // if it was not successful and should not be retries
- /** @var null|string */
- $rbody = null;
-
- // Status code of the last request
- /** @var null|bool */
- $rcode = null;
-
- // Array of headers from the last request
- /** @var null|array */
- $lastRHeaders = null;
-
- $errno = null;
- $message = null;
-
- $determineWriteCallback = function ($rheaders) use (
- &$readBodyChunk,
- &$shouldRetry,
- &$rbody,
- &$numRetries,
- &$rcode,
- &$lastRHeaders,
- &$errno
- ) {
- $lastRHeaders = $rheaders;
- $errno = \curl_errno($this->curlHandle);
-
- $rcode = \curl_getinfo($this->curlHandle, \CURLINFO_HTTP_CODE);
-
- // Send the bytes from the body of a successful request to the caller-provided $readBodyChunk.
- if ($rcode < 300) {
- $rbody = null;
-
- return function ($curl, $data) use (&$readBodyChunk) {
- // Don't expose the $curl handle to the user, and don't require them to
- // return the length of $data.
- \call_user_func_array($readBodyChunk, [$data]);
-
- return \strlen($data);
- };
- }
-
- $shouldRetry = $this->shouldRetry($errno, $rcode, $rheaders, $numRetries);
-
- // Discard the body from an unsuccessful request that should be retried.
- if ($shouldRetry) {
- return function ($curl, $data) {
- return \strlen($data);
- };
- } else {
- // Otherwise, buffer the body into $rbody. It will need to be parsed to determine
- // which exception to throw to the user.
- $rbody = '';
-
- return function ($curl, $data) use (&$rbody) {
- $rbody .= $data;
-
- return \strlen($data);
- };
- }
- };
-
- while (true) {
- list($headerCallback, $writeCallback) = $this->useHeadersToDetermineWriteCallback($opts, $determineWriteCallback);
- $opts[\CURLOPT_HEADERFUNCTION] = $headerCallback;
- $opts[\CURLOPT_WRITEFUNCTION] = $writeCallback;
-
- $shouldRetry = false;
- $rbody = null;
- $this->resetCurlHandle();
- \curl_setopt_array($this->curlHandle, $opts);
- $result = \curl_exec($this->curlHandle);
- $errno = \curl_errno($this->curlHandle);
- if (0 !== $errno) {
- $message = \curl_error($this->curlHandle);
- }
- if (!$this->getEnablePersistentConnections()) {
- $this->closeCurlHandle();
- }
-
- if (\is_callable($this->getRequestStatusCallback())) {
- \call_user_func_array(
- $this->getRequestStatusCallback(),
- [$rbody, $rcode, $lastRHeaders, $errno, $message, $shouldRetry, $numRetries]
- );
- }
-
- if ($shouldRetry) {
- ++$numRetries;
- $sleepSeconds = $this->sleepTime($numRetries, $lastRHeaders);
- \usleep((int) ($sleepSeconds * 1000000));
- } else {
- break;
- }
- }
-
- if (0 !== $errno) {
- $this->handleCurlError($absUrl, $errno, $message, $numRetries);
- }
-
- return [$rbody, $rcode, $lastRHeaders];
- }
-
- /**
- * @param array $opts cURL options
- * @param string $absUrl
- */
- public function executeRequestWithRetries($opts, $absUrl)
- {
- $numRetries = 0;
-
- while (true) {
- $rcode = 0;
- $errno = 0;
- $message = null;
-
- // Create a callback to capture HTTP headers for the response
- $rheaders = new Util\CaseInsensitiveArray();
- $headerCallback = function ($curl, $header_line) use (&$rheaders) {
- return CurlClient::parseLineIntoHeaderArray($header_line, $rheaders);
- };
- $opts[\CURLOPT_HEADERFUNCTION] = $headerCallback;
-
- $this->resetCurlHandle();
- \curl_setopt_array($this->curlHandle, $opts);
- $rbody = \curl_exec($this->curlHandle);
-
- if (false === $rbody) {
- $errno = \curl_errno($this->curlHandle);
- $message = \curl_error($this->curlHandle);
- } else {
- $rcode = \curl_getinfo($this->curlHandle, \CURLINFO_HTTP_CODE);
- }
- if (!$this->getEnablePersistentConnections()) {
- $this->closeCurlHandle();
- }
-
- $shouldRetry = $this->shouldRetry($errno, $rcode, $rheaders, $numRetries);
-
- if (\is_callable($this->getRequestStatusCallback())) {
- \call_user_func_array(
- $this->getRequestStatusCallback(),
- [$rbody, $rcode, $rheaders, $errno, $message, $shouldRetry, $numRetries]
- );
- }
-
- if ($shouldRetry) {
- ++$numRetries;
- $sleepSeconds = $this->sleepTime($numRetries, $rheaders);
- \usleep((int) ($sleepSeconds * 1000000));
- } else {
- break;
- }
- }
-
- if (false === $rbody) {
- $this->handleCurlError($absUrl, $errno, $message, $numRetries);
- }
-
- return [$rbody, $rcode, $rheaders];
- }
-
- /**
- * @param string $url
- * @param int $errno
- * @param string $message
- * @param int $numRetries
- *
- * @throws Exception\ApiConnectionException
- */
- private function handleCurlError($url, $errno, $message, $numRetries)
- {
- switch ($errno) {
- case \CURLE_COULDNT_CONNECT:
- case \CURLE_COULDNT_RESOLVE_HOST:
- case \CURLE_OPERATION_TIMEOUTED:
- $msg = "Could not connect to Stripe ({$url}). Please check your "
- . 'internet connection and try again. If this problem persists, '
- . "you should check Stripe's service status at "
- . 'https://twitter.com/stripestatus, or';
-
- break;
-
- case \CURLE_SSL_CACERT:
- case \CURLE_SSL_PEER_CERTIFICATE:
- $msg = "Could not verify Stripe's SSL certificate. Please make sure "
- . 'that your network is not intercepting certificates. '
- . "(Try going to {$url} in your browser.) "
- . 'If this problem persists,';
-
- break;
-
- default:
- $msg = 'Unexpected error communicating with Stripe. '
- . 'If this problem persists,';
- }
- $msg .= ' let us know at support@stripe.com.';
-
- $msg .= "\n\n(Network error [errno {$errno}]: {$message})";
-
- if ($numRetries > 0) {
- $msg .= "\n\nRequest was retried {$numRetries} times.";
- }
-
- throw new Exception\ApiConnectionException($msg);
- }
-
- /**
- * Checks if an error is a problem that we should retry on. This includes both
- * socket errors that may represent an intermittent problem and some special
- * HTTP statuses.
- *
- * @param int $errno
- * @param int $rcode
- * @param array|\Stripe\Util\CaseInsensitiveArray $rheaders
- * @param int $numRetries
- *
- * @return bool
- */
- private function shouldRetry($errno, $rcode, $rheaders, $numRetries)
- {
- if ($numRetries >= Stripe::getMaxNetworkRetries()) {
- return false;
- }
-
- // Retry on timeout-related problems (either on open or read).
- if (\CURLE_OPERATION_TIMEOUTED === $errno) {
- return true;
- }
-
- // Destination refused the connection, the connection was reset, or a
- // variety of other connection failures. This could occur from a single
- // saturated server, so retry in case it's intermittent.
- if (\CURLE_COULDNT_CONNECT === $errno) {
- return true;
- }
-
- // The API may ask us not to retry (eg; if doing so would be a no-op)
- // or advise us to retry (eg; in cases of lock timeouts); we defer to that.
- if (isset($rheaders['stripe-should-retry'])) {
- if ('false' === $rheaders['stripe-should-retry']) {
- return false;
- }
- if ('true' === $rheaders['stripe-should-retry']) {
- return true;
- }
- }
-
- // 409 Conflict
- if (409 === $rcode) {
- return true;
- }
-
- // Retry on 500, 503, and other internal errors.
- //
- // Note that we expect the stripe-should-retry header to be false
- // in most cases when a 500 is returned, since our idempotency framework
- // would typically replay it anyway.
- if ($rcode >= 500) {
- return true;
- }
-
- return false;
- }
-
- /**
- * Provides the number of seconds to wait before retrying a request.
- *
- * @param int $numRetries
- * @param array|\Stripe\Util\CaseInsensitiveArray $rheaders
- *
- * @return int
- */
- private function sleepTime($numRetries, $rheaders)
- {
- // Apply exponential backoff with $initialNetworkRetryDelay on the
- // number of $numRetries so far as inputs. Do not allow the number to exceed
- // $maxNetworkRetryDelay.
- $sleepSeconds = \min(
- Stripe::getInitialNetworkRetryDelay() * 1.0 * 2 ** ($numRetries - 1),
- Stripe::getMaxNetworkRetryDelay()
- );
-
- // Apply some jitter by randomizing the value in the range of
- // ($sleepSeconds / 2) to ($sleepSeconds).
- $sleepSeconds *= 0.5 * (1 + $this->randomGenerator->randFloat());
-
- // But never sleep less than the base sleep seconds.
- $sleepSeconds = \max(Stripe::getInitialNetworkRetryDelay(), $sleepSeconds);
-
- // And never sleep less than the time the API asks us to wait, assuming it's a reasonable ask.
- $retryAfter = isset($rheaders['retry-after']) ? (float) ($rheaders['retry-after']) : 0.0;
- if (\floor($retryAfter) === $retryAfter && $retryAfter <= Stripe::getMaxRetryAfter()) {
- $sleepSeconds = \max($sleepSeconds, $retryAfter);
- }
-
- return $sleepSeconds;
- }
-
- /**
- * Initializes the curl handle. If already initialized, the handle is closed first.
- */
- private function initCurlHandle()
- {
- $this->closeCurlHandle();
- $this->curlHandle = \curl_init();
- }
-
- /**
- * Closes the curl handle if initialized. Do nothing if already closed.
- */
- private function closeCurlHandle()
- {
- if (null !== $this->curlHandle) {
- \curl_close($this->curlHandle);
- $this->curlHandle = null;
- }
- }
-
- /**
- * Resets the curl handle. If the handle is not already initialized, or if persistent
- * connections are disabled, the handle is reinitialized instead.
- */
- private function resetCurlHandle()
- {
- if (null !== $this->curlHandle && $this->getEnablePersistentConnections()) {
- \curl_reset($this->curlHandle);
- } else {
- $this->initCurlHandle();
- }
- }
-
- /**
- * Indicates whether it is safe to use HTTP/2 or not.
- *
- * @return bool
- */
- private function canSafelyUseHttp2()
- {
- // Versions of curl older than 7.60.0 don't respect GOAWAY frames
- // (cf. https://github.com/curl/curl/issues/2416), which Stripe use.
- $curlVersion = \curl_version()['version'];
-
- return \version_compare($curlVersion, '7.60.0') >= 0;
- }
-
- /**
- * Checks if a list of headers contains a specific header name.
- *
- * @param string[] $headers
- * @param string $name
- *
- * @return bool
- */
- private function hasHeader($headers, $name)
- {
- foreach ($headers as $header) {
- if (0 === \strncasecmp($header, "{$name}: ", \strlen($name) + 2)) {
- return true;
- }
- }
-
- return false;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/HttpClient/StreamingClientInterface.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/HttpClient/StreamingClientInterface.php
deleted file mode 100644
index 482f9a11..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/HttpClient/StreamingClientInterface.php
+++ /dev/null
@@ -1,23 +0,0 @@
-type and options parameters used. You can find the
- * result of each verification check performed in the appropriate sub-resource:
- * document, id_number, selfie.
- *
- * Each VerificationReport contains a copy of any data collected by the user as
- * well as reference IDs which can be used to access collected images through the
- * FileUpload API. To configure and
- * create VerificationReports, use the VerificationSession
- * API.
- *
- * Related guides: Accessing
- * verification results.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property \Stripe\StripeObject $document Result from a document check
- * @property \Stripe\StripeObject $id_number Result from an id_number check
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $options
- * @property \Stripe\StripeObject $selfie Result from a selfie check
- * @property string $type Type of report.
- * @property null|string $verification_session ID of the VerificationSession that created this report.
- */
-class VerificationReport extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'identity.verification_report';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Retrieve;
-
- const TYPE_DOCUMENT = 'document';
- const TYPE_ID_NUMBER = 'id_number';
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Identity/VerificationSession.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Identity/VerificationSession.php
deleted file mode 100644
index 50193997..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Identity/VerificationSession.php
+++ /dev/null
@@ -1,88 +0,0 @@
-verification check to perform.
- * Only create one VerificationSession for each verification in your system.
- *
- * A VerificationSession transitions through multiple statuses throughout its
- * lifetime as it progresses through the verification flow. The VerificationSession
- * contains the user’s verified data after verification checks are complete.
- *
- * Related guide: The Verification
- * Sessions API
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|string $client_secret The short-lived client secret used by Stripe.js to show a verification modal inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on passing the client secret to the frontend to learn more.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|\Stripe\StripeObject $last_error If present, this property tells you the last error encountered when processing the verification.
- * @property null|string|\Stripe\Identity\VerificationReport $last_verification_report ID of the most recent VerificationReport. Learn more about accessing detailed verification results.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property \Stripe\StripeObject $options
- * @property null|\Stripe\StripeObject $redaction Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.
- * @property string $status Status of this VerificationSession. Learn more about the lifecycle of sessions.
- * @property string $type The type of verification check to be performed.
- * @property null|string $url The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on verifying identity documents to learn how to redirect users to Stripe.
- * @property null|\Stripe\StripeObject $verified_outputs The user’s verified data.
- */
-class VerificationSession extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'identity.verification_session';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-
- const STATUS_CANCELED = 'canceled';
- const STATUS_PROCESSING = 'processing';
- const STATUS_REQUIRES_INPUT = 'requires_input';
- const STATUS_VERIFIED = 'verified';
-
- const TYPE_DOCUMENT = 'document';
- const TYPE_ID_NUMBER = 'id_number';
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Identity\VerificationSession the canceled verification session
- */
- public function cancel($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/cancel';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Identity\VerificationSession the redacted verification session
- */
- public function redact($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/redact';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Invoice.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Invoice.php
deleted file mode 100644
index a6732362..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Invoice.php
+++ /dev/null
@@ -1,283 +0,0 @@
-invoice
- * items, and proration adjustments that may be caused by subscription
- * upgrades/downgrades (if necessary).
- *
- * If your invoice is configured to be billed through automatic charges, Stripe
- * automatically finalizes your invoice and attempts payment. Note that finalizing
- * the invoice, when
- * automatic, does not happen immediately as the invoice is created. Stripe
- * waits until one hour after the last webhook was successfully sent (or the last
- * webhook timed out after failing). If you (and the platforms you may have
- * connected to) have no webhooks configured, Stripe waits one hour after creation
- * to finalize the invoice.
- *
- * If your invoice is configured to be billed by sending an email, then based on
- * your email
- * settings, Stripe will email the invoice to your customer and await payment.
- * These emails can contain a link to a hosted page to pay the invoice.
- *
- * Stripe applies any customer credit on the account before determining the amount
- * due for the invoice (i.e., the amount that will be actually charged). If the
- * amount due for the invoice is less than Stripe's minimum allowed
- * charge per currency, the invoice is automatically marked paid, and we add
- * the amount due to the customer's credit balance which is applied to the next
- * invoice.
- *
- * More details on the customer's credit balance are here.
- *
- * Related guide: Send
- * Invoices to Customers.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|string $account_country The country of the business associated with this invoice, most often the business creating the invoice.
- * @property null|string $account_name The public name of the business associated with this invoice, most often the business creating the invoice.
- * @property null|(string|\Stripe\TaxId)[] $account_tax_ids The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
- * @property int $amount_due Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the amount_due may be 0. If there is a positive starting_balance for the invoice (the customer owes money), the amount_due will also take that into account. The charge that gets generated for the invoice will be for the amount specified in amount_due.
- * @property int $amount_paid The amount, in %s, that was paid.
- * @property int $amount_remaining The amount remaining, in %s, that is due.
- * @property null|string|\Stripe\StripeObject $application ID of the Connect Application that created the invoice.
- * @property null|int $application_fee_amount The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.
- * @property int $attempt_count Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.
- * @property bool $attempted Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the invoice.created webhook, for example, so you might not want to display that invoice as unpaid to your users.
- * @property bool $auto_advance Controls whether Stripe will perform automatic collection of the invoice. When false, the invoice's state will not automatically advance without an explicit action.
- * @property \Stripe\StripeObject $automatic_tax
- * @property null|string $billing_reason Indicates the reason why the invoice was created. subscription_cycle indicates an invoice created by a subscription advancing into a new period. subscription_create indicates an invoice created due to creating a subscription. subscription_update indicates an invoice created due to updating a subscription. subscription is set for all old invoices to indicate either a change to a subscription or a period advancement. manual is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The upcoming value is reserved for simulated invoices per the upcoming invoice endpoint. subscription_threshold indicates an invoice created due to a billing threshold being reached.
- * @property null|string|\Stripe\Charge $charge ID of the latest charge generated for this invoice, if any.
- * @property string $collection_method Either charge_automatically, or send_invoice. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property null|\Stripe\StripeObject[] $custom_fields Custom fields displayed on the invoice.
- * @property null|string|\Stripe\Customer $customer The ID of the customer who will be billed.
- * @property null|\Stripe\StripeObject $customer_address The customer's address. Until the invoice is finalized, this field will equal customer.address. Once the invoice is finalized, this field will no longer be updated.
- * @property null|string $customer_email The customer's email. Until the invoice is finalized, this field will equal customer.email. Once the invoice is finalized, this field will no longer be updated.
- * @property null|string $customer_name The customer's name. Until the invoice is finalized, this field will equal customer.name. Once the invoice is finalized, this field will no longer be updated.
- * @property null|string $customer_phone The customer's phone number. Until the invoice is finalized, this field will equal customer.phone. Once the invoice is finalized, this field will no longer be updated.
- * @property null|\Stripe\StripeObject $customer_shipping The customer's shipping information. Until the invoice is finalized, this field will equal customer.shipping. Once the invoice is finalized, this field will no longer be updated.
- * @property null|string $customer_tax_exempt The customer's tax exempt status. Until the invoice is finalized, this field will equal customer.tax_exempt. Once the invoice is finalized, this field will no longer be updated.
- * @property null|\Stripe\StripeObject[] $customer_tax_ids The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as customer.tax_ids. Once the invoice is finalized, this field will no longer be updated.
- * @property null|string|\Stripe\PaymentMethod $default_payment_method ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
- * @property null|string|\Stripe\Account|\Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source $default_source ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
- * @property \Stripe\TaxRate[] $default_tax_rates The tax rates applied to this invoice, if any.
- * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
- * @property null|\Stripe\Discount $discount Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts.
- * @property null|(string|\Stripe\Discount)[] $discounts The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use expand[]=discounts to expand each discount.
- * @property null|int $due_date The date on which payment for this invoice is due. This value will be null for invoices where collection_method=charge_automatically.
- * @property null|int $ending_balance Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null.
- * @property null|string $footer Footer displayed on the invoice.
- * @property null|string $hosted_invoice_url The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null.
- * @property null|string $invoice_pdf The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.
- * @property null|\Stripe\ErrorObject $last_finalization_error The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
- * @property \Stripe\Collection<\Stripe\InvoiceLineItem> $lines The individual line items that make up the invoice. lines is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|int $next_payment_attempt The time at which payment will next be attempted. This value will be null for invoices where collection_method=send_invoice.
- * @property null|string $number A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified.
- * @property null|string|\Stripe\Account $on_behalf_of The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the Invoices with Connect documentation for details.
- * @property bool $paid Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.
- * @property bool $paid_out_of_band Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe.
- * @property null|string|\Stripe\PaymentIntent $payment_intent The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent.
- * @property \Stripe\StripeObject $payment_settings
- * @property int $period_end End of the usage period during which invoice items were added to this invoice.
- * @property int $period_start Start of the usage period during which invoice items were added to this invoice.
- * @property int $post_payment_credit_notes_amount Total amount of all post-payment credit notes issued for this invoice.
- * @property int $pre_payment_credit_notes_amount Total amount of all pre-payment credit notes issued for this invoice.
- * @property null|string|\Stripe\Quote $quote The quote this invoice was generated from.
- * @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this invoice.
- * @property int $starting_balance Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance.
- * @property null|string $statement_descriptor Extra information about an invoice for the customer's credit card statement.
- * @property null|string $status The status of the invoice, one of draft, open, paid, uncollectible, or void. Learn more
- * @property \Stripe\StripeObject $status_transitions
- * @property null|string|\Stripe\Subscription $subscription The subscription that this invoice was prepared for, if any.
- * @property int $subscription_proration_date Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
- * @property int $subtotal Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated
- * @property null|int $tax The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.
- * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this invoice belongs to.
- * @property \Stripe\StripeObject $threshold_reason
- * @property int $total Total after discounts and taxes.
- * @property null|\Stripe\StripeObject[] $total_discount_amounts The aggregate amounts calculated per discount across all line items.
- * @property \Stripe\StripeObject[] $total_tax_amounts The aggregate amounts calculated per tax rate for all line items.
- * @property null|int $webhooks_delivered_at Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have been exhausted. This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.
- */
-class Invoice extends ApiResource
-{
- const OBJECT_NAME = 'invoice';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Delete;
- use ApiOperations\Retrieve;
- use ApiOperations\Search;
- use ApiOperations\Update;
-
- const BILLING_CHARGE_AUTOMATICALLY = 'charge_automatically';
- const BILLING_SEND_INVOICE = 'send_invoice';
-
- const BILLING_REASON_MANUAL = 'manual';
- const BILLING_REASON_QUOTE_ACCEPT = 'quote_accept';
- const BILLING_REASON_SUBSCRIPTION = 'subscription';
- const BILLING_REASON_SUBSCRIPTION_CREATE = 'subscription_create';
- const BILLING_REASON_SUBSCRIPTION_CYCLE = 'subscription_cycle';
- const BILLING_REASON_SUBSCRIPTION_THRESHOLD = 'subscription_threshold';
- const BILLING_REASON_SUBSCRIPTION_UPDATE = 'subscription_update';
- const BILLING_REASON_UPCOMING = 'upcoming';
-
- const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically';
- const COLLECTION_METHOD_SEND_INVOICE = 'send_invoice';
-
- const STATUS_DELETED = 'deleted';
- const STATUS_DRAFT = 'draft';
- const STATUS_OPEN = 'open';
- const STATUS_PAID = 'paid';
- const STATUS_UNCOLLECTIBLE = 'uncollectible';
- const STATUS_VOID = 'void';
-
- use ApiOperations\NestedResource;
-
- const PATH_LINES = '/lines';
-
- /**
- * @param string $id the ID of the invoice on which to retrieve the lines
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws StripeExceptionApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\InvoiceLineItem> the list of lines (InvoiceLineItem)
- */
- public static function allLines($id, $params = null, $opts = null)
- {
- return self::_allNestedResources($id, static::PATH_LINES, $params, $opts);
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Invoice the finalized invoice
- */
- public function finalizeInvoice($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/finalize';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Invoice the uncollectible invoice
- */
- public function markUncollectible($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/mark_uncollectible';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Invoice the paid invoice
- */
- public function pay($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/pay';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Invoice the sent invoice
- */
- public function sendInvoice($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/send';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Invoice the upcoming invoice
- */
- public static function upcoming($params = null, $opts = null)
- {
- $url = static::classUrl() . '/upcoming';
- list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
- $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
- $obj->setLastResponse($response);
-
- return $obj;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Invoice the voided invoice
- */
- public function voidInvoice($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/void';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SearchResult the invoice search results
- */
- public static function search($params = null, $opts = null)
- {
- $url = '/v1/invoices/search';
-
- return self::_searchResource($url, $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/InvoiceItem.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/InvoiceItem.php
deleted file mode 100644
index 76eae069..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/InvoiceItem.php
+++ /dev/null
@@ -1,50 +0,0 @@
-Subscription
- * Invoices.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount Amount (in the currency specified) of the invoice item. This should always be equal to unit_amount * quantity.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property string|\Stripe\Customer $customer The ID of the customer who will be billed when this invoice item is billed.
- * @property int $date Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
- * @property bool $discountable If true, discounts will apply to this invoice item. Always false for prorations.
- * @property null|(string|\Stripe\Discount)[] $discounts The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use expand[]=discounts to expand each discount.
- * @property null|string|\Stripe\Invoice $invoice The ID of the invoice this invoice item belongs to.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property \Stripe\StripeObject $period
- * @property null|\Stripe\Plan $plan If the invoice item is a proration, the plan of the subscription that the proration was computed for.
- * @property null|\Stripe\Price $price The price of the invoice item.
- * @property bool $proration Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.
- * @property int $quantity Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for.
- * @property null|string|\Stripe\Subscription $subscription The subscription that this invoice item has been created for, if any.
- * @property string $subscription_item The subscription item that this invoice item has been created for, if any.
- * @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to the invoice item. When set, the default_tax_rates on the invoice do not apply to this invoice item.
- * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this invoice item belongs to.
- * @property null|int $unit_amount Unit amount (in the currency specified) of the invoice item.
- * @property null|string $unit_amount_decimal Same as unit_amount, but contains a decimal value with at most 12 decimal places.
- */
-class InvoiceItem extends ApiResource
-{
- const OBJECT_NAME = 'invoiceitem';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Delete;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/InvoiceLineItem.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/InvoiceLineItem.php
deleted file mode 100644
index 0a5331e6..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/InvoiceLineItem.php
+++ /dev/null
@@ -1,34 +0,0 @@
-ISO currency code, in lowercase. Must be a supported currency.
- * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
- * @property null|\Stripe\StripeObject[] $discount_amounts The amount of discount calculated per discount for this line item.
- * @property bool $discountable If true, discounts will apply to this line item. Always false for prorations.
- * @property null|(string|\Stripe\Discount)[] $discounts The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use expand[]=discounts to expand each discount.
- * @property string $invoice_item The ID of the invoice item associated with this line item if any.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with type=subscription this will reflect the metadata of the subscription that caused the line item to be created.
- * @property \Stripe\StripeObject $period
- * @property null|\Stripe\Plan $plan The plan of the subscription, if the line item is a subscription or a proration.
- * @property null|\Stripe\Price $price The price of the line item.
- * @property bool $proration Whether this is a proration.
- * @property null|\Stripe\StripeObject $proration_details Additional details for proration line items
- * @property null|int $quantity The quantity of the subscription, if the line item is a subscription or a proration.
- * @property null|string $subscription The subscription that the invoice item pertains to, if any.
- * @property string $subscription_item The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription.
- * @property \Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item
- * @property \Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item.
- * @property string $type A string identifying the type of the source of this line item, either an invoiceitem or a subscription.
- */
-class InvoiceLineItem extends ApiResource
-{
- const OBJECT_NAME = 'line_item';
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Issuing/Authorization.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Issuing/Authorization.php
deleted file mode 100644
index 7e597df5..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Issuing/Authorization.php
+++ /dev/null
@@ -1,81 +0,0 @@
-issued card is used to
- * make a purchase, an Issuing Authorization object is created. Authorizations
- * must be approved for the purchase to be completed successfully.
- *
- * Related guide: Issued Card
- * Authorizations.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount The total amount that was authorized or rejected. This amount is in the card's currency and in the smallest currency unit.
- * @property null|\Stripe\StripeObject $amount_details Detailed breakdown of amount components. These amounts are denominated in currency and in the smallest currency unit.
- * @property bool $approved Whether the authorization has been approved.
- * @property string $authorization_method How the card details were provided.
- * @property \Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with this authorization.
- * @property \Stripe\Issuing\Card $card You can create physical or virtual cards that are issued to cardholders.
- * @property null|string|\Stripe\Issuing\Cardholder $cardholder The cardholder to whom this authorization belongs.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property int $merchant_amount The total amount that was authorized or rejected. This amount is in the merchant_currency and in the smallest currency unit.
- * @property string $merchant_currency The currency that was presented to the cardholder for the authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property \Stripe\StripeObject $merchant_data
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|\Stripe\StripeObject $pending_request The pending authorization request. This field will only be non-null during an issuing_authorization.request webhook.
- * @property \Stripe\StripeObject[] $request_history History of every time pending_request was approved/denied, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization.
- * @property string $status The current status of the authorization in its lifecycle.
- * @property \Stripe\Issuing\Transaction[] $transactions List of transactions associated with this authorization.
- * @property \Stripe\StripeObject $verification_data
- * @property null|string $wallet The digital wallet used for this authorization. One of apple_pay, google_pay, or samsung_pay.
- */
-class Authorization extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'issuing.authorization';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Authorization the approved authorization
- */
- public function approve($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/approve';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Authorization the declined authorization
- */
- public function decline($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/decline';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Issuing/Card.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Issuing/Card.php
deleted file mode 100644
index 31deaf3f..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Issuing/Card.php
+++ /dev/null
@@ -1,60 +0,0 @@
-create physical or
- * virtual cards that are issued to cardholders.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property string $brand The brand of the card.
- * @property null|string $cancellation_reason The reason why the card was canceled.
- * @property \Stripe\Issuing\Cardholder $cardholder
An Issuing Cardholder object represents an individual or business entity who is issued cards.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property string $cvc The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with the expand parameter. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint.
- * @property int $exp_month The expiration month of the card.
- * @property int $exp_year The expiration year of the card.
- * @property string $last4 The last 4 digits of the card number.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string $number The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with the expand parameter. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint.
- * @property null|string|\Stripe\Issuing\Card $replaced_by The latest card that replaces this card, if any.
- * @property null|string|\Stripe\Issuing\Card $replacement_for The card this card replaces, if any.
- * @property null|string $replacement_reason The reason why the previous card needed to be replaced.
- * @property null|\Stripe\StripeObject $shipping Where and how the card will be shipped.
- * @property \Stripe\StripeObject $spending_controls
- * @property string $status Whether authorizations can be approved on this card.
- * @property string $type The type of the card.
- * @property null|\Stripe\StripeObject $wallets Information relating to digital wallets (like Apple Pay and Google Pay).
- */
-class Card extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'issuing.card';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\CardDetails the card details associated with that issuing card
- */
- public function details($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/details';
- list($response, $opts) = $this->_request('get', $url, $params, $opts);
- $obj = \Stripe\Util\Util::convertToStripeObject($response, $opts);
- $obj->setLastResponse($response);
-
- return $obj;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Issuing/CardDetails.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Issuing/CardDetails.php
deleted file mode 100644
index 98f4e0b8..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Issuing/CardDetails.php
+++ /dev/null
@@ -1,19 +0,0 @@
-Cardholder object represents an individual or business
- * entity who is issued cards.
- *
- * Related guide: How to create a
- * Cardholder
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property \Stripe\StripeObject $billing
- * @property null|\Stripe\StripeObject $company Additional information about a company cardholder.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string $email The cardholder's email address.
- * @property null|\Stripe\StripeObject $individual Additional information about an individual cardholder.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string $name The cardholder's name. This will be printed on cards issued to them.
- * @property null|string $phone_number The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the 3D Secure documentation for more details.
- * @property \Stripe\StripeObject $requirements
- * @property null|\Stripe\StripeObject $spending_controls Rules that control spending across this cardholder's cards. Refer to our documentation for more details.
- * @property string $status Specifies whether to permit authorizations on this cardholder's cards.
- * @property string $type One of individual or company.
- */
-class Cardholder extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'issuing.cardholder';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Issuing/Dispute.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Issuing/Dispute.php
deleted file mode 100644
index 1eeb17ee..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Issuing/Dispute.php
+++ /dev/null
@@ -1,53 +0,0 @@
-card issuer, you can dispute
- * transactions that the cardholder does not recognize, suspects to be fraudulent,
- * or has other issues with.
- *
- * Related guide: Disputing
- * Transactions
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount Disputed amount. Usually the amount of the transaction, but can differ (usually because of currency fluctuation).
- * @property null|\Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with the dispute.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency The currency the transaction was made in.
- * @property \Stripe\StripeObject $evidence
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string $status Current status of the dispute.
- * @property string|\Stripe\Issuing\Transaction $transaction The transaction being disputed.
- */
-class Dispute extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'issuing.dispute';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Dispute the submited dispute
- */
- public function submit($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/submit';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Issuing/Transaction.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Issuing/Transaction.php
deleted file mode 100644
index 90a38edd..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Issuing/Transaction.php
+++ /dev/null
@@ -1,44 +0,0 @@
-issued card that
- * results in funds entering or leaving your Stripe account, such as a completed
- * purchase or refund, is represented by an Issuing Transaction
- * object.
- *
- * Related guide: Issued Card
- * Transactions.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount The transaction amount, which will be reflected in your balance. This amount is in your currency and in the smallest currency unit.
- * @property null|\Stripe\StripeObject $amount_details Detailed breakdown of amount components. These amounts are denominated in currency and in the smallest currency unit.
- * @property null|string|\Stripe\Issuing\Authorization $authorization The Authorization object that led to this transaction.
- * @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction associated with this transaction.
- * @property string|\Stripe\Issuing\Card $card The card used to make this transaction.
- * @property null|string|\Stripe\Issuing\Cardholder $cardholder The cardholder to whom this transaction belongs.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property null|string|\Stripe\Issuing\Dispute $dispute If you've disputed the transaction, the ID of the dispute.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property int $merchant_amount The amount that the merchant will receive, denominated in merchant_currency and in the smallest currency unit. It will be different from amount if the merchant is taking payment in a different currency.
- * @property string $merchant_currency The currency with which the merchant is taking payment.
- * @property \Stripe\StripeObject $merchant_data
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|\Stripe\StripeObject $purchase_details Additional purchase information that is optionally provided by the merchant.
- * @property string $type The nature of the transaction.
- * @property null|string $wallet The digital wallet used for this transaction. One of apple_pay, google_pay, or samsung_pay.
- */
-class Transaction extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'issuing.transaction';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/LineItem.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/LineItem.php
deleted file mode 100644
index 0a413461..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/LineItem.php
+++ /dev/null
@@ -1,26 +0,0 @@
-ISO currency code, in lowercase. Must be a supported currency.
- * @property string $description An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.
- * @property \Stripe\StripeObject[] $discounts The discounts applied to the line item.
- * @property null|\Stripe\Price $price The price used to generate the line item.
- * @property null|int $quantity The quantity of products being purchased.
- * @property \Stripe\StripeObject[] $taxes The taxes applied to the line item.
- */
-class LineItem extends ApiResource
-{
- const OBJECT_NAME = 'item';
-
- use ApiOperations\All;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/LoginLink.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/LoginLink.php
deleted file mode 100644
index 3351356b..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/LoginLink.php
+++ /dev/null
@@ -1,15 +0,0 @@
-true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $multi_use
- * @property string|\Stripe\PaymentMethod $payment_method ID of the payment method associated with this mandate.
- * @property \Stripe\StripeObject $payment_method_details
- * @property \Stripe\StripeObject $single_use
- * @property string $status The status of the mandate, which indicates whether it can be used to initiate a payment.
- * @property string $type The type of the mandate.
- */
-class Mandate extends ApiResource
-{
- const OBJECT_NAME = 'mandate';
-
- use ApiOperations\Retrieve;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/OAuth.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/OAuth.php
deleted file mode 100644
index 7b0886e3..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/OAuth.php
+++ /dev/null
@@ -1,101 +0,0 @@
-request(
- 'post',
- '/oauth/token',
- $params,
- null
- );
-
- return Util\Util::convertToStripeObject($response->json, $opts);
- }
-
- /**
- * Disconnects an account from your platform.
- *
- * @param null|array $params
- * @param null|array $opts
- *
- * @throws \Stripe\Exception\OAuth\OAuthErrorException if the request fails
- *
- * @return StripeObject object containing the response from the API
- */
- public static function deauthorize($params = null, $opts = null)
- {
- $params = $params ?: [];
- $base = ($opts && \array_key_exists('connect_base', $opts)) ? $opts['connect_base'] : Stripe::$connectBase;
- $requestor = new ApiRequestor(null, $base);
- $params['client_id'] = self::_getClientId($params);
- list($response, $apiKey) = $requestor->request(
- 'post',
- '/oauth/deauthorize',
- $params,
- null
- );
-
- return Util\Util::convertToStripeObject($response->json, $opts);
- }
-
- private static function _getClientId($params = null)
- {
- $clientId = ($params && \array_key_exists('client_id', $params)) ? $params['client_id'] : null;
- if (null === $clientId) {
- $clientId = Stripe::getClientId();
- }
- if (null === $clientId) {
- $msg = 'No client_id provided. (HINT: set your client_id using '
- . '"Stripe::setClientId()". You can find your client_ids '
- . 'in your Stripe dashboard at '
- . 'https://dashboard.stripe.com/account/applications/settings, '
- . 'after registering your account as a platform. See '
- . 'https://stripe.com/docs/connect/standard-accounts for details, '
- . 'or email support@stripe.com if you have any questions.';
-
- throw new Exception\AuthenticationException($msg);
- }
-
- return $clientId;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/OAuthErrorObject.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/OAuthErrorObject.php
deleted file mode 100644
index 620c5bb2..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/OAuthErrorObject.php
+++ /dev/null
@@ -1,31 +0,0 @@
- null,
- 'error_description' => null,
- ], $values);
- parent::refreshFrom($values, $opts, $partial);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Order.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Order.php
deleted file mode 100644
index 9b840050..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Order.php
+++ /dev/null
@@ -1,81 +0,0 @@
-products. You can
- * create, retrieve, and pay individual orders, as well as list all orders. Orders
- * are identified by a unique, random ID.
- *
- * Related guide: Tax, Shipping,
- * and Inventory.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order.
- * @property null|int $amount_returned The total amount that was returned to the customer.
- * @property null|string $application ID of the Connect Application that created the order.
- * @property null|int $application_fee A fee in cents that will be applied to the order and transferred to the application owner’s Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation.
- * @property null|string|\Stripe\Charge $charge The ID of the payment used to pay for the order. Present if the order status is paid, fulfilled, or refunded.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property null|string|\Stripe\Customer $customer The customer used for the order.
- * @property null|string $email The email address of the customer placing the order.
- * @property string $external_coupon_code External coupon code to load for this order.
- * @property \Stripe\OrderItem[] $items List of items constituting the order. An order can have up to 25 items.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|\Stripe\Collection<\Stripe\OrderReturn> $returns A list of returns that have taken place for this order.
- * @property null|string $selected_shipping_method The shipping method that is currently selected for this order, if any. If present, it is equal to one of the ids of shipping methods in the shipping_methods array. At order creation time, if there are multiple shipping methods, Stripe will automatically selected the first method.
- * @property null|\Stripe\StripeObject $shipping The shipping address for the order. Present if the order is for goods to be shipped.
- * @property null|\Stripe\StripeObject[] $shipping_methods A list of supported shipping methods for this order. The desired shipping method can be specified either by updating the order, or when paying it.
- * @property string $status Current order status. One of created, paid, canceled, fulfilled, or returned. More details in the Orders Guide.
- * @property null|\Stripe\StripeObject $status_transitions The timestamps at which the order status was updated.
- * @property null|int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch.
- * @property string $upstream_id The user's order ID if it is different from the Stripe order ID.
- */
-class Order extends ApiResource
-{
- const OBJECT_NAME = 'order';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\OrderReturn the newly created return
- */
- public function returnOrder($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/returns';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
-
- return Util\Util::convertToStripeObject($response, $opts);
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Order the paid order
- */
- public function pay($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/pay';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/OrderItem.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/OrderItem.php
deleted file mode 100644
index e2e6e39a..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/OrderItem.php
+++ /dev/null
@@ -1,19 +0,0 @@
-order items. Returns always
- * belong to an order, and may optionally contain a refund.
- *
- * Related guide: Handling
- * Returns.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the returned line item.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property \Stripe\OrderItem[] $items The items included in this order return.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|string|\Stripe\Order $order The order that this return includes items from.
- * @property null|string|\Stripe\Refund $refund The ID of the refund issued for this return.
- */
-class OrderReturn extends ApiResource
-{
- const OBJECT_NAME = 'order_return';
-
- use ApiOperations\All;
- use ApiOperations\Retrieve;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/PaymentIntent.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/PaymentIntent.php
deleted file mode 100644
index b7d777ab..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/PaymentIntent.php
+++ /dev/null
@@ -1,195 +0,0 @@
-multiple
- * statuses throughout its lifetime as it interfaces with Stripe.js to perform
- * authentication flows and ultimately creates at most one successful charge.
- *
- * Related guide: Payment Intents API.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
- * @property int $amount_capturable Amount that can be captured from this PaymentIntent.
- * @property \Stripe\StripeObject $amount_details
- * @property int $amount_received Amount that was collected by this PaymentIntent.
- * @property null|string|\Stripe\StripeObject $application ID of the Connect application that created the PaymentIntent.
- * @property null|int $application_fee_amount The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents use case for connected accounts.
- * @property null|\Stripe\StripeObject $automatic_payment_methods Settings to configure compatible payment methods from the Stripe Dashboard
- * @property null|int $canceled_at Populated when status is canceled, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch.
- * @property null|string $cancellation_reason Reason for cancellation of this PaymentIntent, either user-provided (duplicate, fraudulent, requested_by_customer, or abandoned) or generated by Stripe internally (failed_invoice, void_invoice, or automatic).
- * @property string $capture_method Controls when the funds will be captured from the customer's account.
- * @property \Stripe\Collection<\Stripe\Charge> $charges Charges that were created by this PaymentIntent, if any.
- * @property null|string $client_secret
The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key.
The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
Refer to our docs to accept a payment and learn about how client_secret should be handled.
- * @property string $confirmation_method
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property null|string|\Stripe\Customer $customer
ID of the Customer this PaymentIntent belongs to, if one exists.
Payment methods attached to other Customers cannot be used with this PaymentIntent.
If present in combination with setup_future_usage, this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.
- * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
- * @property null|string|\Stripe\Invoice $invoice ID of the invoice that created this PaymentIntent, if it exists.
- * @property null|\Stripe\ErrorObject $last_payment_error The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. For more information, see the documentation.
- * @property null|\Stripe\StripeObject $next_action If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.
- * @property null|string|\Stripe\Account $on_behalf_of The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents use case for connected accounts for details.
- * @property null|string|\Stripe\PaymentMethod $payment_method ID of the payment method used in this PaymentIntent.
- * @property null|\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for this PaymentIntent.
- * @property string[] $payment_method_types The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.
- * @property null|\Stripe\StripeObject $processing If present, this property tells you about the processing state of the payment.
- * @property null|string $receipt_email Email address that the receipt for the resulting payment will be sent to. If receipt_email is specified for a payment in live mode, a receipt will be sent regardless of your email settings.
- * @property null|string|\Stripe\Review $review ID of the review associated with this PaymentIntent, if any.
- * @property null|string $setup_future_usage
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter will attach the payment method to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be attached to a Customer after the transaction completes.
When processing card payments, Stripe also uses setup_future_usage to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA.
- * @property null|\Stripe\StripeObject $shipping Shipping information for this PaymentIntent.
- * @property null|string|\Stripe\Account|\Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source $source This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied.
- * @property null|string $statement_descriptor For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.
- * @property null|string $statement_descriptor_suffix Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
- * @property string $status Status of this PaymentIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, requires_capture, canceled, or succeeded. Read more about each PaymentIntent status.
- * @property null|\Stripe\StripeObject $transfer_data The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents use case for connected accounts for details.
- * @property null|string $transfer_group A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected accounts for details.
- */
-class PaymentIntent extends ApiResource
-{
- const OBJECT_NAME = 'payment_intent';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Search;
- use ApiOperations\Update;
-
- const STATUS_CANCELED = 'canceled';
- const STATUS_PROCESSING = 'processing';
- const STATUS_REQUIRES_ACTION = 'requires_action';
- const STATUS_REQUIRES_CAPTURE = 'requires_capture';
- const STATUS_REQUIRES_CONFIRMATION = 'requires_confirmation';
- const STATUS_REQUIRES_PAYMENT_METHOD = 'requires_payment_method';
- const STATUS_SUCCEEDED = 'succeeded';
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentIntent the applied payment intent
- */
- public function applyCustomerBalance($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/apply_customer_balance';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentIntent the canceled payment intent
- */
- public function cancel($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/cancel';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentIntent the captured payment intent
- */
- public function capture($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/capture';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentIntent the confirmed payment intent
- */
- public function confirm($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/confirm';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentIntent the incremented payment intent
- */
- public function incrementAuthorization($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/increment_authorization';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentIntent the verified payment intent
- */
- public function verifyMicrodeposits($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/verify_microdeposits';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SearchResult the payment intent search results
- */
- public static function search($params = null, $opts = null)
- {
- $url = '/v1/payment_intents/search';
-
- return self::_searchResource($url, $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/PaymentLink.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/PaymentLink.php
deleted file mode 100644
index 8062c537..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/PaymentLink.php
+++ /dev/null
@@ -1,70 +0,0 @@
-checkout session to
- * render the payment page. You can use checkout
- * session events to track payments through payment links.
- *
- * Related guide: Payment Links API
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property bool $active Whether the payment link's url is active. If false, customers visiting the URL will be shown a page saying that the link has been deactivated.
- * @property \Stripe\StripeObject $after_completion
- * @property bool $allow_promotion_codes Whether user redeemable promotion codes are enabled.
- * @property null|int $application_fee_amount The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account.
- * @property null|float $application_fee_percent This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account.
- * @property \Stripe\StripeObject $automatic_tax
- * @property string $billing_address_collection Configuration for collecting the customer's billing address.
- * @property \Stripe\Collection<\Stripe\LineItem> $line_items The line items representing what is being sold.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|string|\Stripe\Account $on_behalf_of The account on behalf of which to charge. See the Connect documentation for details.
- * @property null|string[] $payment_method_types The list of payment method types that customers can use. When null, Stripe will dynamically show relevant payment methods you've enabled in your payment method settings.
- * @property \Stripe\StripeObject $phone_number_collection
- * @property null|\Stripe\StripeObject $shipping_address_collection Configuration for collecting the customer's shipping address.
- * @property null|\Stripe\StripeObject $subscription_data When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use subscription_data.
- * @property null|\Stripe\StripeObject $transfer_data The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
- * @property string $url The public URL that can be shared with customers.
- */
-class PaymentLink extends ApiResource
-{
- const OBJECT_NAME = 'payment_link';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-
- const BILLING_ADDRESS_COLLECTION_AUTO = 'auto';
- const BILLING_ADDRESS_COLLECTION_REQUIRED = 'required';
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- * @param mixed $id
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\PaymentLink> list of LineItems
- */
- public static function allLineItems($id, $params = null, $opts = null)
- {
- $url = static::resourceUrl($id) . '/line_items';
- list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
- $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
- $obj->setLastResponse($response);
-
- return $obj;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/PaymentMethod.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/PaymentMethod.php
deleted file mode 100644
index e14e474e..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/PaymentMethod.php
+++ /dev/null
@@ -1,95 +0,0 @@
-PaymentIntents to
- * collect payments or save them to Customer objects to store instrument details
- * for future payments.
- *
- * Related guides: Payment Methods and
- * More Payment
- * Scenarios.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property \Stripe\StripeObject $acss_debit
- * @property \Stripe\StripeObject $afterpay_clearpay
- * @property \Stripe\StripeObject $alipay
- * @property \Stripe\StripeObject $au_becs_debit
- * @property \Stripe\StripeObject $bacs_debit
- * @property \Stripe\StripeObject $bancontact
- * @property \Stripe\StripeObject $billing_details
- * @property \Stripe\StripeObject $boleto
- * @property \Stripe\StripeObject $card
- * @property \Stripe\StripeObject $card_present
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string|\Stripe\Customer $customer The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
- * @property \Stripe\StripeObject $customer_balance
- * @property \Stripe\StripeObject $eps
- * @property \Stripe\StripeObject $fpx
- * @property \Stripe\StripeObject $giropay
- * @property \Stripe\StripeObject $grabpay
- * @property \Stripe\StripeObject $ideal
- * @property \Stripe\StripeObject $interac_present
- * @property \Stripe\StripeObject $klarna
- * @property \Stripe\StripeObject $konbini
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property \Stripe\StripeObject $oxxo
- * @property \Stripe\StripeObject $p24
- * @property \Stripe\StripeObject $paynow
- * @property \Stripe\StripeObject $sepa_debit
- * @property \Stripe\StripeObject $sofort
- * @property string $type The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
- * @property \Stripe\StripeObject $us_bank_account
- * @property \Stripe\StripeObject $wechat_pay
- */
-class PaymentMethod extends ApiResource
-{
- const OBJECT_NAME = 'payment_method';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentMethod the attached payment method
- */
- public function attach($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/attach';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentMethod the detached payment method
- */
- public function detach($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/detach';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Payout.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Payout.php
deleted file mode 100644
index edbe4920..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Payout.php
+++ /dev/null
@@ -1,108 +0,0 @@
-Payout object is created when you receive funds from Stripe, or
- * when you initiate a payout to either a bank account or debit card of a connected Stripe account. You
- * can retrieve individual payouts, as well as list all payouts. Payouts are made
- * on varying schedules,
- * depending on your country and industry.
- *
- * Related guide: Receiving Payouts.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount Amount (in %s) to be transferred to your bank account or debit card.
- * @property int $arrival_date Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays.
- * @property bool $automatic Returns true if the payout was created by an automated payout schedule, and false if it was requested manually.
- * @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this payout on your account balance.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
- * @property null|string|\Stripe\BankAccount|\Stripe\Card $destination ID of the bank account or card the payout was sent to.
- * @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance.
- * @property null|string $failure_code Error code explaining reason for payout failure if available. See Types of payout failures for a list of failure codes.
- * @property null|string $failure_message Message to user further explaining reason for payout failure if available.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string $method The method used to send this payout, which can be standard or instant. instant is only supported for payouts to debit cards. (See Instant payouts for marketplaces for more information.)
- * @property null|string|\Stripe\Payout $original_payout If the payout reverses another, this is the ID of the original payout.
- * @property null|string|\Stripe\Payout $reversed_by If the payout was reversed, this is the ID of the payout that reverses this payout.
- * @property string $source_type The source balance this payout came from. One of card, fpx, or bank_account.
- * @property null|string $statement_descriptor Extra information about a payout to be displayed on the user's bank statement.
- * @property string $status Current status of the payout: paid, pending, in_transit, canceled or failed. A payout is pending until it is submitted to the bank, when it becomes in_transit. The status then changes to paid if the transaction goes through, or to failed or canceled (within 5 business days). Some failed payouts may initially show as paid but then change to failed.
- * @property string $type Can be bank_account or card.
- */
-class Payout extends ApiResource
-{
- const OBJECT_NAME = 'payout';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-
- const FAILURE_ACCOUNT_CLOSED = 'account_closed';
- const FAILURE_ACCOUNT_FROZEN = 'account_frozen';
- const FAILURE_BANK_ACCOUNT_RESTRICTED = 'bank_account_restricted';
- const FAILURE_BANK_OWNERSHIP_CHANGED = 'bank_ownership_changed';
- const FAILURE_COULD_NOT_PROCESS = 'could_not_process';
- const FAILURE_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized';
- const FAILURE_DECLINED = 'declined';
- const FAILURE_INCORRECT_ACCOUNT_HOLDER_NAME = 'incorrect_account_holder_name';
- const FAILURE_INSUFFICIENT_FUNDS = 'insufficient_funds';
- const FAILURE_INVALID_ACCOUNT_NUMBER = 'invalid_account_number';
- const FAILURE_INVALID_CURRENCY = 'invalid_currency';
- const FAILURE_NO_ACCOUNT = 'no_account';
- const FAILURE_UNSUPPORTED_CARD = 'unsupported_card';
-
- const METHOD_INSTANT = 'instant';
- const METHOD_STANDARD = 'standard';
-
- const STATUS_CANCELED = 'canceled';
- const STATUS_FAILED = 'failed';
- const STATUS_IN_TRANSIT = 'in_transit';
- const STATUS_PAID = 'paid';
- const STATUS_PENDING = 'pending';
-
- const TYPE_BANK_ACCOUNT = 'bank_account';
- const TYPE_CARD = 'card';
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Payout the canceled payout
- */
- public function cancel($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/cancel';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Payout the reversed payout
- */
- public function reverse($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/reverse';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Person.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Person.php
deleted file mode 100644
index b1398c4e..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Person.php
+++ /dev/null
@@ -1,123 +0,0 @@
-Standard onboarding
- * or Express onboarding
- * documentation for information about platform pre-filling and account
- * onboarding steps.
- *
- * Related guide: Handling
- * Identity Verification with the API.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property string $account The account the person is associated with.
- * @property \Stripe\StripeObject $address
- * @property null|\Stripe\StripeObject $address_kana The Kana variation of the person's address (Japan only).
- * @property null|\Stripe\StripeObject $address_kanji The Kanji variation of the person's address (Japan only).
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property \Stripe\StripeObject $dob
- * @property null|string $email The person's email address.
- * @property null|string $first_name The person's first name.
- * @property null|string $first_name_kana The Kana variation of the person's first name (Japan only).
- * @property null|string $first_name_kanji The Kanji variation of the person's first name (Japan only).
- * @property string[] $full_name_aliases A list of alternate names or aliases that the person is known by.
- * @property null|\Stripe\StripeObject $future_requirements Information about the upcoming new requirements for this person, including what information needs to be collected, and by when.
- * @property null|string $gender The person's gender (International regulations require either "male" or "female").
- * @property bool $id_number_provided Whether the person's id_number was provided.
- * @property null|string $last_name The person's last name.
- * @property null|string $last_name_kana The Kana variation of the person's last name (Japan only).
- * @property null|string $last_name_kanji The Kanji variation of the person's last name (Japan only).
- * @property null|string $maiden_name The person's maiden name.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|string $nationality The country where the person is a national.
- * @property null|string $phone The person's phone number.
- * @property string $political_exposure Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
- * @property \Stripe\StripeObject $registered_address
- * @property \Stripe\StripeObject $relationship
- * @property null|\Stripe\StripeObject $requirements Information about the requirements for this person, including what information needs to be collected, and by when.
- * @property bool $ssn_last_4_provided Whether the last four digits of the person's Social Security number have been provided (U.S. only).
- * @property \Stripe\StripeObject $verification
- */
-class Person extends ApiResource
-{
- const OBJECT_NAME = 'person';
-
- use ApiOperations\Delete;
- use ApiOperations\Update;
-
- const GENDER_FEMALE = 'female';
- const GENDER_MALE = 'male';
-
- const POLITICAL_EXPOSURE_EXISTING = 'existing';
- const POLITICAL_EXPOSURE_NONE = 'none';
-
- const VERIFICATION_STATUS_PENDING = 'pending';
- const VERIFICATION_STATUS_UNVERIFIED = 'unverified';
- const VERIFICATION_STATUS_VERIFIED = 'verified';
-
- /**
- * @return string the API URL for this Stripe account reversal
- */
- public function instanceUrl()
- {
- $id = $this['id'];
- $account = $this['account'];
- if (!$id) {
- throw new Exception\UnexpectedValueException(
- 'Could not determine which URL to request: ' .
- "class instance has invalid ID: {$id}",
- null
- );
- }
- $id = Util\Util::utf8($id);
- $account = Util\Util::utf8($account);
-
- $base = Account::classUrl();
- $accountExtn = \urlencode($account);
- $extn = \urlencode($id);
-
- return "{$base}/{$accountExtn}/persons/{$extn}";
- }
-
- /**
- * @param array|string $_id
- * @param null|array|string $_opts
- *
- * @throws \Stripe\Exception\BadMethodCallException
- */
- public static function retrieve($_id, $_opts = null)
- {
- $msg = 'Persons cannot be retrieved without an account ID. Retrieve ' .
- "a person using `Account::retrievePerson('account_id', " .
- "'person_id')`.";
-
- throw new Exception\BadMethodCallException($msg);
- }
-
- /**
- * @param string $_id
- * @param null|array $_params
- * @param null|array|string $_options
- *
- * @throws \Stripe\Exception\BadMethodCallException
- */
- public static function update($_id, $_params = null, $_options = null)
- {
- $msg = 'Persons cannot be updated without an account ID. Update ' .
- "a person using `Account::updatePerson('account_id', " .
- "'person_id', \$updateParams)`.";
-
- throw new Exception\BadMethodCallException($msg);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Plan.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Plan.php
deleted file mode 100644
index c3621fa6..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Plan.php
+++ /dev/null
@@ -1,57 +0,0 @@
-Prices API. It replaces the Plans
- * API and is backwards compatible to simplify your migration.
- *
- * Plans define the base price, currency, and billing cycle for recurring purchases
- * of products. Products help
- * you track inventory or provisioning, and plans help you track pricing. Different
- * physical goods or levels of service should be represented by products, and
- * pricing options should be represented by plans. This approach lets you change
- * prices without having to change your provisioning scheme.
- *
- * For example, you might have a single "gold" product that has plans for
- * $10/month, $100/year, €9/month, and €90/year.
- *
- * Related guides: Set up
- * a subscription and more about products and prices.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property bool $active Whether the plan can be used for new purchases.
- * @property null|string $aggregate_usage Specifies a usage aggregation strategy for plans of usage_type=metered. Allowed values are sum for summing up all usage during a period, last_during_period for using the last usage record reported within a period, last_ever for using the last usage record ever (across period bounds) or max which uses the usage record with the maximum reported usage during a period. Defaults to sum.
- * @property null|int $amount The unit amount in %s to be charged, represented as a whole integer if possible. Only set if billing_scheme=per_unit.
- * @property null|string $amount_decimal The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if billing_scheme=per_unit.
- * @property string $billing_scheme Describes how to compute the price per period. Either per_unit or tiered. per_unit indicates that the fixed amount (specified in amount) will be charged per unit in quantity (for plans with usage_type=licensed), or per unit of total usage (for plans with usage_type=metered). tiered indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property string $interval The frequency at which a subscription is billed. One of day, week, month or year.
- * @property int $interval_count The number of intervals (specified in the interval attribute) between subscription billings. For example, interval=month and interval_count=3 bills every 3 months.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|string $nickname A brief description of the plan, hidden from customers.
- * @property null|string|\Stripe\Product $product The product whose pricing this plan determines.
- * @property \Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires billing_scheme to be set to tiered. See also the documentation for billing_scheme.
- * @property null|string $tiers_mode Defines if the tiering price should be graduated or volume based. In volume-based tiering, the maximum quantity within a period determines the per unit price. In graduated tiering, pricing can change as the quantity grows.
- * @property null|\Stripe\StripeObject $transform_usage Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with tiers.
- * @property null|int $trial_period_days Default number of trial days when subscribing a customer to this plan using trial_from_plan=true.
- * @property string $usage_type Configures how the quantity per period should be determined. Can be either metered or licensed. licensed automatically bills the quantity set when adding it to a subscription. metered aggregates the total usage based on usage records. Defaults to licensed.
- */
-class Plan extends ApiResource
-{
- const OBJECT_NAME = 'plan';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Delete;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Price.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Price.php
deleted file mode 100644
index 3d2e147d..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Price.php
+++ /dev/null
@@ -1,83 +0,0 @@
-Products help you track
- * inventory or provisioning, and prices help you track payment terms. Different
- * physical goods or levels of service should be represented by products, and
- * pricing options should be represented by prices. This approach lets you change
- * prices without having to change your provisioning scheme.
- *
- * For example, you might have a single "gold" product that has prices
- * for $10/month, $100/year, and €9 once.
- *
- * Related guides: Set up
- * a subscription, create an invoice,
- * and more about products and prices.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property bool $active Whether the price can be used for new purchases.
- * @property string $billing_scheme Describes how to compute the price per period. Either per_unit or tiered. per_unit indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity (for prices with usage_type=licensed), or per unit of total usage (for prices with usage_type=metered). tiered indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|string $lookup_key A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|string $nickname A brief description of the price, hidden from customers.
- * @property string|\Stripe\Product $product The ID of the product this price is associated with.
- * @property null|\Stripe\StripeObject $recurring The recurring components of a price such as interval and usage_type.
- * @property null|string $tax_behavior Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Once specified as either inclusive or exclusive, it cannot be changed.
- * @property \Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires billing_scheme to be set to tiered. See also the documentation for billing_scheme.
- * @property null|string $tiers_mode Defines if the tiering price should be graduated or volume based. In volume-based tiering, the maximum quantity within a period determines the per unit price. In graduated tiering, pricing can change as the quantity grows.
- * @property null|\Stripe\StripeObject $transform_quantity Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with tiers.
- * @property string $type One of one_time or recurring depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
- * @property null|int $unit_amount The unit amount in %s to be charged, represented as a whole integer if possible. Only set if billing_scheme=per_unit.
- * @property null|string $unit_amount_decimal The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if billing_scheme=per_unit.
- */
-class Price extends ApiResource
-{
- const OBJECT_NAME = 'price';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Search;
- use ApiOperations\Update;
-
- const BILLING_SCHEME_PER_UNIT = 'per_unit';
- const BILLING_SCHEME_TIERED = 'tiered';
-
- const TAX_BEHAVIOR_EXCLUSIVE = 'exclusive';
- const TAX_BEHAVIOR_INCLUSIVE = 'inclusive';
- const TAX_BEHAVIOR_UNSPECIFIED = 'unspecified';
-
- const TIERS_MODE_GRADUATED = 'graduated';
- const TIERS_MODE_VOLUME = 'volume';
-
- const TYPE_ONE_TIME = 'one_time';
- const TYPE_RECURRING = 'recurring';
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SearchResult the price search results
- */
- public static function search($params = null, $opts = null)
- {
- $url = '/v1/prices/search';
-
- return self::_searchResource($url, $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Product.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Product.php
deleted file mode 100644
index d3d21634..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Product.php
+++ /dev/null
@@ -1,73 +0,0 @@
-Prices to
- * configure pricing in Payment Links, Checkout, and Subscriptions.
- *
- * Related guides: Set up
- * a subscription, share a Payment
- * Link, accept
- * payments with Checkout, and more about Products and Prices
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property bool $active Whether the product is currently available for purchase.
- * @property null|string[] $attributes A list of up to 5 attributes that each SKU can provide values for (e.g., ["color", "size"]).
- * @property null|string $caption A short one-line description of the product, meant to be displayable to the customer. Only applicable to products of type=good.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string[] $deactivate_on An array of connect application identifiers that cannot purchase this product. Only applicable to products of type=good.
- * @property null|string|\Stripe\Price $default_price The ID of the Price object that is the default price for this product.
- * @property null|string $description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
- * @property string[] $images A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string $name The product's name, meant to be displayable to the customer.
- * @property null|\Stripe\StripeObject $package_dimensions The dimensions of this product for shipping purposes.
- * @property null|bool $shippable Whether this product is shipped (i.e., physical goods).
- * @property null|string $statement_descriptor Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used.
- * @property null|string|\Stripe\TaxCode $tax_code A tax code ID.
- * @property string $type The type of the product. The product is either of type good, which is eligible for use with Orders and SKUs, or service, which is eligible for use with Subscriptions and Plans.
- * @property null|string $unit_label A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions.
- * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch.
- * @property null|string $url A URL of a publicly-accessible webpage for this product.
- */
-class Product extends ApiResource
-{
- const OBJECT_NAME = 'product';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Delete;
- use ApiOperations\Retrieve;
- use ApiOperations\Search;
- use ApiOperations\Update;
-
- const TYPE_GOOD = 'good';
- const TYPE_SERVICE = 'service';
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SearchResult the product search results
- */
- public static function search($params = null, $opts = null)
- {
- $url = '/v1/products/search';
-
- return self::_searchResource($url, $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/PromotionCode.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/PromotionCode.php
deleted file mode 100644
index 2457add4..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/PromotionCode.php
+++ /dev/null
@@ -1,33 +0,0 @@
-invoices or orders. Coupons do not work with conventional one-off charges.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string|\Stripe\Customer $customer The customer that this promotion code can be used by.
- * @property null|int $expires_at Date at which the promotion code can no longer be redeemed.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|int $max_redemptions Maximum number of times this promotion code can be redeemed.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property \Stripe\StripeObject $restrictions
- * @property int $times_redeemed Number of times this promotion code has been used.
- */
-class PromotionCode extends ApiResource
-{
- const OBJECT_NAME = 'promotion_code';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Quote.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Quote.php
deleted file mode 100644
index b3fcb349..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Quote.php
+++ /dev/null
@@ -1,171 +0,0 @@
-charge_automatically, or send_invoice. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to charge_automatically.
- * @property \Stripe\StripeObject $computed
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property null|string|\Stripe\Customer $customer The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
- * @property (string|\Stripe\TaxRate)[] $default_tax_rates The tax rates applied to this quote.
- * @property null|string $description A description that will be displayed on the quote PDF.
- * @property (string|\Stripe\Discount)[] $discounts The discounts applied to this quote.
- * @property int $expires_at The date on which the quote will be canceled if in open or draft status. Measured in seconds since the Unix epoch.
- * @property null|string $footer A footer that will be displayed on the quote PDF.
- * @property null|\Stripe\StripeObject $from_quote Details of the quote that was cloned. See the cloning documentation for more details.
- * @property null|string $header A header that will be displayed on the quote PDF.
- * @property null|string|\Stripe\Invoice $invoice The invoice that was created from this quote.
- * @property null|\Stripe\StripeObject $invoice_settings All invoices will be billed using the specified settings.
- * @property \Stripe\Collection<\Stripe\LineItem> $line_items A list of items the customer is being quoted for.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|string $number A unique number that identifies this particular quote. This number is assigned once the quote is finalized.
- * @property null|string|\Stripe\Account $on_behalf_of The account on behalf of which to charge. See the Connect documentation for details.
- * @property string $status The status of the quote.
- * @property \Stripe\StripeObject $status_transitions
- * @property null|string|\Stripe\Subscription $subscription The subscription that was created or updated from this quote.
- * @property \Stripe\StripeObject $subscription_data
- * @property null|string|\Stripe\SubscriptionSchedule $subscription_schedule The subscription schedule that was created or updated from this quote.
- * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this quote belongs to.
- * @property \Stripe\StripeObject $total_details
- * @property null|\Stripe\StripeObject $transfer_data The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices.
- */
-class Quote extends ApiResource
-{
- const OBJECT_NAME = 'quote';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-
- const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically';
- const COLLECTION_METHOD_SEND_INVOICE = 'send_invoice';
-
- const STATUS_ACCEPTED = 'accepted';
- const STATUS_CANCELED = 'canceled';
- const STATUS_DRAFT = 'draft';
- const STATUS_OPEN = 'open';
-
- /**
- * @param callable $readBodyChunkCallable
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- */
- public function pdf($readBodyChunkCallable, $params = null, $opts = null)
- {
- $opts = \Stripe\Util\RequestOptions::parse($opts);
- if (null === $opts->apiBase) {
- $opts->apiBase = Stripe::$apiUploadBase;
- }
-
- $url = $this->instanceUrl() . '/pdf';
- $this->_requestStream('get', $url, $readBodyChunkCallable, $params, $opts);
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Quote the accepted quote
- */
- public function accept($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/accept';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Quote the canceled quote
- */
- public function cancel($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/cancel';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Quote the finalized quote
- */
- public function finalizeQuote($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/finalize';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- * @param mixed $id
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Quote> list of LineItems
- */
- public static function allComputedUpfrontLineItems($id, $params = null, $opts = null)
- {
- $url = static::resourceUrl($id) . '/computed_upfront_line_items';
- list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
- $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
- $obj->setLastResponse($response);
-
- return $obj;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- * @param mixed $id
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Quote> list of LineItems
- */
- public static function allLineItems($id, $params = null, $opts = null)
- {
- $url = static::resourceUrl($id) . '/line_items';
- list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
- $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
- $obj->setLastResponse($response);
-
- return $obj;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Radar/EarlyFraudWarning.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Radar/EarlyFraudWarning.php
deleted file mode 100644
index 2dfd2aca..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Radar/EarlyFraudWarning.php
+++ /dev/null
@@ -1,38 +0,0 @@
-Early
- * Fraud Warnings.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property bool $actionable An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later.
- * @property string|\Stripe\Charge $charge ID of the charge this early fraud warning is for, optionally expanded.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $fraud_type The type of fraud labelled by the issuer. One of card_never_received, fraudulent_card_application, made_with_counterfeit_card, made_with_lost_card, made_with_stolen_card, misc, unauthorized_use_of_card.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property string|\Stripe\PaymentIntent $payment_intent ID of the Payment Intent this early fraud warning is for, optionally expanded.
- */
-class EarlyFraudWarning extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'radar.early_fraud_warning';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Retrieve;
-
- const FRAUD_TYPE_CARD_NEVER_RECEIVED = 'card_never_received';
- const FRAUD_TYPE_FRAUDULENT_CARD_APPLICATION = 'fraudulent_card_application';
- const FRAUD_TYPE_MADE_WITH_COUNTERFEIT_CARD = 'made_with_counterfeit_card';
- const FRAUD_TYPE_MADE_WITH_LOST_CARD = 'made_with_lost_card';
- const FRAUD_TYPE_MADE_WITH_STOLEN_CARD = 'made_with_stolen_card';
- const FRAUD_TYPE_MISC = 'misc';
- const FRAUD_TYPE_UNAUTHORIZED_USE_OF_CARD = 'unauthorized_use_of_card';
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Radar/ValueList.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Radar/ValueList.php
deleted file mode 100644
index 8cd62236..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Radar/ValueList.php
+++ /dev/null
@@ -1,35 +0,0 @@
-Default Stripe
- * Lists.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property string $alias The name of the value list for use in rules.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $created_by The name or email address of the user who created this value list.
- * @property string $item_type The type of items in the value list. One of card_fingerprint, card_bin, email, ip_address, country, string, case_sensitive_string, or customer_id.
- * @property \Stripe\Collection<\Stripe\Radar\ValueListItem> $list_items List of items contained within this value list.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string $name The name of the value list.
- */
-class ValueList extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'radar.value_list';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Delete;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Radar/ValueListItem.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Radar/ValueListItem.php
deleted file mode 100644
index c4ab2819..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Radar/ValueListItem.php
+++ /dev/null
@@ -1,31 +0,0 @@
-Managing List
- * Items.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $created_by The name or email address of the user who added this item to the value list.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property string $value The value of the item.
- * @property string $value_list The identifier of the value list this item belongs to.
- */
-class ValueListItem extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'radar.value_list_item';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Delete;
- use \Stripe\ApiOperations\Retrieve;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Recipient.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Recipient.php
deleted file mode 100644
index 75155b53..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Recipient.php
+++ /dev/null
@@ -1,44 +0,0 @@
-Recipient objects, you can transfer money from your Stripe
- * account to a third-party bank account or debit card. The API allows you to
- * create, delete, and update your recipients. You can retrieve individual
- * recipients as well as a list of all your recipients.
- *
- * Recipient objects have been deprecated in favor of Connect, specifically Connect's much
- * more powerful Account objects.
- * Stripe accounts that don't already use recipients can no longer begin doing so.
- * Please use Account objects instead.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|\Stripe\BankAccount $active_account Hash describing the current account on the recipient, if there is one.
- * @property null|\Stripe\Collection<\Stripe\Card> $cards
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string|\Stripe\Card $default_card The default card to use for creating transfers to this recipient.
- * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
- * @property null|string $email
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|string|\Stripe\Account $migrated_to The ID of the Custom account this recipient was migrated to. If set, the recipient can no longer be updated, nor can transfers be made to it: use the Custom account instead.
- * @property null|string $name Full, legal name of the recipient.
- * @property string|\Stripe\Account $rolled_back_from
- * @property string $type Type of the recipient, one of individual or corporation.
- * @property bool $verified Whether the recipient has been verified. This field is non-standard, and maybe removed in the future
- */
-class Recipient extends ApiResource
-{
- const OBJECT_NAME = 'recipient';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Delete;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/RecipientTransfer.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/RecipientTransfer.php
deleted file mode 100644
index 5e2d4365..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/RecipientTransfer.php
+++ /dev/null
@@ -1,36 +0,0 @@
-Refund objects allow you to refund a charge that has previously
- * been created but not yet refunded. Funds will be refunded to the credit or debit
- * card that was originally charged.
- *
- * Related guide: Refunds.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount Amount, in %s.
- * @property null|string|\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact on your account balance.
- * @property null|string|\Stripe\Charge $charge ID of the charge that was refunded.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property string $description An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only)
- * @property string|\Stripe\BalanceTransaction $failure_balance_transaction If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.
- * @property string $failure_reason If the refund failed, the reason for refund failure if known. Possible values are lost_or_stolen_card, expired_or_canceled_card, or unknown.
- * @property string $instructions_email Email to which refund instructions, if required, are sent to.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property \Stripe\StripeObject $next_action
- * @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that was refunded.
- * @property null|string $reason Reason for the refund, either user-provided (duplicate, fraudulent, or requested_by_customer) or generated by Stripe internally (expired_uncaptured_charge).
- * @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this refund.
- * @property null|string|\Stripe\TransferReversal $source_transfer_reversal The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details.
- * @property null|string $status Status of the refund. For credit card refunds, this can be pending, succeeded, or failed. For other types of refunds, it can be pending, succeeded, failed, or canceled. Refer to our refunds documentation for more details.
- * @property null|string|\Stripe\TransferReversal $transfer_reversal If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter.
- */
-class Refund extends ApiResource
-{
- const OBJECT_NAME = 'refund';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-
- const FAILURE_REASON_EXPIRED_OR_CANCELED_CARD = 'expired_or_canceled_card';
- const FAILURE_REASON_LOST_OR_STOLEN_CARD = 'lost_or_stolen_card';
- const FAILURE_REASON_UNKNOWN = 'unknown';
-
- const REASON_DUPLICATE = 'duplicate';
- const REASON_EXPIRED_UNCAPTURED_CHARGE = 'expired_uncaptured_charge';
- const REASON_FRAUDULENT = 'fraudulent';
- const REASON_REQUESTED_BY_CUSTOMER = 'requested_by_customer';
-
- const STATUS_CANCELED = 'canceled';
- const STATUS_FAILED = 'failed';
- const STATUS_PENDING = 'pending';
- const STATUS_SUCCEEDED = 'succeeded';
-
- /**
- * @deprecated use FAILURE_REASON_EXPIRED_OR_CANCELED_CARD instead
- */
- const FAILURE_REASON = 'expired_or_canceled_card';
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Refund the canceled refund
- */
- public function cancel($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/cancel';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Reporting/ReportRun.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Reporting/ReportRun.php
deleted file mode 100644
index 7c3d2a99..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Reporting/ReportRun.php
+++ /dev/null
@@ -1,37 +0,0 @@
-API Access to
- * Reports.
- *
- * Note that certain report types can only be run based on your live-mode data (not
- * test-mode data), and will error when queried without a live-mode API key.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string $error If something should go wrong during the run, a message about the failure (populated when status=failed).
- * @property bool $livemode true if the report is run on live mode data and false if it is run on test mode data.
- * @property \Stripe\StripeObject $parameters
- * @property string $report_type The ID of the report type to run, such as "balance.summary.1".
- * @property null|\Stripe\File $result The file object representing the result of the report run (populated when status=succeeded).
- * @property string $status Status of this report run. This will be pending when the run is initially created. When the run finishes, this will be set to succeeded and the result field will be populated. Rarely, we may encounter an error, at which point this will be set to failed and the error field will be populated.
- * @property null|int $succeeded_at Timestamp at which this run successfully finished (populated when status=succeeded). Measured in seconds since the Unix epoch.
- */
-class ReportRun extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'reporting.report_run';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Retrieve;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Reporting/ReportType.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Reporting/ReportType.php
deleted file mode 100644
index 4725656e..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Reporting/ReportType.php
+++ /dev/null
@@ -1,35 +0,0 @@
-API Access to Reports
- * documentation for those Report Type IDs, along with required and optional
- * parameters.
- *
- * Note that certain report types can only be run based on your live-mode data (not
- * test-mode data), and will error when queried without a live-mode API key.
- *
- * @property string $id The ID of the Report Type, such as balance.summary.1.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $data_available_end Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch.
- * @property int $data_available_start Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch.
- * @property null|string[] $default_columns List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the columns parameter, this will be null.)
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property string $name Human-readable name of the Report Type
- * @property int $updated When this Report Type was latest updated. Measured in seconds since the Unix epoch.
- * @property int $version Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas.
- */
-class ReportType extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'reporting.report_type';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Retrieve;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/RequestTelemetry.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/RequestTelemetry.php
deleted file mode 100644
index bf9074ac..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/RequestTelemetry.php
+++ /dev/null
@@ -1,26 +0,0 @@
-requestId = $requestId;
- $this->requestDuration = $requestDuration;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Review.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Review.php
deleted file mode 100644
index af8f3985..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Review.php
+++ /dev/null
@@ -1,66 +0,0 @@
-Radar and reviewing payments here.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|string $billing_zip The ZIP or postal code of the card used, if applicable.
- * @property null|string|\Stripe\Charge $charge The charge associated with this review.
- * @property null|string $closed_reason The reason the review was closed, or null if it has not yet been closed. One of approved, refunded, refunded_as_fraud, disputed, or redacted.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string $ip_address The IP address where the payment originated.
- * @property null|\Stripe\StripeObject $ip_address_location Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property bool $open If true, the review needs action.
- * @property string $opened_reason The reason the review was opened. One of rule or manual.
- * @property string|\Stripe\PaymentIntent $payment_intent The PaymentIntent ID associated with this review, if one exists.
- * @property string $reason The reason the review is currently open or closed. One of rule, manual, approved, refunded, refunded_as_fraud, disputed, or redacted.
- * @property null|\Stripe\StripeObject $session Information related to the browsing session of the user who initiated the payment.
- */
-class Review extends ApiResource
-{
- const OBJECT_NAME = 'review';
-
- use ApiOperations\All;
- use ApiOperations\Retrieve;
-
- /**
- * Possible string representations of the current, the opening or the closure reason of the review.
- * Not all of these enumeration apply to all of the ´reason´ fields. Please consult the Review object to
- * determine where these are apply.
- *
- * @see https://stripe.com/docs/api/radar/reviews/object
- */
- const REASON_APPROVED = 'approved';
- const REASON_DISPUTED = 'disputed';
- const REASON_MANUAL = 'manual';
- const REASON_REFUNDED = 'refunded';
- const REASON_REFUNDED_AS_FRAUD = 'refunded_as_fraud';
- const REASON_RULE = 'rule';
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Review the approved review
- */
- public function approve($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/approve';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SKU.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SKU.php
deleted file mode 100644
index 09d6c85e..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SKU.php
+++ /dev/null
@@ -1,41 +0,0 @@
-stock keeping units.
- * SKUs describe specific product variations, taking into account any combination
- * of: attributes, currency, and cost. For example, a product may be a T-shirt,
- * whereas a specific SKU represents the size: large, color:
- * red version of that shirt.
- *
- * Can also be used to manage inventory.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property bool $active Whether the SKU is available for purchase.
- * @property \Stripe\StripeObject $attributes A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are ["size", "gender"], a valid SKU has the following dictionary of attributes: {"size": "Medium", "gender": "Unisex"}.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property null|string $image The URL of an image for this SKU, meant to be displayable to the customer.
- * @property \Stripe\StripeObject $inventory
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|\Stripe\StripeObject $package_dimensions The dimensions of this SKU for shipping purposes.
- * @property int $price The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency).
- * @property string|\Stripe\Product $product The ID of the product this SKU is associated with. The product must be currently active.
- * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch.
- */
-class SKU extends ApiResource
-{
- const OBJECT_NAME = 'sku';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Delete;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SearchResult.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SearchResult.php
deleted file mode 100644
index f42769d9..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SearchResult.php
+++ /dev/null
@@ -1,234 +0,0 @@
-Collection in that they both wrap
- * around a list of objects and provide pagination. However the
- * SearchResult object paginates by relying on a
- * next_page token included in the response rather than using
- * object IDs and a starting_before/ending_after
- * parameter. Thus, SearchResult only supports forwards pagination.
- *
- * The {@see $total_count} property is only available when
- * the `expand` parameter contains `total_count`.
- *
- * @template TStripeObject of StripeObject
- * @template-implements \IteratorAggregate
- *
- * @property string $object
- * @property string $url
- * @property string $next_page
- * @property int $total_count
- * @property bool $has_more
- * @property TStripeObject[] $data
- */
-class SearchResult extends StripeObject implements \Countable, \IteratorAggregate
-{
- const OBJECT_NAME = 'search_result';
-
- use ApiOperations\Request;
-
- /** @var array */
- protected $filters = [];
-
- /**
- * @return string the base URL for the given class
- */
- public static function baseUrl()
- {
- return Stripe::$apiBase;
- }
-
- /**
- * Returns the filters.
- *
- * @return array the filters
- */
- public function getFilters()
- {
- return $this->filters;
- }
-
- /**
- * Sets the filters, removing paging options.
- *
- * @param array $filters the filters
- */
- public function setFilters($filters)
- {
- $this->filters = $filters;
- }
-
- #[\ReturnTypeWillChange]
- public function offsetGet($k)
- {
- if (\is_string($k)) {
- return parent::offsetGet($k);
- }
- $msg = "You tried to access the {$k} index, but SearchResult " .
- 'types only support string keys. (HINT: Search calls ' .
- 'return an object with a `data` (which is the data ' .
- "array). You likely want to call ->data[{$k}])";
-
- throw new Exception\InvalidArgumentException($msg);
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws Exception\ApiErrorException
- *
- * @return SearchResult
- */
- public function all($params = null, $opts = null)
- {
- self::_validateParams($params);
- list($url, $params) = $this->extractPathAndUpdateParams($params);
-
- list($response, $opts) = $this->_request('get', $url, $params, $opts);
- $obj = Util\Util::convertToStripeObject($response, $opts);
- if (!($obj instanceof \Stripe\SearchResult)) {
- throw new \Stripe\Exception\UnexpectedValueException(
- 'Expected type ' . \Stripe\SearchResult::class . ', got "' . \get_class($obj) . '" instead.'
- );
- }
- $obj->setFilters($params);
-
- return $obj;
- }
-
- /**
- * @return int the number of objects in the current page
- */
- #[\ReturnTypeWillChange]
- public function count()
- {
- return \count($this->data);
- }
-
- /**
- * @return \ArrayIterator an iterator that can be used to iterate
- * across objects in the current page
- */
- #[\ReturnTypeWillChange]
- public function getIterator()
- {
- return new \ArrayIterator($this->data);
- }
-
- /**
- * @return \Generator|TStripeObject[] A generator that can be used to
- * iterate across all objects across all pages. As page boundaries are
- * encountered, the next page will be fetched automatically for
- * continued iteration.
- */
- public function autoPagingIterator()
- {
- $page = $this;
-
- while (true) {
- foreach ($page as $item) {
- yield $item;
- }
- $page = $page->nextPage();
-
- if ($page->isEmpty()) {
- break;
- }
- }
- }
-
- /**
- * Returns an empty set of search results. This is returned from
- * {@see nextPage()} when we know that there isn't a next page in order to
- * replicate the behavior of the API when it attempts to return a page
- * beyond the last.
- *
- * @param null|array|string $opts
- *
- * @return SearchResult
- */
- public static function emptySearchResult($opts = null)
- {
- return SearchResult::constructFrom(['data' => []], $opts);
- }
-
- /**
- * Returns true if the page object contains no element.
- *
- * @return bool
- */
- public function isEmpty()
- {
- return empty($this->data);
- }
-
- /**
- * Fetches the next page in the resource list (if there is one).
- *
- * This method will try to respect the limit of the current page. If none
- * was given, the default limit will be fetched again.
- *
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @return SearchResult
- */
- public function nextPage($params = null, $opts = null)
- {
- if (!$this->has_more) {
- return static::emptySearchResult($opts);
- }
-
- $params = \array_merge(
- $this->filters ?: [],
- ['page' => $this->next_page],
- $params ?: []
- );
-
- return $this->all($params, $opts);
- }
-
- /**
- * Gets the first item from the current page. Returns `null` if the current page is empty.
- *
- * @return null|TStripeObject
- */
- public function first()
- {
- return \count($this->data) > 0 ? $this->data[0] : null;
- }
-
- /**
- * Gets the last item from the current page. Returns `null` if the current page is empty.
- *
- * @return null|TStripeObject
- */
- public function last()
- {
- return \count($this->data) > 0 ? $this->data[\count($this->data) - 1] : null;
- }
-
- private function extractPathAndUpdateParams($params)
- {
- $url = \parse_url($this->url);
-
- if (!isset($url['path'])) {
- throw new Exception\UnexpectedValueException("Could not parse list url into parts: {$url}");
- }
-
- if (isset($url['query'])) {
- // If the URL contains a query param, parse it out into $params so they
- // don't interact weirdly with each other.
- $query = [];
- \parse_str($url['query'], $query);
- $params = \array_merge($params ?: [], $query);
- }
-
- return [$url['path'], $params];
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/AbstractService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/AbstractService.php
deleted file mode 100644
index 145af675..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/AbstractService.php
+++ /dev/null
@@ -1,105 +0,0 @@
-client = $client;
- $this->streamingClient = $client;
- }
-
- /**
- * Gets the client used by this service to send requests.
- *
- * @return \Stripe\StripeClientInterface
- */
- public function getClient()
- {
- return $this->client;
- }
-
- /**
- * Gets the client used by this service to send requests.
- *
- * @return \Stripe\StripeStreamingClientInterface
- */
- public function getStreamingClient()
- {
- return $this->streamingClient;
- }
-
- /**
- * Translate null values to empty strings. For service methods,
- * we interpret null as a request to unset the field, which
- * corresponds to sending an empty string for the field to the
- * API.
- *
- * @param null|array $params
- */
- private static function formatParams($params)
- {
- if (null === $params) {
- return null;
- }
- \array_walk_recursive($params, function (&$value, $key) {
- if (null === $value) {
- $value = '';
- }
- });
-
- return $params;
- }
-
- protected function request($method, $path, $params, $opts)
- {
- return $this->getClient()->request($method, $path, static::formatParams($params), $opts);
- }
-
- protected function requestStream($method, $path, $readBodyChunkCallable, $params, $opts)
- {
- return $this->getStreamingClient()->requestStream($method, $path, $readBodyChunkCallable, static::formatParams($params), $opts);
- }
-
- protected function requestCollection($method, $path, $params, $opts)
- {
- return $this->getClient()->requestCollection($method, $path, static::formatParams($params), $opts);
- }
-
- protected function requestSearchResult($method, $path, $params, $opts)
- {
- return $this->getClient()->requestSearchResult($method, $path, static::formatParams($params), $opts);
- }
-
- protected function buildPath($basePath, ...$ids)
- {
- foreach ($ids as $id) {
- if (null === $id || '' === \trim($id)) {
- $msg = 'The resource ID cannot be null or whitespace.';
-
- throw new \Stripe\Exception\InvalidArgumentException($msg);
- }
- }
-
- return \sprintf($basePath, ...\array_map('\urlencode', $ids));
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/AbstractServiceFactory.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/AbstractServiceFactory.php
deleted file mode 100644
index 4aca6868..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/AbstractServiceFactory.php
+++ /dev/null
@@ -1,59 +0,0 @@
- */
- private $services;
-
- /**
- * @param \Stripe\StripeClientInterface $client
- */
- public function __construct($client)
- {
- $this->client = $client;
- $this->services = [];
- }
-
- /**
- * @param string $name
- *
- * @return null|string
- */
- abstract protected function getServiceClass($name);
-
- /**
- * @param string $name
- *
- * @return null|AbstractService|AbstractServiceFactory
- */
- public function __get($name)
- {
- $serviceClass = $this->getServiceClass($name);
- if (null !== $serviceClass) {
- if (!\array_key_exists($name, $this->services)) {
- $this->services[$name] = new $serviceClass($this->client);
- }
-
- return $this->services[$name];
- }
-
- \trigger_error('Undefined property: ' . static::class . '::$' . $name);
-
- return null;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/AccountLinkService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/AccountLinkService.php
deleted file mode 100644
index 2e904923..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/AccountLinkService.php
+++ /dev/null
@@ -1,25 +0,0 @@
-request('post', '/v1/account_links', $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/AccountService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/AccountService.php
deleted file mode 100644
index 4ef217d5..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/AccountService.php
+++ /dev/null
@@ -1,382 +0,0 @@
-Connect. If you’re not a platform, the list is empty.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Account>
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/accounts', $params, $opts);
- }
-
- /**
- * Returns a list of capabilities associated with the account. The capabilities are
- * returned sorted by creation date, with the most recent capability appearing
- * first.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Capability>
- */
- public function allCapabilities($parentId, $params = null, $opts = null)
- {
- return $this->requestCollection('get', $this->buildPath('/v1/accounts/%s/capabilities', $parentId), $params, $opts);
- }
-
- /**
- * List external accounts for an account.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\BankAccount|\Stripe\Card>
- */
- public function allExternalAccounts($parentId, $params = null, $opts = null)
- {
- return $this->requestCollection('get', $this->buildPath('/v1/accounts/%s/external_accounts', $parentId), $params, $opts);
- }
-
- /**
- * Returns a list of people associated with the account’s legal entity. The people
- * are returned sorted by creation date, with the most recent people appearing
- * first.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Person>
- */
- public function allPersons($parentId, $params = null, $opts = null)
- {
- return $this->requestCollection('get', $this->buildPath('/v1/accounts/%s/persons', $parentId), $params, $opts);
- }
-
- /**
- * With Connect, you can create Stripe accounts for
- * your users. To do this, you’ll first need to register your
- * platform.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Account
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/accounts', $params, $opts);
- }
-
- /**
- * Create an external account for a given account.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\BankAccount|\Stripe\Card
- */
- public function createExternalAccount($parentId, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/accounts/%s/external_accounts', $parentId), $params, $opts);
- }
-
- /**
- * Creates a single-use login link for an Express account to access their Stripe
- * dashboard.
- *
- * You may only create login links for Express accounts connected to your
- * platform.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\LoginLink
- */
- public function createLoginLink($parentId, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/accounts/%s/login_links', $parentId), $params, $opts);
- }
-
- /**
- * Creates a new person.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Person
- */
- public function createPerson($parentId, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/accounts/%s/persons', $parentId), $params, $opts);
- }
-
- /**
- * With Connect, you can delete accounts you manage.
- *
- * Accounts created using test-mode keys can be deleted at any time. Standard
- * accounts created using live-mode keys cannot be deleted. Custom or Express
- * accounts created using live-mode keys can only be deleted once all balances are
- * zero.
- *
- * If you want to delete your own account, use the account information tab in your
- * account settings instead.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Account
- */
- public function delete($id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/accounts/%s', $id), $params, $opts);
- }
-
- /**
- * Delete a specified external account for a given account.
- *
- * @param string $parentId
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\BankAccount|\Stripe\Card
- */
- public function deleteExternalAccount($parentId, $id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/accounts/%s/external_accounts/%s', $parentId, $id), $params, $opts);
- }
-
- /**
- * Deletes an existing person’s relationship to the account’s legal entity. Any
- * person with a relationship for an account can be deleted through the API, except
- * if the person is the account_opener. If your integration is using
- * the executive parameter, you cannot delete the only verified
- * executive on file.
- *
- * @param string $parentId
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Person
- */
- public function deletePerson($parentId, $id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/accounts/%s/persons/%s', $parentId, $id), $params, $opts);
- }
-
- /**
- * With Connect, you may flag accounts as suspicious.
- *
- * Test-mode Custom and Express accounts can be rejected at any time. Accounts
- * created using live-mode keys may only be rejected once all balances are zero.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Account
- */
- public function reject($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/accounts/%s/reject', $id), $params, $opts);
- }
-
- /**
- * Retrieves information about the specified Account Capability.
- *
- * @param string $parentId
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Capability
- */
- public function retrieveCapability($parentId, $id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/accounts/%s/capabilities/%s', $parentId, $id), $params, $opts);
- }
-
- /**
- * Retrieve a specified external account for a given account.
- *
- * @param string $parentId
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\BankAccount|\Stripe\Card
- */
- public function retrieveExternalAccount($parentId, $id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/accounts/%s/external_accounts/%s', $parentId, $id), $params, $opts);
- }
-
- /**
- * Retrieves an existing person.
- *
- * @param string $parentId
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Person
- */
- public function retrievePerson($parentId, $id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/accounts/%s/persons/%s', $parentId, $id), $params, $opts);
- }
-
- /**
- * Updates a connected account by setting the
- * values of the parameters passed. Any parameters not provided are left unchanged.
- * Most parameters can be changed only for Custom accounts. (These are marked
- * Custom Only below.) Parameters marked Custom and
- * Express are not supported for Standard accounts.
- *
- * To update your own account, use the Dashboard. Refer to our Connect documentation to learn more
- * about updating accounts.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Account
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/accounts/%s', $id), $params, $opts);
- }
-
- /**
- * Updates an existing Account Capability.
- *
- * @param string $parentId
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Capability
- */
- public function updateCapability($parentId, $id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/accounts/%s/capabilities/%s', $parentId, $id), $params, $opts);
- }
-
- /**
- * Updates the metadata, account holder name, account holder type of a bank account
- * belonging to a Custom account, and
- * optionally sets it as the default for its currency. Other bank account details
- * are not editable by design.
- *
- * You can re-enable a disabled bank account by performing an update call without
- * providing any arguments or changes.
- *
- * @param string $parentId
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\BankAccount|\Stripe\Card
- */
- public function updateExternalAccount($parentId, $id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/accounts/%s/external_accounts/%s', $parentId, $id), $params, $opts);
- }
-
- /**
- * Updates an existing person.
- *
- * @param string $parentId
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Person
- */
- public function updatePerson($parentId, $id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/accounts/%s/persons/%s', $parentId, $id), $params, $opts);
- }
-
- /**
- * Retrieves the details of an account.
- *
- * @param null|string $id
- * @param null|array $params
- * @param null|array|StripeUtilRequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Account
- */
- public function retrieve($id = null, $params = null, $opts = null)
- {
- if (null === $id) {
- return $this->request('get', '/v1/account', $params, $opts);
- }
-
- return $this->request('get', $this->buildPath('/v1/accounts/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/ApplePayDomainService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/ApplePayDomainService.php
deleted file mode 100644
index 3a076f47..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/ApplePayDomainService.php
+++ /dev/null
@@ -1,70 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/apple_pay/domains', $params, $opts);
- }
-
- /**
- * Create an apple pay domain.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\ApplePayDomain
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/apple_pay/domains', $params, $opts);
- }
-
- /**
- * Delete an apple pay domain.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\ApplePayDomain
- */
- public function delete($id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/apple_pay/domains/%s', $id), $params, $opts);
- }
-
- /**
- * Retrieve an apple pay domain.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\ApplePayDomain
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/apple_pay/domains/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/ApplicationFeeService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/ApplicationFeeService.php
deleted file mode 100644
index 138c3794..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/ApplicationFeeService.php
+++ /dev/null
@@ -1,125 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/application_fees', $params, $opts);
- }
-
- /**
- * You can see a list of the refunds belonging to a specific application fee. Note
- * that the 10 most recent refunds are always available by default on the
- * application fee object. If you need more than those 10, you can use this API
- * method and the limit and starting_after parameters to
- * page through additional refunds.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\ApplicationFeeRefund>
- */
- public function allRefunds($parentId, $params = null, $opts = null)
- {
- return $this->requestCollection('get', $this->buildPath('/v1/application_fees/%s/refunds', $parentId), $params, $opts);
- }
-
- /**
- * Refunds an application fee that has previously been collected but not yet
- * refunded. Funds will be refunded to the Stripe account from which the fee was
- * originally collected.
- *
- * You can optionally refund only part of an application fee. You can do so
- * multiple times, until the entire fee has been refunded.
- *
- * Once entirely refunded, an application fee can’t be refunded again. This method
- * will raise an error when called on an already-refunded application fee, or when
- * trying to refund more money than is left on an application fee.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\ApplicationFeeRefund
- */
- public function createRefund($parentId, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/application_fees/%s/refunds', $parentId), $params, $opts);
- }
-
- /**
- * Retrieves the details of an application fee that your account has collected. The
- * same information is returned when refunding the application fee.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\ApplicationFee
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/application_fees/%s', $id), $params, $opts);
- }
-
- /**
- * By default, you can see the 10 most recent refunds stored directly on the
- * application fee object, but you can also retrieve details about a specific
- * refund stored on the application fee.
- *
- * @param string $parentId
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\ApplicationFeeRefund
- */
- public function retrieveRefund($parentId, $id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/application_fees/%s/refunds/%s', $parentId, $id), $params, $opts);
- }
-
- /**
- * Updates the specified application fee refund by setting the values of the
- * parameters passed. Any parameters not provided will be left unchanged.
- *
- * This request only accepts metadata as an argument.
- *
- * @param string $parentId
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\ApplicationFeeRefund
- */
- public function updateRefund($parentId, $id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/application_fees/%s/refunds/%s', $parentId, $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/BalanceService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/BalanceService.php
deleted file mode 100644
index 0f55385f..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/BalanceService.php
+++ /dev/null
@@ -1,26 +0,0 @@
-Accounting
- * for negative balances.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Balance
- */
- public function retrieve($params = null, $opts = null)
- {
- return $this->request('get', '/v1/balance', $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/BalanceTransactionService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/BalanceTransactionService.php
deleted file mode 100644
index 9e6d37c0..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/BalanceTransactionService.php
+++ /dev/null
@@ -1,47 +0,0 @@
-/v1/balance/history.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\BalanceTransaction>
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/balance_transactions', $params, $opts);
- }
-
- /**
- * Retrieves the balance transaction with the given ID.
- *
- * Note that this endpoint previously used the path
- * /v1/balance/history/:id.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\BalanceTransaction
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/balance_transactions/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/BillingPortal/BillingPortalServiceFactory.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/BillingPortal/BillingPortalServiceFactory.php
deleted file mode 100644
index 23a4d30b..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/BillingPortal/BillingPortalServiceFactory.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- */
- private static $classMap = [
- 'configurations' => ConfigurationService::class,
- 'sessions' => SessionService::class,
- ];
-
- protected function getServiceClass($name)
- {
- return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/BillingPortal/ConfigurationService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/BillingPortal/ConfigurationService.php
deleted file mode 100644
index 11d1a5a3..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/BillingPortal/ConfigurationService.php
+++ /dev/null
@@ -1,73 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/billing_portal/configurations', $params, $opts);
- }
-
- /**
- * Creates a configuration that describes the functionality and behavior of a
- * PortalSession.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\BillingPortal\Configuration
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/billing_portal/configurations', $params, $opts);
- }
-
- /**
- * Retrieves a configuration that describes the functionality of the customer
- * portal.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\BillingPortal\Configuration
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/billing_portal/configurations/%s', $id), $params, $opts);
- }
-
- /**
- * Updates a configuration that describes the functionality of the customer portal.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\BillingPortal\Configuration
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/billing_portal/configurations/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/BillingPortal/SessionService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/BillingPortal/SessionService.php
deleted file mode 100644
index 6b3e6026..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/BillingPortal/SessionService.php
+++ /dev/null
@@ -1,23 +0,0 @@
-request('post', '/v1/billing_portal/sessions', $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/ChargeService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/ChargeService.php
deleted file mode 100644
index 0bde0279..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/ChargeService.php
+++ /dev/null
@@ -1,122 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/charges', $params, $opts);
- }
-
- /**
- * Capture the payment of an existing, uncaptured, charge. This is the second half
- * of the two-step payment flow, where first you created a
- * charge with the capture option set to false.
- *
- * Uncaptured payments expire a set number of days after they are created (7 by default). If they are not captured
- * by that point in time, they will be marked as refunded and will no longer be
- * capturable.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Charge
- */
- public function capture($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/charges/%s/capture', $id), $params, $opts);
- }
-
- /**
- * To charge a credit card or other payment source, you create a
- * Charge object. If your API key is in test mode, the supplied
- * payment source (e.g., card) won’t actually be charged, although everything else
- * will occur as if in live mode. (Stripe assumes that the charge would have
- * completed successfully).
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Charge
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/charges', $params, $opts);
- }
-
- /**
- * Retrieves the details of a charge that has previously been created. Supply the
- * unique charge ID that was returned from your previous request, and Stripe will
- * return the corresponding charge information. The same information is returned
- * when creating or refunding the charge.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Charge
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/charges/%s', $id), $params, $opts);
- }
-
- /**
- * Search for charges you’ve previously created using Stripe’s Search Query Language. Don’t use
- * search in read-after-write flows where strict consistency is necessary. Under
- * normal operating conditions, data is searchable in less than a minute.
- * Occasionally, propagation of new or updated data can be up to an hour behind
- * during outages. Search functionality is not available to merchants in India.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SearchResult<\Stripe\Charge>
- */
- public function search($params = null, $opts = null)
- {
- return $this->requestSearchResult('get', '/v1/charges/search', $params, $opts);
- }
-
- /**
- * Updates the specified charge by setting the values of the parameters passed. Any
- * parameters not provided will be left unchanged.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Charge
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/charges/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Checkout/CheckoutServiceFactory.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Checkout/CheckoutServiceFactory.php
deleted file mode 100644
index bb26a837..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Checkout/CheckoutServiceFactory.php
+++ /dev/null
@@ -1,25 +0,0 @@
-
- */
- private static $classMap = [
- 'sessions' => SessionService::class,
- ];
-
- protected function getServiceClass($name)
- {
- return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Checkout/SessionService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Checkout/SessionService.php
deleted file mode 100644
index a2938d0a..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Checkout/SessionService.php
+++ /dev/null
@@ -1,92 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/checkout/sessions', $params, $opts);
- }
-
- /**
- * When retrieving a Checkout Session, there is an includable
- * line_items property containing the first handful of those
- * items. There is also a URL where you can retrieve the full (paginated) list of
- * line items.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\LineItem>
- */
- public function allLineItems($parentId, $params = null, $opts = null)
- {
- return $this->requestCollection('get', $this->buildPath('/v1/checkout/sessions/%s/line_items', $parentId), $params, $opts);
- }
-
- /**
- * Creates a Session object.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Checkout\Session
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/checkout/sessions', $params, $opts);
- }
-
- /**
- * A Session can be expired when it is in one of these statuses: open.
- *
- * After it expires, a customer can’t complete a Session and customers loading the
- * Session see a message saying the Session is expired.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Checkout\Session
- */
- public function expire($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/checkout/sessions/%s/expire', $id), $params, $opts);
- }
-
- /**
- * Retrieves a Session object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Checkout\Session
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/checkout/sessions/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/CoreServiceFactory.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/CoreServiceFactory.php
deleted file mode 100644
index 76f82c3c..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/CoreServiceFactory.php
+++ /dev/null
@@ -1,139 +0,0 @@
-
- */
- private static $classMap = [
- 'accountLinks' => AccountLinkService::class,
- 'accounts' => AccountService::class,
- 'applePayDomains' => ApplePayDomainService::class,
- 'applicationFees' => ApplicationFeeService::class,
- 'balance' => BalanceService::class,
- 'balanceTransactions' => BalanceTransactionService::class,
- 'billingPortal' => BillingPortal\BillingPortalServiceFactory::class,
- 'charges' => ChargeService::class,
- 'checkout' => Checkout\CheckoutServiceFactory::class,
- 'countrySpecs' => CountrySpecService::class,
- 'coupons' => CouponService::class,
- 'creditNotes' => CreditNoteService::class,
- 'customers' => CustomerService::class,
- 'disputes' => DisputeService::class,
- 'ephemeralKeys' => EphemeralKeyService::class,
- 'events' => EventService::class,
- 'exchangeRates' => ExchangeRateService::class,
- 'fileLinks' => FileLinkService::class,
- 'files' => FileService::class,
- 'financialConnections' => FinancialConnections\FinancialConnectionsServiceFactory::class,
- 'identity' => Identity\IdentityServiceFactory::class,
- 'invoiceItems' => InvoiceItemService::class,
- 'invoices' => InvoiceService::class,
- 'issuing' => Issuing\IssuingServiceFactory::class,
- 'mandates' => MandateService::class,
- 'oauth' => OAuthService::class,
- 'orderReturns' => OrderReturnService::class,
- 'orders' => OrderService::class,
- 'paymentIntents' => PaymentIntentService::class,
- 'paymentLinks' => PaymentLinkService::class,
- 'paymentMethods' => PaymentMethodService::class,
- 'payouts' => PayoutService::class,
- 'plans' => PlanService::class,
- 'prices' => PriceService::class,
- 'products' => ProductService::class,
- 'promotionCodes' => PromotionCodeService::class,
- 'quotes' => QuoteService::class,
- 'radar' => Radar\RadarServiceFactory::class,
- 'refunds' => RefundService::class,
- 'reporting' => Reporting\ReportingServiceFactory::class,
- 'reviews' => ReviewService::class,
- 'setupAttempts' => SetupAttemptService::class,
- 'setupIntents' => SetupIntentService::class,
- 'shippingRates' => ShippingRateService::class,
- 'sigma' => Sigma\SigmaServiceFactory::class,
- 'skus' => SkuService::class,
- 'sources' => SourceService::class,
- 'subscriptionItems' => SubscriptionItemService::class,
- 'subscriptions' => SubscriptionService::class,
- 'subscriptionSchedules' => SubscriptionScheduleService::class,
- 'taxCodes' => TaxCodeService::class,
- 'taxRates' => TaxRateService::class,
- 'terminal' => Terminal\TerminalServiceFactory::class,
- 'testHelpers' => TestHelpers\TestHelpersServiceFactory::class,
- 'tokens' => TokenService::class,
- 'topups' => TopupService::class,
- 'transfers' => TransferService::class,
- 'webhookEndpoints' => WebhookEndpointService::class,
- ];
-
- protected function getServiceClass($name)
- {
- return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/CountrySpecService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/CountrySpecService.php
deleted file mode 100644
index 8f3869fe..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/CountrySpecService.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/country_specs', $params, $opts);
- }
-
- /**
- * Returns a Country Spec for a given Country code.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\CountrySpec
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/country_specs/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/CouponService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/CouponService.php
deleted file mode 100644
index 89eb2c7d..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/CouponService.php
+++ /dev/null
@@ -1,104 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/coupons', $params, $opts);
- }
-
- /**
- * You can create coupons easily via the coupon management page of the
- * Stripe dashboard. Coupon creation is also accessible via the API if you need to
- * create coupons on the fly.
- *
- * A coupon has either a percent_off or an amount_off and
- * currency. If you set an amount_off, that amount will
- * be subtracted from any invoice’s subtotal. For example, an invoice with a
- * subtotal of 100 will have a final total of
- * 0 if a coupon with an amount_off of
- * 200 is applied to it and an invoice with a subtotal of
- * 300 will have a final total of 100 if
- * a coupon with an amount_off of 200 is applied to
- * it.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Coupon
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/coupons', $params, $opts);
- }
-
- /**
- * You can delete coupons via the coupon management page of the
- * Stripe dashboard. However, deleting a coupon does not affect any customers who
- * have already applied the coupon; it means that new customers can’t redeem the
- * coupon. You can also delete coupons via the API.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Coupon
- */
- public function delete($id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/coupons/%s', $id), $params, $opts);
- }
-
- /**
- * Retrieves the coupon with the given ID.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Coupon
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/coupons/%s', $id), $params, $opts);
- }
-
- /**
- * Updates the metadata of a coupon. Other coupon details (currency, duration,
- * amount_off) are, by design, not editable.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Coupon
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/coupons/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/CreditNoteService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/CreditNoteService.php
deleted file mode 100644
index 5c631328..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/CreditNoteService.php
+++ /dev/null
@@ -1,156 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/credit_notes', $params, $opts);
- }
-
- /**
- * When retrieving a credit note, you’ll get a lines property
- * containing the the first handful of those items. There is also a URL where you
- * can retrieve the full (paginated) list of line items.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\CreditNoteLineItem>
- */
- public function allLines($parentId, $params = null, $opts = null)
- {
- return $this->requestCollection('get', $this->buildPath('/v1/credit_notes/%s/lines', $parentId), $params, $opts);
- }
-
- /**
- * Issue a credit note to adjust the amount of a finalized invoice. For a
- * status=open invoice, a credit note reduces its
- * amount_due. For a status=paid invoice, a credit note
- * does not affect its amount_due. Instead, it can result in any
- * combination of the following:.
- *
- *
Refund: create a new refund (using refund_amount) or link
- * an existing refund (using refund).
Customer balance
- * credit: credit the customer’s balance (using credit_amount) which
- * will be automatically applied to their next invoice when it’s finalized.
- *
Outside of Stripe credit: record the amount that is or will be credited
- * outside of Stripe (using out_of_band_amount).
- *
- * For post-payment credit notes the sum of the refund, credit and outside of
- * Stripe amounts must equal the credit note total.
- *
- * You may issue multiple credit notes for an invoice. Each credit note will
- * increment the invoice’s pre_payment_credit_notes_amount or
- * post_payment_credit_notes_amount depending on its
- * status at the time of credit note creation.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\CreditNote
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/credit_notes', $params, $opts);
- }
-
- /**
- * Get a preview of a credit note without creating it.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\CreditNote
- */
- public function preview($params = null, $opts = null)
- {
- return $this->request('get', '/v1/credit_notes/preview', $params, $opts);
- }
-
- /**
- * When retrieving a credit note preview, you’ll get a lines
- * property containing the first handful of those items. This URL you can retrieve
- * the full (paginated) list of line items.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\CreditNote>
- */
- public function previewLines($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/credit_notes/preview/lines', $params, $opts);
- }
-
- /**
- * Retrieves the credit note object with the given identifier.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\CreditNote
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/credit_notes/%s', $id), $params, $opts);
- }
-
- /**
- * Updates an existing credit note.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\CreditNote
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/credit_notes/%s', $id), $params, $opts);
- }
-
- /**
- * Marks a credit note as void. Learn more about voiding credit notes.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\CreditNote
- */
- public function voidCreditNote($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/credit_notes/%s/void', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/CustomerService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/CustomerService.php
deleted file mode 100644
index fe4163b8..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/CustomerService.php
+++ /dev/null
@@ -1,440 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/customers', $params, $opts);
- }
-
- /**
- * Returns a list of transactions that updated the customer’s balances.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\CustomerBalanceTransaction>
- */
- public function allBalanceTransactions($parentId, $params = null, $opts = null)
- {
- return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/balance_transactions', $parentId), $params, $opts);
- }
-
- /**
- * Returns a list of PaymentMethods for a given Customer.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Customer>
- */
- public function allPaymentMethods($id, $params = null, $opts = null)
- {
- return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/payment_methods', $id), $params, $opts);
- }
-
- /**
- * List sources for a specified customer.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source>
- */
- public function allSources($parentId, $params = null, $opts = null)
- {
- return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/sources', $parentId), $params, $opts);
- }
-
- /**
- * Returns a list of tax IDs for a customer.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\TaxId>
- */
- public function allTaxIds($parentId, $params = null, $opts = null)
- {
- return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/tax_ids', $parentId), $params, $opts);
- }
-
- /**
- * Creates a new customer object.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Customer
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/customers', $params, $opts);
- }
-
- /**
- * Creates an immutable transaction that updates the customer’s credit balance.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\CustomerBalanceTransaction
- */
- public function createBalanceTransaction($parentId, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/customers/%s/balance_transactions', $parentId), $params, $opts);
- }
-
- /**
- * Retrieve funding instructions for a customer cash balance. If funding
- * instructions do not yet exist for the customer, new funding instructions will be
- * created. If funding instructions have already been created for a given customer,
- * the same funding instructions will be retrieved. In other words, we will return
- * the same funding instructions each time.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Customer
- */
- public function createFundingInstructions($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/customers/%s/funding_instructions', $id), $params, $opts);
- }
-
- /**
- * When you create a new credit card, you must specify a customer or recipient on
- * which to create it.
- *
- * If the card’s owner has no default card, then the new card will become the
- * default. However, if the owner already has a default, then it will not change.
- * To change the default, you should update the
- * customer to have a new default_source.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source
- */
- public function createSource($parentId, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/customers/%s/sources', $parentId), $params, $opts);
- }
-
- /**
- * Creates a new TaxID object for a customer.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TaxId
- */
- public function createTaxId($parentId, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/customers/%s/tax_ids', $parentId), $params, $opts);
- }
-
- /**
- * Permanently deletes a customer. It cannot be undone. Also immediately cancels
- * any active subscriptions on the customer.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Customer
- */
- public function delete($id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/customers/%s', $id), $params, $opts);
- }
-
- /**
- * Removes the currently applied discount on a customer.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Customer
- */
- public function deleteDiscount($id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/customers/%s/discount', $id), $params, $opts);
- }
-
- /**
- * @param string $parentId
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source
- */
- public function deleteSource($parentId, $id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/customers/%s/sources/%s', $parentId, $id), $params, $opts);
- }
-
- /**
- * Deletes an existing TaxID object.
- *
- * @param string $parentId
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TaxId
- */
- public function deleteTaxId($parentId, $id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/customers/%s/tax_ids/%s', $parentId, $id), $params, $opts);
- }
-
- /**
- * Retrieves a Customer object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Customer
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/customers/%s', $id), $params, $opts);
- }
-
- /**
- * Retrieves a specific customer balance transaction that updated the customer’s balances.
- *
- * @param string $parentId
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\CustomerBalanceTransaction
- */
- public function retrieveBalanceTransaction($parentId, $id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/customers/%s/balance_transactions/%s', $parentId, $id), $params, $opts);
- }
-
- /**
- * Retrieves a customer’s cash balance.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\cash_balance
- */
- public function retrieveCashBalance($parentId, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/customers/%s/cash_balance', $parentId), $params, $opts);
- }
-
- /**
- * Retrieve a specified source for a given customer.
- *
- * @param string $parentId
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source
- */
- public function retrieveSource($parentId, $id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/customers/%s/sources/%s', $parentId, $id), $params, $opts);
- }
-
- /**
- * Retrieves the TaxID object with the given identifier.
- *
- * @param string $parentId
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TaxId
- */
- public function retrieveTaxId($parentId, $id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/customers/%s/tax_ids/%s', $parentId, $id), $params, $opts);
- }
-
- /**
- * Search for customers you’ve previously created using Stripe’s Search Query Language. Don’t use
- * search in read-after-write flows where strict consistency is necessary. Under
- * normal operating conditions, data is searchable in less than a minute.
- * Occasionally, propagation of new or updated data can be up to an hour behind
- * during outages. Search functionality is not available to merchants in India.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SearchResult<\Stripe\Customer>
- */
- public function search($params = null, $opts = null)
- {
- return $this->requestSearchResult('get', '/v1/customers/search', $params, $opts);
- }
-
- /**
- * Updates the specified customer by setting the values of the parameters passed.
- * Any parameters not provided will be left unchanged. For example, if you pass the
- * source parameter, that becomes the customer’s active source
- * (e.g., a card) to be used for all charges in the future. When you update a
- * customer to a new valid card source by passing the source
- * parameter: for each of the customer’s current subscriptions, if the subscription
- * bills automatically and is in the past_due state, then the latest
- * open invoice for the subscription with automatic collection enabled will be
- * retried. This retry will not count as an automatic retry, and will not affect
- * the next regularly scheduled payment for the invoice. Changing the
- * default_source for a customer will not trigger this behavior.
- *
- * This request accepts mostly the same arguments as the customer creation call.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Customer
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/customers/%s', $id), $params, $opts);
- }
-
- /**
- * Most credit balance transaction fields are immutable, but you may update its
- * description and metadata.
- *
- * @param string $parentId
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\CustomerBalanceTransaction
- */
- public function updateBalanceTransaction($parentId, $id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/customers/%s/balance_transactions/%s', $parentId, $id), $params, $opts);
- }
-
- /**
- * Updates a customer’s cash balance.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\cash_balance
- */
- public function updateCashBalance($parentId, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/customers/%s/cash_balance', $parentId), $params, $opts);
- }
-
- /**
- * @param string $parentId
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source
- */
- public function updateSource($parentId, $id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/customers/%s/sources/%s', $parentId, $id), $params, $opts);
- }
-
- /**
- * @param string $parentId
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source
- */
- public function verifySource($parentId, $id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/customers/%s/sources/%s/verify', $parentId, $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/DisputeService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/DisputeService.php
deleted file mode 100644
index 86d3584a..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/DisputeService.php
+++ /dev/null
@@ -1,83 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/disputes', $params, $opts);
- }
-
- /**
- * Closing the dispute for a charge indicates that you do not have any evidence to
- * submit and are essentially dismissing the dispute, acknowledging it as lost.
- *
- * The status of the dispute will change from needs_response to
- * lost. Closing a dispute is irreversible.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Dispute
- */
- public function close($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/disputes/%s/close', $id), $params, $opts);
- }
-
- /**
- * Retrieves the dispute with the given ID.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Dispute
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/disputes/%s', $id), $params, $opts);
- }
-
- /**
- * When you get a dispute, contacting your customer is always the best first step.
- * If that doesn’t work, you can submit evidence to help us resolve the dispute in
- * your favor. You can do this in your dashboard, but if you prefer,
- * you can use the API to submit evidence programmatically.
- *
- * Depending on your dispute type, different evidence fields will give you a better
- * chance of winning your dispute. To figure out which evidence fields to provide,
- * see our guide to dispute types.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Dispute
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/disputes/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/EphemeralKeyService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/EphemeralKeyService.php
deleted file mode 100644
index 3ca14c90..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/EphemeralKeyService.php
+++ /dev/null
@@ -1,43 +0,0 @@
-request('delete', $this->buildPath('/v1/ephemeral_keys/%s', $id), $params, $opts);
- }
-
- /**
- * Creates a short-lived API key for a given resource.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\EphemeralKey
- */
- public function create($params = null, $opts = null)
- {
- if (!$opts || !isset($opts['stripe_version'])) {
- throw new \Stripe\Exception\InvalidArgumentException('stripe_version must be specified to create an ephemeral key');
- }
-
- return $this->request('post', '/v1/ephemeral_keys', $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/EventService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/EventService.php
deleted file mode 100644
index 9e779dd9..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/EventService.php
+++ /dev/null
@@ -1,44 +0,0 @@
-event object api_version
- * attribute (not according to your current Stripe API version or
- * Stripe-Version header).
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Event>
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/events', $params, $opts);
- }
-
- /**
- * Retrieves the details of an event. Supply the unique identifier of the event,
- * which you might have received in a webhook.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Event
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/events/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/ExchangeRateService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/ExchangeRateService.php
deleted file mode 100644
index fe010b00..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/ExchangeRateService.php
+++ /dev/null
@@ -1,41 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/exchange_rates', $params, $opts);
- }
-
- /**
- * Retrieves the exchange rates from the given currency to every supported
- * currency.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\ExchangeRate
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/exchange_rates/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/FileLinkService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/FileLinkService.php
deleted file mode 100644
index 06929a9c..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/FileLinkService.php
+++ /dev/null
@@ -1,70 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/file_links', $params, $opts);
- }
-
- /**
- * Creates a new file link object.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\FileLink
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/file_links', $params, $opts);
- }
-
- /**
- * Retrieves the file link with the given ID.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\FileLink
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/file_links/%s', $id), $params, $opts);
- }
-
- /**
- * Updates an existing file link object. Expired links can no longer be updated.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\FileLink
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/file_links/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/FileService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/FileService.php
deleted file mode 100644
index 82ef0e50..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/FileService.php
+++ /dev/null
@@ -1,66 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/files', $params, $opts);
- }
-
- /**
- * Retrieves the details of an existing file object. Supply the unique file ID from
- * a file, and Stripe will return the corresponding file object. To access file
- * contents, see the File Upload
- * Guide.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\File
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/files/%s', $id), $params, $opts);
- }
-
- /**
- * Create a file.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @return \Stripe\File
- */
- public function create($params = null, $opts = null)
- {
- $opts = \Stripe\Util\RequestOptions::parse($opts);
- if (!isset($opts->apiBase)) {
- $opts->apiBase = $this->getClient()->getFilesBase();
- }
-
- // Manually flatten params, otherwise curl's multipart encoder will
- // choke on nested null|arrays.
- $flatParams = \array_column(\Stripe\Util\Util::flattenParams($params), 1, 0);
-
- return $this->request('post', '/v1/files', $flatParams, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/FinancialConnections/AccountService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/FinancialConnections/AccountService.php
deleted file mode 100644
index 1c96b124..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/FinancialConnections/AccountService.php
+++ /dev/null
@@ -1,58 +0,0 @@
-Account. You will
- * no longer be able to access data associated with the account (e.g. balances,
- * transactions).
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\FinancialConnections\Account
- */
- public function disconnect($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/financial_connections/accounts/%s/disconnect', $id), $params, $opts);
- }
-
- /**
- * Refreshes the data associated with a Financial Connections Account.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\FinancialConnections\Account
- */
- public function refresh($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/financial_connections/accounts/%s/refresh', $id), $params, $opts);
- }
-
- /**
- * Retrieves the details of an Financial Connections Account.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\FinancialConnections\Account
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/financial_connections/accounts/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php
deleted file mode 100644
index 7dd82634..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- */
- private static $classMap = [
- 'accounts' => AccountService::class,
- 'sessions' => SessionService::class,
- ];
-
- protected function getServiceClass($name)
- {
- return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/FinancialConnections/SessionService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/FinancialConnections/SessionService.php
deleted file mode 100644
index eab589cd..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/FinancialConnections/SessionService.php
+++ /dev/null
@@ -1,41 +0,0 @@
-Session. The session’s client_secret can be used to
- * launch the flow using Stripe.js.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\FinancialConnections\Session
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/financial_connections/sessions', $params, $opts);
- }
-
- /**
- * Retrieves the details of a Financial Connections Session.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\FinancialConnections\Session
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/financial_connections/sessions/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Identity/IdentityServiceFactory.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Identity/IdentityServiceFactory.php
deleted file mode 100644
index cf631462..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Identity/IdentityServiceFactory.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- */
- private static $classMap = [
- 'verificationReports' => VerificationReportService::class,
- 'verificationSessions' => VerificationSessionService::class,
- ];
-
- protected function getServiceClass($name)
- {
- return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Identity/VerificationReportService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Identity/VerificationReportService.php
deleted file mode 100644
index 9289d9df..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Identity/VerificationReportService.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/identity/verification_reports', $params, $opts);
- }
-
- /**
- * Retrieves an existing VerificationReport.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Identity\VerificationReport
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/identity/verification_reports/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Identity/VerificationSessionService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Identity/VerificationSessionService.php
deleted file mode 100644
index 24bb4e06..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Identity/VerificationSessionService.php
+++ /dev/null
@@ -1,146 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/identity/verification_sessions', $params, $opts);
- }
-
- /**
- * A VerificationSession object can be canceled when it is in
- * requires_inputstatus.
- *
- * Once canceled, future submission attempts are disabled. This cannot be undone.
- * Learn more.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Identity\VerificationSession
- */
- public function cancel($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/identity/verification_sessions/%s/cancel', $id), $params, $opts);
- }
-
- /**
- * Creates a VerificationSession object.
- *
- * After the VerificationSession is created, display a verification modal using the
- * session client_secret or send your users to the session’s
- * url.
- *
- * If your API key is in test mode, verification checks won’t actually process,
- * though everything else will occur as if in live mode.
- *
- * Related guide: Verify your
- * users’ identity documents.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Identity\VerificationSession
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/identity/verification_sessions', $params, $opts);
- }
-
- /**
- * Redact a VerificationSession to remove all collected information from Stripe.
- * This will redact the VerificationSession and all objects related to it,
- * including VerificationReports, Events, request logs, etc.
- *
- * A VerificationSession object can be redacted when it is in
- * requires_input or verifiedstatus. Redacting a
- * VerificationSession in requires_action state will automatically
- * cancel it.
- *
- * The redaction process may take up to four days. When the redaction process is in
- * progress, the VerificationSession’s redaction.status field will be
- * set to processing; when the process is finished, it will change to
- * redacted and an identity.verification_session.redacted
- * event will be emitted.
- *
- * Redaction is irreversible. Redacted objects are still accessible in the Stripe
- * API, but all the fields that contain personal data will be replaced by the
- * string [redacted] or a similar placeholder. The
- * metadata field will also be erased. Redacted objects cannot be
- * updated or used for any purpose.
- *
- * Learn more.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Identity\VerificationSession
- */
- public function redact($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/identity/verification_sessions/%s/redact', $id), $params, $opts);
- }
-
- /**
- * Retrieves the details of a VerificationSession that was previously created.
- *
- * When the session status is requires_input, you can use this method
- * to retrieve a valid client_secret or url to allow
- * re-submission.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Identity\VerificationSession
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/identity/verification_sessions/%s', $id), $params, $opts);
- }
-
- /**
- * Updates a VerificationSession object.
- *
- * When the session status is requires_input, you can use this method
- * to update the verification check and options.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Identity\VerificationSession
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/identity/verification_sessions/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/InvoiceItemService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/InvoiceItemService.php
deleted file mode 100644
index 45e20721..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/InvoiceItemService.php
+++ /dev/null
@@ -1,93 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/invoiceitems', $params, $opts);
- }
-
- /**
- * Creates an item to be added to a draft invoice (up to 250 items per invoice). If
- * no invoice is specified, the item will be on the next invoice created for the
- * customer specified.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\InvoiceItem
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/invoiceitems', $params, $opts);
- }
-
- /**
- * Deletes an invoice item, removing it from an invoice. Deleting invoice items is
- * only possible when they’re not attached to invoices, or if it’s attached to a
- * draft invoice.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\InvoiceItem
- */
- public function delete($id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/invoiceitems/%s', $id), $params, $opts);
- }
-
- /**
- * Retrieves the invoice item with the given ID.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\InvoiceItem
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/invoiceitems/%s', $id), $params, $opts);
- }
-
- /**
- * Updates the amount or description of an invoice item on an upcoming invoice.
- * Updating an invoice item is only possible before the invoice it’s attached to is
- * closed.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\InvoiceItem
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/invoiceitems/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/InvoiceService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/InvoiceService.php
deleted file mode 100644
index 5cb9091d..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/InvoiceService.php
+++ /dev/null
@@ -1,292 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/invoices', $params, $opts);
- }
-
- /**
- * When retrieving an invoice, you’ll get a lines property
- * containing the total count of line items and the first handful of those items.
- * There is also a URL where you can retrieve the full (paginated) list of line
- * items.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\LineItem>
- */
- public function allLines($parentId, $params = null, $opts = null)
- {
- return $this->requestCollection('get', $this->buildPath('/v1/invoices/%s/lines', $parentId), $params, $opts);
- }
-
- /**
- * This endpoint creates a draft invoice for a given customer. The draft invoice
- * created pulls in all pending invoice items on that customer, including
- * prorations. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to
- * your customers.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Invoice
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/invoices', $params, $opts);
- }
-
- /**
- * Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to
- * delete invoices that are no longer in a draft state will fail; once an invoice
- * has been finalized or if an invoice is for a subscription, it must be voided.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Invoice
- */
- public function delete($id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/invoices/%s', $id), $params, $opts);
- }
-
- /**
- * Stripe automatically finalizes drafts before sending and attempting payment on
- * invoices. However, if you’d like to finalize a draft invoice manually, you can
- * do so using this method.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Invoice
- */
- public function finalizeInvoice($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/invoices/%s/finalize', $id), $params, $opts);
- }
-
- /**
- * Marking an invoice as uncollectible is useful for keeping track of bad debts
- * that can be written off for accounting purposes.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Invoice
- */
- public function markUncollectible($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/invoices/%s/mark_uncollectible', $id), $params, $opts);
- }
-
- /**
- * Stripe automatically creates and then attempts to collect payment on invoices
- * for customers on subscriptions according to your subscriptions
- * settings. However, if you’d like to attempt payment on an invoice out of the
- * normal collection schedule or for some other reason, you can do so.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Invoice
- */
- public function pay($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/invoices/%s/pay', $id), $params, $opts);
- }
-
- /**
- * Retrieves the invoice with the given ID.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Invoice
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/invoices/%s', $id), $params, $opts);
- }
-
- /**
- * Search for invoices you’ve previously created using Stripe’s Search Query Language. Don’t use
- * search in read-after-write flows where strict consistency is necessary. Under
- * normal operating conditions, data is searchable in less than a minute.
- * Occasionally, propagation of new or updated data can be up to an hour behind
- * during outages. Search functionality is not available to merchants in India.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SearchResult<\Stripe\Invoice>
- */
- public function search($params = null, $opts = null)
- {
- return $this->requestSearchResult('get', '/v1/invoices/search', $params, $opts);
- }
-
- /**
- * Stripe will automatically send invoices to customers according to your subscriptions
- * settings. However, if you’d like to manually send an invoice to your
- * customer out of the normal schedule, you can do so. When sending invoices that
- * have already been paid, there will be no reference to the payment in the email.
- *
- * Requests made in test-mode result in no emails being sent, despite sending an
- * invoice.sent event.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Invoice
- */
- public function sendInvoice($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/invoices/%s/send', $id), $params, $opts);
- }
-
- /**
- * At any time, you can preview the upcoming invoice for a customer. This will show
- * you all the charges that are pending, including subscription renewal charges,
- * invoice item charges, etc. It will also show you any discounts that are
- * applicable to the invoice.
- *
- * Note that when you are viewing an upcoming invoice, you are simply viewing a
- * preview – the invoice has not yet been created. As such, the upcoming invoice
- * will not show up in invoice listing calls, and you cannot use the API to pay or
- * edit the invoice. If you want to change the amount that your customer will be
- * billed, you can add, remove, or update pending invoice items, or update the
- * customer’s discount.
- *
- * You can preview the effects of updating a subscription, including a preview of
- * what proration will take place. To ensure that the actual proration is
- * calculated exactly the same as the previewed proration, you should pass a
- * proration_date parameter when doing the actual subscription update.
- * The value passed in should be the same as the
- * subscription_proration_date returned on the upcoming invoice
- * resource. The recommended way to get only the prorations being previewed is to
- * consider only proration line items where period[start] is equal to
- * the subscription_proration_date on the upcoming invoice resource.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Invoice
- */
- public function upcoming($params = null, $opts = null)
- {
- return $this->request('get', '/v1/invoices/upcoming', $params, $opts);
- }
-
- /**
- * When retrieving an upcoming invoice, you’ll get a lines
- * property containing the total count of line items and the first handful of those
- * items. There is also a URL where you can retrieve the full (paginated) list of
- * line items.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Invoice>
- */
- public function upcomingLines($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/invoices/upcoming/lines', $params, $opts);
- }
-
- /**
- * Draft invoices are fully editable. Once an invoice is finalized, monetary values,
- * as well as collection_method, become uneditable.
- *
- * If you would like to stop the Stripe Billing engine from automatically
- * finalizing, reattempting payments on, sending reminders for, or automatically reconciling
- * invoices, pass auto_advance=false.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Invoice
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/invoices/%s', $id), $params, $opts);
- }
-
- /**
- * Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is
- * similar to deletion, however it only applies to
- * finalized invoices and maintains a papertrail where the invoice can still be
- * found.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Invoice
- */
- public function voidInvoice($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/invoices/%s/void', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Issuing/AuthorizationService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Issuing/AuthorizationService.php
deleted file mode 100644
index 6517688f..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Issuing/AuthorizationService.php
+++ /dev/null
@@ -1,97 +0,0 @@
-Authorization objects. The objects are
- * sorted in descending order by creation date, with the most recently created
- * object appearing first.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Issuing\Authorization>
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/issuing/authorizations', $params, $opts);
- }
-
- /**
- * Approves a pending Issuing Authorization object. This request
- * should be made within the timeout window of the real-time
- * authorization flow.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Authorization
- */
- public function approve($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/issuing/authorizations/%s/approve', $id), $params, $opts);
- }
-
- /**
- * Declines a pending Issuing Authorization object. This request
- * should be made within the timeout window of the real time
- * authorization flow.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Authorization
- */
- public function decline($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/issuing/authorizations/%s/decline', $id), $params, $opts);
- }
-
- /**
- * Retrieves an Issuing Authorization object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Authorization
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/issuing/authorizations/%s', $id), $params, $opts);
- }
-
- /**
- * Updates the specified Issuing Authorization object by setting the
- * values of the parameters passed. Any parameters not provided will be left
- * unchanged.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Authorization
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/issuing/authorizations/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Issuing/CardService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Issuing/CardService.php
deleted file mode 100644
index 22b7e541..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Issuing/CardService.php
+++ /dev/null
@@ -1,73 +0,0 @@
-Card objects. The objects are sorted in
- * descending order by creation date, with the most recently created object
- * appearing first.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Issuing\Card>
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/issuing/cards', $params, $opts);
- }
-
- /**
- * Creates an Issuing Card object.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Card
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/issuing/cards', $params, $opts);
- }
-
- /**
- * Retrieves an Issuing Card object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Card
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/issuing/cards/%s', $id), $params, $opts);
- }
-
- /**
- * Updates the specified Issuing Card object by setting the values of
- * the parameters passed. Any parameters not provided will be left unchanged.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Card
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/issuing/cards/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Issuing/CardholderService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Issuing/CardholderService.php
deleted file mode 100644
index 65e675b3..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Issuing/CardholderService.php
+++ /dev/null
@@ -1,74 +0,0 @@
-Cardholder objects. The objects are
- * sorted in descending order by creation date, with the most recently created
- * object appearing first.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Issuing\Cardholder>
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/issuing/cardholders', $params, $opts);
- }
-
- /**
- * Creates a new Issuing Cardholder object that can be issued cards.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Cardholder
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/issuing/cardholders', $params, $opts);
- }
-
- /**
- * Retrieves an Issuing Cardholder object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Cardholder
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/issuing/cardholders/%s', $id), $params, $opts);
- }
-
- /**
- * Updates the specified Issuing Cardholder object by setting the
- * values of the parameters passed. Any parameters not provided will be left
- * unchanged.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Cardholder
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/issuing/cardholders/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Issuing/DisputeService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Issuing/DisputeService.php
deleted file mode 100644
index 45c25288..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Issuing/DisputeService.php
+++ /dev/null
@@ -1,99 +0,0 @@
-Dispute objects. The objects are sorted
- * in descending order by creation date, with the most recently created object
- * appearing first.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Issuing\Dispute>
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/issuing/disputes', $params, $opts);
- }
-
- /**
- * Creates an Issuing Dispute object. Individual pieces of evidence
- * within the evidence object are optional at this point. Stripe only
- * validates that required evidence is present during submission. Refer to Dispute
- * reasons and evidence for more details about evidence requirements.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Dispute
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/issuing/disputes', $params, $opts);
- }
-
- /**
- * Retrieves an Issuing Dispute object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Dispute
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/issuing/disputes/%s', $id), $params, $opts);
- }
-
- /**
- * Submits an Issuing Dispute to the card network. Stripe validates
- * that all evidence fields required for the dispute’s reason are present. For more
- * details, see Dispute
- * reasons and evidence.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Dispute
- */
- public function submit($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/issuing/disputes/%s/submit', $id), $params, $opts);
- }
-
- /**
- * Updates the specified Issuing Dispute object by setting the values
- * of the parameters passed. Any parameters not provided will be left unchanged.
- * Properties on the evidence object can be unset by passing in an
- * empty string.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Dispute
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/issuing/disputes/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Issuing/IssuingServiceFactory.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Issuing/IssuingServiceFactory.php
deleted file mode 100644
index a8d5d0f8..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Issuing/IssuingServiceFactory.php
+++ /dev/null
@@ -1,33 +0,0 @@
-
- */
- private static $classMap = [
- 'authorizations' => AuthorizationService::class,
- 'cardholders' => CardholderService::class,
- 'cards' => CardService::class,
- 'disputes' => DisputeService::class,
- 'transactions' => TransactionService::class,
- ];
-
- protected function getServiceClass($name)
- {
- return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Issuing/TransactionService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Issuing/TransactionService.php
deleted file mode 100644
index dd83b182..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Issuing/TransactionService.php
+++ /dev/null
@@ -1,59 +0,0 @@
-Transaction objects. The objects are
- * sorted in descending order by creation date, with the most recently created
- * object appearing first.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Issuing\Transaction>
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/issuing/transactions', $params, $opts);
- }
-
- /**
- * Retrieves an Issuing Transaction object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Transaction
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/issuing/transactions/%s', $id), $params, $opts);
- }
-
- /**
- * Updates the specified Issuing Transaction object by setting the
- * values of the parameters passed. Any parameters not provided will be left
- * unchanged.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Transaction
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/issuing/transactions/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/MandateService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/MandateService.php
deleted file mode 100644
index 156bff0a..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/MandateService.php
+++ /dev/null
@@ -1,24 +0,0 @@
-request('get', $this->buildPath('/v1/mandates/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/OAuthService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/OAuthService.php
deleted file mode 100644
index b745ad98..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/OAuthService.php
+++ /dev/null
@@ -1,150 +0,0 @@
-_parseOpts($opts);
- $opts->apiBase = $this->_getBase($opts);
-
- return $this->request($method, $path, $params, $opts);
- }
-
- /**
- * Generates a URL to Stripe's OAuth form.
- *
- * @param null|array $params
- * @param null|array $opts
- *
- * @return string the URL to Stripe's OAuth form
- */
- public function authorizeUrl($params = null, $opts = null)
- {
- $params = $params ?: [];
-
- $opts = $this->_parseOpts($opts);
- $base = $this->_getBase($opts);
-
- $params['client_id'] = $this->_getClientId($params);
- if (!\array_key_exists('response_type', $params)) {
- $params['response_type'] = 'code';
- }
- $query = \Stripe\Util\Util::encodeParameters($params);
-
- return $base . '/oauth/authorize?' . $query;
- }
-
- /**
- * Use an authoriztion code to connect an account to your platform and
- * fetch the user's credentials.
- *
- * @param null|array $params
- * @param null|array $opts
- *
- * @throws \Stripe\Exception\OAuth\OAuthErrorException if the request fails
- *
- * @return \Stripe\StripeObject object containing the response from the API
- */
- public function token($params = null, $opts = null)
- {
- $params = $params ?: [];
- $params['client_secret'] = $this->_getClientSecret($params);
-
- return $this->requestConnect('post', '/oauth/token', $params, $opts);
- }
-
- /**
- * Disconnects an account from your platform.
- *
- * @param null|array $params
- * @param null|array $opts
- *
- * @throws \Stripe\Exception\OAuth\OAuthErrorException if the request fails
- *
- * @return \Stripe\StripeObject object containing the response from the API
- */
- public function deauthorize($params = null, $opts = null)
- {
- $params = $params ?: [];
- $params['client_id'] = $this->_getClientId($params);
-
- return $this->requestConnect('post', '/oauth/deauthorize', $params, $opts);
- }
-
- private function _getClientId($params = null)
- {
- $clientId = ($params && \array_key_exists('client_id', $params)) ? $params['client_id'] : null;
-
- if (null === $clientId) {
- $clientId = $this->client->getClientId();
- }
- if (null === $clientId) {
- $msg = 'No client_id provided. (HINT: set your client_id using '
- . '`new \Stripe\StripeClient([clientId =>
- ])`)". You can find your client_ids '
- . 'in your Stripe dashboard at '
- . 'https://dashboard.stripe.com/account/applications/settings, '
- . 'after registering your account as a platform. See '
- . 'https://stripe.com/docs/connect/standard-accounts for details, '
- . 'or email support@stripe.com if you have any questions.';
-
- throw new \Stripe\Exception\AuthenticationException($msg);
- }
-
- return $clientId;
- }
-
- private function _getClientSecret($params = null)
- {
- if (\array_key_exists('client_secret', $params)) {
- return $params['client_secret'];
- }
-
- return $this->client->getApiKey();
- }
-
- /**
- * @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request
- *
- * @throws \Stripe\Exception\InvalidArgumentException
- *
- * @return \Stripe\Util\RequestOptions
- */
- private function _parseOpts($opts)
- {
- if (\is_array($opts)) {
- if (\array_key_exists('connect_base', $opts)) {
- // Throw an exception for the convenience of anybody migrating to
- // \Stripe\Service\OAuthService from \Stripe\OAuth, where `connect_base`
- // was the name of the parameter that behaves as `api_base` does here.
- throw new \Stripe\Exception\InvalidArgumentException('Use `api_base`, not `connect_base`');
- }
- }
-
- return \Stripe\Util\RequestOptions::parse($opts);
- }
-
- /**
- * @param \Stripe\Util\RequestOptions $opts
- *
- * @return string
- */
- private function _getBase($opts)
- {
- return isset($opts->apiBase) ?
- $opts->apiBase :
- $this->client->getConnectBase();
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/OrderReturnService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/OrderReturnService.php
deleted file mode 100644
index b98af5f3..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/OrderReturnService.php
+++ /dev/null
@@ -1,42 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/order_returns', $params, $opts);
- }
-
- /**
- * Retrieves the details of an existing order return. Supply the unique order ID
- * from either an order return creation request or the order return list, and
- * Stripe will return the corresponding order information.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\OrderReturn
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/order_returns/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/OrderService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/OrderService.php
deleted file mode 100644
index 9da8a3db..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/OrderService.php
+++ /dev/null
@@ -1,109 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/orders', $params, $opts);
- }
-
- /**
- * Creates a new order object.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Order
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/orders', $params, $opts);
- }
-
- /**
- * Pay an order by providing a source to create a payment.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Order
- */
- public function pay($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/orders/%s/pay', $id), $params, $opts);
- }
-
- /**
- * Retrieves the details of an existing order. Supply the unique order ID from
- * either an order creation request or the order list, and Stripe will return the
- * corresponding order information.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Order
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/orders/%s', $id), $params, $opts);
- }
-
- /**
- * Return all or part of an order. The order must have a status of
- * paid or fulfilled before it can be returned. Once all
- * items have been returned, the order will become canceled or
- * returned depending on which status the order started in.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Order
- */
- public function returnOrder($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/orders/%s/returns', $id), $params, $opts);
- }
-
- /**
- * Updates the specific order by setting the values of the parameters passed. Any
- * parameters not provided will be left unchanged.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Order
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/orders/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PaymentIntentService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PaymentIntentService.php
deleted file mode 100644
index ab8d3a81..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PaymentIntentService.php
+++ /dev/null
@@ -1,283 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/payment_intents', $params, $opts);
- }
-
- /**
- * Manually reconcile the remaining amount for a customer_balance PaymentIntent.
- *
- * This can be used when the cash balance for a
- * customer in manual reconciliation mode received funds.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentIntent
- */
- public function applyCustomerBalance($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/payment_intents/%s/apply_customer_balance', $id), $params, $opts);
- }
-
- /**
- * A PaymentIntent object can be canceled when it is in one of these statuses:
- * requires_payment_method, requires_capture,
- * requires_confirmation, requires_action, or
- * processing.
- *
- * Once canceled, no additional charges will be made by the PaymentIntent and any
- * operations on the PaymentIntent will fail with an error. For PaymentIntents with
- * status=’requires_capture’, the remaining
- * amount_capturable will automatically be refunded.
- *
- * You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session
- * instead
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentIntent
- */
- public function cancel($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/payment_intents/%s/cancel', $id), $params, $opts);
- }
-
- /**
- * Capture the funds of an existing uncaptured PaymentIntent when its status is
- * requires_capture.
- *
- * Uncaptured PaymentIntents will be canceled a set number of days after they are
- * created (7 by default).
- *
- * Learn more about separate authorization
- * and capture.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentIntent
- */
- public function capture($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/payment_intents/%s/capture', $id), $params, $opts);
- }
-
- /**
- * Confirm that your customer intends to pay with current or provided payment
- * method. Upon confirmation, the PaymentIntent will attempt to initiate a payment.
- *
- * If the selected payment method requires additional authentication steps, the
- * PaymentIntent will transition to the requires_action status and
- * suggest additional actions via next_action. If payment fails, the
- * PaymentIntent will transition to the requires_payment_method
- * status. If payment succeeds, the PaymentIntent will transition to the
- * succeeded status (or requires_capture, if
- * capture_method is set to manual).
- *
- * If the confirmation_method is automatic, payment may
- * be attempted using our client SDKs and
- * the PaymentIntent’s client_secret. After
- * next_actions are handled by the client, no additional confirmation
- * is required to complete the payment.
- *
- * If the confirmation_method is manual, all payment
- * attempts must be initiated using a secret key. If any actions are required for
- * the payment, the PaymentIntent will return to the
- * requires_confirmation state after those actions are completed. Your
- * server needs to then explicitly re-confirm the PaymentIntent to initiate the
- * next payment attempt. Read the expanded documentation to
- * learn more about manual confirmation.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentIntent
- */
- public function confirm($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/payment_intents/%s/confirm', $id), $params, $opts);
- }
-
- /**
- * Creates a PaymentIntent object.
- *
- * After the PaymentIntent is created, attach a payment method and confirm to continue the payment.
- * You can read more about the different payment flows available via the Payment
- * Intents API here.
- *
- * When confirm=true is used during creation, it is equivalent to
- * creating and confirming the PaymentIntent in the same call. You may use any
- * parameters available in the confirm
- * API when confirm=true is supplied.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentIntent
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/payment_intents', $params, $opts);
- }
-
- /**
- * Perform an incremental authorization on an eligible PaymentIntent. To be eligible, the
- * PaymentIntent’s status must be requires_capture and incremental_authorization_supported
- * must be true.
- *
- * Incremental authorizations attempt to increase the authorized amount on your
- * customer’s card to the new, higher amount provided. As with the
- * initial authorization, incremental authorizations may be declined. A single
- * PaymentIntent can call this endpoint multiple times to further increase the
- * authorized amount.
- *
- * If the incremental authorization succeeds, the PaymentIntent object is returned
- * with the updated amount.
- * If the incremental authorization fails, a card_declined error is returned, and
- * no fields on the PaymentIntent or Charge are updated. The PaymentIntent object
- * remains capturable for the previously authorized amount.
- *
- * Each PaymentIntent can have a maximum of 10 incremental authorization attempts,
- * including declines. Once captured, a PaymentIntent can no longer be incremented.
- *
- * Learn more about incremental
- * authorizations.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentIntent
- */
- public function incrementAuthorization($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/payment_intents/%s/increment_authorization', $id), $params, $opts);
- }
-
- /**
- * Retrieves the details of a PaymentIntent that has previously been created.
- *
- * Client-side retrieval using a publishable key is allowed when the
- * client_secret is provided in the query string.
- *
- * When retrieved with a publishable key, only a subset of properties will be
- * returned. Please refer to the payment
- * intent object reference for more details.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentIntent
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/payment_intents/%s', $id), $params, $opts);
- }
-
- /**
- * Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language. Don’t use
- * search in read-after-write flows where strict consistency is necessary. Under
- * normal operating conditions, data is searchable in less than a minute.
- * Occasionally, propagation of new or updated data can be up to an hour behind
- * during outages. Search functionality is not available to merchants in India.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SearchResult<\Stripe\PaymentIntent>
- */
- public function search($params = null, $opts = null)
- {
- return $this->requestSearchResult('get', '/v1/payment_intents/search', $params, $opts);
- }
-
- /**
- * Updates properties on a PaymentIntent object without confirming.
- *
- * Depending on which properties you update, you may need to confirm the
- * PaymentIntent again. For example, updating the payment_method will
- * always require you to confirm the PaymentIntent again. If you prefer to update
- * and confirm at the same time, we recommend updating properties via the confirm API instead.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentIntent
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/payment_intents/%s', $id), $params, $opts);
- }
-
- /**
- * Verifies microdeposits on a PaymentIntent object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentIntent
- */
- public function verifyMicrodeposits($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/payment_intents/%s/verify_microdeposits', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PaymentLinkService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PaymentLinkService.php
deleted file mode 100644
index 902cee09..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PaymentLinkService.php
+++ /dev/null
@@ -1,89 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/payment_links', $params, $opts);
- }
-
- /**
- * When retrieving a payment link, there is an includable
- * line_items property containing the first handful of those
- * items. There is also a URL where you can retrieve the full (paginated) list of
- * line items.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\PaymentLink>
- */
- public function allLineItems($id, $params = null, $opts = null)
- {
- return $this->requestCollection('get', $this->buildPath('/v1/payment_links/%s/line_items', $id), $params, $opts);
- }
-
- /**
- * Creates a payment link.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentLink
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/payment_links', $params, $opts);
- }
-
- /**
- * Retrieve a payment link.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentLink
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/payment_links/%s', $id), $params, $opts);
- }
-
- /**
- * Updates a payment link.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentLink
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/payment_links/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PaymentMethodService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PaymentMethodService.php
deleted file mode 100644
index 1ddd282b..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PaymentMethodService.php
+++ /dev/null
@@ -1,130 +0,0 @@
-List a Customer’s
- * PaymentMethods.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\PaymentMethod>
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/payment_methods', $params, $opts);
- }
-
- /**
- * Attaches a PaymentMethod object to a Customer.
- *
- * To attach a new PaymentMethod to a customer for future payments, we recommend
- * you use a SetupIntent or a PaymentIntent
- * with setup_future_usage.
- * These approaches will perform any necessary steps to ensure that the
- * PaymentMethod can be used in a future payment. Using the
- * /v1/payment_methods/:id/attach endpoint does not ensure that future
- * payments can be made with the attached PaymentMethod. See Optimizing cards for future
- * payments for more information about setting up future payments.
- *
- * To use this PaymentMethod as the default for invoice or subscription payments,
- * set invoice_settings.default_payment_method,
- * on the Customer to the PaymentMethod’s ID.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentMethod
- */
- public function attach($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/payment_methods/%s/attach', $id), $params, $opts);
- }
-
- /**
- * Creates a PaymentMethod object. Read the Stripe.js
- * reference to learn how to create PaymentMethods via Stripe.js.
- *
- * Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a
- * payment immediately or the SetupIntent API to collect payment
- * method details ahead of a future payment.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentMethod
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/payment_methods', $params, $opts);
- }
-
- /**
- * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is
- * detached, it can no longer be used for a payment or re-attached to a Customer.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentMethod
- */
- public function detach($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/payment_methods/%s/detach', $id), $params, $opts);
- }
-
- /**
- * Retrieves a PaymentMethod object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentMethod
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/payment_methods/%s', $id), $params, $opts);
- }
-
- /**
- * Updates a PaymentMethod object. A PaymentMethod must be attached a customer to
- * be updated.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentMethod
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/payment_methods/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PayoutService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PayoutService.php
deleted file mode 100644
index 4ca3561c..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PayoutService.php
+++ /dev/null
@@ -1,127 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/payouts', $params, $opts);
- }
-
- /**
- * A previously created payout can be canceled if it has not yet been paid out.
- * Funds will be refunded to your available balance. You may not cancel automatic
- * Stripe payouts.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Payout
- */
- public function cancel($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/payouts/%s/cancel', $id), $params, $opts);
- }
-
- /**
- * To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout amount, or
- * you’ll receive an “Insufficient Funds” error.
- *
- * If your API key is in test mode, money won’t actually be sent, though everything
- * else will occur as if in live mode.
- *
- * If you are creating a manual payout on a Stripe account that uses multiple
- * payment source types, you’ll need to specify the source type balance that the
- * payout should draw from. The balance object
- * details available and pending amounts by source type.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Payout
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/payouts', $params, $opts);
- }
-
- /**
- * Retrieves the details of an existing payout. Supply the unique payout ID from
- * either a payout creation request or the payout list, and Stripe will return the
- * corresponding payout information.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Payout
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/payouts/%s', $id), $params, $opts);
- }
-
- /**
- * Reverses a payout by debiting the destination bank account. Only payouts for
- * connected accounts to US bank accounts may be reversed at this time. If the
- * payout is in the pending status,
- * /v1/payouts/:id/cancel should be used instead.
- *
- * By requesting a reversal via /v1/payouts/:id/reverse, you confirm
- * that the authorized signatory of the selected bank account has authorized the
- * debit on the bank account and that no other authorization is required.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Payout
- */
- public function reverse($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/payouts/%s/reverse', $id), $params, $opts);
- }
-
- /**
- * Updates the specified payout by setting the values of the parameters passed. Any
- * parameters not provided will be left unchanged. This request accepts only the
- * metadata as arguments.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Payout
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/payouts/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PlanService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PlanService.php
deleted file mode 100644
index 6c0a8d47..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PlanService.php
+++ /dev/null
@@ -1,91 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/plans', $params, $opts);
- }
-
- /**
- * You can now model subscriptions more flexibly using the Prices
- * API. It replaces the Plans API and is backwards compatible to simplify your
- * migration.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Plan
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/plans', $params, $opts);
- }
-
- /**
- * Deleting plans means new subscribers can’t be added. Existing subscribers aren’t
- * affected.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Plan
- */
- public function delete($id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/plans/%s', $id), $params, $opts);
- }
-
- /**
- * Retrieves the plan with the given ID.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Plan
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/plans/%s', $id), $params, $opts);
- }
-
- /**
- * Updates the specified plan by setting the values of the parameters passed. Any
- * parameters not provided are left unchanged. By design, you cannot change a
- * plan’s ID, amount, currency, or billing cycle.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Plan
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/plans/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PriceService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PriceService.php
deleted file mode 100644
index ef2b938d..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PriceService.php
+++ /dev/null
@@ -1,92 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/prices', $params, $opts);
- }
-
- /**
- * Creates a new price for an existing product. The price can be recurring or
- * one-time.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Price
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/prices', $params, $opts);
- }
-
- /**
- * Retrieves the price with the given ID.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Price
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/prices/%s', $id), $params, $opts);
- }
-
- /**
- * Search for prices you’ve previously created using Stripe’s Search Query Language. Don’t use
- * search in read-after-write flows where strict consistency is necessary. Under
- * normal operating conditions, data is searchable in less than a minute.
- * Occasionally, propagation of new or updated data can be up to an hour behind
- * during outages. Search functionality is not available to merchants in India.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SearchResult<\Stripe\Price>
- */
- public function search($params = null, $opts = null)
- {
- return $this->requestSearchResult('get', '/v1/prices/search', $params, $opts);
- }
-
- /**
- * Updates the specified price by setting the values of the parameters passed. Any
- * parameters not provided are left unchanged.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Price
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/prices/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/ProductService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/ProductService.php
deleted file mode 100644
index 5eb6d82c..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/ProductService.php
+++ /dev/null
@@ -1,112 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/products', $params, $opts);
- }
-
- /**
- * Creates a new product object.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Product
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/products', $params, $opts);
- }
-
- /**
- * Delete a product. Deleting a product is only possible if it has no prices
- * associated with it. Additionally, deleting a product with type=good
- * is only possible if it has no SKUs associated with it.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Product
- */
- public function delete($id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/products/%s', $id), $params, $opts);
- }
-
- /**
- * Retrieves the details of an existing product. Supply the unique product ID from
- * either a product creation request or the product list, and Stripe will return
- * the corresponding product information.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Product
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/products/%s', $id), $params, $opts);
- }
-
- /**
- * Search for products you’ve previously created using Stripe’s Search Query Language. Don’t use
- * search in read-after-write flows where strict consistency is necessary. Under
- * normal operating conditions, data is searchable in less than a minute.
- * Occasionally, propagation of new or updated data can be up to an hour behind
- * during outages. Search functionality is not available to merchants in India.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SearchResult<\Stripe\Product>
- */
- public function search($params = null, $opts = null)
- {
- return $this->requestSearchResult('get', '/v1/products/search', $params, $opts);
- }
-
- /**
- * Updates the specific product by setting the values of the parameters passed. Any
- * parameters not provided will be left unchanged.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Product
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/products/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PromotionCodeService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PromotionCodeService.php
deleted file mode 100644
index 17461b4b..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PromotionCodeService.php
+++ /dev/null
@@ -1,75 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/promotion_codes', $params, $opts);
- }
-
- /**
- * A promotion code points to a coupon. You can optionally restrict the code to a
- * specific customer, redemption limit, and expiration date.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PromotionCode
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/promotion_codes', $params, $opts);
- }
-
- /**
- * Retrieves the promotion code with the given ID. In order to retrieve a promotion
- * code by the customer-facing code use list with the desired
- * code.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PromotionCode
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/promotion_codes/%s', $id), $params, $opts);
- }
-
- /**
- * Updates the specified promotion code by setting the values of the parameters
- * passed. Most fields are, by design, not editable.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PromotionCode
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/promotion_codes/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/QuoteService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/QuoteService.php
deleted file mode 100644
index d6d20c0b..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/QuoteService.php
+++ /dev/null
@@ -1,177 +0,0 @@
-request('post', $this->buildPath('/v1/quotes/%s/accept', $id), $params, $opts);
- }
-
- /**
- * Returns a list of your quotes.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Quote>
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/quotes', $params, $opts);
- }
-
- /**
- * When retrieving a quote, there is an includable computed.upfront.line_items
- * property containing the first handful of those items. There is also a URL where
- * you can retrieve the full (paginated) list of upfront line items.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Quote>
- */
- public function allComputedUpfrontLineItems($id, $params = null, $opts = null)
- {
- return $this->requestCollection('get', $this->buildPath('/v1/quotes/%s/computed_upfront_line_items', $id), $params, $opts);
- }
-
- /**
- * When retrieving a quote, there is an includable line_items
- * property containing the first handful of those items. There is also a URL where
- * you can retrieve the full (paginated) list of line items.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Quote>
- */
- public function allLineItems($id, $params = null, $opts = null)
- {
- return $this->requestCollection('get', $this->buildPath('/v1/quotes/%s/line_items', $id), $params, $opts);
- }
-
- /**
- * Cancels the quote.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Quote
- */
- public function cancel($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/quotes/%s/cancel', $id), $params, $opts);
- }
-
- /**
- * A quote models prices and services for a customer. Default options for
- * header, description, footer, and
- * expires_at can be set in the dashboard via the quote template.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Quote
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/quotes', $params, $opts);
- }
-
- /**
- * Finalizes the quote.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Quote
- */
- public function finalizeQuote($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/quotes/%s/finalize', $id), $params, $opts);
- }
-
- /**
- * Retrieves the quote with the given ID.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Quote
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/quotes/%s', $id), $params, $opts);
- }
-
- /**
- * A quote models prices and services for a customer.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Quote
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/quotes/%s', $id), $params, $opts);
- }
-
- /**
- * Download the PDF for a finalized quote.
- *
- * @param string $id
- * @param callable $readBodyChunkCallable
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- */
- public function pdf($id, $readBodyChunkCallable, $params = null, $opts = null)
- {
- $opts = \Stripe\Util\RequestOptions::parse($opts);
- if (!isset($opts->apiBase)) {
- $opts->apiBase = $this->getClient()->getFilesBase();
- }
- $this->requestStream('get', $this->buildPath('/v1/quotes/%s/pdf', $id), $readBodyChunkCallable, $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Radar/EarlyFraudWarningService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Radar/EarlyFraudWarningService.php
deleted file mode 100644
index be119b4c..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Radar/EarlyFraudWarningService.php
+++ /dev/null
@@ -1,43 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/radar/early_fraud_warnings', $params, $opts);
- }
-
- /**
- * Retrieves the details of an early fraud warning that has previously been
- * created.
- *
- * Please refer to the early fraud
- * warning object reference for more details.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Radar\EarlyFraudWarning
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/radar/early_fraud_warnings/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Radar/RadarServiceFactory.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Radar/RadarServiceFactory.php
deleted file mode 100644
index b093c671..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Radar/RadarServiceFactory.php
+++ /dev/null
@@ -1,29 +0,0 @@
-
- */
- private static $classMap = [
- 'earlyFraudWarnings' => EarlyFraudWarningService::class,
- 'valueListItems' => ValueListItemService::class,
- 'valueLists' => ValueListService::class,
- ];
-
- protected function getServiceClass($name)
- {
- return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Radar/ValueListItemService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Radar/ValueListItemService.php
deleted file mode 100644
index b9da3dd8..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Radar/ValueListItemService.php
+++ /dev/null
@@ -1,74 +0,0 @@
-ValueListItem objects. The objects are sorted in
- * descending order by creation date, with the most recently created object
- * appearing first.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Radar\ValueListItem>
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/radar/value_list_items', $params, $opts);
- }
-
- /**
- * Creates a new ValueListItem object, which is added to the specified
- * parent value list.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Radar\ValueListItem
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/radar/value_list_items', $params, $opts);
- }
-
- /**
- * Deletes a ValueListItem object, removing it from its parent value
- * list.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Radar\ValueListItem
- */
- public function delete($id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/radar/value_list_items/%s', $id), $params, $opts);
- }
-
- /**
- * Retrieves a ValueListItem object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Radar\ValueListItem
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/radar/value_list_items/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Radar/ValueListService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Radar/ValueListService.php
deleted file mode 100644
index 70d9b486..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Radar/ValueListService.php
+++ /dev/null
@@ -1,93 +0,0 @@
-ValueList objects. The objects are sorted in
- * descending order by creation date, with the most recently created object
- * appearing first.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Radar\ValueList>
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/radar/value_lists', $params, $opts);
- }
-
- /**
- * Creates a new ValueList object, which can then be referenced in
- * rules.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Radar\ValueList
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/radar/value_lists', $params, $opts);
- }
-
- /**
- * Deletes a ValueList object, also deleting any items contained
- * within the value list. To be deleted, a value list must not be referenced in any
- * rules.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Radar\ValueList
- */
- public function delete($id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/radar/value_lists/%s', $id), $params, $opts);
- }
-
- /**
- * Retrieves a ValueList object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Radar\ValueList
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/radar/value_lists/%s', $id), $params, $opts);
- }
-
- /**
- * Updates a ValueList object by setting the values of the parameters
- * passed. Any parameters not provided will be left unchanged. Note that
- * item_type is immutable.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Radar\ValueList
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/radar/value_lists/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/RefundService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/RefundService.php
deleted file mode 100644
index 772c0f6e..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/RefundService.php
+++ /dev/null
@@ -1,95 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/refunds', $params, $opts);
- }
-
- /**
- * Cancels a refund with a status of requires_action.
- *
- * Refunds in other states cannot be canceled, and only refunds for payment methods
- * that require customer action will enter the requires_action state.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Refund
- */
- public function cancel($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/refunds/%s/cancel', $id), $params, $opts);
- }
-
- /**
- * Create a refund.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Refund
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/refunds', $params, $opts);
- }
-
- /**
- * Retrieves the details of an existing refund.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Refund
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/refunds/%s', $id), $params, $opts);
- }
-
- /**
- * Updates the specified refund by setting the values of the parameters passed. Any
- * parameters not provided will be left unchanged.
- *
- * This request only accepts metadata as an argument.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Refund
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/refunds/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Reporting/ReportRunService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Reporting/ReportRunService.php
deleted file mode 100644
index b62898fd..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Reporting/ReportRunService.php
+++ /dev/null
@@ -1,55 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/reporting/report_runs', $params, $opts);
- }
-
- /**
- * Creates a new object and begin running the report. (Certain report types require
- * a live-mode API key.).
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Reporting\ReportRun
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/reporting/report_runs', $params, $opts);
- }
-
- /**
- * Retrieves the details of an existing Report Run.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Reporting\ReportRun
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/reporting/report_runs/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Reporting/ReportTypeService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Reporting/ReportTypeService.php
deleted file mode 100644
index 7fa50382..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Reporting/ReportTypeService.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/reporting/report_types', $params, $opts);
- }
-
- /**
- * Retrieves the details of a Report Type. (Certain report types require a live-mode API key.).
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Reporting\ReportType
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/reporting/report_types/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Reporting/ReportingServiceFactory.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Reporting/ReportingServiceFactory.php
deleted file mode 100644
index 7832e917..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Reporting/ReportingServiceFactory.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- */
- private static $classMap = [
- 'reportRuns' => ReportRunService::class,
- 'reportTypes' => ReportTypeService::class,
- ];
-
- protected function getServiceClass($name)
- {
- return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/ReviewService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/ReviewService.php
deleted file mode 100644
index 3bcd325b..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/ReviewService.php
+++ /dev/null
@@ -1,58 +0,0 @@
-Review objects that have open set to
- * true. The objects are sorted in descending order by creation date,
- * with the most recently created object appearing first.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Review>
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/reviews', $params, $opts);
- }
-
- /**
- * Approves a Review object, closing it and removing it from the list
- * of reviews.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Review
- */
- public function approve($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/reviews/%s/approve', $id), $params, $opts);
- }
-
- /**
- * Retrieves a Review object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Review
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/reviews/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/SetupAttemptService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/SetupAttemptService.php
deleted file mode 100644
index 8657441e..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/SetupAttemptService.php
+++ /dev/null
@@ -1,23 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/setup_attempts', $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/SetupIntentService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/SetupIntentService.php
deleted file mode 100644
index 3dea24cb..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/SetupIntentService.php
+++ /dev/null
@@ -1,143 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/setup_intents', $params, $opts);
- }
-
- /**
- * A SetupIntent object can be canceled when it is in one of these statuses:
- * requires_payment_method, requires_confirmation, or
- * requires_action.
- *
- * Once canceled, setup is abandoned and any operations on the SetupIntent will
- * fail with an error.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SetupIntent
- */
- public function cancel($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/setup_intents/%s/cancel', $id), $params, $opts);
- }
-
- /**
- * Confirm that your customer intends to set up the current or provided payment
- * method. For example, you would confirm a SetupIntent when a customer hits the
- * “Save” button on a payment method management page on your website.
- *
- * If the selected payment method does not require any additional steps from the
- * customer, the SetupIntent will transition to the succeeded status.
- *
- * Otherwise, it will transition to the requires_action status and
- * suggest additional actions via next_action. If setup fails, the
- * SetupIntent will transition to the requires_payment_method status.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SetupIntent
- */
- public function confirm($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/setup_intents/%s/confirm', $id), $params, $opts);
- }
-
- /**
- * Creates a SetupIntent object.
- *
- * After the SetupIntent is created, attach a payment method and confirm to collect any required
- * permissions to charge the payment method later.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SetupIntent
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/setup_intents', $params, $opts);
- }
-
- /**
- * Retrieves the details of a SetupIntent that has previously been created.
- *
- * Client-side retrieval using a publishable key is allowed when the
- * client_secret is provided in the query string.
- *
- * When retrieved with a publishable key, only a subset of properties will be
- * returned. Please refer to the SetupIntent
- * object reference for more details.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SetupIntent
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/setup_intents/%s', $id), $params, $opts);
- }
-
- /**
- * Updates a SetupIntent object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SetupIntent
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/setup_intents/%s', $id), $params, $opts);
- }
-
- /**
- * Verifies microdeposits on a SetupIntent object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SetupIntent
- */
- public function verifyMicrodeposits($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/setup_intents/%s/verify_microdeposits', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/ShippingRateService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/ShippingRateService.php
deleted file mode 100644
index d141e484..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/ShippingRateService.php
+++ /dev/null
@@ -1,70 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/shipping_rates', $params, $opts);
- }
-
- /**
- * Creates a new shipping rate object.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\ShippingRate
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/shipping_rates', $params, $opts);
- }
-
- /**
- * Returns the shipping rate object with the given ID.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\ShippingRate
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/shipping_rates/%s', $id), $params, $opts);
- }
-
- /**
- * Updates an existing shipping rate object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\ShippingRate
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/shipping_rates/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Sigma/ScheduledQueryRunService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Sigma/ScheduledQueryRunService.php
deleted file mode 100644
index 0fa8cd9c..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Sigma/ScheduledQueryRunService.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/sigma/scheduled_query_runs', $params, $opts);
- }
-
- /**
- * Retrieves the details of an scheduled query run.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Sigma\ScheduledQueryRun
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/sigma/scheduled_query_runs/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Sigma/SigmaServiceFactory.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Sigma/SigmaServiceFactory.php
deleted file mode 100644
index 356750f4..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Sigma/SigmaServiceFactory.php
+++ /dev/null
@@ -1,25 +0,0 @@
-
- */
- private static $classMap = [
- 'scheduledQueryRuns' => ScheduledQueryRunService::class,
- ];
-
- protected function getServiceClass($name)
- {
- return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/SkuService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/SkuService.php
deleted file mode 100644
index c00194ea..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/SkuService.php
+++ /dev/null
@@ -1,95 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/skus', $params, $opts);
- }
-
- /**
- * Creates a new SKU associated with a product.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SKU
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/skus', $params, $opts);
- }
-
- /**
- * Delete a SKU. Deleting a SKU is only possible until it has been used in an
- * order.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SKU
- */
- public function delete($id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/skus/%s', $id), $params, $opts);
- }
-
- /**
- * Retrieves the details of an existing SKU. Supply the unique SKU identifier from
- * either a SKU creation request or from the product, and Stripe will return the
- * corresponding SKU information.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SKU
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/skus/%s', $id), $params, $opts);
- }
-
- /**
- * Updates the specific SKU by setting the values of the parameters passed. Any
- * parameters not provided will be left unchanged.
- *
- * Note that a SKU’s attributes are not editable. Instead, you would
- * need to deactivate the existing SKU and create a new one with the new attribute
- * values.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SKU
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/skus/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/SourceService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/SourceService.php
deleted file mode 100644
index c6cc0596..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/SourceService.php
+++ /dev/null
@@ -1,110 +0,0 @@
-request('get', $this->buildPath('/v1/sources/%s/source_transactions', $id), $params, $opts);
- }
-
- /**
- * Creates a new source object.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Source
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/sources', $params, $opts);
- }
-
- /**
- * Delete a specified source for a given customer.
- *
- * @param string $parentId
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Source
- */
- public function detach($parentId, $id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/customers/%s/sources/%s', $parentId, $id), $params, $opts);
- }
-
- /**
- * Retrieves an existing source object. Supply the unique source ID from a source
- * creation request and Stripe will return the corresponding up-to-date source
- * object information.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Source
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/sources/%s', $id), $params, $opts);
- }
-
- /**
- * Updates the specified source by setting the values of the parameters passed. Any
- * parameters not provided will be left unchanged.
- *
- * This request accepts the metadata and owner as
- * arguments. It is also possible to update type specific information for selected
- * payment methods. Please refer to our payment method
- * guides for more detail.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Source
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/sources/%s', $id), $params, $opts);
- }
-
- /**
- * Verify a given source.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Source
- */
- public function verify($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/sources/%s/verify', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/SubscriptionItemService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/SubscriptionItemService.php
deleted file mode 100644
index e18c8de4..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/SubscriptionItemService.php
+++ /dev/null
@@ -1,151 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/subscription_items', $params, $opts);
- }
-
- /**
- * For the specified subscription item, returns a list of summary objects. Each
- * object in the list provides usage information that’s been summarized from
- * multiple usage records and over a subscription billing period (e.g., 15 usage
- * records in the month of September).
- *
- * The list is sorted in reverse-chronological order (newest first). The first list
- * item represents the most current usage period that hasn’t ended yet. Since new
- * usage records can still be added, the returned summary information for the
- * subscription item’s ID should be seen as unstable until the subscription billing
- * period ends.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\UsageRecordSummary>
- */
- public function allUsageRecordSummaries($parentId, $params = null, $opts = null)
- {
- return $this->requestCollection('get', $this->buildPath('/v1/subscription_items/%s/usage_record_summaries', $parentId), $params, $opts);
- }
-
- /**
- * Adds a new item to an existing subscription. No existing items will be changed
- * or replaced.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SubscriptionItem
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/subscription_items', $params, $opts);
- }
-
- /**
- * Creates a usage record for a specified subscription item and date, and fills it
- * with a quantity.
- *
- * Usage records provide quantity information that Stripe uses to
- * track how much a customer is using your service. With usage information and the
- * pricing model set up by the metered
- * billing plan, Stripe helps you send accurate invoices to your customers.
- *
- * The default calculation for usage is to add up all the quantity
- * values of the usage records within a billing period. You can change this default
- * behavior with the billing plan’s aggregate_usageparameter. When
- * there is more than one usage record with the same timestamp, Stripe adds the
- * quantity values together. In most cases, this is the desired
- * resolution, however, you can change this behavior with the action
- * parameter.
- *
- * The default pricing model for metered billing is per-unit pricing.
- * For finer granularity, you can configure metered billing to have a tiered pricing
- * model.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\UsageRecord
- */
- public function createUsageRecord($parentId, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/subscription_items/%s/usage_records', $parentId), $params, $opts);
- }
-
- /**
- * Deletes an item from the subscription. Removing a subscription item from a
- * subscription will not cancel the subscription.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SubscriptionItem
- */
- public function delete($id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/subscription_items/%s', $id), $params, $opts);
- }
-
- /**
- * Retrieves the subscription item with the given ID.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SubscriptionItem
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/subscription_items/%s', $id), $params, $opts);
- }
-
- /**
- * Updates the plan or quantity of an item on a current subscription.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SubscriptionItem
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/subscription_items/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/SubscriptionScheduleService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/SubscriptionScheduleService.php
deleted file mode 100644
index 42aaf6bb..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/SubscriptionScheduleService.php
+++ /dev/null
@@ -1,113 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/subscription_schedules', $params, $opts);
- }
-
- /**
- * Cancels a subscription schedule and its associated subscription immediately (if
- * the subscription schedule has an active subscription). A subscription schedule
- * can only be canceled if its status is not_started or
- * active.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SubscriptionSchedule
- */
- public function cancel($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/subscription_schedules/%s/cancel', $id), $params, $opts);
- }
-
- /**
- * Creates a new subscription schedule object. Each customer can have up to 500
- * active or scheduled subscriptions.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SubscriptionSchedule
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/subscription_schedules', $params, $opts);
- }
-
- /**
- * Releases the subscription schedule immediately, which will stop scheduling of
- * its phases, but leave any existing subscription in place. A schedule can only be
- * released if its status is not_started or active. If
- * the subscription schedule is currently associated with a subscription, releasing
- * it will remove its subscription property and set the subscription’s
- * ID to the released_subscription property.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SubscriptionSchedule
- */
- public function release($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/subscription_schedules/%s/release', $id), $params, $opts);
- }
-
- /**
- * Retrieves the details of an existing subscription schedule. You only need to
- * supply the unique subscription schedule identifier that was returned upon
- * subscription schedule creation.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SubscriptionSchedule
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/subscription_schedules/%s', $id), $params, $opts);
- }
-
- /**
- * Updates an existing subscription schedule.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SubscriptionSchedule
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/subscription_schedules/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/SubscriptionService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/SubscriptionService.php
deleted file mode 100644
index f81310c1..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/SubscriptionService.php
+++ /dev/null
@@ -1,155 +0,0 @@
-status=canceled.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Subscription>
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/subscriptions', $params, $opts);
- }
-
- /**
- * Cancels a customer’s subscription immediately. The customer will not be charged
- * again for the subscription.
- *
- * Note, however, that any pending invoice items that you’ve created will still be
- * charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel
- * at the end of the period, any pending prorations will also be left in place and
- * collected at the end of the period. But if the subscription is set to cancel
- * immediately, pending prorations will be removed.
- *
- * By default, upon subscription cancellation, Stripe will stop automatic
- * collection of all finalized invoices for the customer. This is intended to
- * prevent unexpected payment attempts after the customer has canceled a
- * subscription. However, you can resume automatic collection of the invoices
- * manually after subscription cancellation to have us proceed. Or, you could check
- * for unpaid invoices before allowing the customer to cancel the subscription at
- * all.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Subscription
- */
- public function cancel($id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/subscriptions/%s', $id), $params, $opts);
- }
-
- /**
- * Creates a new subscription on an existing customer. Each customer can have up to
- * 500 active or scheduled subscriptions.
- *
- * When you create a subscription with
- * collection_method=charge_automatically, the first invoice is
- * finalized as part of the request. The payment_behavior parameter
- * determines the exact behavior of the initial payment.
- *
- * To start subscriptions where the first invoice always begins in a
- * draft status, use subscription
- * schedules instead. Schedules provide the flexibility to model more complex
- * billing configurations that change over time.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Subscription
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/subscriptions', $params, $opts);
- }
-
- /**
- * Removes the currently applied discount on a subscription.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Subscription
- */
- public function deleteDiscount($id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/subscriptions/%s/discount', $id), $params, $opts);
- }
-
- /**
- * Retrieves the subscription with the given ID.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Subscription
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/subscriptions/%s', $id), $params, $opts);
- }
-
- /**
- * Search for subscriptions you’ve previously created using Stripe’s Search Query Language. Don’t use
- * search in read-after-write flows where strict consistency is necessary. Under
- * normal operating conditions, data is searchable in less than a minute.
- * Occasionally, propagation of new or updated data can be up to an hour behind
- * during outages. Search functionality is not available to merchants in India.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SearchResult<\Stripe\Subscription>
- */
- public function search($params = null, $opts = null)
- {
- return $this->requestSearchResult('get', '/v1/subscriptions/search', $params, $opts);
- }
-
- /**
- * Updates an existing subscription on a customer to match the specified
- * parameters. When changing plans or quantities, we will optionally prorate the
- * price we charge next month to make up for any price changes. To preview how the
- * proration will be calculated, use the upcoming
- * invoice endpoint.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Subscription
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/subscriptions/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TaxCodeService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TaxCodeService.php
deleted file mode 100644
index fd167a10..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TaxCodeService.php
+++ /dev/null
@@ -1,41 +0,0 @@
-all tax codes
- * available to add to Products in order to allow specific tax calculations.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\TaxCode>
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/tax_codes', $params, $opts);
- }
-
- /**
- * Retrieves the details of an existing tax code. Supply the unique tax code ID and
- * Stripe will return the corresponding tax code information.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TaxCode
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/tax_codes/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TaxRateService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TaxRateService.php
deleted file mode 100644
index 0d67eec3..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TaxRateService.php
+++ /dev/null
@@ -1,71 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/tax_rates', $params, $opts);
- }
-
- /**
- * Creates a new tax rate.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TaxRate
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/tax_rates', $params, $opts);
- }
-
- /**
- * Retrieves a tax rate with the given ID.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TaxRate
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/tax_rates/%s', $id), $params, $opts);
- }
-
- /**
- * Updates an existing tax rate.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TaxRate
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/tax_rates/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Terminal/ConfigurationService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Terminal/ConfigurationService.php
deleted file mode 100644
index 97c7c275..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Terminal/ConfigurationService.php
+++ /dev/null
@@ -1,86 +0,0 @@
-Configuration objects.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Terminal\Configuration>
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/terminal/configurations', $params, $opts);
- }
-
- /**
- * Creates a new Configuration object.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Configuration
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/terminal/configurations', $params, $opts);
- }
-
- /**
- * Deletes a Configuration object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Configuration
- */
- public function delete($id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/terminal/configurations/%s', $id), $params, $opts);
- }
-
- /**
- * Retrieves a Configuration object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Configuration
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/terminal/configurations/%s', $id), $params, $opts);
- }
-
- /**
- * Updates a new Configuration object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Configuration
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/terminal/configurations/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Terminal/ConnectionTokenService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Terminal/ConnectionTokenService.php
deleted file mode 100644
index 7b25b231..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Terminal/ConnectionTokenService.php
+++ /dev/null
@@ -1,25 +0,0 @@
-request('post', '/v1/terminal/connection_tokens', $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Terminal/LocationService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Terminal/LocationService.php
deleted file mode 100644
index 74a776eb..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Terminal/LocationService.php
+++ /dev/null
@@ -1,89 +0,0 @@
-Location objects.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Terminal\Location>
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/terminal/locations', $params, $opts);
- }
-
- /**
- * Creates a new Location object. For further details, including which
- * address fields are required in each country, see the Manage locations guide.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Location
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/terminal/locations', $params, $opts);
- }
-
- /**
- * Deletes a Location object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Location
- */
- public function delete($id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/terminal/locations/%s', $id), $params, $opts);
- }
-
- /**
- * Retrieves a Location object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Location
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/terminal/locations/%s', $id), $params, $opts);
- }
-
- /**
- * Updates a Location object by setting the values of the parameters
- * passed. Any parameters not provided will be left unchanged.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Location
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/terminal/locations/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Terminal/ReaderService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Terminal/ReaderService.php
deleted file mode 100644
index ae855595..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Terminal/ReaderService.php
+++ /dev/null
@@ -1,151 +0,0 @@
-Reader objects.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\Terminal\Reader>
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/terminal/readers', $params, $opts);
- }
-
- /**
- * Cancels the current reader action.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Reader
- */
- public function cancelAction($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/terminal/readers/%s/cancel_action', $id), $params, $opts);
- }
-
- /**
- * Creates a new Reader object.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Reader
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/terminal/readers', $params, $opts);
- }
-
- /**
- * Deletes a Reader object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Reader
- */
- public function delete($id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/terminal/readers/%s', $id), $params, $opts);
- }
-
- /**
- * Initiates a payment flow on a Reader.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Reader
- */
- public function processPaymentIntent($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/terminal/readers/%s/process_payment_intent', $id), $params, $opts);
- }
-
- /**
- * Initiates a setup intent flow on a Reader.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Reader
- */
- public function processSetupIntent($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/terminal/readers/%s/process_setup_intent', $id), $params, $opts);
- }
-
- /**
- * Retrieves a Reader object.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Reader
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/terminal/readers/%s', $id), $params, $opts);
- }
-
- /**
- * Sets reader display to show cart details.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Reader
- */
- public function setReaderDisplay($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/terminal/readers/%s/set_reader_display', $id), $params, $opts);
- }
-
- /**
- * Updates a Reader object by setting the values of the parameters
- * passed. Any parameters not provided will be left unchanged.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Reader
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/terminal/readers/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Terminal/TerminalServiceFactory.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Terminal/TerminalServiceFactory.php
deleted file mode 100644
index f095124c..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/Terminal/TerminalServiceFactory.php
+++ /dev/null
@@ -1,31 +0,0 @@
-
- */
- private static $classMap = [
- 'configurations' => ConfigurationService::class,
- 'connectionTokens' => ConnectionTokenService::class,
- 'locations' => LocationService::class,
- 'readers' => ReaderService::class,
- ];
-
- protected function getServiceClass($name)
- {
- return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TestHelpers/RefundService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TestHelpers/RefundService.php
deleted file mode 100644
index de0e4d10..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TestHelpers/RefundService.php
+++ /dev/null
@@ -1,24 +0,0 @@
-requires_action.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Refund
- */
- public function expire($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/test_helpers/refunds/%s/expire', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TestHelpers/Terminal/ReaderService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TestHelpers/Terminal/ReaderService.php
deleted file mode 100644
index 2eb4de49..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TestHelpers/Terminal/ReaderService.php
+++ /dev/null
@@ -1,25 +0,0 @@
-request('post', $this->buildPath('/v1/test_helpers/terminal/readers/%s/present_payment_method', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TestHelpers/Terminal/TerminalServiceFactory.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TestHelpers/Terminal/TerminalServiceFactory.php
deleted file mode 100644
index 153ebe0d..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TestHelpers/Terminal/TerminalServiceFactory.php
+++ /dev/null
@@ -1,25 +0,0 @@
-
- */
- private static $classMap = [
- 'readers' => ReaderService::class,
- ];
-
- protected function getServiceClass($name)
- {
- return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TestHelpers/TestClockService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TestHelpers/TestClockService.php
deleted file mode 100644
index a4eee8c3..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TestHelpers/TestClockService.php
+++ /dev/null
@@ -1,87 +0,0 @@
-Ready.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TestHelpers\TestClock
- */
- public function advance($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/test_helpers/test_clocks/%s/advance', $id), $params, $opts);
- }
-
- /**
- * Returns a list of your test clocks.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\TestHelpers\TestClock>
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/test_helpers/test_clocks', $params, $opts);
- }
-
- /**
- * Creates a new test clock that can be attached to new customers and quotes.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TestHelpers\TestClock
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/test_helpers/test_clocks', $params, $opts);
- }
-
- /**
- * Deletes a test clock.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TestHelpers\TestClock
- */
- public function delete($id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/test_helpers/test_clocks/%s', $id), $params, $opts);
- }
-
- /**
- * Retrieves a test clock.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TestHelpers\TestClock
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/test_helpers/test_clocks/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TestHelpers/TestHelpersServiceFactory.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TestHelpers/TestHelpersServiceFactory.php
deleted file mode 100644
index aaf82751..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TestHelpers/TestHelpersServiceFactory.php
+++ /dev/null
@@ -1,29 +0,0 @@
-
- */
- private static $classMap = [
- 'refunds' => RefundService::class,
- 'terminal' => Terminal\TerminalServiceFactory::class,
- 'testClocks' => TestClockService::class,
- ];
-
- protected function getServiceClass($name)
- {
- return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TokenService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TokenService.php
deleted file mode 100644
index 1c72759f..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TokenService.php
+++ /dev/null
@@ -1,42 +0,0 @@
-Custom
- * account.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Token
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/tokens', $params, $opts);
- }
-
- /**
- * Retrieves the token with the given ID.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Token
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/tokens/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TopupService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TopupService.php
deleted file mode 100644
index bd486b9e..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TopupService.php
+++ /dev/null
@@ -1,89 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/topups', $params, $opts);
- }
-
- /**
- * Cancels a top-up. Only pending top-ups can be canceled.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Topup
- */
- public function cancel($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/topups/%s/cancel', $id), $params, $opts);
- }
-
- /**
- * Top up the balance of an account.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Topup
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/topups', $params, $opts);
- }
-
- /**
- * Retrieves the details of a top-up that has previously been created. Supply the
- * unique top-up ID that was returned from your previous request, and Stripe will
- * return the corresponding top-up information.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Topup
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/topups/%s', $id), $params, $opts);
- }
-
- /**
- * Updates the metadata of a top-up. Other top-up details are not editable by
- * design.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Topup
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/topups/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TransferService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TransferService.php
deleted file mode 100644
index 4a78545e..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/TransferService.php
+++ /dev/null
@@ -1,175 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/transfers', $params, $opts);
- }
-
- /**
- * You can see a list of the reversals belonging to a specific transfer. Note that
- * the 10 most recent reversals are always available by default on the transfer
- * object. If you need more than those 10, you can use this API method and the
- * limit and starting_after parameters to page through
- * additional reversals.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\TransferReversal>
- */
- public function allReversals($parentId, $params = null, $opts = null)
- {
- return $this->requestCollection('get', $this->buildPath('/v1/transfers/%s/reversals', $parentId), $params, $opts);
- }
-
- /**
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Transfer
- */
- public function cancel($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/transfers/%s/cancel', $id), $params, $opts);
- }
-
- /**
- * To send funds from your Stripe account to a connected account, you create a new
- * transfer object. Your Stripe balance must be able to
- * cover the transfer amount, or you’ll receive an “Insufficient Funds” error.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Transfer
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/transfers', $params, $opts);
- }
-
- /**
- * When you create a new reversal, you must specify a transfer to create it on.
- *
- * When reversing transfers, you can optionally reverse part of the transfer. You
- * can do so as many times as you wish until the entire transfer has been reversed.
- *
- * Once entirely reversed, a transfer can’t be reversed again. This method will
- * return an error when called on an already-reversed transfer, or when trying to
- * reverse more money than is left on a transfer.
- *
- * @param string $parentId
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TransferReversal
- */
- public function createReversal($parentId, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/transfers/%s/reversals', $parentId), $params, $opts);
- }
-
- /**
- * Retrieves the details of an existing transfer. Supply the unique transfer ID
- * from either a transfer creation request or the transfer list, and Stripe will
- * return the corresponding transfer information.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Transfer
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/transfers/%s', $id), $params, $opts);
- }
-
- /**
- * By default, you can see the 10 most recent reversals stored directly on the
- * transfer object, but you can also retrieve details about a specific reversal
- * stored on the transfer.
- *
- * @param string $parentId
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TransferReversal
- */
- public function retrieveReversal($parentId, $id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/transfers/%s/reversals/%s', $parentId, $id), $params, $opts);
- }
-
- /**
- * Updates the specified transfer by setting the values of the parameters passed.
- * Any parameters not provided will be left unchanged.
- *
- * This request accepts only metadata as an argument.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Transfer
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/transfers/%s', $id), $params, $opts);
- }
-
- /**
- * Updates the specified reversal by setting the values of the parameters passed.
- * Any parameters not provided will be left unchanged.
- *
- * This request only accepts metadata and description as arguments.
- *
- * @param string $parentId
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TransferReversal
- */
- public function updateReversal($parentId, $id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/transfers/%s/reversals/%s', $parentId, $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/WebhookEndpointService.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/WebhookEndpointService.php
deleted file mode 100644
index baa15bd2..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/WebhookEndpointService.php
+++ /dev/null
@@ -1,97 +0,0 @@
-
- */
- public function all($params = null, $opts = null)
- {
- return $this->requestCollection('get', '/v1/webhook_endpoints', $params, $opts);
- }
-
- /**
- * A webhook endpoint must have a url and a list of
- * enabled_events. You may optionally specify the Boolean
- * connect parameter. If set to true, then a Connect webhook endpoint
- * that notifies the specified url about events from all connected
- * accounts is created; otherwise an account webhook endpoint that notifies the
- * specified url only about events from your account is created. You
- * can also create webhook endpoints in the webhooks settings
- * section of the Dashboard.
- *
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\WebhookEndpoint
- */
- public function create($params = null, $opts = null)
- {
- return $this->request('post', '/v1/webhook_endpoints', $params, $opts);
- }
-
- /**
- * You can also delete webhook endpoints via the webhook endpoint
- * management page of the Stripe dashboard.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\WebhookEndpoint
- */
- public function delete($id, $params = null, $opts = null)
- {
- return $this->request('delete', $this->buildPath('/v1/webhook_endpoints/%s', $id), $params, $opts);
- }
-
- /**
- * Retrieves the webhook endpoint with the given ID.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\WebhookEndpoint
- */
- public function retrieve($id, $params = null, $opts = null)
- {
- return $this->request('get', $this->buildPath('/v1/webhook_endpoints/%s', $id), $params, $opts);
- }
-
- /**
- * Updates the webhook endpoint. You may edit the url, the list of
- * enabled_events, and the status of your endpoint.
- *
- * @param string $id
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\WebhookEndpoint
- */
- public function update($id, $params = null, $opts = null)
- {
- return $this->request('post', $this->buildPath('/v1/webhook_endpoints/%s', $id), $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SetupAttempt.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SetupAttempt.php
deleted file mode 100644
index 6c83b686..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SetupAttempt.php
+++ /dev/null
@@ -1,32 +0,0 @@
-application on the SetupIntent at the time of this confirmation.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string|\Stripe\Customer $customer The value of customer on the SetupIntent at the time of this confirmation.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|string|\Stripe\Account $on_behalf_of The value of on_behalf_of on the SetupIntent at the time of this confirmation.
- * @property string|\Stripe\PaymentMethod $payment_method ID of the payment method used with this SetupAttempt.
- * @property \Stripe\StripeObject $payment_method_details
- * @property null|\Stripe\ErrorObject $setup_error The error encountered during this attempt to confirm the SetupIntent, if any.
- * @property string|\Stripe\SetupIntent $setup_intent ID of the SetupIntent that this attempt belongs to.
- * @property string $status Status of this SetupAttempt, one of requires_confirmation, requires_action, processing, succeeded, failed, or abandoned.
- * @property string $usage The value of usage on the SetupIntent at the time of this confirmation, one of off_session or on_session.
- */
-class SetupAttempt extends ApiResource
-{
- const OBJECT_NAME = 'setup_attempt';
-
- use ApiOperations\All;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SetupIntent.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SetupIntent.php
deleted file mode 100644
index 9a47a1fa..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SetupIntent.php
+++ /dev/null
@@ -1,131 +0,0 @@
-PaymentIntents to drive
- * the payment flow.
- *
- * Create a SetupIntent as soon as you're ready to collect your customer's payment
- * credentials. Do not maintain long-lived, unconfirmed SetupIntents as they may no
- * longer be valid. The SetupIntent then transitions through multiple statuses as
- * it guides you through the setup process.
- *
- * Successful SetupIntents result in payment credentials that are optimized for
- * future payments. For example, cardholders in certain regions may need to be
- * run through Strong Customer
- * Authentication at the time of payment method collection in order to
- * streamline later off-session payments.
- * If the SetupIntent is used with a Customer,
- * upon success, it will automatically attach the resulting payment method to that
- * Customer. We recommend using SetupIntents or setup_future_usage
- * on PaymentIntents to save payment methods in order to prevent saving invalid or
- * unoptimized payment methods.
- *
- * By using SetupIntents, you ensure that your customers experience the minimum set
- * of required friction, even as regulations change over time.
- *
- * Related guide: Setup
- * Intents API.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|string|\Stripe\StripeObject $application ID of the Connect application that created the SetupIntent.
- * @property null|string $cancellation_reason Reason for cancellation of this SetupIntent, one of abandoned, requested_by_customer, or duplicate.
- * @property null|string $client_secret
The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.
The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string|\Stripe\Customer $customer
ID of the Customer this SetupIntent belongs to, if one exists.
If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
- * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
- * @property null|\Stripe\ErrorObject $last_setup_error The error encountered in the previous SetupIntent confirmation.
- * @property null|string|\Stripe\SetupAttempt $latest_attempt The most recent SetupAttempt for this SetupIntent.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|string|\Stripe\Mandate $mandate ID of the multi use Mandate generated by the SetupIntent.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|\Stripe\StripeObject $next_action If present, this property tells you what actions you need to take in order for your customer to continue payment setup.
- * @property null|string|\Stripe\Account $on_behalf_of The account (if any) for which the setup is intended.
- * @property null|string|\Stripe\PaymentMethod $payment_method ID of the payment method used with this SetupIntent.
- * @property null|\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for this SetupIntent.
- * @property string[] $payment_method_types The list of payment method types (e.g. card) that this SetupIntent is allowed to set up.
- * @property null|string|\Stripe\Mandate $single_use_mandate ID of the single_use Mandate generated by the SetupIntent.
- * @property string $status Status of this SetupIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, canceled, or succeeded.
- * @property string $usage
Indicates how the payment method is intended to be used in the future.
Use on_session if you intend to only reuse the payment method when the customer is in your checkout flow. Use off_session if your customer may or may not be in your checkout flow. If not provided, this value defaults to off_session.
- */
-class SetupIntent extends ApiResource
-{
- const OBJECT_NAME = 'setup_intent';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-
- const STATUS_CANCELED = 'canceled';
- const STATUS_PROCESSING = 'processing';
- const STATUS_REQUIRES_ACTION = 'requires_action';
- const STATUS_REQUIRES_CONFIRMATION = 'requires_confirmation';
- const STATUS_REQUIRES_PAYMENT_METHOD = 'requires_payment_method';
- const STATUS_SUCCEEDED = 'succeeded';
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SetupIntent the canceled setup intent
- */
- public function cancel($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/cancel';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SetupIntent the confirmed setup intent
- */
- public function confirm($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/confirm';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SetupIntent the verified setup intent
- */
- public function verifyMicrodeposits($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/verify_microdeposits';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ShippingRate.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ShippingRate.php
deleted file mode 100644
index e63daf1a..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ShippingRate.php
+++ /dev/null
@@ -1,40 +0,0 @@
-Checkout Sessions
- * to collect shipping costs.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property bool $active Whether the shipping rate can be used for new purchases. Defaults to true.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|\Stripe\StripeObject $delivery_estimate The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
- * @property null|string $display_name The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
- * @property \Stripe\StripeObject $fixed_amount
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|string $tax_behavior Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified.
- * @property null|string|\Stripe\TaxCode $tax_code A tax code ID. The Shipping tax code is txcd_92010001.
- * @property string $type The type of calculation to use on the shipping rate. Can only be fixed_amount for now.
- */
-class ShippingRate extends ApiResource
-{
- const OBJECT_NAME = 'shipping_rate';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-
- const TAX_BEHAVIOR_EXCLUSIVE = 'exclusive';
- const TAX_BEHAVIOR_INCLUSIVE = 'inclusive';
- const TAX_BEHAVIOR_UNSPECIFIED = 'unspecified';
-
- const TYPE_FIXED_AMOUNT = 'fixed_amount';
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Sigma/ScheduledQueryRun.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Sigma/ScheduledQueryRun.php
deleted file mode 100644
index b109dde7..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Sigma/ScheduledQueryRun.php
+++ /dev/null
@@ -1,37 +0,0 @@
-scheduled
- * a Sigma query, you'll receive a
- * sigma.scheduled_query_run.created webhook each time the query runs.
- * The webhook contains a ScheduledQueryRun object, which you can use
- * to retrieve the query results.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property int $data_load_time When the query was run, Sigma contained a snapshot of your Stripe data at this time.
- * @property \Stripe\StripeObject $error
- * @property null|\Stripe\File $file The file object representing the results of the query.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property int $result_available_until Time at which the result expires and is no longer available for download.
- * @property string $sql SQL for the query.
- * @property string $status The query's execution status, which will be completed for successful runs, and canceled, failed, or timed_out otherwise.
- * @property string $title Title of the query.
- */
-class ScheduledQueryRun extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'scheduled_query_run';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Retrieve;
-
- public static function classUrl()
- {
- return '/v1/sigma/scheduled_query_runs';
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SingletonApiResource.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SingletonApiResource.php
deleted file mode 100644
index a182ca95..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SingletonApiResource.php
+++ /dev/null
@@ -1,40 +0,0 @@
-refresh();
-
- return $instance;
- }
-
- /**
- * @return string the endpoint associated with this singleton class
- */
- public static function classUrl()
- {
- // Replace dots with slashes for namespaced resources, e.g. if the object's name is
- // "foo.bar", then its URL will be "/v1/foo/bar".
-
- /** @phpstan-ignore-next-line */
- $base = \str_replace('.', '/', static::OBJECT_NAME);
-
- return "/v1/{$base}";
- }
-
- /**
- * @return string the endpoint associated with this singleton API resource
- */
- public function instanceUrl()
- {
- return static::classUrl();
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Source.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Source.php
deleted file mode 100644
index 75e75941..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Source.php
+++ /dev/null
@@ -1,168 +0,0 @@
-Source objects allow you to accept a variety of payment methods.
- * They represent a customer's payment instrument, and can be used with the Stripe
- * API just like a Card object: once chargeable, they can be charged,
- * or can be attached to customers.
- *
- * Related guides: Sources API and Sources & Customers.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property \Stripe\StripeObject $ach_credit_transfer
- * @property \Stripe\StripeObject $ach_debit
- * @property \Stripe\StripeObject $acss_debit
- * @property \Stripe\StripeObject $alipay
- * @property null|int $amount A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for single_use sources.
- * @property \Stripe\StripeObject $au_becs_debit
- * @property \Stripe\StripeObject $bancontact
- * @property \Stripe\StripeObject $card
- * @property \Stripe\StripeObject $card_present
- * @property string $client_secret The client secret of the source. Used for client-side retrieval using a publishable key.
- * @property \Stripe\StripeObject $code_verification
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string $currency Three-letter ISO code for the currency associated with the source. This is the currency for which the source will be chargeable once ready. Required for single_use sources.
- * @property string $customer The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer.
- * @property \Stripe\StripeObject $eps
- * @property string $flow The authentication flow of the source. flow is one of redirect, receiver, code_verification, none.
- * @property \Stripe\StripeObject $giropay
- * @property \Stripe\StripeObject $ideal
- * @property \Stripe\StripeObject $klarna
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property \Stripe\StripeObject $multibanco
- * @property null|\Stripe\StripeObject $owner Information about the owner of the payment instrument that may be used or required by particular source types.
- * @property \Stripe\StripeObject $p24
- * @property \Stripe\StripeObject $receiver
- * @property \Stripe\StripeObject $redirect
- * @property \Stripe\StripeObject $sepa_credit_transfer
- * @property \Stripe\StripeObject $sepa_debit
- * @property \Stripe\StripeObject $sofort
- * @property \Stripe\StripeObject $source_order
- * @property null|string $statement_descriptor Extra information about a source. This will appear on your customer's statement every time you charge the source.
- * @property string $status The status of the source, one of canceled, chargeable, consumed, failed, or pending. Only chargeable sources can be used to create a charge.
- * @property \Stripe\StripeObject $three_d_secure
- * @property string $type The type of the source. The type is a payment method, one of ach_credit_transfer, ach_debit, alipay, bancontact, card, card_present, eps, giropay, ideal, multibanco, klarna, p24, sepa_debit, sofort, three_d_secure, or wechat. An additional hash is included on the source with a name matching this value. It contains additional information specific to the payment method used.
- * @property null|string $usage Either reusable or single_use. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.
- * @property \Stripe\StripeObject $wechat
- */
-class Source extends ApiResource
-{
- const OBJECT_NAME = 'source';
-
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-
- const FLOW_CODE_VERIFICATION = 'code_verification';
- const FLOW_NONE = 'none';
- const FLOW_RECEIVER = 'receiver';
- const FLOW_REDIRECT = 'redirect';
-
- const STATUS_CANCELED = 'canceled';
- const STATUS_CHARGEABLE = 'chargeable';
- const STATUS_CONSUMED = 'consumed';
- const STATUS_FAILED = 'failed';
- const STATUS_PENDING = 'pending';
-
- const USAGE_REUSABLE = 'reusable';
- const USAGE_SINGLE_USE = 'single_use';
-
- use ApiOperations\NestedResource;
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\UnexpectedValueException if the source is not attached to a customer
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Source the detached source
- */
- public function detach($params = null, $opts = null)
- {
- self::_validateParams($params);
-
- $id = $this['id'];
- if (!$id) {
- $class = static::class;
- $msg = "Could not determine which URL to request: {$class} instance "
- . "has invalid ID: {$id}";
-
- throw new Exception\UnexpectedValueException($msg, null);
- }
-
- if ($this['customer']) {
- $base = Customer::classUrl();
- $parentExtn = \urlencode(Util\Util::utf8($this['customer']));
- $extn = \urlencode(Util\Util::utf8($id));
- $url = "{$base}/{$parentExtn}/sources/{$extn}";
-
- list($response, $opts) = $this->_request('delete', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
- $message = 'This source object does not appear to be currently attached '
- . 'to a customer object.';
-
- throw new Exception\UnexpectedValueException($message);
- }
-
- /**
- * @deprecated sourceTransactions is deprecated. Please use Source::allSourceTransactions instead.
- *
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection the list of source transactions
- */
- public function sourceTransactions($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/source_transactions';
- list($response, $opts) = $this->_request('get', $url, $params, $opts);
- $obj = \Stripe\Util\Util::convertToStripeObject($response, $opts);
- $obj->setLastResponse($response);
-
- return $obj;
- }
-
- /**
- * @param string $id
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection the list of source transactions
- */
- public static function allSourceTransactions($id, $params = null, $opts = null)
- {
- return self::_allNestedResources($id, '/source_transactions', $params, $opts);
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Source the verified source
- */
- public function verify($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/verify';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SourceTransaction.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SourceTransaction.php
deleted file mode 100644
index 281f2a71..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SourceTransaction.php
+++ /dev/null
@@ -1,20 +0,0 @@
-coreServiceFactory) {
- $this->coreServiceFactory = new \Stripe\Service\CoreServiceFactory($this);
- }
-
- return $this->coreServiceFactory->__get($name);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/StripeClientInterface.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/StripeClientInterface.php
deleted file mode 100644
index d5a8806f..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/StripeClientInterface.php
+++ /dev/null
@@ -1,21 +0,0 @@
- "old_value"]
- *
- * If we update the object with `metadata[new]=new_value`, the server side
- * object now has *both* fields:
- *
- * metadata = ["old" => "old_value", "new" => "new_value"]
- *
- * This is okay in itself because usually users will want to treat it as
- * additive:
- *
- * $obj->metadata["new"] = "new_value";
- * $obj->save();
- *
- * However, in other cases, they may want to replace the entire existing
- * contents:
- *
- * $obj->metadata = ["new" => "new_value"];
- * $obj->save();
- *
- * This is where things get a little bit tricky because in order to clear
- * any old keys that may have existed, we actually have to send an explicit
- * empty string to the server. So the operation above would have to send
- * this form to get the intended behavior:
- *
- * metadata[old]=&metadata[new]=new_value
- *
- * This method allows us to track which parameters are considered additive,
- * and lets us behave correctly where appropriate when serializing
- * parameters to be sent.
- *
- * @return Util\Set Set of additive parameters
- */
- public static function getAdditiveParams()
- {
- static $additiveParams = null;
- if (null === $additiveParams) {
- // Set `metadata` as additive so that when it's set directly we remember
- // to clear keys that may have been previously set by sending empty
- // values for them.
- //
- // It's possible that not every object has `metadata`, but having this
- // option set when there is no `metadata` field is not harmful.
- $additiveParams = new Util\Set([
- 'metadata',
- ]);
- }
-
- return $additiveParams;
- }
-
- public function __construct($id = null, $opts = null)
- {
- list($id, $this->_retrieveOptions) = Util\Util::normalizeId($id);
- $this->_opts = Util\RequestOptions::parse($opts);
- $this->_originalValues = [];
- $this->_values = [];
- $this->_unsavedValues = new Util\Set();
- $this->_transientValues = new Util\Set();
- if (null !== $id) {
- $this->_values['id'] = $id;
- }
- }
-
- // Standard accessor magic methods
- public function __set($k, $v)
- {
- if (static::getPermanentAttributes()->includes($k)) {
- throw new Exception\InvalidArgumentException(
- "Cannot set {$k} on this object. HINT: you can't set: " .
- \implode(', ', static::getPermanentAttributes()->toArray())
- );
- }
-
- if ('' === $v) {
- throw new Exception\InvalidArgumentException(
- 'You cannot set \'' . $k . '\'to an empty string. '
- . 'We interpret empty strings as NULL in requests. '
- . 'You may set obj->' . $k . ' = NULL to delete the property'
- );
- }
-
- $this->_values[$k] = Util\Util::convertToStripeObject($v, $this->_opts);
- $this->dirtyValue($this->_values[$k]);
- $this->_unsavedValues->add($k);
- }
-
- public function __isset($k)
- {
- return isset($this->_values[$k]);
- }
-
- public function __unset($k)
- {
- unset($this->_values[$k]);
- $this->_transientValues->add($k);
- $this->_unsavedValues->discard($k);
- }
-
- public function &__get($k)
- {
- // function should return a reference, using $nullval to return a reference to null
- $nullval = null;
- if (!empty($this->_values) && \array_key_exists($k, $this->_values)) {
- return $this->_values[$k];
- }
- if (!empty($this->_transientValues) && $this->_transientValues->includes($k)) {
- $class = static::class;
- $attrs = \implode(', ', \array_keys($this->_values));
- $message = "Stripe Notice: Undefined property of {$class} instance: {$k}. "
- . "HINT: The {$k} attribute was set in the past, however. "
- . 'It was then wiped when refreshing the object '
- . "with the result returned by Stripe's API, "
- . 'probably as a result of a save(). The attributes currently '
- . "available on this object are: {$attrs}";
- Stripe::getLogger()->error($message);
-
- return $nullval;
- }
- $class = static::class;
- Stripe::getLogger()->error("Stripe Notice: Undefined property of {$class} instance: {$k}");
-
- return $nullval;
- }
-
- // Magic method for var_dump output. Only works with PHP >= 5.6
- public function __debugInfo()
- {
- return $this->_values;
- }
-
- // ArrayAccess methods
- #[\ReturnTypeWillChange]
- public function offsetSet($k, $v)
- {
- $this->{$k} = $v;
- }
-
- #[\ReturnTypeWillChange]
- public function offsetExists($k)
- {
- return \array_key_exists($k, $this->_values);
- }
-
- #[\ReturnTypeWillChange]
- public function offsetUnset($k)
- {
- unset($this->{$k});
- }
-
- #[\ReturnTypeWillChange]
- public function offsetGet($k)
- {
- return \array_key_exists($k, $this->_values) ? $this->_values[$k] : null;
- }
-
- /**
- * @return int
- */
- #[\ReturnTypeWillChange]
- public function count()
- {
- return \count($this->_values);
- }
-
- public function keys()
- {
- return \array_keys($this->_values);
- }
-
- public function values()
- {
- return \array_values($this->_values);
- }
-
- /**
- * This unfortunately needs to be public to be used in Util\Util.
- *
- * @param array $values
- * @param null|array|string|Util\RequestOptions $opts
- *
- * @return static the object constructed from the given values
- */
- public static function constructFrom($values, $opts = null)
- {
- $obj = new static(isset($values['id']) ? $values['id'] : null);
- $obj->refreshFrom($values, $opts);
-
- return $obj;
- }
-
- /**
- * Refreshes this object using the provided values.
- *
- * @param array $values
- * @param null|array|string|Util\RequestOptions $opts
- * @param bool $partial defaults to false
- */
- public function refreshFrom($values, $opts, $partial = false)
- {
- $this->_opts = Util\RequestOptions::parse($opts);
-
- $this->_originalValues = self::deepCopy($values);
-
- if ($values instanceof StripeObject) {
- $values = $values->toArray();
- }
-
- // Wipe old state before setting new. This is useful for e.g. updating a
- // customer, where there is no persistent card parameter. Mark those values
- // which don't persist as transient
- if ($partial) {
- $removed = new Util\Set();
- } else {
- $removed = new Util\Set(\array_diff(\array_keys($this->_values), \array_keys($values)));
- }
-
- foreach ($removed->toArray() as $k) {
- unset($this->{$k});
- }
-
- $this->updateAttributes($values, $opts, false);
- foreach ($values as $k => $v) {
- $this->_transientValues->discard($k);
- $this->_unsavedValues->discard($k);
- }
- }
-
- /**
- * Mass assigns attributes on the model.
- *
- * @param array $values
- * @param null|array|string|Util\RequestOptions $opts
- * @param bool $dirty defaults to true
- */
- public function updateAttributes($values, $opts = null, $dirty = true)
- {
- foreach ($values as $k => $v) {
- // Special-case metadata to always be cast as a StripeObject
- // This is necessary in case metadata is empty, as PHP arrays do
- // not differentiate between lists and hashes, and we consider
- // empty arrays to be lists.
- if (('metadata' === $k) && (\is_array($v))) {
- $this->_values[$k] = StripeObject::constructFrom($v, $opts);
- } else {
- $this->_values[$k] = Util\Util::convertToStripeObject($v, $opts);
- }
- if ($dirty) {
- $this->dirtyValue($this->_values[$k]);
- }
- $this->_unsavedValues->add($k);
- }
- }
-
- /**
- * @param bool $force defaults to false
- *
- * @return array a recursive mapping of attributes to values for this object,
- * including the proper value for deleted attributes
- */
- public function serializeParameters($force = false)
- {
- $updateParams = [];
-
- foreach ($this->_values as $k => $v) {
- // There are a few reasons that we may want to add in a parameter for
- // update:
- //
- // 1. The `$force` option has been set.
- // 2. We know that it was modified.
- // 3. Its value is a StripeObject. A StripeObject may contain modified
- // values within in that its parent StripeObject doesn't know about.
- //
- $original = \array_key_exists($k, $this->_originalValues) ? $this->_originalValues[$k] : null;
- $unsaved = $this->_unsavedValues->includes($k);
- if ($force || $unsaved || $v instanceof StripeObject) {
- $updateParams[$k] = $this->serializeParamsValue(
- $this->_values[$k],
- $original,
- $unsaved,
- $force,
- $k
- );
- }
- }
-
- // a `null` that makes it out of `serializeParamsValue` signals an empty
- // value that we shouldn't appear in the serialized form of the object
- return \array_filter(
- $updateParams,
- function ($v) {
- return null !== $v;
- }
- );
- }
-
- public function serializeParamsValue($value, $original, $unsaved, $force, $key = null)
- {
- // The logic here is that essentially any object embedded in another
- // object that had a `type` is actually an API resource of a different
- // type that's been included in the response. These other resources must
- // be updated from their proper endpoints, and therefore they are not
- // included when serializing even if they've been modified.
- //
- // There are _some_ known exceptions though.
- //
- // For example, if the value is unsaved (meaning the user has set it), and
- // it looks like the API resource is persisted with an ID, then we include
- // the object so that parameters are serialized with a reference to its
- // ID.
- //
- // Another example is that on save API calls it's sometimes desirable to
- // update a customer's default source by setting a new card (or other)
- // object with `->source=` and then saving the customer. The
- // `saveWithParent` flag to override the default behavior allows us to
- // handle these exceptions.
- //
- // We throw an error if a property was set explicitly but we can't do
- // anything with it because the integration is probably not working as the
- // user intended it to.
- if (null === $value) {
- return '';
- }
- if (($value instanceof ApiResource) && (!$value->saveWithParent)) {
- if (!$unsaved) {
- return null;
- }
- if (isset($value->id)) {
- return $value;
- }
-
- throw new Exception\InvalidArgumentException(
- "Cannot save property `{$key}` containing an API resource of type " .
- \get_class($value) . ". It doesn't appear to be persisted and is " .
- 'not marked as `saveWithParent`.'
- );
- }
- if (\is_array($value)) {
- if (Util\Util::isList($value)) {
- // Sequential array, i.e. a list
- $update = [];
- foreach ($value as $v) {
- $update[] = $this->serializeParamsValue($v, null, true, $force);
- }
- // This prevents an array that's unchanged from being resent.
- if ($update !== $this->serializeParamsValue($original, null, true, $force, $key)) {
- return $update;
- }
- } else {
- // Associative array, i.e. a map
- return Util\Util::convertToStripeObject($value, $this->_opts)->serializeParameters();
- }
- } elseif ($value instanceof StripeObject) {
- $update = $value->serializeParameters($force);
- if ($original && $unsaved && $key && static::getAdditiveParams()->includes($key)) {
- $update = \array_merge(self::emptyValues($original), $update);
- }
-
- return $update;
- } else {
- return $value;
- }
- }
-
- /**
- * @return mixed
- */
- #[\ReturnTypeWillChange]
- public function jsonSerialize()
- {
- return $this->toArray();
- }
-
- /**
- * Returns an associative array with the key and values composing the
- * Stripe object.
- *
- * @return array the associative array
- */
- public function toArray()
- {
- $maybeToArray = function ($value) {
- if (null === $value) {
- return null;
- }
-
- return \is_object($value) && \method_exists($value, 'toArray') ? $value->toArray() : $value;
- };
-
- return \array_reduce(\array_keys($this->_values), function ($acc, $k) use ($maybeToArray) {
- if ('_' === \substr((string) $k, 0, 1)) {
- return $acc;
- }
- $v = $this->_values[$k];
- if (Util\Util::isList($v)) {
- $acc[$k] = \array_map($maybeToArray, $v);
- } else {
- $acc[$k] = $maybeToArray($v);
- }
-
- return $acc;
- }, []);
- }
-
- /**
- * Returns a pretty JSON representation of the Stripe object.
- *
- * @return string the JSON representation of the Stripe object
- */
- public function toJSON()
- {
- return \json_encode($this->toArray(), \JSON_PRETTY_PRINT);
- }
-
- public function __toString()
- {
- $class = static::class;
-
- return $class . ' JSON: ' . $this->toJSON();
- }
-
- /**
- * Sets all keys within the StripeObject as unsaved so that they will be
- * included with an update when `serializeParameters` is called. This
- * method is also recursive, so any StripeObjects contained as values or
- * which are values in a tenant array are also marked as dirty.
- */
- public function dirty()
- {
- $this->_unsavedValues = new Util\Set(\array_keys($this->_values));
- foreach ($this->_values as $k => $v) {
- $this->dirtyValue($v);
- }
- }
-
- protected function dirtyValue($value)
- {
- if (\is_array($value)) {
- foreach ($value as $v) {
- $this->dirtyValue($v);
- }
- } elseif ($value instanceof StripeObject) {
- $value->dirty();
- }
- }
-
- /**
- * Produces a deep copy of the given object including support for arrays
- * and StripeObjects.
- *
- * @param mixed $obj
- */
- protected static function deepCopy($obj)
- {
- if (\is_array($obj)) {
- $copy = [];
- foreach ($obj as $k => $v) {
- $copy[$k] = self::deepCopy($v);
- }
-
- return $copy;
- }
- if ($obj instanceof StripeObject) {
- return $obj::constructFrom(
- self::deepCopy($obj->_values),
- clone $obj->_opts
- );
- }
-
- return $obj;
- }
-
- /**
- * Returns a hash of empty values for all the values that are in the given
- * StripeObject.
- *
- * @param mixed $obj
- */
- public static function emptyValues($obj)
- {
- if (\is_array($obj)) {
- $values = $obj;
- } elseif ($obj instanceof StripeObject) {
- $values = $obj->_values;
- } else {
- throw new Exception\InvalidArgumentException(
- 'empty_values got unexpected object type: ' . \get_class($obj)
- );
- }
-
- return \array_fill_keys(\array_keys($values), '');
- }
-
- /**
- * @return null|ApiResponse The last response from the Stripe API
- */
- public function getLastResponse()
- {
- return $this->_lastResponse;
- }
-
- /**
- * Sets the last response from the Stripe API.
- *
- * @param ApiResponse $resp
- */
- public function setLastResponse($resp)
- {
- $this->_lastResponse = $resp;
- }
-
- /**
- * Indicates whether or not the resource has been deleted on the server.
- * Note that some, but not all, resources can indicate whether they have
- * been deleted.
- *
- * @return bool whether the resource is deleted
- */
- public function isDeleted()
- {
- return isset($this->_values['deleted']) ? $this->_values['deleted'] : false;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/StripeStreamingClientInterface.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/StripeStreamingClientInterface.php
deleted file mode 100644
index e5e34c18..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/StripeStreamingClientInterface.php
+++ /dev/null
@@ -1,11 +0,0 @@
-Creating
- * Subscriptions.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|string|\Stripe\StripeObject $application ID of the Connect Application that created the subscription.
- * @property null|float $application_fee_percent A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account.
- * @property \Stripe\StripeObject $automatic_tax
- * @property int $billing_cycle_anchor Determines the date of the first full invoice, and, for plans with month or year intervals, the day of the month for subsequent invoices.
- * @property null|\Stripe\StripeObject $billing_thresholds Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
- * @property null|int $cancel_at A date in the future at which the subscription will automatically get canceled
- * @property bool $cancel_at_period_end If the subscription has been canceled with the at_period_end flag set to true, cancel_at_period_end on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period.
- * @property null|int $canceled_at If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with cancel_at_period_end, canceled_at will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state.
- * @property string $collection_method Either charge_automatically, or send_invoice. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property int $current_period_end End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.
- * @property int $current_period_start Start of the current period that the subscription has been invoiced for.
- * @property string|\Stripe\Customer $customer ID of the customer who owns the subscription.
- * @property null|int $days_until_due Number of days a customer has to pay invoices generated by this subscription. This value will be null for subscriptions where collection_method=charge_automatically.
- * @property null|string|\Stripe\PaymentMethod $default_payment_method ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over default_source. If neither are set, invoices will use the customer's invoice_settings.default_payment_method or default_source.
- * @property null|string|\Stripe\Account|\Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source $default_source ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If default_payment_method is also set, default_payment_method will take precedence. If neither are set, invoices will use the customer's invoice_settings.default_payment_method or default_source.
- * @property null|\Stripe\TaxRate[] $default_tax_rates The tax rates that will apply to any subscription item that does not have tax_rates set. Invoices created will have their default_tax_rates populated from the subscription.
- * @property null|\Stripe\Discount $discount Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis.
- * @property null|int $ended_at If the subscription has ended, the date the subscription ended.
- * @property \Stripe\Collection<\Stripe\SubscriptionItem> $items List of subscription items, each with an attached price.
- * @property null|string|\Stripe\Invoice $latest_invoice The most recent invoice this subscription has generated.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|int $next_pending_invoice_item_invoice Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at pending_invoice_item_interval.
- * @property null|\Stripe\StripeObject $pause_collection If specified, payment collection for this subscription will be paused.
- * @property null|\Stripe\StripeObject $payment_settings Payment settings passed on to invoices created by the subscription.
- * @property null|\Stripe\StripeObject $pending_invoice_item_interval Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling Create an invoice for the given subscription at the specified interval.
- * @property null|string|\Stripe\SetupIntent $pending_setup_intent You can use this SetupIntent to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the SCA Migration Guide.
- * @property null|\Stripe\StripeObject $pending_update If specified, pending updates that will be applied to the subscription once the latest_invoice has been paid.
- * @property null|string|\Stripe\SubscriptionSchedule $schedule The schedule attached to the subscription
- * @property int $start_date Date when the subscription was first created. The date might differ from the created date due to backdating.
- * @property string $status
Possible values are incomplete, incomplete_expired, trialing, active, past_due, canceled, or unpaid.
For collection_method=charge_automatically a subscription moves into incomplete if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an active state. If the first invoice is not paid within 23 hours, the subscription transitions to incomplete_expired. This is a terminal state, the open invoice will be voided and no further invoices will be generated.
A subscription that is currently in a trial period is trialing and moves to active when the trial period is over.
If subscription collection_method=charge_automatically it becomes past_due when payment to renew it fails and canceled or unpaid (depending on your subscriptions settings) when Stripe has exhausted all payment retry attempts.
If subscription collection_method=send_invoice it becomes past_due when its invoice is not paid by the due date, and canceled or unpaid if it is still not paid by an additional deadline after that. Note that when a subscription has a status of unpaid, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.
- * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this subscription belongs to.
- * @property null|int $trial_end If the subscription has a trial, the end of that trial.
- * @property null|int $trial_start If the subscription has a trial, the beginning of that trial.
- */
-class Subscription extends ApiResource
-{
- const OBJECT_NAME = 'subscription';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Search;
- use ApiOperations\Update;
-
- const PAYMENT_BEHAVIOR_ALLOW_INCOMPLETE = 'allow_incomplete';
- const PAYMENT_BEHAVIOR_DEFAULT_INCOMPLETE = 'default_incomplete';
- const PAYMENT_BEHAVIOR_ERROR_IF_INCOMPLETE = 'error_if_incomplete';
- const PAYMENT_BEHAVIOR_PENDING_IF_INCOMPLETE = 'pending_if_incomplete';
-
- const PRORATION_BEHAVIOR_ALWAYS_INVOICE = 'always_invoice';
- const PRORATION_BEHAVIOR_CREATE_PRORATIONS = 'create_prorations';
- const PRORATION_BEHAVIOR_NONE = 'none';
-
- const STATUS_ACTIVE = 'active';
- const STATUS_CANCELED = 'canceled';
- const STATUS_INCOMPLETE = 'incomplete';
- const STATUS_INCOMPLETE_EXPIRED = 'incomplete_expired';
- const STATUS_PAST_DUE = 'past_due';
- const STATUS_TRIALING = 'trialing';
- const STATUS_UNPAID = 'unpaid';
-
- use ApiOperations\Delete {
- delete as protected _delete;
- }
-
- public static function getSavedNestedResources()
- {
- static $savedNestedResources = null;
- if (null === $savedNestedResources) {
- $savedNestedResources = new Util\Set([
- 'source',
- ]);
- }
-
- return $savedNestedResources;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Subscription the deleted subscription
- */
- public function cancel($params = null, $opts = null)
- {
- return $this->_delete($params, $opts);
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Subscription the updated subscription
- */
- public function deleteDiscount($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/discount';
- list($response, $opts) = $this->_request('delete', $url, $params, $opts);
- $this->refreshFrom(['discount' => null], $opts, true);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SearchResult the subscription search results
- */
- public static function search($params = null, $opts = null)
- {
- $url = '/v1/subscriptions/search';
-
- return self::_searchResource($url, $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SubscriptionItem.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SubscriptionItem.php
deleted file mode 100644
index 36afdf83..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SubscriptionItem.php
+++ /dev/null
@@ -1,84 +0,0 @@
-key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property \Stripe\Plan $plan
You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.
Plans define the base price, currency, and billing cycle for recurring purchases of products. Products help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.
For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.
Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.
For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
- * @property int $quantity The quantity of the plan to which the customer should be subscribed.
- * @property string $subscription The subscription this subscription_item belongs to.
- * @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to this subscription_item. When set, the default_tax_rates on the subscription do not apply to this subscription_item.
- */
-class SubscriptionItem extends ApiResource
-{
- const OBJECT_NAME = 'subscription_item';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Delete;
- use ApiOperations\NestedResource;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-
- const PATH_USAGE_RECORDS = '/usage_records';
-
- /**
- * @param null|string $id the ID of the subscription item on which to create the usage record
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\UsageRecord
- */
- public static function createUsageRecord($id, $params = null, $opts = null)
- {
- return self::_createNestedResource($id, static::PATH_USAGE_RECORDS, $params, $opts);
- }
-
- /**
- * @deprecated usageRecordSummaries is deprecated. Please use SubscriptionItem::allUsageRecordSummaries instead.
- *
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection the list of usage record summaries
- */
- public function usageRecordSummaries($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/usage_record_summaries';
- list($response, $opts) = $this->_request('get', $url, $params, $opts);
- $obj = \Stripe\Util\Util::convertToStripeObject($response, $opts);
- $obj->setLastResponse($response);
-
- return $obj;
- }
-
- const PATH_USAGE_RECORD_SUMMARIES = '/usage_record_summaries';
-
- /**
- * @param string $id the ID of the subscription item on which to retrieve the usage record summaries
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\UsageRecordSummary> the list of usage record summaries
- */
- public static function allUsageRecordSummaries($id, $params = null, $opts = null)
- {
- return self::_allNestedResources($id, static::PATH_USAGE_RECORD_SUMMARIES, $params, $opts);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SubscriptionSchedule.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SubscriptionSchedule.php
deleted file mode 100644
index c1d4ce02..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/SubscriptionSchedule.php
+++ /dev/null
@@ -1,76 +0,0 @@
-Subscription
- * Schedules.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|string|\Stripe\StripeObject $application ID of the Connect Application that created the schedule.
- * @property null|int $canceled_at Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
- * @property null|int $completed_at Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|\Stripe\StripeObject $current_phase Object representing the start and end dates for the current phase of the subscription schedule, if it is active.
- * @property string|\Stripe\Customer $customer ID of the customer who owns the subscription schedule.
- * @property \Stripe\StripeObject $default_settings
- * @property string $end_behavior Behavior of the subscription schedule and underlying subscription when it ends. Possible values are release and cancel.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property \Stripe\StripeObject[] $phases Configuration for the subscription schedule's phases.
- * @property null|int $released_at Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
- * @property null|string $released_subscription ID of the subscription once managed by the subscription schedule (if it is released).
- * @property string $status The present status of the subscription schedule. Possible values are not_started, active, completed, released, and canceled. You can read more about the different states in our behavior guide.
- * @property null|string|\Stripe\Subscription $subscription ID of the subscription managed by the subscription schedule.
- * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this subscription schedule belongs to.
- */
-class SubscriptionSchedule extends ApiResource
-{
- const OBJECT_NAME = 'subscription_schedule';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SubscriptionSchedule the canceled subscription schedule
- */
- public function cancel($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/cancel';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SubscriptionSchedule the released subscription schedule
- */
- public function release($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/release';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/TaxCode.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/TaxCode.php
deleted file mode 100644
index 0dfc49e8..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/TaxCode.php
+++ /dev/null
@@ -1,22 +0,0 @@
-Tax codes classify
- * goods and services for tax purposes.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property string $description A detailed description of which types of products the tax code represents.
- * @property string $name A short name for the tax code.
- */
-class TaxCode extends ApiResource
-{
- const OBJECT_NAME = 'tax_code';
-
- use ApiOperations\All;
- use ApiOperations\Retrieve;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/TaxId.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/TaxId.php
deleted file mode 100644
index f8e86933..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/TaxId.php
+++ /dev/null
@@ -1,120 +0,0 @@
-customer. A customer's tax IDs
- * are displayed on invoices and credit notes issued for the customer.
- *
- * Related guide: Customer
- * Tax Identification Numbers.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|string $country Two-letter ISO code representing the country of the tax ID.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string|\Stripe\Customer $customer ID of the customer.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property string $type Type of the tax ID, one of ae_trn, au_abn, au_arn, bg_uic, br_cnpj, br_cpf, ca_bn, ca_gst_hst, ca_pst_bc, ca_pst_mb, ca_pst_sk, ca_qst, ch_vat, cl_tin, es_cif, eu_oss_vat, eu_vat, gb_vat, ge_vat, hk_br, hu_tin, id_npwp, il_vat, in_gst, is_vat, jp_cn, jp_rn, kr_brn, li_uid, mx_rfc, my_frp, my_itn, my_sst, no_vat, nz_gst, ru_inn, ru_kpp, sa_vat, sg_gst, sg_uen, si_tin, th_vat, tw_vat, ua_vat, us_ein, or za_vat. Note that some legacy tax IDs have type unknown
- * @property string $value Value of the tax ID.
- * @property null|\Stripe\StripeObject $verification Tax ID verification information.
- */
-class TaxId extends ApiResource
-{
- const OBJECT_NAME = 'tax_id';
-
- use ApiOperations\Delete;
-
- const TYPE_AE_TRN = 'ae_trn';
- const TYPE_AU_ABN = 'au_abn';
- const TYPE_AU_ARN = 'au_arn';
- const TYPE_BG_UIC = 'bg_uic';
- const TYPE_BR_CNPJ = 'br_cnpj';
- const TYPE_BR_CPF = 'br_cpf';
- const TYPE_CA_BN = 'ca_bn';
- const TYPE_CA_GST_HST = 'ca_gst_hst';
- const TYPE_CA_PST_BC = 'ca_pst_bc';
- const TYPE_CA_PST_MB = 'ca_pst_mb';
- const TYPE_CA_PST_SK = 'ca_pst_sk';
- const TYPE_CA_QST = 'ca_qst';
- const TYPE_CH_VAT = 'ch_vat';
- const TYPE_CL_TIN = 'cl_tin';
- const TYPE_ES_CIF = 'es_cif';
- const TYPE_EU_OSS_VAT = 'eu_oss_vat';
- const TYPE_EU_VAT = 'eu_vat';
- const TYPE_GB_VAT = 'gb_vat';
- const TYPE_GE_VAT = 'ge_vat';
- const TYPE_HK_BR = 'hk_br';
- const TYPE_HU_TIN = 'hu_tin';
- const TYPE_ID_NPWP = 'id_npwp';
- const TYPE_IL_VAT = 'il_vat';
- const TYPE_IN_GST = 'in_gst';
- const TYPE_IS_VAT = 'is_vat';
- const TYPE_JP_CN = 'jp_cn';
- const TYPE_JP_RN = 'jp_rn';
- const TYPE_KR_BRN = 'kr_brn';
- const TYPE_LI_UID = 'li_uid';
- const TYPE_MX_RFC = 'mx_rfc';
- const TYPE_MY_FRP = 'my_frp';
- const TYPE_MY_ITN = 'my_itn';
- const TYPE_MY_SST = 'my_sst';
- const TYPE_NO_VAT = 'no_vat';
- const TYPE_NZ_GST = 'nz_gst';
- const TYPE_RU_INN = 'ru_inn';
- const TYPE_RU_KPP = 'ru_kpp';
- const TYPE_SA_VAT = 'sa_vat';
- const TYPE_SG_GST = 'sg_gst';
- const TYPE_SG_UEN = 'sg_uen';
- const TYPE_SI_TIN = 'si_tin';
- const TYPE_TH_VAT = 'th_vat';
- const TYPE_TW_VAT = 'tw_vat';
- const TYPE_UA_VAT = 'ua_vat';
- const TYPE_UNKNOWN = 'unknown';
- const TYPE_US_EIN = 'us_ein';
- const TYPE_ZA_VAT = 'za_vat';
-
- const VERIFICATION_STATUS_PENDING = 'pending';
- const VERIFICATION_STATUS_UNAVAILABLE = 'unavailable';
- const VERIFICATION_STATUS_UNVERIFIED = 'unverified';
- const VERIFICATION_STATUS_VERIFIED = 'verified';
-
- /**
- * @return string the API URL for this tax id
- */
- public function instanceUrl()
- {
- $id = $this['id'];
- $customer = $this['customer'];
- if (!$id) {
- throw new Exception\UnexpectedValueException(
- "Could not determine which URL to request: class instance has invalid ID: {$id}"
- );
- }
- $id = Util\Util::utf8($id);
- $customer = Util\Util::utf8($customer);
-
- $base = Customer::classUrl();
- $customerExtn = \urlencode($customer);
- $extn = \urlencode($id);
-
- return "{$base}/{$customerExtn}/tax_ids/{$extn}";
- }
-
- /**
- * @param array|string $_id
- * @param null|array|string $_opts
- *
- * @throws \Stripe\Exception\BadMethodCallException
- */
- public static function retrieve($_id, $_opts = null)
- {
- $msg = 'Tax IDs cannot be retrieved without a customer ID. Retrieve ' .
- "a tax ID using `Customer::retrieveTaxId('customer_id', " .
- "'tax_id_id')`.";
-
- throw new Exception\BadMethodCallException($msg);
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/TaxRate.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/TaxRate.php
deleted file mode 100644
index 5a456378..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/TaxRate.php
+++ /dev/null
@@ -1,50 +0,0 @@
-invoices, subscriptions and
- * Checkout
- * Sessions to collect tax.
- *
- * Related guide: Tax
- * Rates.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property bool $active Defaults to true. When set to false, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
- * @property null|string $country Two-letter country code (ISO 3166-1 alpha-2).
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string $description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
- * @property string $display_name The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.
- * @property bool $inclusive This specifies if the tax rate is inclusive or exclusive.
- * @property null|string $jurisdiction The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property float $percentage This represents the tax rate percent out of 100.
- * @property null|string $state ISO 3166-2 subdivision code, without country prefix. For example, "NY" for New York, United States.
- * @property null|string $tax_type The high-level tax type, such as vat or sales_tax.
- */
-class TaxRate extends ApiResource
-{
- const OBJECT_NAME = 'tax_rate';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-
- const TAX_TYPE_GST = 'gst';
- const TAX_TYPE_HST = 'hst';
- const TAX_TYPE_JCT = 'jct';
- const TAX_TYPE_PST = 'pst';
- const TAX_TYPE_QST = 'qst';
- const TAX_TYPE_RST = 'rst';
- const TAX_TYPE_SALES_TAX = 'sales_tax';
- const TAX_TYPE_VAT = 'vat';
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Terminal/Configuration.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Terminal/Configuration.php
deleted file mode 100644
index f34831f7..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Terminal/Configuration.php
+++ /dev/null
@@ -1,28 +0,0 @@
-true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $tipping
- * @property \Stripe\StripeObject $verifone_p400
- */
-class Configuration extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'terminal.configuration';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Delete;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Terminal/ConnectionToken.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Terminal/ConnectionToken.php
deleted file mode 100644
index e49a0b0e..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Terminal/ConnectionToken.php
+++ /dev/null
@@ -1,22 +0,0 @@
-Fleet
- * Management.
- *
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property string $location The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see the docs on scoping connection tokens.
- * @property string $secret Your application should pass this token to the Stripe Terminal SDK.
- */
-class ConnectionToken extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'terminal.connection_token';
-
- use \Stripe\ApiOperations\Create;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Terminal/Location.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Terminal/Location.php
deleted file mode 100644
index 11c625d8..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Terminal/Location.php
+++ /dev/null
@@ -1,30 +0,0 @@
-Fleet
- * Management.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property \Stripe\StripeObject $address
- * @property string $configuration_overrides The ID of a configuration that will be used to customize all readers in this location.
- * @property string $display_name The display name of the location.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- */
-class Location extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'terminal.location';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Delete;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Terminal/Reader.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Terminal/Reader.php
deleted file mode 100644
index d7a3d36e..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Terminal/Reader.php
+++ /dev/null
@@ -1,104 +0,0 @@
-Connecting to a
- * Reader.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|\Stripe\StripeObject $action The most recent action performed by the reader.
- * @property null|string $device_sw_version The current software version of the reader.
- * @property string $device_type Type of reader, one of bbpos_wisepad3, stripe_m2, bbpos_chipper2x, bbpos_wisepos_e, or verifone_P400.
- * @property null|string $ip_address The local IP address of the reader.
- * @property string $label Custom label given to the reader for easier identification.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|string|\Stripe\Terminal\Location $location The location identifier of the reader.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string $serial_number Serial number of the reader.
- * @property null|string $status The networking status of the reader.
- */
-class Reader extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'terminal.reader';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Delete;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Reader the canceled reader
- */
- public function cancelAction($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/cancel_action';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Reader the processed reader
- */
- public function processPaymentIntent($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/process_payment_intent';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Reader the processed reader
- */
- public function processSetupIntent($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/process_setup_intent';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Reader the seted reader
- */
- public function setReaderDisplay($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/set_reader_display';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/TestHelpers/TestClock.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/TestHelpers/TestClock.php
deleted file mode 100644
index 01d36ea0..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/TestHelpers/TestClock.php
+++ /dev/null
@@ -1,53 +0,0 @@
-true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|string $name The custom name supplied at creation.
- * @property string $status The status of the Test Clock.
- */
-class TestClock extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'test_helpers.test_clock';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Delete;
- use \Stripe\ApiOperations\Retrieve;
-
- const STATUS_ADVANCING = 'advancing';
- const STATUS_INTERNAL_FAILURE = 'internal_failure';
- const STATUS_READY = 'ready';
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TestHelpers\TestClock the advanced test clock
- */
- public function advance($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/advance';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ThreeDSecure.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ThreeDSecure.php
deleted file mode 100644
index 51b5691d..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/ThreeDSecure.php
+++ /dev/null
@@ -1,37 +0,0 @@
-3D
- * Secure object. Once the object has been created, you can use it to
- * authenticate the cardholder and create a charge.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount Amount of the charge that you will create when authentication completes.
- * @property bool $authenticated True if the cardholder went through the authentication flow and their bank indicated that authentication succeeded.
- * @property \Stripe\Card $card
You can store multiple cards on a customer in order to charge the customer later. You can also store multiple debit cards on a recipient in order to transfer to those cards later.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|string $redirect_url If present, this is the URL that you should send the cardholder to for authentication. If you are going to use Stripe.js to display the authentication page in an iframe, you should use the value "_callback".
- * @property string $status Possible values are redirect_pending, succeeded, or failed. When the cardholder can be authenticated, the object starts with status redirect_pending. When liability will be shifted to the cardholder's bank (either because the cardholder was successfully authenticated, or because the bank has not implemented 3D Secure, the object wlil be in status succeeded. failed indicates that authentication was attempted unsuccessfully.
- */
-class ThreeDSecure extends ApiResource
-{
- const OBJECT_NAME = 'three_d_secure';
-
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
-
- /**
- * @return string the endpoint URL for the given class
- */
- public static function classUrl()
- {
- return '/v1/3d_secure';
- }
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Token.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Token.php
deleted file mode 100644
index 18b33e86..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Token.php
+++ /dev/null
@@ -1,57 +0,0 @@
-recommended payments integrations to
- * perform this process client-side. This ensures that no sensitive card data
- * touches your server, and allows your integration to operate in a PCI-compliant
- * way.
- *
- * If you cannot use client-side tokenization, you can also create tokens using the
- * API with either your publishable or secret API key. Keep in mind that if your
- * integration uses this method, you are responsible for any PCI compliance that
- * may be required, and you must keep your secret API key safe. Unlike with
- * client-side tokenization, your customer's information is not sent directly to
- * Stripe, so we cannot determine how it is handled or stored.
- *
- * Tokens cannot be stored or used more than once. To store card or bank account
- * information for later use, you can create Customer objects or Custom accounts. Note
- * that Radar, our integrated solution
- * for automatic fraud protection, performs best with integrations that use
- * client-side tokenization.
- *
- * Related guide: Accept
- * a payment
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property \Stripe\BankAccount $bank_account
These bank accounts are payment methods on Customer objects.
On the other hand External Accounts are transfer destinations on Account objects for Custom accounts. They can be bank accounts or debit cards as well, and are documented in the links above.
You can store multiple cards on a customer in order to charge the customer later. You can also store multiple debit cards on a recipient in order to transfer to those cards later.
- * @property null|string $client_ip IP address of the client that generated the token.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property string $type Type of the token: account, bank_account, card, or pii.
- * @property bool $used Whether this token has already been used (tokens can be used only once).
- */
-class Token extends ApiResource
-{
- const OBJECT_NAME = 'token';
-
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
-
- const TYPE_ACCOUNT = 'account';
- const TYPE_BANK_ACCOUNT = 'bank_account';
- const TYPE_CARD = 'card';
- const TYPE_PII = 'pii';
-}
diff --git a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Topup.php b/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Topup.php
deleted file mode 100644
index 69cdd689..00000000
--- a/wp-content/plugins/easy-digital-downloads/includes/gateways/stripe/vendor/stripe/stripe-php/lib/Topup.php
+++ /dev/null
@@ -1,63 +0,0 @@
-Topping Up your
- * Platform Account.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount Amount transferred.
- * @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
- * @property null|int $expected_availability_date Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up.
- * @property null|string $failure_code Error code explaining reason for top-up failure if available (see the errors section for a list of codes).
- * @property null|string $failure_message Message to user further explaining reason for top-up failure if available.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property \Stripe\Source $source
Source objects allow you to accept a variety of payment methods. They represent a customer's payment instrument, and can be used with the Stripe API just like a Card object: once chargeable, they can be charged, or can be attached to customers.