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
/** | |
* WooCommerce - SecureTrading payment gateway | |
* Filter the billingtelephonetype sent to SecureTrading | |
* | |
**/ | |
add_filter('securetrading_billing_phone_type', 'my_securetrading_billing_phone_type'); | |
function my_securetrading_billing_phone_type( ) { | |
// Available Phone Types are H (Home), W (Work), M (Mobile) |
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
/** | |
* WooCommerce - SecureTrading payment gateway | |
* Filter the version sent to SecureTrading | |
* | |
**/ | |
add_filter('securetrading_version', 'my_securetrading_version'); | |
function my_securetrading_version( ) { | |
// Default is 2 since version 1.5 of the plugin |
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
/** | |
* WooCommerce - Klarna payment gateway | |
* Filter Create order & Update order for adding separate shipping address fields in Klarna Checkout iframe. | |
**/ | |
// New order ($create) | |
add_filter('kco_create_order', 'my_kco_create_order'); | |
function my_kco_create_order( $create ) { | |
$create['options']['allow_separate_shipping_address'] = 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
<?php | |
/** | |
* WooCommerce - Double.net Tracking code | |
* | |
**/ | |
add_action( 'woocommerce_thankyou', 'my_custom_tracking' ); | |
function my_custom_tracking( $order_id ) { | |
$order = new WC_Order( $order_id ); | |
$reference = ltrim( $order->get_order_number(), '#'); |
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
// Change the output of multiple comments text in Post header meta or Post footer meta | |
add_filter( 'ntp_multiple_comment_text', 'themename_multiple_comment_text' ); | |
function themename_multiple_comment_text() { | |
return 'Comments: % Comments'; | |
} |
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 | |
/** | |
* WooCommerce | |
* -------------------------- | |
* | |
* Remove related products | |
* | |
* Clear the query arguments for related products so none show. | |
* | |
*/ |
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 | |
/** | |
* WooCommerce | |
* -------------- | |
* | |
* Hide all prices in your store. | |
* | |
* Can be useful when using WooCommerce as a quote tool. | |
* | |
*/ |
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 | |
/** | |
* WooCommerce - Klarna | |
* -------------- | |
* | |
* Add input field for Billing Phone to Klarna (Invoice) Payment gateway Description area. | |
* | |
* Can be useful if the regular WC checkout form is stripped down since Klarna require a Phone number. | |
* | |
*/ |
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
#site-title { | |
width: 900px; | |
} | |
#header-widget { | |
width: 0px; | |
} |
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 | |
/* | |
Plugin Name: Modify Klarna Checkout URL | |
Plugin URI: http://krokedil.com | |
Description: Change checkout URL for Klarna Checkout if user isn't from a specific country | |
Version: 1.0 | |
Author: Krokedil | |
Author URI: http://krokedil.com | |
*/ | |
add_filter( 'woocommerce_get_checkout_url', 'krokedil_change_checkout_url', 30 ); |