Cookie Bar privacy policy
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
1. You have access to $order variable | |
Hooks (do_action and apply_filters) use additional arguments which are passed on to the function. If they allow you to use the “$order” object you’re in business. Here’s how to get all the order information: | |
// Get Order ID and Key | |
$order->get_id(); | |
$order->get_order_key(); | |
// Get Order Totals $0.00 | |
$order->get_formatted_order_total(); | |
$order->get_cart_tax(); |
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
$cart = WC()->cart; | |
// $cart conditionals (if) | |
WC()->cart->is_empty() | |
WC()->cart->needs_payment() | |
WC()->cart->show_shipping() | |
WC()->cart->needs_shipping() | |
WC()->cart->needs_shipping_address() | |
WC()->cart->display_prices_including_tax() |
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
from PIL import Image, ImageDraw | |
background = Image.open("immagine-di-background.png" ) | |
immagine-da-incollare-sopra = Image.open('img/elementi/layoutB.png') | |
width, height = background.size | |
transparent = Image.new('RGBA', (width, height), (0,0,0,0)) | |
transparent.paste(background, (0,0)) | |
transparent.paste(immagine-da-incollare-sopra, (0,0)) | |
background.save('immagine-da-salvare.png') |
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
#Importiamo le librerie | |
import os | |
from InstagramAPI import InstagramAPI | |
import time | |
import schedule | |
#Importo l'elenco dei file presenti nella cartella coda_file in una lista | |
foldername = './coda_file/' | |
fileNames = os.listdir(foldername) |