Changeset 2662763
- Timestamp:
- 01/24/2022 05:03:47 AM (4 years ago)
- Location:
- appmaker-woocommerce-mobile-app-manager/trunk
- Files:
-
- 13 edited
-
i18n/languages/appmaker-woocommerce-mobile-app-manager.pot (modified) (1 diff)
-
lib/appmaker-multi-step-checkout/includes/page-template.php (modified) (1 diff)
-
lib/endpoints/appmaker/class-appmaker-wc-rest-backend-settings-controller.php (modified) (1 diff)
-
lib/endpoints/wc/class-appmaker-wc-rest-orders-controller.php (modified) (2 diffs)
-
lib/endpoints/wc/class-appmaker-wc-rest-products-controller.php (modified) (5 diffs)
-
lib/third-party-support/misc/class-appmaker-wc-aftership-order-tracking.php (modified) (1 diff)
-
lib/third-party-support/misc/class-appmaker-wc-dokan.php (modified) (6 diffs)
-
lib/third-party-support/misc/class-appmaker-wc-fibosearch.php (modified) (1 diff)
-
lib/third-party-support/misc/class-appmaker-wc-sumopayment.php (modified) (4 diffs)
-
lib/third-party-support/misc/class-appmaker-wc-translatepress.php (modified) (4 diffs)
-
lib/third-party-support/misc/class-appmaker-wc-wcfm-vendor.php (modified) (1 diff)
-
plugin.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
appmaker-woocommerce-mobile-app-manager/trunk/i18n/languages/appmaker-woocommerce-mobile-app-manager.pot
r2602288 r2662763 168 168 msgstr "" 169 169 170 #: lib/endpoints/wc/class-appmaker-wc-rest-products-controller.php:3412 171 msgid "Thank you for your feedback. We will look into it." 172 msgstr "" 173 170 174 #: lib/endpoints/wc/class-appmaker-wc-rest-products-controller.php:1116 171 175 msgid "Add review" -
appmaker-woocommerce-mobile-app-manager/trunk/lib/appmaker-multi-step-checkout/includes/page-template.php
r2455359 r2662763 3 3 <head> 4 4 <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"> 6 6 <title><?php wp_title(); ?></title> 7 7 <?php wp_head(); ?> -
appmaker-woocommerce-mobile-app-manager/trunk/lib/endpoints/appmaker/class-appmaker-wc-rest-backend-settings-controller.php
r2641193 r2662763 834 834 array( 835 835 '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', 836 856 'id' => 'hide_brand_images', 837 857 'label' => 'Show/Hide Brand Images', -
appmaker-woocommerce-mobile-app-manager/trunk/lib/endpoints/wc/class-appmaker-wc-rest-orders-controller.php
r2641193 r2662763 257 257 } 258 258 $data['account_details'] = property_exists( $gateway, 'account_details' ) ? $gateway->account_details : false; 259 $data['show_account_details'] = false; 259 260 if(!empty($data['account_details'])) { 261 $data['show_account_details'] = true; 260 262 $data['account_details_title'] = array( 261 263 'account_details'=>__( 'Account details:', 'woocommerce' ), … … 267 269 'bic'=>__('BIC / Swift', 'woocommerce'), 268 270 ); 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 } 270 296 } 271 297 -
appmaker-woocommerce-mobile-app-manager/trunk/lib/endpoints/wc/class-appmaker-wc-rest-products-controller.php
r2647272 r2662763 195 195 'methods' => WP_REST_Server::READABLE, 196 196 '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' ), 197 208 'permission_callback' => array( $this, 'api_permissions_check' ), 198 209 'args' => $this->get_collection_params(), … … 1025 1036 1026 1037 $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' ) ); 1028 1039 $category_in_webview = apply_filters('appmaker_wc_category_in_webview', array()); 1029 1040 $product_category = wp_get_post_terms( $product->get_id() ,'product_cat' ); … … 1279 1290 // Taxonomy-based attributes are prefixed with `pa_`, otherwise simply `attribute_`. 1280 1291 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( 1282 1295 'id' => $name, 1283 'name' => $ this->get_attribute_taxonomy_label( $name ),1296 'name' => $attr_name, 1284 1297 'option' => $attribute, 1285 ); 1298 ); 1299 } 1286 1300 } else { 1287 1301 $id = $this->sanitize_id( $name ); … … 1526 1540 'expanded' => false, 1527 1541 'allow_product_review'=>( 'open' === $post->comment_status ), 1542 'allow_review_report' => APPMAKER_WC::$api->get_settings('allow_visitors_to_report_comments', true ), 1528 1543 'review_button_title'=>__('Add review', 'appmaker-woocommerce-mobile-app-manager'), 1529 1544 'view_more_reviews' => ( (int) $product->get_review_count() ) > 10 ? true : false , … … 3379 3394 return $response; 3380 3395 } 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 ); 3381 3402 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 3382 3421 3383 3422 } -
appmaker-woocommerce-mobile-app-manager/trunk/lib/third-party-support/misc/class-appmaker-wc-aftership-order-tracking.php
r2145595 r2662763 24 24 $values['aftership_tracking_provider'] = get_post_meta($response->data['id'], '_aftership_tracking_provider', true); 25 25 $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 26 31 if (!$values['aftership_tracking_provider']) { 27 32 return $response; -
appmaker-woocommerce-mobile-app-manager/trunk/lib/third-party-support/misc/class-appmaker-wc-dokan.php
r2619875 r2662763 213 213 $user_id = get_current_user_id(); 214 214 $author_id = get_post_field( 'post_author', $product->get_id() ); 215 $product_id = $product->get_id() ; 215 216 $author = get_user_by( 'id', $author_id ); 216 217 $store_info = dokan_get_store_info( $author->ID ); … … 243 244 ); 244 245 } 246 245 247 if( $user_id && class_exists('Dokan_Pro') && $key == 'chat_now' ) { 246 248 $url = site_url(); 247 249 $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); 250 251 $return[$key] = array( 251 252 'type' => 'menu', … … 257 258 'type' => 'OPEN_IN_WEB_VIEW', 258 259 '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 , 260 261 'title' => __('Chat Now', 'dokan'), 261 262 ), … … 263 264 ); 264 265 } 265 266 } 266 if( ! $user_id && $key == 'chat_now'){ 267 unset($tabs[$key]); 268 unset($return[$key]); 269 } 270 271 } 272 267 273 // if( ! isset( $return['seller'] ) && is_array($store_info) && isset( $store_info['store_name'] ) ) { 268 274 … … 301 307 // ))); 302 308 // } 309 303 310 return $return; 304 311 } 305 312 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(); 310 320 $output = <<<HTML 311 321 <html> 312 322 <head> 313 $output 323 $output 324 <meta name="viewport" content= "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> 314 325 <script> 315 326 window.onload = function(){ … … 319 330 }; 320 331 </script> 332 321 333 </head> 322 334 <body> -
appmaker-woocommerce-mobile-app-manager/trunk/lib/third-party-support/misc/class-appmaker-wc-fibosearch.php
r2647272 r2662763 41 41 //echo version_compare('1.14.0', '1.15.0', '<=');exit; 42 42 // 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 ){ 44 44 add_filter('exit_fibo_search_results' , '__return_false',999 ); 45 45 ob_start(); -
appmaker-woocommerce-mobile-app-manager/trunk/lib/third-party-support/misc/class-appmaker-wc-sumopayment.php
r2249884 r2662763 27 27 if(method_exists('SUMO_PP_Product_Manager','get_product_props' )){ 28 28 $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 } 31 33 32 34 $product = wc_get_product( $_POST['product_id'] ); … … 119 121 if(method_exists('SUMO_PP_Product_Manager','get_product_props' )){ 120 122 $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 } 123 127 124 128 $payment_plans = array(); … … 144 148 $product_props = SUMO_PP_Product_Manager::get_product_props($product->get_id() ); 145 149 }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() ); 147 152 } 148 153 … … 169 174 // $payment_plan_id = 'Payment_plan_'.$plan_id; 170 175 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 ); 173 178 }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 ); 175 181 } 176 182 -
appmaker-woocommerce-mobile-app-manager/trunk/lib/third-party-support/misc/class-appmaker-wc-translatepress.php
r2647272 r2662763 38 38 } 39 39 40 public function product_translation( $data, $product, $expanded ) {40 public static function product_translation( $data, $product, $expanded ) { 41 41 42 42 $trp = TRP_Translate_Press::get_trp_instance(); … … 46 46 } 47 47 48 public function product_widget_translations ( $return,$product ) {48 public static function product_widget_translations ( $return,$product ) { 49 49 50 50 $product_tabs = apply_filters( 'woocommerce_product_tabs', array() ); … … 68 68 } 69 69 70 public function attribute_name_translation($attributes, $product, $variations, $visible){70 public static function attribute_name_translation($attributes, $product, $variations, $visible){ 71 71 $trp = TRP_Translate_Press::get_trp_instance(); 72 72 $translation_render = $trp->get_component( 'translation_render' ); … … 82 82 } 83 83 84 public function product_name_cart_translation( $return ) {84 public static function product_name_cart_translation( $return ) { 85 85 $trp = TRP_Translate_Press::get_trp_instance(); 86 86 $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 216 216 $shop_name = ''; 217 217 $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']; 235 227 } 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 } 238 240 return $response; 239 241 } -
appmaker-woocommerce-mobile-app-manager/trunk/plugin.php
r2647272 r2662763 6 6 * Plugin URI: https://appmaker.xyz 7 7 * Description: This Plugin is used to manage Android and iOS mobile app created for your WooCommerce store 8 * Version: 1.36. 18 * Version: 1.36.2 9 9 * Author: Appmaker 10 10 * Author URI: https://appmaker.xyz/woocommerce … … 12 12 * Domain Path: /i18n/languages/ 13 13 * WC requires at least: 2.6.0 14 * WC tested up to: 5.8.014 * WC tested up to: 6.1.1 15 15 */ 16 16 … … 32 32 * @var string 33 33 */ 34 static $version = '1.36. 1';34 static $version = '1.36.2'; 35 35 36 36 /** -
appmaker-woocommerce-mobile-app-manager/trunk/readme.txt
r2647272 r2662763 5 5 Requires at least: 4.5.0 6 6 Tested up to: 5.8 7 Stable tag: 1.36. 17 Stable tag: 1.36.2 8 8 Requires PHP: 5.2 9 9 This Plugin is used to manage Android and iOS mobile app created for your WooCommerce store … … 165 165 == Changelog == 166 166 167 = 1.36.2 = 168 169 Updated 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 167 179 = 1.36.1 = 168 180
Note: See TracChangeset
for help on using the changeset viewer.