Changeset 3290493
- Timestamp:
- 05/09/2025 12:37:07 PM (11 months ago)
- Location:
- simpler-checkout
- Files:
-
- 2 added
- 34 edited
- 1 copied
-
tags/1.1.7 (copied) (copied from simpler-checkout/trunk)
-
tags/1.1.7/README.txt (modified) (2 diffs)
-
tags/1.1.7/includes/Compatibility/bundles.php (modified) (19 diffs)
-
tags/1.1.7/includes/Compatibility/cod.php (modified) (4 diffs)
-
tags/1.1.7/includes/Compatibility/free-gifts.php (modified) (5 diffs)
-
tags/1.1.7/includes/Compatibility/gift-cards.php (added)
-
tags/1.1.7/includes/Compatibility/gift-wrap.php (modified) (4 diffs)
-
tags/1.1.7/includes/Compatibility/pickup.php (modified) (3 diffs)
-
tags/1.1.7/includes/Http/Controllers/ProductController.php (modified) (1 diff)
-
tags/1.1.7/includes/Services/CartHelper.php (modified) (4 diffs)
-
tags/1.1.7/includes/button.php (modified) (4 diffs)
-
tags/1.1.7/includes/compat.php (modified) (1 diff)
-
tags/1.1.7/includes/constants.php (modified) (1 diff)
-
tags/1.1.7/includes/takeover.php (modified) (1 diff)
-
tags/1.1.7/simpler.php (modified) (1 diff)
-
tags/1.1.7/vendor/autoload.php (modified) (1 diff)
-
tags/1.1.7/vendor/composer/autoload_real.php (modified) (3 diffs)
-
tags/1.1.7/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/1.1.7/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/includes/Compatibility/bundles.php (modified) (19 diffs)
-
trunk/includes/Compatibility/cod.php (modified) (4 diffs)
-
trunk/includes/Compatibility/free-gifts.php (modified) (5 diffs)
-
trunk/includes/Compatibility/gift-cards.php (added)
-
trunk/includes/Compatibility/gift-wrap.php (modified) (4 diffs)
-
trunk/includes/Compatibility/pickup.php (modified) (3 diffs)
-
trunk/includes/Http/Controllers/ProductController.php (modified) (1 diff)
-
trunk/includes/Services/CartHelper.php (modified) (4 diffs)
-
trunk/includes/button.php (modified) (4 diffs)
-
trunk/includes/compat.php (modified) (1 diff)
-
trunk/includes/constants.php (modified) (1 diff)
-
trunk/includes/takeover.php (modified) (1 diff)
-
trunk/simpler.php (modified) (1 diff)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (3 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simpler-checkout/tags/1.1.7/README.txt
r3272319 r3290493 5 5 Tested up to: 6.5 6 6 Requires PHP: 7.0 7 Stable tag: 1.1. 67 Stable tag: 1.1.7 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 35 35 36 36 == Changelog == 37 38 == 1.1.7 39 Compat: [pw woocommerce gift cards] (https://wordpress.org/plugins/pw-woocommerce-gift-cards/) 37 40 38 41 == 1.1.6 -
simpler-checkout/tags/1.1.7/includes/Compatibility/bundles.php
r3272319 r3290493 9 9 return $value; 10 10 } 11 11 12 add_filter('simplerwc_cart_item_is_bundled', 'simplerwc_compat_wc_pb_cart_item_is_bundled', 10, 2); 12 13 … … 18 19 return $value; 19 20 } 21 20 22 add_filter('simplerwc_cart_item_is_bundle_container', 'simplerwc_compat_wc_pb_cart_item_is_bundle_container', 10, 2); 21 23 22 24 function simplerwc_compat_wc_pb_get_selected_cart_items_linked_to_the_bundle_cart_item($value, $cart, $cart_item, $bundle_type) 23 25 { 24 if($bundle_type!='wc_pb') return $value; 25 26 if (function_exists('wc_pb_get_bundled_cart_items') ){ 26 if ($bundle_type != 'wc_pb') 27 return $value; 28 29 if (function_exists('wc_pb_get_bundled_cart_items')) { 27 30 $bundled_items = \wc_pb_get_bundled_cart_items($cart_item); 28 31 foreach ($bundled_items as $idx => $item) { … … 34 37 return $value; 35 38 } 39 36 40 add_filter('simplerwc_get_selected_cart_items_linked_to_the_bundle_cart_item', 'simplerwc_compat_wc_pb_get_selected_cart_items_linked_to_the_bundle_cart_item', 10, 4); 37 41 … … 43 47 return $value; 44 48 } 49 45 50 add_filter('simplerwc_product_is_bundle_container', 'simplerwc_compat_wc_pb_product_is_bundle_container', 10, 2); 46 51 47 52 function simplerwc_compat_wc_pb_get_all_products_linked_to_the_bundle_product($value, $product, $bundle_type) 48 53 { 49 if($bundle_type!='wc_pb') return $value; 54 if ($bundle_type != 'wc_pb') 55 return $value; 50 56 51 57 if (is_a($product, 'WC_Product_Bundle') && class_exists('WC_PB_DB')) { … … 65 71 return $value; 66 72 } 73 67 74 add_filter('simplerwc_get_all_products_linked_to_the_bundle_product', 'simplerwc_compat_wc_pb_get_all_products_linked_to_the_bundle_product', 10, 3); 68 75 69 76 function simplerwc_compat_wc_pb_add_simpler_bundle_to_cart($value, $simpler_item) 70 77 { 71 if($simpler_item->get_bundle_type()!='wc_pb') return $value; 72 73 if (!class_exists('WC_PB_DB')) return $value; 78 if ($simpler_item->get_bundle_type() != 'wc_pb') 79 return $value; 80 81 if (!class_exists('WC_PB_DB')) 82 return $value; 74 83 75 84 // the final bundle configuration to be added to cart … … 78 87 // get bundle configurations 79 88 $bundled = \WC_PB_DB::query_bundled_items(array( 80 'return' => 'id=>product_id',89 'return' => 'id=>product_id', 81 90 'bundle_id' => array($simpler_item->get_product_id()) 82 91 )); … … 125 134 ); 126 135 } 136 127 137 function simplerwc_compat_wc_pb_construct_variation_configuration($bundle, $product) 128 138 { … … 138 148 return $c; 139 149 } 150 140 151 add_filter('simplerwc_add_simpler_bundle_to_cart', 'simplerwc_compat_wc_pb_add_simpler_bundle_to_cart', 10, 2); 141 152 142 function simplerwc_compat_wc_pb_get_product_type_of_the_bundle($value,$bundle_type) 143 { 144 if($bundle_type=='wc_pb') return 'bundle'; 145 return $value; 146 } 153 function simplerwc_compat_wc_pb_get_product_type_of_the_bundle($value, $bundle_type) 154 { 155 if ($bundle_type == 'wc_pb') 156 return 'bundle'; 157 return $value; 158 } 159 147 160 add_filter('simplerwc_get_product_type_of_the_bundle', 'simplerwc_compat_wc_pb_get_product_type_of_the_bundle', 10, 2); 148 161 149 function simplerwc_compat_wc_pb_get_bundle_type_of_the_product($value,$product) 150 { 151 if($value) return $value; 162 function simplerwc_compat_wc_pb_get_bundle_type_of_the_product($value, $product) 163 { 164 if ($value) 165 return $value; 152 166 if (is_a($product, 'WC_Product_Bundle') && class_exists('WC_PB_DB')) { 153 167 return 'wc_pb'; … … 155 169 return $value; 156 170 } 171 157 172 add_filter('simplerwc_get_bundle_type_of_the_product', 'simplerwc_compat_wc_pb_get_bundle_type_of_the_product', 10, 2); 158 159 160 173 161 174 // WPC Smart Bundles 162 175 function simplerwc_compat_woosb_cart_item_is_bundled($value, $cart_item) 163 176 { 164 if (array_key_exists('woosb_parent_id', $cart_item)) {177 if (array_key_exists('woosb_parent_id', $cart_item)) { 165 178 return true; 166 179 } 167 180 return $value; 168 181 } 182 169 183 add_filter('simplerwc_cart_item_is_bundled', 'simplerwc_compat_woosb_cart_item_is_bundled', 10, 2); 170 184 171 185 function simplerwc_compat_woosb_cart_item_is_bundle_container($value, $cart_item) 172 186 { 173 if (isset($cart_item['woosb_ids']) && !empty($cart_item['woosb_ids'])) {187 if (isset($cart_item['woosb_ids']) && !empty($cart_item['woosb_ids'])) { 174 188 return 'woosb'; 175 189 } 176 190 return $value; 177 191 } 192 178 193 add_filter('simplerwc_cart_item_is_bundle_container', 'simplerwc_compat_woosb_cart_item_is_bundle_container', 10, 2); 179 194 180 195 function simplerwc_compat_woosb_get_selected_cart_items_linked_to_the_bundle_cart_item($value, $cart, $cart_item, $bundle_type) 181 196 { 182 if($bundle_type!='woosb') return $value; 197 if ($bundle_type != 'woosb') 198 return $value; 183 199 184 200 $bundled_items = []; 185 201 $bundle_ids = explode(',', $cart_item['woosb_ids']); 186 202 187 203 foreach ($bundle_ids as $id) { 188 204 foreach ($cart->get_cart_contents() as $item) { … … 195 211 return $bundled_items; 196 212 } 213 197 214 add_filter('simplerwc_get_selected_cart_items_linked_to_the_bundle_cart_item', 'simplerwc_compat_woosb_get_selected_cart_items_linked_to_the_bundle_cart_item', 10, 4); 198 215 199 216 function simplerwc_compat_woosb_product_is_bundle_container($value, $product) 200 217 { 201 if (is_a( $product, 'WC_Product_Woosb')) {218 if (is_a($product, 'WC_Product_Woosb')) { 202 219 return 'woosb'; 203 220 } 204 221 return $value; 205 222 } 223 206 224 add_filter('simplerwc_product_is_bundle_container', 'simplerwc_compat_woosb_product_is_bundle_container', 10, 2); 207 225 208 226 function simplerwc_compat_woosb_get_all_products_linked_to_the_bundle_product($value, $product, $bundle_type) 209 227 { 210 if($bundle_type!='woosb') return $value; 211 212 if (is_a( $product, 'WC_Product_Woosb' )) { 228 if ($bundle_type != 'woosb') 229 return $value; 230 231 if (is_a($product, 'WC_Product_Woosb')) { 213 232 $bundle_items = $product->get_meta('woosb_ids'); 214 233 if (is_array($bundle_items)) { … … 226 245 return $value; 227 246 } 247 228 248 add_filter('simplerwc_get_all_products_linked_to_the_bundle_product', 'simplerwc_compat_woosb_get_all_products_linked_to_the_bundle_product', 10, 3); 229 249 230 250 function simplerwc_compat_woosb_add_simpler_bundle_to_cart($value, $simpler_item) 231 251 { 232 if($simpler_item->get_bundle_type()!='woosb') return $value; 233 234 if (!class_exists('WPCleverWoosb')) return $value; 252 if ($simpler_item->get_bundle_type() != 'woosb') 253 return $value; 254 255 if (!class_exists('WPCleverWoosb')) 256 return $value; 235 257 236 258 $WPCleverWoosb = new \WPCleverWoosb; 237 259 $cart_data = apply_filters('simplerwc_get_cart_item_data', [], $simpler_item); 238 239 $product_id = $simpler_item->get_product_id(); 240 $quantity = $simpler_item->get_quantity(); 241 $variation_id = NULL; 242 $variation = $simpler_item->get_attributes_array(); 243 244 $cart_item_data = $WPCleverWoosb->add_cart_item_data($cart_data, $product_id);245 if (isset($cart_item_data['woosb_ids'])){260 261 $product_id = $simpler_item->get_product_id(); 262 $quantity = $simpler_item->get_quantity(); 263 $variation_id = NULL; 264 $variation = $simpler_item->get_attributes_array(); 265 266 $cart_item_data = $WPCleverWoosb->add_cart_item_data($cart_data, $product_id); 267 if (isset($cart_item_data['woosb_ids'])) { 246 268 $new_woosb_ids = []; 247 $woosb_ids = explode(',', $cart_item_data['woosb_ids']);248 foreach ($woosb_ids as $woosb_id){249 list($pid, $pkey,$pqty) = explode('/',$woosb_id);250 foreach ($simpler_item->get_bundled() as $b_item){251 if ($pid == $b_item['product_id']){269 $woosb_ids = explode(',', $cart_item_data['woosb_ids']); 270 foreach ($woosb_ids as $woosb_id) { 271 list($pid, $pkey, $pqty) = explode('/', $woosb_id); 272 foreach ($simpler_item->get_bundled() as $b_item) { 273 if ($pid == $b_item['product_id']) { 252 274 $pqty = $b_item['quantity']; 253 $new_woosb_id = implode('/', [$pid,$pkey,$pqty]);254 $new_woosb_ids[] =$new_woosb_id;275 $new_woosb_id = implode('/', [$pid, $pkey, $pqty]); 276 $new_woosb_ids[] = $new_woosb_id; 255 277 } 256 278 } 257 279 } 258 $cart_item_data['woosb_ids'] = implode(',', $new_woosb_ids);280 $cart_item_data['woosb_ids'] = implode(',', $new_woosb_ids); 259 281 } 260 282 261 283 $cart_item_key = WC()->cart->add_to_cart( 262 $product_id, 263 $quantity, 264 $variation_id, 265 $variation, 266 $cart_item_data 284 $product_id, 285 $quantity, 286 $variation_id, 287 $variation, 288 $cart_item_data 267 289 ); 268 269 $WPCleverWoosb->add_to_cart($cart_item_key, $product_id, $quantity, null,[],$cart_item_data);290 291 $WPCleverWoosb->add_to_cart($cart_item_key, $product_id, $quantity, null, [], $cart_item_data); 270 292 return $cart_item_key; 271 293 } 294 272 295 add_filter('simplerwc_add_simpler_bundle_to_cart', 'simplerwc_compat_woosb_add_simpler_bundle_to_cart', 10, 2); 273 296 274 297 function simplerwc_compat_woosb_before_create_quoted_product($lineItem) 275 298 { 276 if (isset($lineItem['woosb_price'])){299 if (isset($lineItem['woosb_price'])) { 277 300 $lineItem['line_total'] = $lineItem['woosb_price']; 278 301 $lineItem['line_subtotal'] = $lineItem['woosb_price']; 279 302 } 280 if (isset($lineItem['woosb_parent_id'])){303 if (isset($lineItem['woosb_parent_id'])) { 281 304 $lineItem['line_total'] = 0; 282 305 $lineItem['line_subtotal'] = 0; … … 284 307 return $lineItem; 285 308 } 309 286 310 add_filter('simplerwc_before_create_quoted_product', 'simplerwc_compat_woosb_before_create_quoted_product', 10, 1); 287 311 288 function simplerwc_compat_woosb_get_product_type_of_the_bundle($value,$bundle_type) 289 { 290 if($bundle_type=='woosb') return 'bundle'; 291 return $value; 292 } 312 function simplerwc_compat_woosb_get_product_type_of_the_bundle($value, $bundle_type) 313 { 314 if ($bundle_type == 'woosb') 315 return 'bundle'; 316 return $value; 317 } 318 293 319 add_filter('simplerwc_get_product_type_of_the_bundle', 'simplerwc_compat_woosb_get_product_type_of_the_bundle', 10, 2); 294 320 295 function simplerwc_compat_woosb_get_bundle_type_of_the_product($value,$product) 296 { 297 if($value) return $value; 298 if (is_a( $product, 'WC_Product_Woosb' )) { 321 function simplerwc_compat_woosb_get_bundle_type_of_the_product($value, $product) 322 { 323 if ($value) 324 return $value; 325 if (is_a($product, 'WC_Product_Woosb')) { 299 326 return 'woosb'; 300 327 } 301 328 return $value; 302 329 } 330 303 331 add_filter('simplerwc_get_bundle_type_of_the_product', 'simplerwc_compat_woosb_get_bundle_type_of_the_product', 10, 2); 304 305 306 332 307 333 // WPC Frequently Brought Together 308 334 function simplerwc_compat_woobt_cart_item_is_bundled($value, $cart_item) 309 335 { 310 if (array_key_exists('woobt_parent_id', $cart_item)) {336 if (array_key_exists('woobt_parent_id', $cart_item)) { 311 337 return true; 312 338 } 313 339 return $value; 314 340 } 341 315 342 add_filter('simplerwc_cart_item_is_bundled', 'simplerwc_compat_woobt_cart_item_is_bundled', 10, 2); 316 343 317 344 function simplerwc_compat_woobt_cart_item_is_bundle_container($value, $cart_item) 318 345 { 319 if (isset($cart_item['woobt_ids']) && !empty($cart_item['woobt_ids'])) {346 if (isset($cart_item['woobt_ids']) && !empty($cart_item['woobt_ids'])) { 320 347 return 'woobt'; 321 348 } 322 349 return $value; 323 350 } 351 324 352 add_filter('simplerwc_cart_item_is_bundle_container', 'simplerwc_compat_woobt_cart_item_is_bundle_container', 10, 2); 325 353 326 354 function simplerwc_compat_woobt_get_selected_cart_items_linked_to_the_bundle_cart_item($value, $cart, $cart_item, $bundle_type) 327 355 { 328 if($bundle_type!='woobt') return $value; 356 if ($bundle_type != 'woobt') 357 return $value; 329 358 330 359 $bundled_items = []; 331 360 $bundle_ids = explode(',', $cart_item['woobt_ids']); 332 361 333 362 foreach ($bundle_ids as $bundle_line) { 334 list($id, $code,$qty) = explode('/',$bundle_line);363 list($id, $code, $qty) = explode('/', $bundle_line); 335 364 foreach ($cart->get_cart_contents() as $item) { 336 if ($item['product_id'] == $id && isset($item['woobt_parent_id']) && $item['woobt_parent_id'] ==$cart_item['product_id']) {365 if ($item['product_id'] == $id && isset($item['woobt_parent_id']) && $item['woobt_parent_id'] == $cart_item['product_id']) { 337 366 $bundled_items[] = $item; 338 367 break; … … 342 371 return $bundled_items; 343 372 } 373 344 374 add_filter('simplerwc_get_selected_cart_items_linked_to_the_bundle_cart_item', 'simplerwc_compat_woobt_get_selected_cart_items_linked_to_the_bundle_cart_item', 10, 4); 345 375 … … 348 378 $linked_products = get_post_meta($product->get_id(), 'woobt_ids', true); 349 379 350 if (empty($linked_products)) return $value; 351 380 if (empty($linked_products)) 381 return $value; 382 352 383 return 'woobt'; 353 384 } 385 354 386 add_filter('simplerwc_product_is_bundle_container', 'simplerwc_compat_woobt_product_is_bundle_container', 10, 2); 355 387 356 388 function simplerwc_compat_woobt_get_all_products_linked_to_the_bundle_product($value, $product, $bundle_type) 357 389 { 358 if($bundle_type!='woobt') return $value; 390 if ($bundle_type != 'woobt') 391 return $value; 359 392 360 393 $linked_products = get_post_meta($product->get_id(), 'woobt_ids', true); 361 394 362 if (empty($linked_products)) return $value; 395 if (empty($linked_products)) 396 return $value; 363 397 364 398 $linked_products = maybe_unserialize($linked_products); 365 399 366 400 foreach ($linked_products as $key => $item) { 367 401 if (isset($item['id'])) { 368 402 $product = wc_get_product($item['id']); 369 403 if ($product) { 370 $value[]=$product; 371 } 372 } 373 } 374 return $value; 375 } 404 $value[] = $product; 405 } 406 } 407 } 408 return $value; 409 } 410 376 411 add_filter('simplerwc_get_all_products_linked_to_the_bundle_product', 'simplerwc_compat_woobt_get_all_products_linked_to_the_bundle_product', 10, 3); 377 412 378 413 function simplerwc_compat_woobt_add_simpler_bundle_to_cart($value, $simpler_item) 379 414 { 380 if($simpler_item->get_bundle_type()!='woobt') return $value; 415 if ($simpler_item->get_bundle_type() != 'woobt') 416 return $value; 381 417 382 418 $main_product_metadata = apply_filters('simplerwc_get_cart_item_data', [], $simpler_item); 383 384 $main_product_id = $simpler_item->get_product_id(); 419 420 $main_product_id = $simpler_item->get_product_id(); 385 421 $main_product_cart_key = WC()->cart->add_to_cart( 386 $main_product_id, 387 $simpler_item->get_quantity(), 388 null, 389 $simpler_item->get_attributes_array(), 422 $main_product_id, 423 $simpler_item->get_quantity(), 424 null, 425 $simpler_item->get_attributes_array(), 390 426 $main_product_metadata 391 427 ); 392 428 $value = $main_product_cart_key; 393 429 394 430 if (class_exists('WPCleverWoobt')) { 395 431 $WPCleverWoobt = new \WPCleverWoobt; … … 397 433 $main_product_metadata['woobt_ids'] = ''; 398 434 $ids = []; 399 $linked_products = $WPCleverWoobt->get_product_items( $main_product_id);400 foreach ($linked_products as $linked_key => $linked_product) {401 foreach ($simpler_item->get_bundled() as $simpler_bundled_item){402 if ($simpler_bundled_item['product_id'] == $linked_product['id']){403 $ids[] = $simpler_bundled_item['product_id'] .'/'.$linked_key.'/'.$simpler_bundled_item['quantity'];435 $linked_products = $WPCleverWoobt->get_product_items($main_product_id); 436 foreach ($linked_products as $linked_key => $linked_product) { 437 foreach ($simpler_item->get_bundled() as $simpler_bundled_item) { 438 if ($simpler_bundled_item['product_id'] == $linked_product['id']) { 439 $ids[] = $simpler_bundled_item['product_id'] . '/' . $linked_key . '/' . $simpler_bundled_item['quantity']; 404 440 } 405 441 } 406 442 } 407 $main_product_metadata['woobt_ids'] =implode(',',$ids);443 $main_product_metadata['woobt_ids'] = implode(',', $ids); 408 444 $WPCleverWoobt->add_to_cart( 409 $main_product_cart_key, 410 $main_product_id, 445 $main_product_cart_key, 446 $main_product_id, 411 447 $simpler_item->get_quantity(), 412 448 null, 413 $simpler_item->get_attributes_array(), 449 $simpler_item->get_attributes_array(), 414 450 $main_product_metadata 415 451 ); … … 419 455 return $value; 420 456 } 457 421 458 add_filter('simplerwc_add_simpler_bundle_to_cart', 'simplerwc_compat_woobt_add_simpler_bundle_to_cart', 10, 2); 422 459 423 function simplerwc_compat_woobt_get_product_type_of_the_bundle($value,$bundle_type) 424 { 425 return $value; 426 } 460 function simplerwc_compat_woobt_get_product_type_of_the_bundle($value, $bundle_type) 461 { 462 return $value; 463 } 464 427 465 add_filter('simplerwc_get_product_type_of_the_bundle', 'simplerwc_compat_woobt_get_product_type_of_the_bundle', 10, 2); 428 466 429 function simplerwc_compat_woobt_get_bundle_type_of_the_product($value,$product) 430 { 431 if($value) return $value; 467 function simplerwc_compat_woobt_get_bundle_type_of_the_product($value, $product) 468 { 469 if ($value) 470 return $value; 432 471 $linked_products = get_post_meta($product->get_id(), 'woobt_ids', true); 433 if (!empty($linked_products)) return 'woobt'; 434 return $value; 435 } 472 if (!empty($linked_products)) 473 return 'woobt'; 474 return $value; 475 } 476 436 477 add_filter('simplerwc_get_bundle_type_of_the_product', 'simplerwc_compat_woobt_get_bundle_type_of_the_product', 10, 2); 437 438 439 478 440 479 // WC Linked products 441 480 function simplerwc_compat_woocommerce_cart_item_is_bundled($value, $cart_item) 442 481 { 443 if (array_key_exists('bundle_sell_of', $cart_item)) {482 if (array_key_exists('bundle_sell_of', $cart_item)) { 444 483 return true; 445 484 } 446 485 return $value; 447 486 } 487 448 488 add_filter('simplerwc_cart_item_is_bundled', 'simplerwc_compat_woocommerce_cart_item_is_bundled', 10, 2); 449 489 450 490 function simplerwc_compat_woocommerce_cart_item_is_bundle_container($value, $cart_item) 451 491 { 452 if (isset($cart_item['bundle_sells']) && !empty($cart_item['bundle_sells'])) {492 if (isset($cart_item['bundle_sells']) && !empty($cart_item['bundle_sells'])) { 453 493 return 'woocommerce'; 454 494 } 455 495 return $value; 456 496 } 497 457 498 add_filter('simplerwc_cart_item_is_bundle_container', 'simplerwc_compat_woocommerce_cart_item_is_bundle_container', 10, 2); 458 499 459 500 function simplerwc_compat_woocommerce_get_selected_cart_items_linked_to_the_bundle_cart_item($value, $cart, $cart_item, $bundle_type) 460 501 { 461 if($bundle_type!='woocommerce') return $value; 502 if ($bundle_type != 'woocommerce') 503 return $value; 462 504 463 505 $bundled_items = []; 464 $cross_sell_items = $cart_item[ "bundle_sells"] ?? [];506 $cross_sell_items = $cart_item['bundle_sells'] ?? []; 465 507 foreach ($cross_sell_items as $id) { 466 508 $bundled_items[] = $cart->get_cart_item($id); … … 468 510 return $bundled_items; 469 511 } 512 470 513 add_filter('simplerwc_get_selected_cart_items_linked_to_the_bundle_cart_item', 'simplerwc_compat_woocommerce_get_selected_cart_items_linked_to_the_bundle_cart_item', 10, 4); 471 514 … … 474 517 $linked_products = get_post_meta($product->get_id(), 'bundle_sells', true); 475 518 476 if (empty($linked_products)) return $value; 477 478 return $value; 479 } 519 if (empty($linked_products)) 520 return $value; 521 522 return $value; 523 } 524 480 525 add_filter('simplerwc_product_is_bundle_container', 'simplerwc_compat_woocommerce_product_is_bundle_container', 10, 2); 481 526 482 527 function simplerwc_compat_woocommerce_get_all_products_linked_to_the_bundle_product($value, $product, $bundle_type) 483 528 { 484 if($bundle_type!='woocommerce') return $value; 485 486 return $value; 487 } 529 if ($bundle_type != 'woocommerce') 530 return $value; 531 532 return $value; 533 } 534 488 535 add_filter('simplerwc_get_all_products_linked_to_the_bundle_product', 'simplerwc_compat_woocommerce_get_all_products_linked_to_the_bundle_product', 10, 3); 489 536 490 537 function simplerwc_compat_woocommerce_add_simpler_bundle_to_cart($value, $simpler_item) 491 538 { 492 if($simpler_item->get_bundle_type()!='woocommerce') return $value; 539 if ($simpler_item->get_bundle_type() != 'woocommerce') 540 return $value; 493 541 494 542 $main_product_cart_key = \WC()->cart->add_to_cart( … … 515 563 return $main_product_cart_key; 516 564 } 565 517 566 add_filter('simplerwc_add_simpler_bundle_to_cart', 'simplerwc_compat_woocommerce_add_simpler_bundle_to_cart', 10, 2); 518 567 519 function simplerwc_compat_woocommerce_get_product_type_of_the_bundle($value,$bundle_type) 520 { 521 return $value; 522 } 568 function simplerwc_compat_woocommerce_get_product_type_of_the_bundle($value, $bundle_type) 569 { 570 return $value; 571 } 572 523 573 add_filter('simplerwc_get_product_type_of_the_bundle', 'simplerwc_compat_woocommerce_get_product_type_of_the_bundle', 10, 2); 524 574 525 function simplerwc_compat_woocommerce_get_bundle_type_of_the_product($value,$product) 526 { 527 if($value) return $value; 528 return 'woocommerce'; 529 } 575 function simplerwc_compat_woocommerce_get_bundle_type_of_the_product($value, $product) 576 { 577 if ($value) 578 return $value; 579 return 'woocommerce'; 580 } 581 530 582 add_filter('simplerwc_get_bundle_type_of_the_product', 'simplerwc_compat_woocommerce_get_bundle_type_of_the_product', 11, 2); -
simpler-checkout/tags/1.1.7/includes/Compatibility/cod.php
r3272319 r3290493 6 6 use Simpler\Models\Quotation; 7 7 8 9 8 /** 10 9 * @param Quotation $quotation … … 13 12 * @return PaymentMethod[] 14 13 */ 15 function simplerwc_compat_wc_smart_cod_quote(array $paymentMethods, Quotation $quotation) {16 14 function simplerwc_compat_wc_smart_cod_quote(array $paymentMethods, Quotation $quotation) 15 { 17 16 $shippingMethod = $quotation->get_shipping_rate(); 18 17 19 if (!$shippingMethod) {18 if (!$shippingMethod) { 20 19 return $paymentMethods; 21 20 } 22 21 23 if(!defined('DOING_AJAX')) define('DOING_AJAX',true); 22 if (!defined('DOING_AJAX')) 23 define('DOING_AJAX', true); 24 24 $availablePaymentMethods = WC()->payment_gateways->get_available_payment_gateways(); 25 25 26 26 $codCost = 0; 27 if (isset($availablePaymentMethods['cod']) ) {28 if ($availablePaymentMethods['cod'] instanceof \WC_Smart_COD_Admin ) {27 if (isset($availablePaymentMethods['cod'])) { 28 if ($availablePaymentMethods['cod'] instanceof \WC_Smart_COD_Admin) { 29 29 $smartCod = new \WC_Smart_COD_Public('wc-smart-cod'); 30 30 $smartCod->init_wsc_settings(); 31 if (!$smartCod->has_cod_available()){31 if (!$smartCod->has_cod_available()) { 32 32 return $paymentMethods; 33 33 } 34 $codCost = $smartCod->apply_smart_cod_fees(WC()->cart, false);35 if (isset($availablePaymentMethods['cod']->settings['extra_fee_tax']) && $availablePaymentMethods['cod']->settings['extra_fee_tax'] =='enable') {36 $taxes = \wc_array_merge_recursive_numeric([], \WC_Tax::calc_tax($codCost, \WC_Tax::get_rates(''), false));34 $codCost = $smartCod->apply_smart_cod_fees(WC()->cart, false); 35 if (isset($availablePaymentMethods['cod']->settings['extra_fee_tax']) && $availablePaymentMethods['cod']->settings['extra_fee_tax'] == 'enable') { 36 $taxes = \wc_array_merge_recursive_numeric([], \WC_Tax::calc_tax($codCost, \WC_Tax::get_rates(''), false)); 37 37 if (!empty($taxes)) { 38 38 $codCost += array_sum($taxes); … … 58 58 add_filter('simplerwc_quotation_payment_method', 'simplerwc_compat_wc_smart_cod_quote', 10, 2); 59 59 60 61 60 /** 62 61 * @param Closure[] $closures … … 68 67 { 69 68 if ( 70 !($paymentMethod = $orderRequest->get_order()->get_payment_method()) 71 || $paymentMethod->getType() != PaymentMethod::COD72 ||!class_exists('Wc_Smart_Cod_Admin')69 !($paymentMethod = $orderRequest->get_order()->get_payment_method()) || 70 $paymentMethod->getType() != PaymentMethod::COD || 71 !class_exists('Wc_Smart_Cod_Admin') 73 72 ) { 74 73 return $closures; -
simpler-checkout/tags/1.1.7/includes/Compatibility/free-gifts.php
r3272319 r3290493 18 18 } 19 19 } 20 20 21 add_action('simplerwc_after_add_to_cart', 'simplerwc_fgf_after_add_to_cart'); 21 22 23 22 24 23 // iThemeland Free Gifts : https://ithemelandco.com/plugins/free-gifts-for-woocommerce/ … … 44 43 add_filter('simplerwc_button_should_ignore_cart_item', 'simplerwc_compat_ithemeland_free_gifts_ignore', 10, 2); 45 44 46 47 48 45 // BOGO https://woocommerce.com/products/buy-one-get-one-free/ 49 46 function simplerwc_compat_bogof_free_gifts_ignore($value, $cart_item) … … 54 51 return $value; 55 52 } 53 56 54 add_filter('simplerwc_button_should_ignore_cart_item', 'simplerwc_compat_bogof_free_gifts_ignore', 10, 2); 57 58 59 55 60 56 // Asana [WooCommerce Dynamic Pricing and Discounts] https://www.asanaplugins.com/product/woocommerce-dynamic-pricing-and-discounts-plugin/ … … 66 62 return $value; 67 63 } 64 68 65 add_filter('simplerwc_button_should_ignore_cart_item', 'simplerwc_compat_asana_wcdpd_free_gifts_ignore', 10, 2); 69 70 71 66 72 67 // Pricepep [WooCommerce Dynamic Pricing, Discounts & Fees] https://codecanyon.net/item/woocommerce-dynamic-pricing-discounts/7119279 … … 75 70 add_filter('rp_wcdpd_request_is_product_feed', '__return_true', 10, 0); 76 71 } 72 77 73 add_action('simplerwc_product_controller_request_before', 'simplerwc_rp_wcdpd_set_is_product_feed', 1, 0); -
simpler-checkout/tags/1.1.7/includes/Compatibility/gift-wrap.php
r3272319 r3290493 1 1 <?php 2 2 3 use Simpler\Models\Money;4 3 use Simpler\Models\GiftWrapAddon; 5 4 use Simpler\Models\GiftWrapOption; 5 use Simpler\Models\Money; 6 6 7 7 // Gift Wrapping for WooCommerce https://wordpress.com/plugins/gift-wrapping-for-woocommerce 8 8 function simplerwc_compat_quote_tgpc_gift_wrapping_for_woocommerce($value, $quotation) 9 9 { 10 if ( ! class_exists( 'Tgpc_Wc_Gift_Wrap' )) {10 if (!class_exists('Tgpc_Wc_Gift_Wrap')) { 11 11 return $value; 12 12 } 13 13 14 if ( get_option( 'tgpc_gift_wrapper_enabled' ) !== 'yes' ){14 if (get_option('tgpc_gift_wrapper_enabled') !== 'yes') { 15 15 return $value; 16 16 } 17 17 $giftWrapAddon = new GiftWrapAddon(); 18 $giftWrapOption = new GiftWrapOption( "1");18 $giftWrapOption = new GiftWrapOption('1'); 19 19 20 $fee_cost = (float) apply_filters( 'tgpc_wc_gift_wrapper_cost', get_option( 'tgpc_gift_wrapper_cost', 0 ));20 $fee_cost = (float) apply_filters('tgpc_wc_gift_wrapper_cost', get_option('tgpc_gift_wrapper_cost', 0)); 21 21 $tax_cost = 0; 22 22 $net_cost = $fee_cost; 23 24 $is_taxable = get_option( 'tgpc_gift_wrapper_cost_tax_status') === 'yes';25 $tax_class = get_option( 'tgpc_gift_wrapper_tax_class', '');23 24 $is_taxable = get_option('tgpc_gift_wrapper_cost_tax_status') === 'yes'; 25 $tax_class = get_option('tgpc_gift_wrapper_tax_class', ''); 26 26 if ($is_taxable) { 27 $taxes = \wc_array_merge_recursive_numeric([], \WC_Tax::calc_tax($fee_cost, $tax_class, false));27 $taxes = \wc_array_merge_recursive_numeric([], \WC_Tax::calc_tax($fee_cost, $tax_class, false)); 28 28 if (!empty($taxes)) { 29 29 $tax_cost = array_sum($taxes); … … 32 32 } 33 33 34 if ( $fee_cost) {34 if ($fee_cost) { 35 35 $giftWrapOption->setCosts( 36 Money::to_cents( $fee_cost),37 Money::to_cents( $net_cost),38 Money::to_cents( $tax_cost)36 Money::to_cents($fee_cost), 37 Money::to_cents($net_cost), 38 Money::to_cents($tax_cost) 39 39 ); 40 40 } 41 41 $giftWrapAddon->addOption($giftWrapOption); 42 $value[] =$giftWrapAddon;42 $value[] = $giftWrapAddon; 43 43 44 44 return $value; 45 45 } 46 46 47 add_filter('simplerwc_quotation_addons', 'simplerwc_compat_quote_tgpc_gift_wrapping_for_woocommerce', 10, 2); 47 48 48 49 49 function simplerwc_compat_submit_tgpc_gift_wrapping_for_woocommerce($closures, $order_request) 50 50 { 51 if ( ! class_exists( 'Tgpc_Wc_Gift_Wrap' )) {51 if (!class_exists('Tgpc_Wc_Gift_Wrap')) { 52 52 return $closures; 53 53 } 54 54 55 if ( get_option( 'tgpc_gift_wrapper_enabled' ) !== 'yes' ){55 if (get_option('tgpc_gift_wrapper_enabled') !== 'yes') { 56 56 return $closures; 57 57 } 58 58 59 59 $addons = $order_request->get_order()->get_addons(); 60 if ( empty($addons)) {60 if (empty($addons)) { 61 61 return $closures; 62 62 } 63 63 64 64 $giftWrapAddon = null; 65 foreach ( $addons as $a ){66 if ( $a['type'] == GiftWrapAddon::type() ){65 foreach ($addons as $a) { 66 if ($a['type'] == GiftWrapAddon::type()) { 67 67 $giftWrapAddon = GiftWrapAddon::from_json($a); 68 68 break; … … 70 70 } 71 71 72 if ( ! $giftWrapAddon ){72 if (!$giftWrapAddon) { 73 73 return $closures; 74 74 } 75 75 76 76 $closures[] = function () { 77 $tgpc_public = new Tgpc_Wc_Gift_Wrap_Public('Tgpc_Wc_Gift_Wrap', 'v1.0.0');77 $tgpc_public = new Tgpc_Wc_Gift_Wrap_Public('Tgpc_Wc_Gift_Wrap', 'v1.0.0'); 78 78 $_POST['tgpc_enable_checkout_gift_wrapper'] = true; 79 79 $tgpc_public->tgpc_add_gift_wrapper_fee(); … … 82 82 return $closures; 83 83 } 84 84 85 add_filter('simplerwc_order_fees', 'simplerwc_compat_submit_tgpc_gift_wrapping_for_woocommerce', 10, 2); -
simpler-checkout/tags/1.1.7/includes/Compatibility/pickup.php
r3272319 r3290493 13 13 function simplerwc_local_pickup_plus_after_set_checkout_data($order, $order_request) 14 14 { 15 $pickupId = $order_request->get_order()->get_shipping() ->get_pickup_location_id();15 $pickupId = $order_request->get_order()->get_shipping()?$order_request->get_order()->get_shipping()->get_pickup_location_id():null; 16 16 if (!$pickupId || !class_exists('WC_Local_Pickup_Plus')) { 17 17 return; … … 24 24 } 25 25 } 26 26 27 add_action('simplerwc_after_set_checkout_data', 'simplerwc_local_pickup_plus_after_set_checkout_data', 10, 2); 27 28 } 28 29 } 30 29 31 add_action('init', 'simplerwc_compat_wc_local_pickup_plus'); 30 32 31 32 33 //WC Pickup Store https://wordpress.org/plugins/wc-pickup-store 33 // WC Pickup Store https://wordpress.org/plugins/wc-pickup-store 34 34 function simplerwc_compat_wc_pickup_store_set_store_name($order, $request) 35 35 { … … 42 42 } 43 43 44 $location = $request->get_order()->get_shipping() ->get_pickup_location_id();44 $location = $request->get_order()->get_shipping()?$request->get_order()->get_shipping()->get_pickup_location_id():null; 45 45 if ($location) { 46 46 $order->add_meta_data('_shipping_pickup_stores', $location); 47 47 } 48 48 } 49 49 50 add_action('simplerwc_after_set_checkout_data', 'simplerwc_compat_wc_pickup_store_set_store_name', 10, 2); -
simpler-checkout/tags/1.1.7/includes/Http/Controllers/ProductController.php
r3209879 r3290493 171 171 $obj['attributes_data'] = $this->attributes($product); 172 172 } 173 $obj = apply_filters('simplerwc_products_to_response', $obj); 173 174 $data[] = $obj; 174 175 } -
simpler-checkout/tags/1.1.7/includes/Services/CartHelper.php
r3257191 r3290493 3 3 namespace Simpler\Services; 4 4 5 use Exception;6 5 use Simpler\Exceptions\{BaseException, InvalidProductException}; 7 6 use Simpler\Models\CartItem; 7 use Exception; 8 8 9 9 trait CartHelper 10 10 { 11 12 11 private function initialize_cart() 13 12 { … … 15 14 // This prevents updating an existing cart with the one given in the quotation request. 16 15 add_filter('woocommerce_persistent_cart_enabled', '__return_false'); 17 WC()->cart = new \WC_Cart();18 WC()->session = new \WC_Session_Handler();16 WC()->cart = new \WC_Cart(); 17 WC()->session = new \WC_Session_Handler(); 19 18 WC()->cart->get_cart_from_session(); 20 19 } … … 25 24 private function add_item_to_cart(CartItem $item) 26 25 { 26 do_action('simplerwc_before_add_to_cart', $item); 27 27 $productAdded = false; 28 if(!$item->get_bundle_type() && $item->has_bundled()){ 29 30 $bundle_type = apply_filters('simplerwc_get_bundle_type_of_the_product', null,\wc_get_product( $item->get_product_id())); 31 32 $item->set_bundle_type($bundle_type); 28 if (!$item->get_bundle_type() && $item->has_bundled()) { 29 $bundle_type = apply_filters('simplerwc_get_bundle_type_of_the_product', null, \wc_get_product($item->get_product_id())); 30 31 $item->set_bundle_type($bundle_type); 33 32 } 34 33 if ($item->get_bundle_type()) { … … 50 49 } 51 50 } 52 53 -
simpler-checkout/tags/1.1.7/includes/button.php
r3257191 r3290493 257 257 function simplerwc_get_cart_item_attributes($cart_item, $bundled_cart_items = null, $bundle_type = null) 258 258 { 259 $attrs = simplerwc_get_product_attributes($cart_item['data'], $bundle_type );259 $attrs = simplerwc_get_product_attributes($cart_item['data'], $bundle_type, $cart_item); 260 260 if (isset($cart_item['quantity'])) { 261 261 $attrs['quantity'] = $cart_item['quantity']; 262 262 } 263 if (is_a($cart_item['data'], 'WC_Product_Variation')) { 264 /*** @var \WC_Product_Variation $product */ 265 $attrs['attributes'] = array_key_exists('variation', $cart_item) ? $cart_item['variation'] : $product->get_variation_attributes(); 266 } 263 267 264 if (isset($bundled_cart_items) && count($bundled_cart_items) > 0) { 268 265 $attrs['bundled'] = array_values(array_map(function ($el) { … … 276 273 * @param \WC_Product $product The product to extract information from 277 274 */ 278 function simplerwc_get_product_attributes($product,$bundle_type = null )275 function simplerwc_get_product_attributes($product,$bundle_type = null, $cart_item = null) 279 276 { 280 277 $attrs = [ … … 286 283 'sold_individually' => $product->is_sold_individually(), 287 284 'purchasable' => $product->is_purchasable(), 288 'attributes' => apply_filters('simplerwc_button_get_product_attributes', [], $product )285 'attributes' => apply_filters('simplerwc_button_get_product_attributes', [], $product, $cart_item) 289 286 ]; 290 287 if (is_a($product, 'WC_Product_Variable')) { … … 295 292 } else if (is_a($product, 'WC_Product_Variation')) { 296 293 /** @var \WC_Product_Variation $product */ 297 $attrs['attributes'] = apply_filters('simplerwc_button_get_product_attributes', $product->get_variation_attributes(), $product );294 $attrs['attributes'] = apply_filters('simplerwc_button_get_product_attributes', $product->get_variation_attributes(), $product, $cart_item); 298 295 } 299 296 if($bundle_type){ -
simpler-checkout/tags/1.1.7/includes/compat.php
r3272319 r3290493 4 4 include_once('Compatibility/cod.php'); 5 5 include_once('Compatibility/free-gifts.php'); 6 include_once('Compatibility/gift-cards.php'); 6 7 include_once('Compatibility/gift-wrap.php'); 7 8 include_once('Compatibility/pickup.php'); -
simpler-checkout/tags/1.1.7/includes/constants.php
r3272319 r3290493 1 1 <?php 2 2 3 const SIMPLERWC_VERSION = '1.1. 6';3 const SIMPLERWC_VERSION = '1.1.7'; 4 4 5 5 function simplerwc_get_sdk_uri() -
simpler-checkout/tags/1.1.7/includes/takeover.php
r3239474 r3290493 55 55 } 56 56 57 $products = $cart->get_cart ();57 $products = $cart->get_cart_contents(); 58 58 $products_array = []; 59 59 60 60 foreach ($products as $cart_item) { 61 $product = $cart_item['data']; 61 62 $product_data = [ 62 'id' => (string)$ cart_item['product_id'],63 'id' => (string)$product->get_id(), 63 64 'qty' => (string)$cart_item['quantity'], 64 65 ]; 65 66 if (!empty($cart_item['variation'])) { 66 67 $attrs = new stdClass(); 67 foreach ($cart_item['variation'] as $attribute => $value) { 68 $p_attrs = apply_filters('simplerwc_button_get_product_attributes', $product->get_variation_attributes(), $product, $cart_item); 69 foreach ($p_attrs as $attribute => $value) { 68 70 $attrs->{$attribute} = (string)$value; 69 71 } -
simpler-checkout/tags/1.1.7/simpler.php
r3272319 r3290493 8 8 * Description: Simpler Checkout lets your customers complete their purchases in seconds, with any payment method they want, in any device or browser and without a password. 9 9 * Tags: woocommerce, checkout, payments, conversion rate 10 * Version: 1.1. 610 * Version: 1.1.7 11 11 * Requires at least: 5.1 12 * Tested up to: 6. 3.112 * Tested up to: 6.8.1 13 13 * Requires PHP: 7.0 14 14 * License: GPLv3 -
simpler-checkout/tags/1.1.7/vendor/autoload.php
r3272319 r3290493 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit c151c635e566471924c6a51e32d8b1e3::getLoader();7 return ComposerAutoloaderInitefc042c3b3729108c3bc76726cf4af6b::getLoader(); -
simpler-checkout/tags/1.1.7/vendor/composer/autoload_real.php
r3272319 r3290493 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit c151c635e566471924c6a51e32d8b1e35 class ComposerAutoloaderInitefc042c3b3729108c3bc76726cf4af6b 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit c151c635e566471924c6a51e32d8b1e3', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInitefc042c3b3729108c3bc76726cf4af6b', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); 29 spl_autoload_unregister(array('ComposerAutoloaderInit c151c635e566471924c6a51e32d8b1e3', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInitefc042c3b3729108c3bc76726cf4af6b', 'loadClassLoader')); 30 30 31 31 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 33 33 require __DIR__ . '/autoload_static.php'; 34 34 35 call_user_func(\Composer\Autoload\ComposerStaticInit c151c635e566471924c6a51e32d8b1e3::getInitializer($loader));35 call_user_func(\Composer\Autoload\ComposerStaticInitefc042c3b3729108c3bc76726cf4af6b::getInitializer($loader)); 36 36 } else { 37 37 $map = require __DIR__ . '/autoload_namespaces.php'; -
simpler-checkout/tags/1.1.7/vendor/composer/autoload_static.php
r3272319 r3290493 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit c151c635e566471924c6a51e32d8b1e37 class ComposerStaticInitefc042c3b3729108c3bc76726cf4af6b 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 89 89 { 90 90 return \Closure::bind(function () use ($loader) { 91 $loader->prefixLengthsPsr4 = ComposerStaticInit c151c635e566471924c6a51e32d8b1e3::$prefixLengthsPsr4;92 $loader->prefixDirsPsr4 = ComposerStaticInit c151c635e566471924c6a51e32d8b1e3::$prefixDirsPsr4;93 $loader->classMap = ComposerStaticInit c151c635e566471924c6a51e32d8b1e3::$classMap;91 $loader->prefixLengthsPsr4 = ComposerStaticInitefc042c3b3729108c3bc76726cf4af6b::$prefixLengthsPsr4; 92 $loader->prefixDirsPsr4 = ComposerStaticInitefc042c3b3729108c3bc76726cf4af6b::$prefixDirsPsr4; 93 $loader->classMap = ComposerStaticInitefc042c3b3729108c3bc76726cf4af6b::$classMap; 94 94 95 95 }, null, ClassLoader::class); -
simpler-checkout/tags/1.1.7/vendor/composer/installed.php
r3272319 r3290493 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => '1.1. 6',4 'version' => '1.1. 6.0',3 'pretty_version' => '1.1.7', 4 'version' => '1.1.7.0', 5 5 'type' => 'wordpress-plugin', 6 6 'install_path' => __DIR__ . '/../../', 7 7 'aliases' => array(), 8 'reference' => ' 6abeec6ddab3c1396ae34fdae5700fc18085a09b',8 'reference' => 'd9107f5b5c2f0d7f288673fc5289e91e3f020004', 9 9 'name' => 'simpler-checkout/woo', 10 10 'dev' => false, … … 12 12 'versions' => array( 13 13 'simpler-checkout/woo' => array( 14 'pretty_version' => '1.1. 6',15 'version' => '1.1. 6.0',14 'pretty_version' => '1.1.7', 15 'version' => '1.1.7.0', 16 16 'type' => 'wordpress-plugin', 17 17 'install_path' => __DIR__ . '/../../', 18 18 'aliases' => array(), 19 'reference' => ' 6abeec6ddab3c1396ae34fdae5700fc18085a09b',19 'reference' => 'd9107f5b5c2f0d7f288673fc5289e91e3f020004', 20 20 'dev_requirement' => false, 21 21 ), -
simpler-checkout/trunk/README.txt
r3272319 r3290493 5 5 Tested up to: 6.5 6 6 Requires PHP: 7.0 7 Stable tag: 1.1. 67 Stable tag: 1.1.7 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 35 35 36 36 == Changelog == 37 38 == 1.1.7 39 Compat: [pw woocommerce gift cards] (https://wordpress.org/plugins/pw-woocommerce-gift-cards/) 37 40 38 41 == 1.1.6 -
simpler-checkout/trunk/includes/Compatibility/bundles.php
r3272319 r3290493 9 9 return $value; 10 10 } 11 11 12 add_filter('simplerwc_cart_item_is_bundled', 'simplerwc_compat_wc_pb_cart_item_is_bundled', 10, 2); 12 13 … … 18 19 return $value; 19 20 } 21 20 22 add_filter('simplerwc_cart_item_is_bundle_container', 'simplerwc_compat_wc_pb_cart_item_is_bundle_container', 10, 2); 21 23 22 24 function simplerwc_compat_wc_pb_get_selected_cart_items_linked_to_the_bundle_cart_item($value, $cart, $cart_item, $bundle_type) 23 25 { 24 if($bundle_type!='wc_pb') return $value; 25 26 if (function_exists('wc_pb_get_bundled_cart_items') ){ 26 if ($bundle_type != 'wc_pb') 27 return $value; 28 29 if (function_exists('wc_pb_get_bundled_cart_items')) { 27 30 $bundled_items = \wc_pb_get_bundled_cart_items($cart_item); 28 31 foreach ($bundled_items as $idx => $item) { … … 34 37 return $value; 35 38 } 39 36 40 add_filter('simplerwc_get_selected_cart_items_linked_to_the_bundle_cart_item', 'simplerwc_compat_wc_pb_get_selected_cart_items_linked_to_the_bundle_cart_item', 10, 4); 37 41 … … 43 47 return $value; 44 48 } 49 45 50 add_filter('simplerwc_product_is_bundle_container', 'simplerwc_compat_wc_pb_product_is_bundle_container', 10, 2); 46 51 47 52 function simplerwc_compat_wc_pb_get_all_products_linked_to_the_bundle_product($value, $product, $bundle_type) 48 53 { 49 if($bundle_type!='wc_pb') return $value; 54 if ($bundle_type != 'wc_pb') 55 return $value; 50 56 51 57 if (is_a($product, 'WC_Product_Bundle') && class_exists('WC_PB_DB')) { … … 65 71 return $value; 66 72 } 73 67 74 add_filter('simplerwc_get_all_products_linked_to_the_bundle_product', 'simplerwc_compat_wc_pb_get_all_products_linked_to_the_bundle_product', 10, 3); 68 75 69 76 function simplerwc_compat_wc_pb_add_simpler_bundle_to_cart($value, $simpler_item) 70 77 { 71 if($simpler_item->get_bundle_type()!='wc_pb') return $value; 72 73 if (!class_exists('WC_PB_DB')) return $value; 78 if ($simpler_item->get_bundle_type() != 'wc_pb') 79 return $value; 80 81 if (!class_exists('WC_PB_DB')) 82 return $value; 74 83 75 84 // the final bundle configuration to be added to cart … … 78 87 // get bundle configurations 79 88 $bundled = \WC_PB_DB::query_bundled_items(array( 80 'return' => 'id=>product_id',89 'return' => 'id=>product_id', 81 90 'bundle_id' => array($simpler_item->get_product_id()) 82 91 )); … … 125 134 ); 126 135 } 136 127 137 function simplerwc_compat_wc_pb_construct_variation_configuration($bundle, $product) 128 138 { … … 138 148 return $c; 139 149 } 150 140 151 add_filter('simplerwc_add_simpler_bundle_to_cart', 'simplerwc_compat_wc_pb_add_simpler_bundle_to_cart', 10, 2); 141 152 142 function simplerwc_compat_wc_pb_get_product_type_of_the_bundle($value,$bundle_type) 143 { 144 if($bundle_type=='wc_pb') return 'bundle'; 145 return $value; 146 } 153 function simplerwc_compat_wc_pb_get_product_type_of_the_bundle($value, $bundle_type) 154 { 155 if ($bundle_type == 'wc_pb') 156 return 'bundle'; 157 return $value; 158 } 159 147 160 add_filter('simplerwc_get_product_type_of_the_bundle', 'simplerwc_compat_wc_pb_get_product_type_of_the_bundle', 10, 2); 148 161 149 function simplerwc_compat_wc_pb_get_bundle_type_of_the_product($value,$product) 150 { 151 if($value) return $value; 162 function simplerwc_compat_wc_pb_get_bundle_type_of_the_product($value, $product) 163 { 164 if ($value) 165 return $value; 152 166 if (is_a($product, 'WC_Product_Bundle') && class_exists('WC_PB_DB')) { 153 167 return 'wc_pb'; … … 155 169 return $value; 156 170 } 171 157 172 add_filter('simplerwc_get_bundle_type_of_the_product', 'simplerwc_compat_wc_pb_get_bundle_type_of_the_product', 10, 2); 158 159 160 173 161 174 // WPC Smart Bundles 162 175 function simplerwc_compat_woosb_cart_item_is_bundled($value, $cart_item) 163 176 { 164 if (array_key_exists('woosb_parent_id', $cart_item)) {177 if (array_key_exists('woosb_parent_id', $cart_item)) { 165 178 return true; 166 179 } 167 180 return $value; 168 181 } 182 169 183 add_filter('simplerwc_cart_item_is_bundled', 'simplerwc_compat_woosb_cart_item_is_bundled', 10, 2); 170 184 171 185 function simplerwc_compat_woosb_cart_item_is_bundle_container($value, $cart_item) 172 186 { 173 if (isset($cart_item['woosb_ids']) && !empty($cart_item['woosb_ids'])) {187 if (isset($cart_item['woosb_ids']) && !empty($cart_item['woosb_ids'])) { 174 188 return 'woosb'; 175 189 } 176 190 return $value; 177 191 } 192 178 193 add_filter('simplerwc_cart_item_is_bundle_container', 'simplerwc_compat_woosb_cart_item_is_bundle_container', 10, 2); 179 194 180 195 function simplerwc_compat_woosb_get_selected_cart_items_linked_to_the_bundle_cart_item($value, $cart, $cart_item, $bundle_type) 181 196 { 182 if($bundle_type!='woosb') return $value; 197 if ($bundle_type != 'woosb') 198 return $value; 183 199 184 200 $bundled_items = []; 185 201 $bundle_ids = explode(',', $cart_item['woosb_ids']); 186 202 187 203 foreach ($bundle_ids as $id) { 188 204 foreach ($cart->get_cart_contents() as $item) { … … 195 211 return $bundled_items; 196 212 } 213 197 214 add_filter('simplerwc_get_selected_cart_items_linked_to_the_bundle_cart_item', 'simplerwc_compat_woosb_get_selected_cart_items_linked_to_the_bundle_cart_item', 10, 4); 198 215 199 216 function simplerwc_compat_woosb_product_is_bundle_container($value, $product) 200 217 { 201 if (is_a( $product, 'WC_Product_Woosb')) {218 if (is_a($product, 'WC_Product_Woosb')) { 202 219 return 'woosb'; 203 220 } 204 221 return $value; 205 222 } 223 206 224 add_filter('simplerwc_product_is_bundle_container', 'simplerwc_compat_woosb_product_is_bundle_container', 10, 2); 207 225 208 226 function simplerwc_compat_woosb_get_all_products_linked_to_the_bundle_product($value, $product, $bundle_type) 209 227 { 210 if($bundle_type!='woosb') return $value; 211 212 if (is_a( $product, 'WC_Product_Woosb' )) { 228 if ($bundle_type != 'woosb') 229 return $value; 230 231 if (is_a($product, 'WC_Product_Woosb')) { 213 232 $bundle_items = $product->get_meta('woosb_ids'); 214 233 if (is_array($bundle_items)) { … … 226 245 return $value; 227 246 } 247 228 248 add_filter('simplerwc_get_all_products_linked_to_the_bundle_product', 'simplerwc_compat_woosb_get_all_products_linked_to_the_bundle_product', 10, 3); 229 249 230 250 function simplerwc_compat_woosb_add_simpler_bundle_to_cart($value, $simpler_item) 231 251 { 232 if($simpler_item->get_bundle_type()!='woosb') return $value; 233 234 if (!class_exists('WPCleverWoosb')) return $value; 252 if ($simpler_item->get_bundle_type() != 'woosb') 253 return $value; 254 255 if (!class_exists('WPCleverWoosb')) 256 return $value; 235 257 236 258 $WPCleverWoosb = new \WPCleverWoosb; 237 259 $cart_data = apply_filters('simplerwc_get_cart_item_data', [], $simpler_item); 238 239 $product_id = $simpler_item->get_product_id(); 240 $quantity = $simpler_item->get_quantity(); 241 $variation_id = NULL; 242 $variation = $simpler_item->get_attributes_array(); 243 244 $cart_item_data = $WPCleverWoosb->add_cart_item_data($cart_data, $product_id);245 if (isset($cart_item_data['woosb_ids'])){260 261 $product_id = $simpler_item->get_product_id(); 262 $quantity = $simpler_item->get_quantity(); 263 $variation_id = NULL; 264 $variation = $simpler_item->get_attributes_array(); 265 266 $cart_item_data = $WPCleverWoosb->add_cart_item_data($cart_data, $product_id); 267 if (isset($cart_item_data['woosb_ids'])) { 246 268 $new_woosb_ids = []; 247 $woosb_ids = explode(',', $cart_item_data['woosb_ids']);248 foreach ($woosb_ids as $woosb_id){249 list($pid, $pkey,$pqty) = explode('/',$woosb_id);250 foreach ($simpler_item->get_bundled() as $b_item){251 if ($pid == $b_item['product_id']){269 $woosb_ids = explode(',', $cart_item_data['woosb_ids']); 270 foreach ($woosb_ids as $woosb_id) { 271 list($pid, $pkey, $pqty) = explode('/', $woosb_id); 272 foreach ($simpler_item->get_bundled() as $b_item) { 273 if ($pid == $b_item['product_id']) { 252 274 $pqty = $b_item['quantity']; 253 $new_woosb_id = implode('/', [$pid,$pkey,$pqty]);254 $new_woosb_ids[] =$new_woosb_id;275 $new_woosb_id = implode('/', [$pid, $pkey, $pqty]); 276 $new_woosb_ids[] = $new_woosb_id; 255 277 } 256 278 } 257 279 } 258 $cart_item_data['woosb_ids'] = implode(',', $new_woosb_ids);280 $cart_item_data['woosb_ids'] = implode(',', $new_woosb_ids); 259 281 } 260 282 261 283 $cart_item_key = WC()->cart->add_to_cart( 262 $product_id, 263 $quantity, 264 $variation_id, 265 $variation, 266 $cart_item_data 284 $product_id, 285 $quantity, 286 $variation_id, 287 $variation, 288 $cart_item_data 267 289 ); 268 269 $WPCleverWoosb->add_to_cart($cart_item_key, $product_id, $quantity, null,[],$cart_item_data);290 291 $WPCleverWoosb->add_to_cart($cart_item_key, $product_id, $quantity, null, [], $cart_item_data); 270 292 return $cart_item_key; 271 293 } 294 272 295 add_filter('simplerwc_add_simpler_bundle_to_cart', 'simplerwc_compat_woosb_add_simpler_bundle_to_cart', 10, 2); 273 296 274 297 function simplerwc_compat_woosb_before_create_quoted_product($lineItem) 275 298 { 276 if (isset($lineItem['woosb_price'])){299 if (isset($lineItem['woosb_price'])) { 277 300 $lineItem['line_total'] = $lineItem['woosb_price']; 278 301 $lineItem['line_subtotal'] = $lineItem['woosb_price']; 279 302 } 280 if (isset($lineItem['woosb_parent_id'])){303 if (isset($lineItem['woosb_parent_id'])) { 281 304 $lineItem['line_total'] = 0; 282 305 $lineItem['line_subtotal'] = 0; … … 284 307 return $lineItem; 285 308 } 309 286 310 add_filter('simplerwc_before_create_quoted_product', 'simplerwc_compat_woosb_before_create_quoted_product', 10, 1); 287 311 288 function simplerwc_compat_woosb_get_product_type_of_the_bundle($value,$bundle_type) 289 { 290 if($bundle_type=='woosb') return 'bundle'; 291 return $value; 292 } 312 function simplerwc_compat_woosb_get_product_type_of_the_bundle($value, $bundle_type) 313 { 314 if ($bundle_type == 'woosb') 315 return 'bundle'; 316 return $value; 317 } 318 293 319 add_filter('simplerwc_get_product_type_of_the_bundle', 'simplerwc_compat_woosb_get_product_type_of_the_bundle', 10, 2); 294 320 295 function simplerwc_compat_woosb_get_bundle_type_of_the_product($value,$product) 296 { 297 if($value) return $value; 298 if (is_a( $product, 'WC_Product_Woosb' )) { 321 function simplerwc_compat_woosb_get_bundle_type_of_the_product($value, $product) 322 { 323 if ($value) 324 return $value; 325 if (is_a($product, 'WC_Product_Woosb')) { 299 326 return 'woosb'; 300 327 } 301 328 return $value; 302 329 } 330 303 331 add_filter('simplerwc_get_bundle_type_of_the_product', 'simplerwc_compat_woosb_get_bundle_type_of_the_product', 10, 2); 304 305 306 332 307 333 // WPC Frequently Brought Together 308 334 function simplerwc_compat_woobt_cart_item_is_bundled($value, $cart_item) 309 335 { 310 if (array_key_exists('woobt_parent_id', $cart_item)) {336 if (array_key_exists('woobt_parent_id', $cart_item)) { 311 337 return true; 312 338 } 313 339 return $value; 314 340 } 341 315 342 add_filter('simplerwc_cart_item_is_bundled', 'simplerwc_compat_woobt_cart_item_is_bundled', 10, 2); 316 343 317 344 function simplerwc_compat_woobt_cart_item_is_bundle_container($value, $cart_item) 318 345 { 319 if (isset($cart_item['woobt_ids']) && !empty($cart_item['woobt_ids'])) {346 if (isset($cart_item['woobt_ids']) && !empty($cart_item['woobt_ids'])) { 320 347 return 'woobt'; 321 348 } 322 349 return $value; 323 350 } 351 324 352 add_filter('simplerwc_cart_item_is_bundle_container', 'simplerwc_compat_woobt_cart_item_is_bundle_container', 10, 2); 325 353 326 354 function simplerwc_compat_woobt_get_selected_cart_items_linked_to_the_bundle_cart_item($value, $cart, $cart_item, $bundle_type) 327 355 { 328 if($bundle_type!='woobt') return $value; 356 if ($bundle_type != 'woobt') 357 return $value; 329 358 330 359 $bundled_items = []; 331 360 $bundle_ids = explode(',', $cart_item['woobt_ids']); 332 361 333 362 foreach ($bundle_ids as $bundle_line) { 334 list($id, $code,$qty) = explode('/',$bundle_line);363 list($id, $code, $qty) = explode('/', $bundle_line); 335 364 foreach ($cart->get_cart_contents() as $item) { 336 if ($item['product_id'] == $id && isset($item['woobt_parent_id']) && $item['woobt_parent_id'] ==$cart_item['product_id']) {365 if ($item['product_id'] == $id && isset($item['woobt_parent_id']) && $item['woobt_parent_id'] == $cart_item['product_id']) { 337 366 $bundled_items[] = $item; 338 367 break; … … 342 371 return $bundled_items; 343 372 } 373 344 374 add_filter('simplerwc_get_selected_cart_items_linked_to_the_bundle_cart_item', 'simplerwc_compat_woobt_get_selected_cart_items_linked_to_the_bundle_cart_item', 10, 4); 345 375 … … 348 378 $linked_products = get_post_meta($product->get_id(), 'woobt_ids', true); 349 379 350 if (empty($linked_products)) return $value; 351 380 if (empty($linked_products)) 381 return $value; 382 352 383 return 'woobt'; 353 384 } 385 354 386 add_filter('simplerwc_product_is_bundle_container', 'simplerwc_compat_woobt_product_is_bundle_container', 10, 2); 355 387 356 388 function simplerwc_compat_woobt_get_all_products_linked_to_the_bundle_product($value, $product, $bundle_type) 357 389 { 358 if($bundle_type!='woobt') return $value; 390 if ($bundle_type != 'woobt') 391 return $value; 359 392 360 393 $linked_products = get_post_meta($product->get_id(), 'woobt_ids', true); 361 394 362 if (empty($linked_products)) return $value; 395 if (empty($linked_products)) 396 return $value; 363 397 364 398 $linked_products = maybe_unserialize($linked_products); 365 399 366 400 foreach ($linked_products as $key => $item) { 367 401 if (isset($item['id'])) { 368 402 $product = wc_get_product($item['id']); 369 403 if ($product) { 370 $value[]=$product; 371 } 372 } 373 } 374 return $value; 375 } 404 $value[] = $product; 405 } 406 } 407 } 408 return $value; 409 } 410 376 411 add_filter('simplerwc_get_all_products_linked_to_the_bundle_product', 'simplerwc_compat_woobt_get_all_products_linked_to_the_bundle_product', 10, 3); 377 412 378 413 function simplerwc_compat_woobt_add_simpler_bundle_to_cart($value, $simpler_item) 379 414 { 380 if($simpler_item->get_bundle_type()!='woobt') return $value; 415 if ($simpler_item->get_bundle_type() != 'woobt') 416 return $value; 381 417 382 418 $main_product_metadata = apply_filters('simplerwc_get_cart_item_data', [], $simpler_item); 383 384 $main_product_id = $simpler_item->get_product_id(); 419 420 $main_product_id = $simpler_item->get_product_id(); 385 421 $main_product_cart_key = WC()->cart->add_to_cart( 386 $main_product_id, 387 $simpler_item->get_quantity(), 388 null, 389 $simpler_item->get_attributes_array(), 422 $main_product_id, 423 $simpler_item->get_quantity(), 424 null, 425 $simpler_item->get_attributes_array(), 390 426 $main_product_metadata 391 427 ); 392 428 $value = $main_product_cart_key; 393 429 394 430 if (class_exists('WPCleverWoobt')) { 395 431 $WPCleverWoobt = new \WPCleverWoobt; … … 397 433 $main_product_metadata['woobt_ids'] = ''; 398 434 $ids = []; 399 $linked_products = $WPCleverWoobt->get_product_items( $main_product_id);400 foreach ($linked_products as $linked_key => $linked_product) {401 foreach ($simpler_item->get_bundled() as $simpler_bundled_item){402 if ($simpler_bundled_item['product_id'] == $linked_product['id']){403 $ids[] = $simpler_bundled_item['product_id'] .'/'.$linked_key.'/'.$simpler_bundled_item['quantity'];435 $linked_products = $WPCleverWoobt->get_product_items($main_product_id); 436 foreach ($linked_products as $linked_key => $linked_product) { 437 foreach ($simpler_item->get_bundled() as $simpler_bundled_item) { 438 if ($simpler_bundled_item['product_id'] == $linked_product['id']) { 439 $ids[] = $simpler_bundled_item['product_id'] . '/' . $linked_key . '/' . $simpler_bundled_item['quantity']; 404 440 } 405 441 } 406 442 } 407 $main_product_metadata['woobt_ids'] =implode(',',$ids);443 $main_product_metadata['woobt_ids'] = implode(',', $ids); 408 444 $WPCleverWoobt->add_to_cart( 409 $main_product_cart_key, 410 $main_product_id, 445 $main_product_cart_key, 446 $main_product_id, 411 447 $simpler_item->get_quantity(), 412 448 null, 413 $simpler_item->get_attributes_array(), 449 $simpler_item->get_attributes_array(), 414 450 $main_product_metadata 415 451 ); … … 419 455 return $value; 420 456 } 457 421 458 add_filter('simplerwc_add_simpler_bundle_to_cart', 'simplerwc_compat_woobt_add_simpler_bundle_to_cart', 10, 2); 422 459 423 function simplerwc_compat_woobt_get_product_type_of_the_bundle($value,$bundle_type) 424 { 425 return $value; 426 } 460 function simplerwc_compat_woobt_get_product_type_of_the_bundle($value, $bundle_type) 461 { 462 return $value; 463 } 464 427 465 add_filter('simplerwc_get_product_type_of_the_bundle', 'simplerwc_compat_woobt_get_product_type_of_the_bundle', 10, 2); 428 466 429 function simplerwc_compat_woobt_get_bundle_type_of_the_product($value,$product) 430 { 431 if($value) return $value; 467 function simplerwc_compat_woobt_get_bundle_type_of_the_product($value, $product) 468 { 469 if ($value) 470 return $value; 432 471 $linked_products = get_post_meta($product->get_id(), 'woobt_ids', true); 433 if (!empty($linked_products)) return 'woobt'; 434 return $value; 435 } 472 if (!empty($linked_products)) 473 return 'woobt'; 474 return $value; 475 } 476 436 477 add_filter('simplerwc_get_bundle_type_of_the_product', 'simplerwc_compat_woobt_get_bundle_type_of_the_product', 10, 2); 437 438 439 478 440 479 // WC Linked products 441 480 function simplerwc_compat_woocommerce_cart_item_is_bundled($value, $cart_item) 442 481 { 443 if (array_key_exists('bundle_sell_of', $cart_item)) {482 if (array_key_exists('bundle_sell_of', $cart_item)) { 444 483 return true; 445 484 } 446 485 return $value; 447 486 } 487 448 488 add_filter('simplerwc_cart_item_is_bundled', 'simplerwc_compat_woocommerce_cart_item_is_bundled', 10, 2); 449 489 450 490 function simplerwc_compat_woocommerce_cart_item_is_bundle_container($value, $cart_item) 451 491 { 452 if (isset($cart_item['bundle_sells']) && !empty($cart_item['bundle_sells'])) {492 if (isset($cart_item['bundle_sells']) && !empty($cart_item['bundle_sells'])) { 453 493 return 'woocommerce'; 454 494 } 455 495 return $value; 456 496 } 497 457 498 add_filter('simplerwc_cart_item_is_bundle_container', 'simplerwc_compat_woocommerce_cart_item_is_bundle_container', 10, 2); 458 499 459 500 function simplerwc_compat_woocommerce_get_selected_cart_items_linked_to_the_bundle_cart_item($value, $cart, $cart_item, $bundle_type) 460 501 { 461 if($bundle_type!='woocommerce') return $value; 502 if ($bundle_type != 'woocommerce') 503 return $value; 462 504 463 505 $bundled_items = []; 464 $cross_sell_items = $cart_item[ "bundle_sells"] ?? [];506 $cross_sell_items = $cart_item['bundle_sells'] ?? []; 465 507 foreach ($cross_sell_items as $id) { 466 508 $bundled_items[] = $cart->get_cart_item($id); … … 468 510 return $bundled_items; 469 511 } 512 470 513 add_filter('simplerwc_get_selected_cart_items_linked_to_the_bundle_cart_item', 'simplerwc_compat_woocommerce_get_selected_cart_items_linked_to_the_bundle_cart_item', 10, 4); 471 514 … … 474 517 $linked_products = get_post_meta($product->get_id(), 'bundle_sells', true); 475 518 476 if (empty($linked_products)) return $value; 477 478 return $value; 479 } 519 if (empty($linked_products)) 520 return $value; 521 522 return $value; 523 } 524 480 525 add_filter('simplerwc_product_is_bundle_container', 'simplerwc_compat_woocommerce_product_is_bundle_container', 10, 2); 481 526 482 527 function simplerwc_compat_woocommerce_get_all_products_linked_to_the_bundle_product($value, $product, $bundle_type) 483 528 { 484 if($bundle_type!='woocommerce') return $value; 485 486 return $value; 487 } 529 if ($bundle_type != 'woocommerce') 530 return $value; 531 532 return $value; 533 } 534 488 535 add_filter('simplerwc_get_all_products_linked_to_the_bundle_product', 'simplerwc_compat_woocommerce_get_all_products_linked_to_the_bundle_product', 10, 3); 489 536 490 537 function simplerwc_compat_woocommerce_add_simpler_bundle_to_cart($value, $simpler_item) 491 538 { 492 if($simpler_item->get_bundle_type()!='woocommerce') return $value; 539 if ($simpler_item->get_bundle_type() != 'woocommerce') 540 return $value; 493 541 494 542 $main_product_cart_key = \WC()->cart->add_to_cart( … … 515 563 return $main_product_cart_key; 516 564 } 565 517 566 add_filter('simplerwc_add_simpler_bundle_to_cart', 'simplerwc_compat_woocommerce_add_simpler_bundle_to_cart', 10, 2); 518 567 519 function simplerwc_compat_woocommerce_get_product_type_of_the_bundle($value,$bundle_type) 520 { 521 return $value; 522 } 568 function simplerwc_compat_woocommerce_get_product_type_of_the_bundle($value, $bundle_type) 569 { 570 return $value; 571 } 572 523 573 add_filter('simplerwc_get_product_type_of_the_bundle', 'simplerwc_compat_woocommerce_get_product_type_of_the_bundle', 10, 2); 524 574 525 function simplerwc_compat_woocommerce_get_bundle_type_of_the_product($value,$product) 526 { 527 if($value) return $value; 528 return 'woocommerce'; 529 } 575 function simplerwc_compat_woocommerce_get_bundle_type_of_the_product($value, $product) 576 { 577 if ($value) 578 return $value; 579 return 'woocommerce'; 580 } 581 530 582 add_filter('simplerwc_get_bundle_type_of_the_product', 'simplerwc_compat_woocommerce_get_bundle_type_of_the_product', 11, 2); -
simpler-checkout/trunk/includes/Compatibility/cod.php
r3272319 r3290493 6 6 use Simpler\Models\Quotation; 7 7 8 9 8 /** 10 9 * @param Quotation $quotation … … 13 12 * @return PaymentMethod[] 14 13 */ 15 function simplerwc_compat_wc_smart_cod_quote(array $paymentMethods, Quotation $quotation) {16 14 function simplerwc_compat_wc_smart_cod_quote(array $paymentMethods, Quotation $quotation) 15 { 17 16 $shippingMethod = $quotation->get_shipping_rate(); 18 17 19 if (!$shippingMethod) {18 if (!$shippingMethod) { 20 19 return $paymentMethods; 21 20 } 22 21 23 if(!defined('DOING_AJAX')) define('DOING_AJAX',true); 22 if (!defined('DOING_AJAX')) 23 define('DOING_AJAX', true); 24 24 $availablePaymentMethods = WC()->payment_gateways->get_available_payment_gateways(); 25 25 26 26 $codCost = 0; 27 if (isset($availablePaymentMethods['cod']) ) {28 if ($availablePaymentMethods['cod'] instanceof \WC_Smart_COD_Admin ) {27 if (isset($availablePaymentMethods['cod'])) { 28 if ($availablePaymentMethods['cod'] instanceof \WC_Smart_COD_Admin) { 29 29 $smartCod = new \WC_Smart_COD_Public('wc-smart-cod'); 30 30 $smartCod->init_wsc_settings(); 31 if (!$smartCod->has_cod_available()){31 if (!$smartCod->has_cod_available()) { 32 32 return $paymentMethods; 33 33 } 34 $codCost = $smartCod->apply_smart_cod_fees(WC()->cart, false);35 if (isset($availablePaymentMethods['cod']->settings['extra_fee_tax']) && $availablePaymentMethods['cod']->settings['extra_fee_tax'] =='enable') {36 $taxes = \wc_array_merge_recursive_numeric([], \WC_Tax::calc_tax($codCost, \WC_Tax::get_rates(''), false));34 $codCost = $smartCod->apply_smart_cod_fees(WC()->cart, false); 35 if (isset($availablePaymentMethods['cod']->settings['extra_fee_tax']) && $availablePaymentMethods['cod']->settings['extra_fee_tax'] == 'enable') { 36 $taxes = \wc_array_merge_recursive_numeric([], \WC_Tax::calc_tax($codCost, \WC_Tax::get_rates(''), false)); 37 37 if (!empty($taxes)) { 38 38 $codCost += array_sum($taxes); … … 58 58 add_filter('simplerwc_quotation_payment_method', 'simplerwc_compat_wc_smart_cod_quote', 10, 2); 59 59 60 61 60 /** 62 61 * @param Closure[] $closures … … 68 67 { 69 68 if ( 70 !($paymentMethod = $orderRequest->get_order()->get_payment_method()) 71 || $paymentMethod->getType() != PaymentMethod::COD72 ||!class_exists('Wc_Smart_Cod_Admin')69 !($paymentMethod = $orderRequest->get_order()->get_payment_method()) || 70 $paymentMethod->getType() != PaymentMethod::COD || 71 !class_exists('Wc_Smart_Cod_Admin') 73 72 ) { 74 73 return $closures; -
simpler-checkout/trunk/includes/Compatibility/free-gifts.php
r3272319 r3290493 18 18 } 19 19 } 20 20 21 add_action('simplerwc_after_add_to_cart', 'simplerwc_fgf_after_add_to_cart'); 21 22 23 22 24 23 // iThemeland Free Gifts : https://ithemelandco.com/plugins/free-gifts-for-woocommerce/ … … 44 43 add_filter('simplerwc_button_should_ignore_cart_item', 'simplerwc_compat_ithemeland_free_gifts_ignore', 10, 2); 45 44 46 47 48 45 // BOGO https://woocommerce.com/products/buy-one-get-one-free/ 49 46 function simplerwc_compat_bogof_free_gifts_ignore($value, $cart_item) … … 54 51 return $value; 55 52 } 53 56 54 add_filter('simplerwc_button_should_ignore_cart_item', 'simplerwc_compat_bogof_free_gifts_ignore', 10, 2); 57 58 59 55 60 56 // Asana [WooCommerce Dynamic Pricing and Discounts] https://www.asanaplugins.com/product/woocommerce-dynamic-pricing-and-discounts-plugin/ … … 66 62 return $value; 67 63 } 64 68 65 add_filter('simplerwc_button_should_ignore_cart_item', 'simplerwc_compat_asana_wcdpd_free_gifts_ignore', 10, 2); 69 70 71 66 72 67 // Pricepep [WooCommerce Dynamic Pricing, Discounts & Fees] https://codecanyon.net/item/woocommerce-dynamic-pricing-discounts/7119279 … … 75 70 add_filter('rp_wcdpd_request_is_product_feed', '__return_true', 10, 0); 76 71 } 72 77 73 add_action('simplerwc_product_controller_request_before', 'simplerwc_rp_wcdpd_set_is_product_feed', 1, 0); -
simpler-checkout/trunk/includes/Compatibility/gift-wrap.php
r3272319 r3290493 1 1 <?php 2 2 3 use Simpler\Models\Money;4 3 use Simpler\Models\GiftWrapAddon; 5 4 use Simpler\Models\GiftWrapOption; 5 use Simpler\Models\Money; 6 6 7 7 // Gift Wrapping for WooCommerce https://wordpress.com/plugins/gift-wrapping-for-woocommerce 8 8 function simplerwc_compat_quote_tgpc_gift_wrapping_for_woocommerce($value, $quotation) 9 9 { 10 if ( ! class_exists( 'Tgpc_Wc_Gift_Wrap' )) {10 if (!class_exists('Tgpc_Wc_Gift_Wrap')) { 11 11 return $value; 12 12 } 13 13 14 if ( get_option( 'tgpc_gift_wrapper_enabled' ) !== 'yes' ){14 if (get_option('tgpc_gift_wrapper_enabled') !== 'yes') { 15 15 return $value; 16 16 } 17 17 $giftWrapAddon = new GiftWrapAddon(); 18 $giftWrapOption = new GiftWrapOption( "1");18 $giftWrapOption = new GiftWrapOption('1'); 19 19 20 $fee_cost = (float) apply_filters( 'tgpc_wc_gift_wrapper_cost', get_option( 'tgpc_gift_wrapper_cost', 0 ));20 $fee_cost = (float) apply_filters('tgpc_wc_gift_wrapper_cost', get_option('tgpc_gift_wrapper_cost', 0)); 21 21 $tax_cost = 0; 22 22 $net_cost = $fee_cost; 23 24 $is_taxable = get_option( 'tgpc_gift_wrapper_cost_tax_status') === 'yes';25 $tax_class = get_option( 'tgpc_gift_wrapper_tax_class', '');23 24 $is_taxable = get_option('tgpc_gift_wrapper_cost_tax_status') === 'yes'; 25 $tax_class = get_option('tgpc_gift_wrapper_tax_class', ''); 26 26 if ($is_taxable) { 27 $taxes = \wc_array_merge_recursive_numeric([], \WC_Tax::calc_tax($fee_cost, $tax_class, false));27 $taxes = \wc_array_merge_recursive_numeric([], \WC_Tax::calc_tax($fee_cost, $tax_class, false)); 28 28 if (!empty($taxes)) { 29 29 $tax_cost = array_sum($taxes); … … 32 32 } 33 33 34 if ( $fee_cost) {34 if ($fee_cost) { 35 35 $giftWrapOption->setCosts( 36 Money::to_cents( $fee_cost),37 Money::to_cents( $net_cost),38 Money::to_cents( $tax_cost)36 Money::to_cents($fee_cost), 37 Money::to_cents($net_cost), 38 Money::to_cents($tax_cost) 39 39 ); 40 40 } 41 41 $giftWrapAddon->addOption($giftWrapOption); 42 $value[] =$giftWrapAddon;42 $value[] = $giftWrapAddon; 43 43 44 44 return $value; 45 45 } 46 46 47 add_filter('simplerwc_quotation_addons', 'simplerwc_compat_quote_tgpc_gift_wrapping_for_woocommerce', 10, 2); 47 48 48 49 49 function simplerwc_compat_submit_tgpc_gift_wrapping_for_woocommerce($closures, $order_request) 50 50 { 51 if ( ! class_exists( 'Tgpc_Wc_Gift_Wrap' )) {51 if (!class_exists('Tgpc_Wc_Gift_Wrap')) { 52 52 return $closures; 53 53 } 54 54 55 if ( get_option( 'tgpc_gift_wrapper_enabled' ) !== 'yes' ){55 if (get_option('tgpc_gift_wrapper_enabled') !== 'yes') { 56 56 return $closures; 57 57 } 58 58 59 59 $addons = $order_request->get_order()->get_addons(); 60 if ( empty($addons)) {60 if (empty($addons)) { 61 61 return $closures; 62 62 } 63 63 64 64 $giftWrapAddon = null; 65 foreach ( $addons as $a ){66 if ( $a['type'] == GiftWrapAddon::type() ){65 foreach ($addons as $a) { 66 if ($a['type'] == GiftWrapAddon::type()) { 67 67 $giftWrapAddon = GiftWrapAddon::from_json($a); 68 68 break; … … 70 70 } 71 71 72 if ( ! $giftWrapAddon ){72 if (!$giftWrapAddon) { 73 73 return $closures; 74 74 } 75 75 76 76 $closures[] = function () { 77 $tgpc_public = new Tgpc_Wc_Gift_Wrap_Public('Tgpc_Wc_Gift_Wrap', 'v1.0.0');77 $tgpc_public = new Tgpc_Wc_Gift_Wrap_Public('Tgpc_Wc_Gift_Wrap', 'v1.0.0'); 78 78 $_POST['tgpc_enable_checkout_gift_wrapper'] = true; 79 79 $tgpc_public->tgpc_add_gift_wrapper_fee(); … … 82 82 return $closures; 83 83 } 84 84 85 add_filter('simplerwc_order_fees', 'simplerwc_compat_submit_tgpc_gift_wrapping_for_woocommerce', 10, 2); -
simpler-checkout/trunk/includes/Compatibility/pickup.php
r3272319 r3290493 13 13 function simplerwc_local_pickup_plus_after_set_checkout_data($order, $order_request) 14 14 { 15 $pickupId = $order_request->get_order()->get_shipping() ->get_pickup_location_id();15 $pickupId = $order_request->get_order()->get_shipping()?$order_request->get_order()->get_shipping()->get_pickup_location_id():null; 16 16 if (!$pickupId || !class_exists('WC_Local_Pickup_Plus')) { 17 17 return; … … 24 24 } 25 25 } 26 26 27 add_action('simplerwc_after_set_checkout_data', 'simplerwc_local_pickup_plus_after_set_checkout_data', 10, 2); 27 28 } 28 29 } 30 29 31 add_action('init', 'simplerwc_compat_wc_local_pickup_plus'); 30 32 31 32 33 //WC Pickup Store https://wordpress.org/plugins/wc-pickup-store 33 // WC Pickup Store https://wordpress.org/plugins/wc-pickup-store 34 34 function simplerwc_compat_wc_pickup_store_set_store_name($order, $request) 35 35 { … … 42 42 } 43 43 44 $location = $request->get_order()->get_shipping() ->get_pickup_location_id();44 $location = $request->get_order()->get_shipping()?$request->get_order()->get_shipping()->get_pickup_location_id():null; 45 45 if ($location) { 46 46 $order->add_meta_data('_shipping_pickup_stores', $location); 47 47 } 48 48 } 49 49 50 add_action('simplerwc_after_set_checkout_data', 'simplerwc_compat_wc_pickup_store_set_store_name', 10, 2); -
simpler-checkout/trunk/includes/Http/Controllers/ProductController.php
r3209879 r3290493 171 171 $obj['attributes_data'] = $this->attributes($product); 172 172 } 173 $obj = apply_filters('simplerwc_products_to_response', $obj); 173 174 $data[] = $obj; 174 175 } -
simpler-checkout/trunk/includes/Services/CartHelper.php
r3257191 r3290493 3 3 namespace Simpler\Services; 4 4 5 use Exception;6 5 use Simpler\Exceptions\{BaseException, InvalidProductException}; 7 6 use Simpler\Models\CartItem; 7 use Exception; 8 8 9 9 trait CartHelper 10 10 { 11 12 11 private function initialize_cart() 13 12 { … … 15 14 // This prevents updating an existing cart with the one given in the quotation request. 16 15 add_filter('woocommerce_persistent_cart_enabled', '__return_false'); 17 WC()->cart = new \WC_Cart();18 WC()->session = new \WC_Session_Handler();16 WC()->cart = new \WC_Cart(); 17 WC()->session = new \WC_Session_Handler(); 19 18 WC()->cart->get_cart_from_session(); 20 19 } … … 25 24 private function add_item_to_cart(CartItem $item) 26 25 { 26 do_action('simplerwc_before_add_to_cart', $item); 27 27 $productAdded = false; 28 if(!$item->get_bundle_type() && $item->has_bundled()){ 29 30 $bundle_type = apply_filters('simplerwc_get_bundle_type_of_the_product', null,\wc_get_product( $item->get_product_id())); 31 32 $item->set_bundle_type($bundle_type); 28 if (!$item->get_bundle_type() && $item->has_bundled()) { 29 $bundle_type = apply_filters('simplerwc_get_bundle_type_of_the_product', null, \wc_get_product($item->get_product_id())); 30 31 $item->set_bundle_type($bundle_type); 33 32 } 34 33 if ($item->get_bundle_type()) { … … 50 49 } 51 50 } 52 53 -
simpler-checkout/trunk/includes/button.php
r3257191 r3290493 257 257 function simplerwc_get_cart_item_attributes($cart_item, $bundled_cart_items = null, $bundle_type = null) 258 258 { 259 $attrs = simplerwc_get_product_attributes($cart_item['data'], $bundle_type );259 $attrs = simplerwc_get_product_attributes($cart_item['data'], $bundle_type, $cart_item); 260 260 if (isset($cart_item['quantity'])) { 261 261 $attrs['quantity'] = $cart_item['quantity']; 262 262 } 263 if (is_a($cart_item['data'], 'WC_Product_Variation')) { 264 /*** @var \WC_Product_Variation $product */ 265 $attrs['attributes'] = array_key_exists('variation', $cart_item) ? $cart_item['variation'] : $product->get_variation_attributes(); 266 } 263 267 264 if (isset($bundled_cart_items) && count($bundled_cart_items) > 0) { 268 265 $attrs['bundled'] = array_values(array_map(function ($el) { … … 276 273 * @param \WC_Product $product The product to extract information from 277 274 */ 278 function simplerwc_get_product_attributes($product,$bundle_type = null )275 function simplerwc_get_product_attributes($product,$bundle_type = null, $cart_item = null) 279 276 { 280 277 $attrs = [ … … 286 283 'sold_individually' => $product->is_sold_individually(), 287 284 'purchasable' => $product->is_purchasable(), 288 'attributes' => apply_filters('simplerwc_button_get_product_attributes', [], $product )285 'attributes' => apply_filters('simplerwc_button_get_product_attributes', [], $product, $cart_item) 289 286 ]; 290 287 if (is_a($product, 'WC_Product_Variable')) { … … 295 292 } else if (is_a($product, 'WC_Product_Variation')) { 296 293 /** @var \WC_Product_Variation $product */ 297 $attrs['attributes'] = apply_filters('simplerwc_button_get_product_attributes', $product->get_variation_attributes(), $product );294 $attrs['attributes'] = apply_filters('simplerwc_button_get_product_attributes', $product->get_variation_attributes(), $product, $cart_item); 298 295 } 299 296 if($bundle_type){ -
simpler-checkout/trunk/includes/compat.php
r3272319 r3290493 4 4 include_once('Compatibility/cod.php'); 5 5 include_once('Compatibility/free-gifts.php'); 6 include_once('Compatibility/gift-cards.php'); 6 7 include_once('Compatibility/gift-wrap.php'); 7 8 include_once('Compatibility/pickup.php'); -
simpler-checkout/trunk/includes/constants.php
r3272319 r3290493 1 1 <?php 2 2 3 const SIMPLERWC_VERSION = '1.1. 6';3 const SIMPLERWC_VERSION = '1.1.7'; 4 4 5 5 function simplerwc_get_sdk_uri() -
simpler-checkout/trunk/includes/takeover.php
r3239474 r3290493 55 55 } 56 56 57 $products = $cart->get_cart ();57 $products = $cart->get_cart_contents(); 58 58 $products_array = []; 59 59 60 60 foreach ($products as $cart_item) { 61 $product = $cart_item['data']; 61 62 $product_data = [ 62 'id' => (string)$ cart_item['product_id'],63 'id' => (string)$product->get_id(), 63 64 'qty' => (string)$cart_item['quantity'], 64 65 ]; 65 66 if (!empty($cart_item['variation'])) { 66 67 $attrs = new stdClass(); 67 foreach ($cart_item['variation'] as $attribute => $value) { 68 $p_attrs = apply_filters('simplerwc_button_get_product_attributes', $product->get_variation_attributes(), $product, $cart_item); 69 foreach ($p_attrs as $attribute => $value) { 68 70 $attrs->{$attribute} = (string)$value; 69 71 } -
simpler-checkout/trunk/simpler.php
r3272319 r3290493 8 8 * Description: Simpler Checkout lets your customers complete their purchases in seconds, with any payment method they want, in any device or browser and without a password. 9 9 * Tags: woocommerce, checkout, payments, conversion rate 10 * Version: 1.1. 610 * Version: 1.1.7 11 11 * Requires at least: 5.1 12 * Tested up to: 6. 3.112 * Tested up to: 6.8.1 13 13 * Requires PHP: 7.0 14 14 * License: GPLv3 -
simpler-checkout/trunk/vendor/autoload.php
r3272319 r3290493 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit c151c635e566471924c6a51e32d8b1e3::getLoader();7 return ComposerAutoloaderInitefc042c3b3729108c3bc76726cf4af6b::getLoader(); -
simpler-checkout/trunk/vendor/composer/autoload_real.php
r3272319 r3290493 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit c151c635e566471924c6a51e32d8b1e35 class ComposerAutoloaderInitefc042c3b3729108c3bc76726cf4af6b 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit c151c635e566471924c6a51e32d8b1e3', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInitefc042c3b3729108c3bc76726cf4af6b', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); 29 spl_autoload_unregister(array('ComposerAutoloaderInit c151c635e566471924c6a51e32d8b1e3', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInitefc042c3b3729108c3bc76726cf4af6b', 'loadClassLoader')); 30 30 31 31 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 33 33 require __DIR__ . '/autoload_static.php'; 34 34 35 call_user_func(\Composer\Autoload\ComposerStaticInit c151c635e566471924c6a51e32d8b1e3::getInitializer($loader));35 call_user_func(\Composer\Autoload\ComposerStaticInitefc042c3b3729108c3bc76726cf4af6b::getInitializer($loader)); 36 36 } else { 37 37 $map = require __DIR__ . '/autoload_namespaces.php'; -
simpler-checkout/trunk/vendor/composer/autoload_static.php
r3272319 r3290493 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit c151c635e566471924c6a51e32d8b1e37 class ComposerStaticInitefc042c3b3729108c3bc76726cf4af6b 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 89 89 { 90 90 return \Closure::bind(function () use ($loader) { 91 $loader->prefixLengthsPsr4 = ComposerStaticInit c151c635e566471924c6a51e32d8b1e3::$prefixLengthsPsr4;92 $loader->prefixDirsPsr4 = ComposerStaticInit c151c635e566471924c6a51e32d8b1e3::$prefixDirsPsr4;93 $loader->classMap = ComposerStaticInit c151c635e566471924c6a51e32d8b1e3::$classMap;91 $loader->prefixLengthsPsr4 = ComposerStaticInitefc042c3b3729108c3bc76726cf4af6b::$prefixLengthsPsr4; 92 $loader->prefixDirsPsr4 = ComposerStaticInitefc042c3b3729108c3bc76726cf4af6b::$prefixDirsPsr4; 93 $loader->classMap = ComposerStaticInitefc042c3b3729108c3bc76726cf4af6b::$classMap; 94 94 95 95 }, null, ClassLoader::class); -
simpler-checkout/trunk/vendor/composer/installed.php
r3272319 r3290493 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => '1.1. 6',4 'version' => '1.1. 6.0',3 'pretty_version' => '1.1.7', 4 'version' => '1.1.7.0', 5 5 'type' => 'wordpress-plugin', 6 6 'install_path' => __DIR__ . '/../../', 7 7 'aliases' => array(), 8 'reference' => ' 6abeec6ddab3c1396ae34fdae5700fc18085a09b',8 'reference' => 'd9107f5b5c2f0d7f288673fc5289e91e3f020004', 9 9 'name' => 'simpler-checkout/woo', 10 10 'dev' => false, … … 12 12 'versions' => array( 13 13 'simpler-checkout/woo' => array( 14 'pretty_version' => '1.1. 6',15 'version' => '1.1. 6.0',14 'pretty_version' => '1.1.7', 15 'version' => '1.1.7.0', 16 16 'type' => 'wordpress-plugin', 17 17 'install_path' => __DIR__ . '/../../', 18 18 'aliases' => array(), 19 'reference' => ' 6abeec6ddab3c1396ae34fdae5700fc18085a09b',19 'reference' => 'd9107f5b5c2f0d7f288673fc5289e91e3f020004', 20 20 'dev_requirement' => false, 21 21 ),
Note: See TracChangeset
for help on using the changeset viewer.