Plugin Directory

Changeset 2800813


Ignore:
Timestamp:
10/18/2022 05:16:06 PM (3 years ago)
Author:
appexpertsio
Message:

release 6 version 1.3.2

Location:
appexperts/trunk
Files:
38 added
16 edited

Legend:

Unmodified
Added
Removed
  • appexperts/trunk/app-expert.php

    r2789935 r2800813  
    33Plugin Name: AppExperts
    44Description: Integrate App Experts builder functionality with your wordpress website
    5 Version: 1.3.1
     5Version: 1.3.2
    66Author: AppExperts
    77Author URI: https://appexperts.io/
     
    8282
    8383//todo:find a better way
    84 const APP_EXPERT_PLUGIN_VERSION = '1.3.1';  // used in assets
     84const APP_EXPERT_PLUGIN_VERSION = '1.3.2';  // used in assets
    8585const APP_EXPERT_API_NAMESPACE = 'app-expert/v1';
    8686
  • appexperts/trunk/includes/features/authentication/apis/requests/app-expert-forgert-password-request.php

    r2789917 r2800813  
    11<?php
    2 class App_Expert_Forget_Password_Request extends App_Expert_Auth_Request {
     2class App_Expert_Forget_Password_Request extends App_Expert_Request {
    33
    44    public function rules(){
  • appexperts/trunk/includes/init/abstracts/app-expert-integration.php

    r2789917 r2800813  
    2222        if(empty($dependencies)) return true;
    2323
     24        //todo: file name could be changed .
     25        //class_exists check?
    2426        $active_plugins = apply_filters('active_plugins', get_option('active_plugins'));
    2527        foreach ($dependencies as$dependency)
  • appexperts/trunk/includes/init/common/app-expert-language.php

    r2789917 r2800813  
    7070        return  apply_filters('ae_get_user_locale',$local,$user_id);
    7171    }
     72    public static function get_element_translation($element_id, $element_type = 'post', $return_original_if_missing = false, $language_code = null){
     73        return apply_filters('ae_get_element_translation',$element_id, $element_type,$return_original_if_missing,$language_code);
     74    }
    7275
    7376}
  • appexperts/trunk/includes/integrations/sitepress-multilingual-cms/backend/app-expert-wpml-languages.php

    r2789917 r2800813  
    99        add_filter('ae_get_active_languages',array($this,'add_wpml_languages'));
    1010        add_action('ae_switch_lang',array($this,'switch_wpml_lang'));
     11        add_filter('ae_get_element_translation',array($this,'get_element_translation'),1,4);
    1112    }
    1213    public function add_wpml_languages($langs){
     
    1819        $sitepress->switch_lang($lang,true);
    1920    }
     21
     22    public function get_element_translation($element_id, $element_type,$return_original_if_missing,$language_code){
     23        return apply_filters('wpml_object_id',
     24            $element_id,
     25            $element_type,
     26            $return_original_if_missing,
     27            $language_code);
     28    }
    2029}
  • appexperts/trunk/includes/integrations/woocommerce/apis/modifications/app-expert-wc-order.php

    r2789917 r2800813  
    1313    }
    1414    public function set_apis_permission($permission, $context, $object_id, $post_type){
    15         if($post_type =="shop_order"&&$context=="read") return true;
     15        if($post_type =="shop_order"&&$context=="read" && get_current_user_id()>0) return true;
    1616        return $permission;
    1717    }
  • appexperts/trunk/includes/integrations/woocommerce/apis/modifications/app-expert-wc-product.php

    r2789917 r2800813  
    88        add_filter('woocommerce_rest_product_object_query',array($this,'add_to_query'),10,2);
    99        add_filter( "rest_product_collection_params", array($this,'add_additional_params_to_product_api'), 10, 1 );
    10         //wc/store/v1/products
     10        //wc/store/v1/products (Not used)
     11        //todo:remove from here
    1112        add_filter('rest_request_after_callbacks', array($this, 'modify_product_data'), 999, 3);
    1213        //api permission
     
    9899
    99100    public function set_apis_permission($permission, $context, $object_id, $post_type){
    100         if($post_type =="product"&&$context=="read") return true;
     101        if($post_type =="product"&&$context=="read" && get_current_user_id()>0 ) return true;
    101102        return $permission;
    102103    }
  • appexperts/trunk/includes/integrations/woocommerce/assets/css/woocommerce.css

    r2789917 r2800813  
    10261026  color: var(--Dim-gray) !important;
    10271027}
     1028.variation-BookingDate, .variation-BookingTime, .variation-Persons {
     1029  float: none !important;
     1030  clear: none !important;
     1031  display:block !important;
     1032  line-height: 20px;
     1033  padding: 5px 0;
     1034}
     1035dl.variation{
     1036  line-height: 0;
     1037}
     1038dd.variation-BookingDate p,dd.variation-BookingTime p,dd.variation-Persons p{
     1039  margin-top: 0;
     1040}
     1041dd.variation-BookingDate,dd.variation-BookingTime,dd.variation-Persons{
     1042   padding: 5px 5px;
     1043}
  • appexperts/trunk/includes/integrations/woocommerce/backend/app-expert-wc-notification-settings.php

    r2789917 r2800813  
    3333            ]
    3434        ];
     35        //todo : do this in a template & call it here
    3536        foreach ($woocommerce_options as $option ): ?>
    3637          <input type="checkbox"
  • appexperts/trunk/includes/integrations/woocommerce/backend/app-expert-wc-send-notification.php

    r2789917 r2800813  
    1919            $order=wc_get_order($order_id);
    2020            $user_id = $order->get_user_id();
     21            if(!$user_id) return;
    2122            App_Expert_Notification_Helper::save_automatic(
    2223                'Order Status changed',
     
    6364            $order=wc_get_order($order->ID);
    6465            $user_id = $order->get_user_id();
     66            if(!$user_id) return;
    6567            App_Expert_Notification_Helper::save_automatic(
    6668                    'Order Updated',
  • appexperts/trunk/includes/integrations/woocommerce/frontend/app-expert-checkout-authentication.php

    r2789917 r2800813  
    2525        // Guest user case
    2626        if (isset($_GET['guest_user']) && !empty($_GET['guest_user'])) {  // Guest case
     27            if(
     28                ( isset($_GET['session_key'])   && !empty($_GET['session_key']) )&&
     29                !isset($_COOKIE[$_GET['session_key']]) &&
     30                ( isset($_GET['session_value']) && !empty($_GET['session_value']) )
     31            ){
     32                setcookie($_GET['session_key'],$_GET['session_value'],0,"/");
     33                wp_redirect($request_uri);
     34            }
    2735            if (!empty(get_current_user_id())) {
    2836                $this->clear_current_user();
  • appexperts/trunk/includes/integrations/woocommerce/frontend/app-expert-custom-checkout.php

    r2789917 r2800813  
    1515
    1616        //fix lang in checkout
    17       //  add_action('init', array($this, 'force_switch_lang'),1);
    1817        add_filter('locale', array($this, 'force_set_lang'),100);
    1918        add_filter('wc_get_template', array($this, 'render_table'), 1,5);
     
    151150
    152151
    153         WC()->cart->empty_cart();
    154 
    155152        // Product details has the format:
    156153        // product1_id,variation1_id,quantity1,variation_name:variation_value;;variation_name:variation_value||product2_id,...
    157154
     155        if(!isset($_GET['products'])) return;
    158156        $products = $_GET['products'] ? explode("||", urldecode($_GET['products'])) : [];
    159157        foreach ($products as $product) {
     158            WC()->cart->empty_cart();
    160159            $product_details = explode(",", $product);
    161160            $product_id = intval($product_details[0]);
     
    184183            WC()->cart->add_to_cart($product_id, $quantity, $variation_id, $variationsData);
    185184        }
     185
    186186    }
    187187
  • appexperts/trunk/includes/integrations/woocommerce/helpers/app-expert-custom-checkout-helper.php

    r2789917 r2800813  
    55        $saved_page=get_page_by_path(MOBILE_CHECKOUT_PAGE_SLUG);
    66        if(!($saved_page instanceof WP_Post)) return false;
    7 
    87        $request_uri = $_SERVER['REQUEST_URI'];
    98        $relative_page_permalink = str_replace(home_url(), '', get_permalink($saved_page->ID));
     
    1918        if ( !empty( $languages ) && count($languages)>1) {
    2019            foreach( $languages as $l ) {
    21                 $flag=($post->ID==apply_filters( 'wpml_object_id', $saved_page->ID, 'page', false, $l['language_code']));
     20                $flag=($post->ID==App_Expert_Language::get_element_translation($saved_page->ID, 'page', true, $l['language_code']));
    2221                if($flag) break;
    2322            }
  • appexperts/trunk/includes/integrations/woocommerce/helpers/app-expert-wc-product-helper.php

    r2789917 r2800813  
    11<?php
    22class App_Expert_WC_Product_Helper {
    3     public static function get_price($product,$cost){
    4         if ( 'incl' === get_option( 'woocommerce_tax_display_shop' ) ) {
     3    public static function get_price($product,$cost,$context='view'){
     4        $display_option=get_option( 'woocommerce_tax_display_shop' );
     5        if($context=='cart'){
     6            $display_option = get_option( 'woocommerce_tax_display_cart' );
     7        }
     8        if ( 'incl' === $display_option) {
    59            if ( function_exists( 'wc_get_price_excluding_tax' ) ) {
    610                $display_price = wc_get_price_including_tax($product , array( 'price' => $cost ) );
     
    1721        return $display_price;
    1822    }
    19     public static function get_prices($product){
     23    public static function get_prices($product,$context='view'){
    2024        return [
    21             'ae_regular_price' => (float) self::get_price($product,$product->get_regular_price()),
    22             'ae_sale_price'    => (float) self::get_price($product,$product->get_sale_price()),
     25            'ae_regular_price' => (float) self::get_price($product,$product->get_regular_price(),$context),
     26            'ae_sale_price'    => (float) self::get_price($product,$product->get_sale_price(),$context),
    2327        ];
    2428    }
    25     public static function get_data($product,$wc_product=null){
     29    public static function get_data($product,$wc_product=null,$context='view'){
    2630        $user_id =get_current_user_id();
    2731
     
    4852        $product['has_bought_product']= $user_id && wc_customer_bought_product("", $user_id, $product['id']);
    4953        $product['review_count']=$wc_product->get_review_count();
     54        $product['average_rating']= $wc_product->get_average_rating();
    5055        //================  review changes ================
    5156
     
    7075        //================ fix product type issue ================
    7176        $types= get_the_terms( $product['id'], 'product_type');
    72         $product['type'] = !empty($types)?$types[0]->name:$product['type'];
     77        $product['type'] = !empty($types)?$types[0]->name:($product['type']?:null);
     78        $product['parent_id'] = $wc_product->get_parent_id()>0?$wc_product->get_parent_id():null;
    7379        //================  fix product type issue  ================
    7480
    7581        //================  prices fix ================
    76         $prices=self::get_prices($wc_product);
     82        $prices=self::get_prices($wc_product,$context);
    7783        return apply_filters('ae_rest_product_obj',array_merge($product,$prices),$wc_product);
    7884        //================  prices fix ================
  • appexperts/trunk/includes/integrations/woocommerce/templates/thank-you.php

    r2789917 r2800813  
    4848                    <?php if ($order->get_payment_method_title()) : ?>
    4949                        <li class="method">
    50                             <?php _e('Payment Method:', 'app-expert');
    51                             if(isset($_GET['ae_display_lang']))
    52                                 App_Expert_Language_Handler::switch_lang($_GET['ae_display_lang']);
    53                             ?>
     50                            <?php _e('Payment Method:', 'app-expert'); ?>
    5451                            <strong><?php echo $order->get_payment_method_title(); ?></strong>
    5552                        </li>
  • appexperts/trunk/readme.txt

    r2789939 r2800813  
    104104
    105105== Changelog ==
     106= 1.3.2 2022-10-18 =
     107* Improved - UX enhancements
     108* Improved - Help texts, notes and tooltips
     109* Added - Integration with Contact Form 7
     110* Added - Cart Synchronization
     111* Added - Order Notes as order history
     112* Added - Support for bookable product type
     113* Added - Appointment booking
     114
    106115= 1.3.1 2022-09-25 =
    107116* Fix - General Enhancement and fixes
Note: See TracChangeset for help on using the changeset viewer.