Plugin Directory

Changeset 2662763


Ignore:
Timestamp:
01/24/2022 05:03:47 AM (4 years ago)
Author:
appmaker
Message:

1.36.2 = 1.36.2 =

Updated Date: 24/01/22


  • WooCommerce Plugin: Sumo Payment Plans plugin bug fixes
  • WooCommerce Plugin: Aftership plugin 1.14 compatibility fixes
  • Report Product Comments feature
  • Direct Bank Transfer gateway fixes
  • WooCommerce Plugin: Dokan Pro chat feature fixes
  • WooCommerce Plugin: Translatepress plugin bug fixes
  • Compatible with WooCommerce 6.1
Location:
appmaker-woocommerce-mobile-app-manager/trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • appmaker-woocommerce-mobile-app-manager/trunk/i18n/languages/appmaker-woocommerce-mobile-app-manager.pot

    r2602288 r2662763  
    168168msgstr ""
    169169
     170#: lib/endpoints/wc/class-appmaker-wc-rest-products-controller.php:3412
     171msgid "Thank you for your feedback. We will look into it."
     172msgstr ""
     173
    170174#: lib/endpoints/wc/class-appmaker-wc-rest-products-controller.php:1116
    171175msgid "Add review"
  • appmaker-woocommerce-mobile-app-manager/trunk/lib/appmaker-multi-step-checkout/includes/page-template.php

    r2455359 r2662763  
    33    <head>
    44        <meta charset="<?php bloginfo('charset'); ?>" />
    5         <meta name="viewport" content= "width=device-width, initial-scale=1.0">
     5        <meta name="viewport" content= "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">     
    66        <title><?php wp_title(); ?></title>
    77        <?php wp_head(); ?>
  • appmaker-woocommerce-mobile-app-manager/trunk/lib/endpoints/appmaker/class-appmaker-wc-rest-backend-settings-controller.php

    r2641193 r2662763  
    834834                        array(
    835835                            'type'        => 'select',
     836                            'id'          => 'allow_visitors_to_report_comments',
     837                            'label'       => 'Allow visitors to report comments',
     838                            'default'     => 1,
     839                            'data_source' => array(
     840                                'data' => array(
     841                                    array(
     842                                        'id'    => 1,
     843                                        'label' => 'Yes',
     844                                    ),
     845                                    array(
     846                                        'id'    => 0,
     847                                        'label' => 'No',
     848                                    ),
     849                                ),
     850                            ),
     851                        )
     852                    ),
     853                    self::get_field(
     854                        array(
     855                            'type'        => 'select',
    836856                            'id'          => 'hide_brand_images',
    837857                            'label'       => 'Show/Hide Brand Images',
  • appmaker-woocommerce-mobile-app-manager/trunk/lib/endpoints/wc/class-appmaker-wc-rest-orders-controller.php

    r2641193 r2662763  
    257257            }
    258258            $data['account_details'] = property_exists( $gateway, 'account_details' ) ? $gateway->account_details : false;
     259            $data['show_account_details'] = false;
    259260            if(!empty($data['account_details'])) {
     261                 $data['show_account_details'] = true;
    260262                $data['account_details_title'] = array(
    261263                    'account_details'=>__( 'Account details:', 'woocommerce' ),
     
    267269                    'bic'=>__('BIC / Swift', 'woocommerce'),
    268270                );
    269                 }
     271               
     272                $data['account_details_array_title'] = __( 'Account details:', 'woocommerce' );
     273                if( is_array( $data['account_details'] ) ) {
     274                    foreach( $data['account_details'] as $id => $details ) {                   
     275                        if( isset( $details['account_name']) ) {
     276                            $data['account_details_array'][] = array( 'label' =>__('Account name', 'woocommerce'), 'value' =>  $details['account_name'] );                     
     277                        }
     278                        if( isset( $details['account_number']) ) {
     279                            $data['account_details_array'][] = array( 'label' =>__('Account number', 'woocommerce'), 'value' =>  $details['account_number'] );                     
     280                        }
     281                        if( isset( $details['sort_code']) ) {
     282                            $data['account_details_array'][] = array( 'label' =>__('Sort code', 'woocommerce'), 'value' =>  $details['sort_code'] );                       
     283                        }
     284                        if( isset( $details['bank_name']) ) {
     285                            $data['account_details_array'][] = array( 'label' =>__('Bank', 'woocommerce'), 'value' =>  $details['bank_name'] );                     
     286                        }
     287                        if( isset( $details['iban']) ) {
     288                            $data['account_details_array'][] = array( 'label' =>__('IBAN', 'woocommerce'), 'value' =>  $details['iban'] );                     
     289                        }
     290                        if( isset( $details['bic']) ) {
     291                            $data['account_details_array'][] = array( 'label' =>__('BIC / Swift', 'woocommerce'), 'value' =>  $details['bic'] );                       
     292                        }
     293                    }
     294                }
     295            }
    270296        }
    271297
  • appmaker-woocommerce-mobile-app-manager/trunk/lib/endpoints/wc/class-appmaker-wc-rest-products-controller.php

    r2647272 r2662763  
    195195                'methods'             => WP_REST_Server::READABLE,
    196196                'callback'            => array( $this, 'get_tabbed_categories' ),
     197                'permission_callback' => array( $this, 'api_permissions_check' ),
     198                'args'                => $this->get_collection_params(),
     199            ),
     200            'schema' => array( $this, 'get_public_item_schema' ),
     201        ) );
     202
     203        // report product review
     204        register_rest_route( $this->namespace, '/' . $this->rest_base .'/comments/report', array(
     205            array(
     206                'methods'             => WP_REST_Server::CREATABLE,
     207                'callback'            => array( $this, 'report_comment' ),
    197208                'permission_callback' => array( $this, 'api_permissions_check' ),
    198209                'args'                => $this->get_collection_params(),
     
    10251036
    10261037        $data = array();
    1027         $products_in_webview         = apply_filters( 'appmaker_wc_products_in_webview', array( 'bundle','yith_bundle','lottery','grouped','gift-card','composite','woosb','pw-gift-card' ) );
     1038        $products_in_webview         = apply_filters( 'appmaker_wc_products_in_webview', array( 'bundle','yith_bundle','lottery','grouped','gift-card','composite','woosb','pw-gift-card','woosg' ) );
    10281039        $category_in_webview         = apply_filters('appmaker_wc_category_in_webview', array());
    10291040        $product_category            = wp_get_post_terms( $product->get_id() ,'product_cat' );
     
    12791290                    // Taxonomy-based attributes are prefixed with `pa_`, otherwise simply `attribute_`.
    12801291                    if ( 0 === strpos( $attribute_name, 'attribute_pa_' ) ) {
    1281                         $attributes[ $name ] = array(
     1292                        $attr_name = $this->get_attribute_taxonomy_label( $name );
     1293                        if( $attr_name ){    // fix for country code selector plugin which has empty attribute name
     1294                            $attributes[ $name ] = array(
    12821295                            'id'     => $name,
    1283                             'name'   => $this->get_attribute_taxonomy_label( $name ),
     1296                            'name'   => $attr_name,
    12841297                            'option' => $attribute,
    1285                         );
     1298                           );
     1299                        } 
    12861300                    } else {
    12871301                        $id                = $this->sanitize_id( $name );
     
    15261540                        'expanded'   => false,
    15271541                        'allow_product_review'=>( 'open' === $post->comment_status ),
     1542                        'allow_review_report' => APPMAKER_WC::$api->get_settings('allow_visitors_to_report_comments', true ),
    15281543                        'review_button_title'=>__('Add review', 'appmaker-woocommerce-mobile-app-manager'),
    15291544                        'view_more_reviews'       => ( (int) $product->get_review_count() ) > 10 ? true : false ,
     
    33793394        return $response;
    33803395    }
     3396
     3397    public function report_comment( $request ) {
     3398        $return = array('status' => false , 'message' => '' );
     3399        if( isset( $request['id']) && ! empty( $request['id']) ) {
     3400            $comment_id = $request['id'];
     3401            $comment = get_comment( $comment_id );
    33813402   
     3403            $admin_email = get_option( 'admin_email' );     
     3404   
     3405            $subject = sprintf( 'A comment by %s has been flagged by a user', esc_html( $comment->comment_author ) );
     3406            $headers = sprintf( 'From: %s <%s>', esc_html( get_bloginfo( 'site' ) ), get_option( 'admin_email' ) ) . "\r\n\r\n";
     3407            $message =  'A user of your App has flagged a comment.' . "\r\n";
     3408            $message .=  'You are welcome to view the comment yourself at your earliest convenience.' . "\r\n\r\n";
     3409            $message .= esc_url_raw( add_query_arg( array( 'action' => 'editcomment', 'c' => absint( $comment_id ) ), admin_url( 'comment.php' ) ) );   
     3410            $message .= "\r\n\r\n" . 'Comment ID:' . ' ' . $comment_id . "\r\n";       
     3411   
     3412            wp_mail( $admin_email, $subject, $message, $headers );
     3413   
     3414            $return['status'] = true;
     3415            $return['message'] = __( 'Thank you for your feedback. We will look into it.', 'appmaker-woocommerce-mobile-app-manager' );
     3416        }
     3417       
     3418        return $return;
     3419    }
     3420   
    33823421
    33833422}
  • appmaker-woocommerce-mobile-app-manager/trunk/lib/third-party-support/misc/class-appmaker-wc-aftership-order-tracking.php

    r2145595 r2662763  
    2424        $values['aftership_tracking_provider'] = get_post_meta($response->data['id'], '_aftership_tracking_provider', true);
    2525        $values['aftership_tracking_number'] = get_post_meta($response->data['id'], '_aftership_tracking_number', true);
     26       
     27        if( ! $values['aftership_tracking_provider']  ) {
     28            $values['aftership_tracking_provider'] = get_post_meta($response->data['id'], '_aftership_tracking_provider_name', true);
     29       }
     30
    2631        if (!$values['aftership_tracking_provider']) {
    2732            return $response;
  • appmaker-woocommerce-mobile-app-manager/trunk/lib/third-party-support/misc/class-appmaker-wc-dokan.php

    r2619875 r2662763  
    213213        $user_id = get_current_user_id();
    214214        $author_id  = get_post_field( 'post_author', $product->get_id() );
     215        $product_id =  $product->get_id() ;
    215216        $author     = get_user_by( 'id', $author_id );
    216217        $store_info = dokan_get_store_info( $author->ID );
     
    243244                );
    244245            }
     246           
    245247            if( $user_id && class_exists('Dokan_Pro') && $key == 'chat_now' ) {
    246248              $url = site_url();
    247249              $api_key = $this->options['api_key'];
    248               $access_token = apply_filters('appmaker_wc_set_user_access_token', $user_id);
    249    
     250              $access_token = apply_filters('appmaker_wc_set_user_access_token', $user_id);                         
    250251              $return[$key] = array(
    251252                'type' => 'menu',
     
    257258                    'type' => 'OPEN_IN_WEB_VIEW',
    258259                    'params' => array(
    259                         'url' => $url.'/?rest_route=/appmaker-wc/v1/products/chatnow'. '&api_key=' . $api_key . '&access_token=' . $access_token . '&user_id=' . $user_id,
     260                        'url' => $url.'/?rest_route=/appmaker-wc/v1/products/chatnow'. '&api_key=' . $api_key . '&access_token=' . $access_token . '&user_id=' . $user_id. '&author_id=' . $author_id. '&product_id=' .  $product_id ,
    260261                        'title' => __('Chat Now', 'dokan'),
    261262                    ),
     
    263264              );             
    264265            }
    265 
    266         }
     266            if( ! $user_id && $key == 'chat_now'){
     267                unset($tabs[$key]);
     268                unset($return[$key]);
     269            }
     270
     271        }
     272       
    267273        // if( ! isset( $return['seller'] ) && is_array($store_info) && isset( $store_info['store_name'] ) ) {
    268274
     
    301307    //       )));
    302308    //   }
     309   
    303310        return $return;
    304311    }
    305312
    306     public function get_chat_script(){
    307         ob_start();
    308         do_shortcode( '[dokan-live-chat]' );
    309         $output = ob_get_contents();
     313    public function get_chat_script($request){
     314        global $post;
     315        $post = get_post($request['product_id'] );
     316        set_query_var('author',$request['author_id']);       
     317        ob_start();               
     318        do_shortcode( '[dokan-live-chat]' );       
     319        $output = ob_get_contents();       
    310320        $output = <<<HTML
    311321<html>
    312322<head>
    313     $output
     323    $output     
     324    <meta name="viewport" content= "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">       
    314325    <script>
    315326    window.onload = function(){
     
    319330};
    320331</script>
     332
    321333</head>
    322334<body>
  • appmaker-woocommerce-mobile-app-manager/trunk/lib/third-party-support/misc/class-appmaker-wc-fibosearch.php

    r2647272 r2662763  
    4141            //echo version_compare('1.14.0', '1.15.0', '<=');exit;
    4242           // var_dump( version_compare('DGWT_WCAS_VERSION', '1.15.0', '<') );
    43             if( version_compare('DGWT_WCAS_VERSION', '1.14.0', '<=') ){
     43            if( version_compare('DGWT_WCAS_VERSION', '1.14.0', '<=') != 1 ){
    4444                add_filter('exit_fibo_search_results' ,  '__return_false',999 );                 
    4545                ob_start();         
  • appmaker-woocommerce-mobile-app-manager/trunk/lib/third-party-support/misc/class-appmaker-wc-sumopayment.php

    r2249884 r2662763  
    2727        if(method_exists('SUMO_PP_Product_Manager','get_product_props' )){
    2828            $product_props = SUMO_PP_Product_Manager::get_product_props($_POST['product_id'] );
    29         }else
    30             $product_props = SUMO_PP_Product_Manager::get_props($_POST['product_id'] );
     29        }else {
     30            $sumo = new SUMO_PP_Product_Manager;
     31            $product_props = $sumo->get_props($_POST['product_id'] );
     32        }           
    3133           
    3234        $product = wc_get_product( $_POST['product_id'] );
     
    119121        if(method_exists('SUMO_PP_Product_Manager','get_product_props' )){
    120122            $product_props = SUMO_PP_Product_Manager::get_product_props($product );
    121         }else
    122             $product_props = SUMO_PP_Product_Manager::get_props($product );
     123        }else{
     124            $sumo = new SUMO_PP_Product_Manager;
     125            $product_props = $sumo->get_props($product );
     126        }
    123127       
    124128        $payment_plans = array();
     
    144148            $product_props = SUMO_PP_Product_Manager::get_product_props($product->get_id() );
    145149        }else{
    146             $product_props = SUMO_PP_Product_Manager::get_props($product->get_id() );
     150            $sumo = new SUMO_PP_Product_Manager;
     151            $product_props = $sumo->get_props($product->get_id() );
    147152        }
    148153           
     
    169174                            // $payment_plan_id = 'Payment_plan_'.$plan_id;
    170175                            if(class_exists('SUMO_PP_Payment_Plan_Manager')){
    171 
    172                                 $payment_plan_data                                 = SUMO_PP_Payment_Plan_Manager::get_props( $plan_id );
     176                                $sumo_plan_obj                                = new SUMO_PP_Payment_Plan_Manager;
     177                                $payment_plan_data                            = $sumo_plan_obj->get_props( $plan_id );
    173178                            }else{
    174                                 $payment_plan_data                                 = SUMO_PP_Plan_Manager::get_props( $plan_id );
     179                                $sumo_obj                                     = new SUMO_PP_Plan_Manager;
     180                                $payment_plan_data                            = $sumo_obj->get_props( $plan_id );
    175181                            }
    176182                           
  • appmaker-woocommerce-mobile-app-manager/trunk/lib/third-party-support/misc/class-appmaker-wc-translatepress.php

    r2647272 r2662763  
    3838    }
    3939
    40     public function product_translation( $data, $product, $expanded ) {
     40    public static function product_translation( $data, $product, $expanded ) {
    4141
    4242        $trp = TRP_Translate_Press::get_trp_instance();
     
    4646    }
    4747
    48     public function product_widget_translations ( $return,$product ) {
     48    public static function product_widget_translations ( $return,$product ) {
    4949
    5050        $product_tabs = apply_filters( 'woocommerce_product_tabs', array() );
     
    6868    }
    6969
    70     public function attribute_name_translation($attributes, $product, $variations, $visible){
     70    public static function attribute_name_translation($attributes, $product, $variations, $visible){
    7171        $trp = TRP_Translate_Press::get_trp_instance();
    7272        $translation_render = $trp->get_component( 'translation_render' );
     
    8282    }
    8383
    84     public function product_name_cart_translation( $return ) {
     84    public static function product_name_cart_translation( $return ) {
    8585        $trp = TRP_Translate_Press::get_trp_instance();
    8686        $translation_render = $trp->get_component( 'translation_render' );
  • appmaker-woocommerce-mobile-app-manager/trunk/lib/third-party-support/misc/class-appmaker-wc-wcfm-vendor.php

    r2641193 r2662763  
    216216        $shop_name = '';
    217217        $order     = wc_get_order( ( $response->data['id'] ) );
    218         foreach ( $order->get_items() as $item ) {
    219             $product = $item->get_data();
    220             if ( $product['variation_id'] != 0 ) {
    221                 $variation_id = $product['variation_id'];
    222                 $variation    = wc_get_product( $variation_id );
    223                 $product_id   = $variation->get_parent_id();
    224             } else {
    225                 $product_id = $product['product_id'];
    226             }
    227             $vendor_info = $this->get_vendor_info( $product_id );
    228             if ( ! empty( $vendor_info['id'] ) ) {
    229                 $shop_name = 'Vendor : ' . $vendor_info['shop_name'] . "\n";
    230             }
    231             foreach ( $response->data['line_items'] as $key => $item ) {
    232 
    233                 if ( $product_id == $item['product_id'] ) {
    234                     $response->data['line_items'][ $key ]['quantity'] .= "\n" . $shop_name;
     218        if( $order ) {
     219            foreach ( $order->get_items() as $item ) {
     220                $product = $item->get_data();
     221                if ( $product['variation_id'] != 0 ) {
     222                    $variation_id = $product['variation_id'];
     223                    $variation    = wc_get_product( $variation_id );
     224                    $product_id   = $variation->get_parent_id();
     225                } else {
     226                    $product_id = $product['product_id'];
    235227                }
    236             }
    237         }
     228                $vendor_info = $this->get_vendor_info( $product_id );
     229                if ( ! empty( $vendor_info['id'] ) ) {
     230                    $shop_name = 'Vendor : ' . $vendor_info['shop_name'] . "\n";
     231                }
     232                foreach ( $response->data['line_items'] as $key => $item ) {
     233   
     234                    if ( $product_id == $item['product_id'] ) {
     235                        $response->data['line_items'][ $key ]['quantity'] .= "\n" . $shop_name;
     236                    }
     237                }
     238            }
     239        }       
    238240        return $response;
    239241    }
  • appmaker-woocommerce-mobile-app-manager/trunk/plugin.php

    r2647272 r2662763  
    66 * Plugin URI: https://appmaker.xyz
    77 * Description: This Plugin is used to manage Android and iOS mobile app created for your WooCommerce store
    8  * Version: 1.36.1
     8 * Version: 1.36.2
    99 * Author: Appmaker
    1010 * Author URI: https://appmaker.xyz/woocommerce
     
    1212 * Domain Path: /i18n/languages/
    1313 * WC requires at least: 2.6.0
    14  * WC tested up to: 5.8.0
     14 * WC tested up to: 6.1.1
    1515 */
    1616
     
    3232     * @var string
    3333     */
    34     static $version = '1.36.1';
     34    static $version = '1.36.2';
    3535
    3636    /**
  • appmaker-woocommerce-mobile-app-manager/trunk/readme.txt

    r2647272 r2662763  
    55Requires at least: 4.5.0
    66Tested up to: 5.8
    7 Stable tag: 1.36.1
     7Stable tag: 1.36.2
    88Requires PHP: 5.2
    99This Plugin is used to manage Android and iOS mobile app created for your WooCommerce store
     
    165165== Changelog ==
    166166
     167= 1.36.2 =
     168
     169Updated Date: 24/01/22
     170
     171* WooCommerce Plugin: Sumo Payment Plans plugin bug fixes
     172* WooCommerce Plugin: Aftership plugin 1.14 compatibility fixes
     173* Report Product Comments feature
     174* Direct Bank Transfer gateway fixes
     175* WooCommerce Plugin: Dokan Pro chat feature fixes
     176* WooCommerce Plugin: Translatepress plugin bug fixes
     177* Compatible with WooCommerce 6.1
     178
    167179= 1.36.1 =
    168180
Note: See TracChangeset for help on using the changeset viewer.