This snippet gives the ability to remove the default product sortering dropdown select on the shop page. You can place the code in functions.php
.
This file contains 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 // Do not include this if already open! Code goes in theme functions.php. | |
/* | |
* Slow down WooCommerce 360 images rotation. | |
*/ | |
add_filter( 'wc360_js_playspeed', 'woo_slow_down360' ); | |
function woo_slow_down360( $speed ) { | |
return 50; | |
} |
This file contains 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 // Do not include this if already open! Code goes in theme functions.php. | |
/** | |
* Add fields to the checkout page based on products in cart. | |
* | |
* @how-to https://remicorson.com/?p=7871 | |
* @author Remi Corson | |
* @testedwith WooCommerce 3.4.0 | |
*/ |
This file contains 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 // Do not include this if already open! Code goes in theme functions.php. | |
/* | |
* Force customer creation process in Stripe. | |
*/ | |
add_filter( 'wc_stripe_force_save_source', '__return_true' ); |
This file contains 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
// ==UserScript== | |
// @name A8C - Once key field auto-filler | |
// @namespace http://automattic.com/ | |
// @version 0.1 | |
// @description Pre-fill Once fields | |
// @author Remi Corson | |
// @match https://<place_mc_url_here>/once/* | |
// @require http://code.jquery.com/jquery-latest.js | |
// @grant none | |
// ==/UserScript== |
This file contains 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 | |
add_filter( 'woocommerce_review_order_before_payment', 'add_my_checkout_section' ); | |
function add_my_checkout_section() { | |
wc_print_notice( apply_filters( 'woocommerce_checkout_my_checkout_section', __( 'Want a phone call before you buy?', 'woocommerce' ) . ' <a href="#">' . __( 'Click here, we call you back!', 'woocommerce' ) . '</a>' ), 'notice' ); | |
} |
This file contains 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 | |
$count = 1; | |
foreach( $order->get_items() as $item_id => $line_item ){ | |
$item_data = $line_item->get_data(); | |
$product = $line_item->get_product(); | |
$product_name = $product->get_name(); | |
$item_quantity = $line_item->get_quantity(); | |
$item_total = $line_item->get_total(); | |
$metadata['Line Item '.$count] = 'Product name: '.$product_name.' | Quantity: '.$item_quantity.' | Item total: '. number_format( $item_total, 2 ); |
This file contains 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 | |
$order->get_data(); (not needed is using the code above) | |
$order_id = $order_data['id']; | |
$order_parent_id = $order_data['parent_id']; | |
$order_status = $order_data['status']; | |
$order_currency = $order_data['currency']; | |
$order_version = $order_data['version']; | |
$order_payment_method = $order_data['payment_method']; | |
$order_payment_method_title = $order_data['payment_method_title']; |
This file contains 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 | |
$order->get_data(); (not needed is using the code above) | |
$order_id = $order_data['id']; | |
$order_parent_id = $order_data['parent_id']; | |
$order_status = $order_data['status']; | |
$order_currency = $order_data['currency']; | |
$order_version = $order_data['version']; | |
$order_payment_method = $order_data['payment_method']; | |
$order_payment_method_title = $order_data['payment_method_title']; |
This file contains 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
// ==UserScript== | |
// @name Hide Humanity slots when not available | |
// @namespace https://automattic2.humanity.com | |
// @version 0.1 | |
// @description Hide Humanity slots when not available | |
// @author @remicorson | |
// @grant none | |
// @match https://automattic2.humanity.com/app/requests/* | |
// @require http://code.jquery.com/jquery-latest.js | |
// ==/UserScript== |