• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Easy Digital Downloads a2z

Easy Digital Downloads a2z

Easy Digital Downloads a2z

  • Home
  • Plugins
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / EDD_Payment_History_Table::process_bulk_action() – Process the bulk actions

You appear to be a bot. Output may be restricted

Description

Process the bulk actions

Usage

$void = EDD_Payment_History_Table::process_bulk_action();

Parameters

Returns

void

Source

File name: easy-digital-downloads/includes/admin/payments/class-payments-table.php
Lines:

1 to 61 of 61
  public function process_bulk_action() {
    $ids    = isset( $_GET['payment'] ) ? $_GET['payment'] : false;
    $action = $this->current_action();

    if ( ! is_array( $ids ) )
      $ids = array( $ids );


    if( empty( $action ) )
      return;

    foreach ( $ids as $id ) {
      // Detect when a bulk action is being triggered...
      if ( 'delete' === $this->current_action() ) {
        edd_delete_purchase( $id );
      }

      if ( 'set-status-publish' === $this->current_action() ) {
        edd_update_payment_status( $id, 'publish' );
      }

      if ( 'set-status-pending' === $this->current_action() ) {
        edd_update_payment_status( $id, 'pending' );
      }

      if ( 'set-status-processing' === $this->current_action() ) {
        edd_update_payment_status( $id, 'processing' );
      }

      if ( 'set-status-refunded' === $this->current_action() ) {
        edd_update_payment_status( $id, 'refunded' );
      }

      if ( 'set-status-revoked' === $this->current_action() ) {
        edd_update_payment_status( $id, 'revoked' );
      }

      if ( 'set-status-failed' === $this->current_action() ) {
        edd_update_payment_status( $id, 'failed' );
      }

      if ( 'set-status-abandoned' === $this->current_action() ) {
        edd_update_payment_status( $id, 'abandoned' );
      }

      if ( 'set-status-preapproval' === $this->current_action() ) {
        edd_update_payment_status( $id, 'preapproval' );
      }

      if ( 'set-status-cancelled' === $this->current_action() ) {
        edd_update_payment_status( $id, 'cancelled' );
      }

      if( 'resend-receipt' === $this->current_action() ) {
        edd_email_purchase_receipt( $id, false );
      }

      do_action( 'edd_payments_table_do_bulk_action', $id, $this->current_action() );
    }

  }
 

 View on GitHub View on Trac

Published: 26th November 2019 | Last updated: 14th November 2021

Primary Sidebar

Information

Function name: EDD_Payment_History_Table::process_bulk_action
Class ref: EDD_Payment_History_Table
Plugin ref: Easy Digital Downloads
Version: 2.11.6
Sourcefile: includes/admin/payments/class-payments-table.php
File ref: includes/admin/payments/class-payments-table.php
Deprecated?: No
API Letters: E,H,P,T

Footer

Easy Digital Downloads a2z
Easy Digital Downloads a2z
Easy Digital Downloads a2z
WordPress 5.9.3
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  edd.wp-a2z.org
© Copyright Easy Digital Downloads a2z 2014-2022. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites