Plugin Directory

Changeset 2981802


Ignore:
Timestamp:
10/20/2023 04:53:39 PM (2 years ago)
Author:
wpbrewer
Message:

Update to version 1.1.4 from GitHub

Location:
wpbr-linepay-tw
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wpbr-linepay-tw/tags/1.1.4/includes/admin/meta-boxes/class-linepay-tw-order-meta-boxes.php

    r2979934 r2981802  
    3131        self::get_instance();
    3232
    33         add_action( 'add_meta_boxes', array( self::get_instance(), 'linepay_add_meta_boxes' ) );
     33        add_action( 'add_meta_boxes', array( self::get_instance(), 'linepay_add_meta_boxes' ), 10, 2 );
    3434
    3535    }
     
    4141     * @return void
    4242     */
    43     public function linepay_add_meta_boxes() {
     43    public function linepay_add_meta_boxes( $post_type, $post_or_order_object ) {
    4444
    45         //NOTE: 這邊拿不到 global $post
     45        $order = ( $post_or_order_object instanceof WP_Post ) ? wc_get_order( $post_or_order_object->ID ) : $post_or_order_object;
     46
     47        if ( ! $order instanceof WC_Order ) {
     48            return;
     49        }
     50
     51        if ( ! array_key_exists( $order->get_payment_method(), LINEPay_TW::$allowed_payments ) ) {
     52            return;
     53        }
     54
    4655        $screen = wc_get_container()->get( CustomOrdersTableController::class )->custom_orders_table_usage_is_enabled()
    4756        ? wc_get_page_screen_id( 'shop-order' )
    4857        : 'shop_order';
    4958
    50         // if ( array_key_exists( $order->get_meta( '_payment_method' ), LINEPay_TW::$allowed_payments ) ) {
    51             add_meta_box(
    52                 'woocommerce-linepay-meta-boxes',
    53                 __( 'LINE Pay Details', 'wpbr-linepay-tw' ),
    54                 array(
    55                     self::get_instance(),
    56                     'linepay_admin_meta',
    57                 ),
    58                 $screen,
    59                 'side',
    60                 'default'
    61             );
    62         // }
     59        add_meta_box(
     60            'woocommerce-linepay-meta-boxes',
     61            __( 'LINE Pay Details', 'wpbr-linepay-tw' ),
     62            array(
     63                self::get_instance(),
     64                'linepay_admin_meta',
     65            ),
     66            $screen,
     67            'side',
     68            'default'
     69        );
    6370
    6471    }
  • wpbr-linepay-tw/tags/1.1.4/includes/gateways/class-linepay-tw-request.php

    r2979934 r2981802  
    621621         * @return void
    622622         */
    623         if ( apply_filters( 'linepay_tw_enable_detail_note', true ) ) {
     623        if ( apply_filters( 'linepay_tw_enable_detail_note', false ) ) {
    624624            $check_status = $this->check( $order );
    625625            $check_code   = $check_status->returnCode;
  • wpbr-linepay-tw/tags/1.1.4/readme.md

    r2979934 r2981802  
    773. Support country: Taiwan
    884. Support Plugin: WooCommerce
    9 
     95. Compatible with High-Performance Order Storage (HPOS)
    1010
    1111## Changlog ##
     12
     13= 1.1.4 =
     14*Release Date - 20 October 2023*
     15
     16* Update: only show metabox if the payment method is LINE Pay
    1217
    1318= 1.1.3 =
  • wpbr-linepay-tw/tags/1.1.4/readme.txt

    r2979934 r2981802  
    55Tested up to: 6.3.2
    66Requires PHP: 7.4
    7 Stable tag: 1.1.3
     7Stable tag: 1.1.4
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    2121* Support country: Taiwan
    2222* Support Plugin: WooCommerce
     23* Compatible with High-Performance Order Storage (HPOS)
    2324
    2425== Changelog ==
     26
     27= 1.1.4 - 2023-10-21 =
     28
     29* Update: only show metabox if the payment method is LINE Pay
    2530
    2631= 1.1.3 - 2023-10-18 =
  • wpbr-linepay-tw/tags/1.1.4/wpbr-linepay-tw.php

    r2979934 r2981802  
    66 * Author: WPBrewer
    77 * Author URI: https://wpbrewer.com
    8  * Version: 1.1.3
     8 * Version: 1.1.4
    99 * Text Domain: wpbr-linepay-tw
    1010 * Domain Path: /languages
     
    3535define( 'WPBR_LINEPAY_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    3636define( 'WPBR_LINEPAY_BASENAME', plugin_basename( __FILE__ ) );
    37 define( 'WPBR_LINEPAY_VERSION', '1.1.3' );
     37define( 'WPBR_LINEPAY_VERSION', '1.1.4' );
    3838
    3939/**
  • wpbr-linepay-tw/trunk/includes/admin/meta-boxes/class-linepay-tw-order-meta-boxes.php

    r2979934 r2981802  
    3131        self::get_instance();
    3232
    33         add_action( 'add_meta_boxes', array( self::get_instance(), 'linepay_add_meta_boxes' ) );
     33        add_action( 'add_meta_boxes', array( self::get_instance(), 'linepay_add_meta_boxes' ), 10, 2 );
    3434
    3535    }
     
    4141     * @return void
    4242     */
    43     public function linepay_add_meta_boxes() {
     43    public function linepay_add_meta_boxes( $post_type, $post_or_order_object ) {
    4444
    45         //NOTE: 這邊拿不到 global $post
     45        $order = ( $post_or_order_object instanceof WP_Post ) ? wc_get_order( $post_or_order_object->ID ) : $post_or_order_object;
     46
     47        if ( ! $order instanceof WC_Order ) {
     48            return;
     49        }
     50
     51        if ( ! array_key_exists( $order->get_payment_method(), LINEPay_TW::$allowed_payments ) ) {
     52            return;
     53        }
     54
    4655        $screen = wc_get_container()->get( CustomOrdersTableController::class )->custom_orders_table_usage_is_enabled()
    4756        ? wc_get_page_screen_id( 'shop-order' )
    4857        : 'shop_order';
    4958
    50         // if ( array_key_exists( $order->get_meta( '_payment_method' ), LINEPay_TW::$allowed_payments ) ) {
    51             add_meta_box(
    52                 'woocommerce-linepay-meta-boxes',
    53                 __( 'LINE Pay Details', 'wpbr-linepay-tw' ),
    54                 array(
    55                     self::get_instance(),
    56                     'linepay_admin_meta',
    57                 ),
    58                 $screen,
    59                 'side',
    60                 'default'
    61             );
    62         // }
     59        add_meta_box(
     60            'woocommerce-linepay-meta-boxes',
     61            __( 'LINE Pay Details', 'wpbr-linepay-tw' ),
     62            array(
     63                self::get_instance(),
     64                'linepay_admin_meta',
     65            ),
     66            $screen,
     67            'side',
     68            'default'
     69        );
    6370
    6471    }
  • wpbr-linepay-tw/trunk/includes/gateways/class-linepay-tw-request.php

    r2979934 r2981802  
    621621         * @return void
    622622         */
    623         if ( apply_filters( 'linepay_tw_enable_detail_note', true ) ) {
     623        if ( apply_filters( 'linepay_tw_enable_detail_note', false ) ) {
    624624            $check_status = $this->check( $order );
    625625            $check_code   = $check_status->returnCode;
  • wpbr-linepay-tw/trunk/readme.md

    r2979934 r2981802  
    773. Support country: Taiwan
    884. Support Plugin: WooCommerce
    9 
     95. Compatible with High-Performance Order Storage (HPOS)
    1010
    1111## Changlog ##
     12
     13= 1.1.4 =
     14*Release Date - 20 October 2023*
     15
     16* Update: only show metabox if the payment method is LINE Pay
    1217
    1318= 1.1.3 =
  • wpbr-linepay-tw/trunk/readme.txt

    r2979934 r2981802  
    55Tested up to: 6.3.2
    66Requires PHP: 7.4
    7 Stable tag: 1.1.3
     7Stable tag: 1.1.4
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    2121* Support country: Taiwan
    2222* Support Plugin: WooCommerce
     23* Compatible with High-Performance Order Storage (HPOS)
    2324
    2425== Changelog ==
     26
     27= 1.1.4 - 2023-10-21 =
     28
     29* Update: only show metabox if the payment method is LINE Pay
    2530
    2631= 1.1.3 - 2023-10-18 =
  • wpbr-linepay-tw/trunk/wpbr-linepay-tw.php

    r2979934 r2981802  
    66 * Author: WPBrewer
    77 * Author URI: https://wpbrewer.com
    8  * Version: 1.1.3
     8 * Version: 1.1.4
    99 * Text Domain: wpbr-linepay-tw
    1010 * Domain Path: /languages
     
    3535define( 'WPBR_LINEPAY_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    3636define( 'WPBR_LINEPAY_BASENAME', plugin_basename( __FILE__ ) );
    37 define( 'WPBR_LINEPAY_VERSION', '1.1.3' );
     37define( 'WPBR_LINEPAY_VERSION', '1.1.4' );
    3838
    3939/**
Note: See TracChangeset for help on using the changeset viewer.