Changeset 2332301
- Timestamp:
- 06/29/2020 10:39:03 AM (6 years ago)
- Location:
- mobile-builder/trunk
- Files:
-
- 4 edited
-
api/class-mobile-builder-cart.php (modified) (1 diff)
-
helpers/mobile-builder-functions.php (modified) (1 diff)
-
mobile-builder.php (modified) (2 diffs)
-
product/class-mobile-builder-product.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
mobile-builder/trunk/api/class-mobile-builder-cart.php
r2324940 r2332301 131 131 ) ); 132 132 133 register_rest_route( $this->namespace, 'check-auth-header', array( 134 'methods' => WP_REST_Server::CREATABLE, 135 'callback' => array( $this, 'check_auth_header' ), 136 ) ); 137 138 } 139 140 public function check_auth_header( $request ) { 141 $headers = mobile_builder_headers(); 142 143 if ( isset( $headers['Authorization'] ) && $headers['Authorization'] == "Bearer test" ) { 144 return array("check" => true); 145 } 146 147 return array("check" => false); 133 148 } 134 149 -
mobile-builder/trunk/helpers/mobile-builder-functions.php
r2322821 r2332301 94 94 return $result; 95 95 } 96 97 /** 98 * Get request headers 99 * @return array|false 100 */ 101 function mobile_builder_headers() { 102 if ( function_exists( 'apache_request_headers' ) ) { 103 return apache_request_headers(); 104 } else { 105 106 foreach ( $_SERVER as $key => $value ) { 107 if ( substr( $key, 0, 5 ) == "HTTP_" ) { 108 $key = str_replace( " ", "-", 109 ucwords( strtolower( str_replace( "_", " ", substr( $key, 5 ) ) ) ) ); 110 $out[ $key ] = $value; 111 } else { 112 $out[ $key ] = $value; 113 } 114 } 115 116 return $out; 117 } 118 } -
mobile-builder/trunk/mobile-builder.php
r2324940 r2332301 11 11 * Plugin URI: https://doc-oreo.rnlab.io 12 12 * Description: The most advanced drag & drop app builder. Create multi templates and app controls. 13 * Version: 1.0. 213 * Version: 1.0.3 14 14 * Author: Rnlab.io 15 15 * Author URI: https://rnlab.io … … 31 31 * Rename this for your plugin and update it as you release new versions. 32 32 */ 33 define( 'MOBILE_BUILDER_CONTROL_VERSION', '1.4. 4' );33 define( 'MOBILE_BUILDER_CONTROL_VERSION', '1.4.5' ); 34 34 35 35 define( 'MOBILE_BUILDER_PLUGIN_NAME', 'mobile-builder' ); -
mobile-builder/trunk/product/class-mobile-builder-product.php
r2311294 r2332301 227 227 // echo $request->get_param('lat'); die; 228 228 229 $type = $response->data['type']; 230 231 if( $type == 'variable' ){ 232 $price_min = $object->get_variation_price(); 233 $price_max = $object->get_variation_price('max'); 234 $response->data['price_min'] = $price_min; 235 $response->data['price_max'] = $price_max; 236 } 237 229 238 global $woocommerce_wpml; 230 231 239 if ( ! empty( $woocommerce_wpml->multi_currency ) && ! empty( $woocommerce_wpml->settings['currencies_order'] ) ) { 232 240 233 $type = $response->data['type'];234 241 $price = $response->data['price']; 235 242 236 243 if ( $type == 'grouped' || $type == 'variable' ) { 244 237 245 foreach ( $woocommerce_wpml->settings['currencies_order'] as $currency ) { 238 246
Note: See TracChangeset
for help on using the changeset viewer.