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(): | |
| """ |
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
| 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
| /** | |
| * 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
| // 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
| 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
| /** | |
| * 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
| <?php /* | |
| Template Name: Gallery | |
| Gallery template based on Advanced Custom Fields gallery field | |
| with pagination and categories. | |
| ACF Fields for this page are: | |
| - gallery (Gallery field) -> contain all images | |
| - categories (Repeater field) -> images divided into categories | |
| -- name | |
| -- nice_name (for the url) | |
| -- gallery |
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
| wp_get_imgix_image( $attachment_id, $options = '' ) { | |
| $url = ''; | |
| $image = wp_get_attachment_image_src( $attachment_id ); | |
| $imgix_bucket = get_option( 'imgix_bucket' ); | |
| if($image && imgix_bucket) { | |
| $url = $imgix_bucket.$image['url'].$options; |
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 { Injectable } from '@angular/core'; | |
| import { Headers, Http } from '@angular/http'; | |
| import { environment } from '../../environments/environment'; | |
| import { OAuthService } from './oauth.service'; | |
| @Injectable() | |
| export class ApiService { |
NewerOlder