Skip to content

Instantly share code, notes, and snippets.

View bantunesm's full-sized avatar
🦊

Bruno ANTUNES bantunesm

🦊
View GitHub Profile
@kepano
kepano / obsidian-web-clipper.js
Last active April 16, 2024 18:44
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@webdados
webdados / shop_as_client_pro_customer_data.php
Last active April 2, 2024 10:55
How to add custom fields to the Shop as Client PRO add-on ajax call - Classic Checkout
<?php
/* Add this to you (child-)theme functions.php file, on a (mu-)plugin or with a plugin like Code Snippets https://wordpress.org/plugins/code-snippets/ */
/* This only works with the classic checkout */
add_filter( 'shop_as_client_pro_customer_data', 'my_shop_as_client_pro_customer_data', 10, 3 );
function my_shop_as_client_pro_customer_data( $data, $customer = null, $order = null ) {
//Are we getting a "customer" object?
if ( $customer ) {
//Custom checkout field with id "billing_xpto"
@smutek
smutek / content-page.blade.php
Last active February 16, 2022 16:11
Simple Sage 9 Slider with Slick
@php(the_content())
@if($images)
@include('partials/slider')
@endif
@lopspower
lopspower / README.md
Last active April 16, 2024 16:26
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@claudiosanches
claudiosanches / functions.php
Last active June 4, 2022 07:52
WooCommerce - Add Order Again button to My Orders actions
<?php
/**
* Add order again button in my orders actions.
*
* @param array $actions
* @param WC_Order $order
* @return array
*/
function cs_add_order_again_to_my_orders_actions( $actions, $order ) {
if ( $order->has_status( 'completed' ) ) {
@DWboutin
DWboutin / functions.php
Created August 18, 2014 14:06
Woocommerce get regular and sale price
<?php
function the_product_price($product){
//get the sale price of the product whether it be simple, grouped or variable
$sale_price = '<span class="new">'.get_post_meta( get_the_ID(), '_price', true).'</span>';
//get the regular price of the product, but of a simple product
$regular_price = get_post_meta( get_the_ID(), '_regular_price', true);
//oh, the product is variable to $sale_price is empty? Lets get a variation price