This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Get reservations. | |
* | |
* @param int $processed 1/0 | |
* @param string $operator | |
* @param string $order | |
* | |
* @return array | |
*/ | |
public static function get_reservations( $processed = 1, $operator = '>=', $order = 'ASC' ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function domain_set_slot_availability( $is_available, $timeslot, $date ) { | |
// Custom code to set $is_available to false or true. | |
return $is_available; | |
} | |
add_filter( 'iconic_wds_slot_available', 'domain_set_slot_availability', 10, 3 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ALTERNATIVE | |
/** | |
* Force timeslot in checkout | |
*/ | |
$('#jckwds-delivery-time').on('change', function() { | |
if(php_vars.selected_timeslot !== typeof undefined) { | |
$(this).val(php_vars.selected_timeslot); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Update order delivery time with value from location cookie | |
* | |
* @param $value | |
* @return mixed | |
*/ | |
function update_order_delivery_time( $value ) { | |
$location = Vmm_Helpers::get_location(); | |
if( isset( $location['timeslot'] ) ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'iconic_wds_get_reservations_query', array( __CLASS__, 'filter_deliveries_per_warehouse' ) ); | |
/** | |
* Filter deliveries per warehouse | |
* | |
* @param string $q WordPress SQL query statement. | |
* @return mixed | |
*/ | |
public static function filter_deliveries_per_warehouse( $q ) { | |
if ( is_user_logged_in() ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'dart:io'; | |
import 'package:camera/camera.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:image_picker/image_picker.dart'; | |
import 'package:path_provider/path_provider.dart'; | |
import '/utils.dart'; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from decouple import config | |
from ..helpers.vipps_json_generators import get_base_ecom_headers, get_initiate_payment_http_body, \ | |
get_capture_payment_http_body, get_order_ecom_headers, get_order_ecom_cancel_body | |
base_url = 'https://apitest.vipps.no' | |
def token_request(): | |
""" |
OlderNewer