Plugin Directory

Changeset 2802373


Ignore:
Timestamp:
10/21/2022 10:47:35 AM (3 years ago)
Author:
aircash
Message:

Updated refund option.

Location:
aircash-for-woocommerce
Files:
391 added
2 edited

Legend:

Unmodified
Added
Removed
  • aircash-for-woocommerce/trunk/includes/class-aircash-payment-gateway.php

    r2794884 r2802373  
    6161        add_filter( 'wp_enqueue_scripts', array( $this, 'add_frontend_scripts' ) );
    6262        add_action( 'aircash_cron_hook', array( $this, 'update_aircash_account_status' ) );
     63        add_action( 'admin_head', array( $this, 'remove_manual_refund_button_for_aircash_orders' ) );
    6364    }
    6465
    6566    private function get_plugin_url(): string {
    6667        return untrailingslashit( plugins_url( '/', realpath( __DIR__ . '/../aircash-woocommerce.php' ) ) );
     68    }
     69
     70    /**
     71     * Hides the manual refund button
     72     *
     73     * @return void
     74     */
     75    public function remove_manual_refund_button_for_aircash_orders() {
     76        global $post;
     77        if ( ! $post ) {
     78            return;
     79        }
     80        if ( $post->post_type !== 'shop_order' ) {
     81            return;
     82        }
     83        $order = new WC_Order( $post->ID );
     84        if ( 'aircash-woocommerce' !== $order->get_payment_method() ) {
     85            return;
     86        }
     87        echo '<style>.do-manual-refund {display: none !important;}</style>';
    6788    }
    6889
  • aircash-for-woocommerce/trunk/readme.txt

    r2797136 r2802373  
    44Requires at least: 4.7
    55Tested up to: 5.9.3
    6 Stable tag: 1.0.1
     6Stable tag: 1.0.2
    77Requires PHP: 7.1
    88License: GPLv2 or later
     
    101101== Changelog ==
    102102
     103= 1.0.2 =
     104
     105Updated refund option.
     106
    103107= 1.0.1 =
    104108
    105 *Fixed display of QR code.
     109Fixed display of QR code.
    106110
    107111= 1.0 =
    108112
    109 *Initial stable release.
     113Initial stable release.
    110114
    111115== Screenshots ==
Note: See TracChangeset for help on using the changeset viewer.