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 // only copy this line if needed | |
/** | |
* The use of this snippet requires at least WooCommerce 3.2 | |
*/ | |
/** | |
* Alter the column headers for the orders CSV to split item_meta into separate columns | |
* | |
* Note that this change is only applied to the Default - One Row per Item format |
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 | |
add_filter( 'wc_nested_category_layout_category_title_html', 'wc_nested_category_layout_category_title_html', 10, 3 ); | |
function wc_nested_category_layout_category_title_html( $title, $categories, $term ) { | |
$category = $categories[ count( $categories ) - 1 ]; | |
$url = esc_attr( get_term_link( $category ) ); | |
$link = '<a href="' . $url . '">' . wptexturize( $category->name ) . '</a>'; | |
return sprintf( '<h2 class="wc-nested-category-layout-category-title">%s</h2>', $link ); |
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 | |
function wc_address_validation_move_postcode_lookup() { | |
wc_enqueue_js( ' | |
( function() { | |
var $billingLookup = $( "#wc_address_validation_postcode_lookup_billing" ); | |
var $shippingLookup = $( "#wc_address_validation_postcode_lookup_shipping" ); | |
$( "div.woocommerce-billing-fields").find( "h3" ).after( $billingLookup ); |
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 | |
function wc_mollie_reorder_gateways( $gateways ) { | |
$gateway_order = array( | |
// Rearrange these payment options into the order you wish | |
'WC_Gateway_Mollie_iDEAL', | |
'WC_Gateway_Mollie_CreditCard', | |
'WC_Gateway_Mollie_MisterCash', |
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 | |
function wc_address_validation_smartystreets_badge_fix() { | |
wc_enqueue_js( ' | |
$( "body" ).on( "wc_address_validation_fields_mapped", function() { | |
$.each( [ "billing", "shipping" ], function( index, addressType ) { | |
var fields = $( "#" + addressType + "_address_1, #" + addressType + "_address_2, #" + addressType + "_city, #" + addressType + "_state, #" + addressType + "_postcode, #" + addressType + "_country" ); | |
fields.on( "visibility", function() { |
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 | |
// change CSV delimiter to a semi-colon (;) | |
function wc_csv_export_modify_delimiter() { | |
return ';'; | |
} | |
add_filter( 'wc_customer_order_csv_export_delimiter', 'wc_csv_export_modify_delimiter' ); | |
// change CSV enclosure to a pipe (|) | |
function wc_csv_export_modify_enclosure() { | |
return '|'; |
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 sv_wc_order_status_manager_order_is_editable( $editable, $order ) { | |
// list the slugs of all order statuses that should be editable. | |
// Note 'pending', 'on-hold', 'auto-draft' are editable by default | |
$editable_custom_statuses = array( 'packaging', 'awaiting-shipment' ); | |
if ( in_array( $order->get_status(), $editable_custom_statuses ) ) { | |
$editable = true; | |
} |
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 | |
/** | |
* Plugin Name: WooCommerce Mollie Gateway - Additional Fees Compatibility | |
* Plugin URI: http://www.woothemes.com/products/ideal-mollie/ | |
* Description: Adds support for Payment Gateway Based Fees. Adds fees for each Mollie payment gateway based on fees listed at https://www.mollie.com/en/pricing | |
* Author: SkyVerge | |
* Author URI: http://www.skyverge.com | |
* Version: 1.0.0 | |
* | |
* Copyright: (c) 2015 SkyVerge, Inc. ([email protected]) |
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 support for %%payment_method%% merge variable to XML export file names | |
* | |
* @param string $post_replace_filename the post replace filename | |
* @param string $post_replace_filename the pre replace filename | |
* @param array $order_ids the order ids | |
* @return string | |
*/ | |
function wc_xml_export_suite_file_name_payment_method( $post_replace_filename, $pre_replace_filename, $order_ids ) { |
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 the product price to the individual line item entry | |
* | |
* @param array $line_item the original line item data | |
* @param array $item WC order item data | |
* @param WC_Product $product the product | |
* @return string | |
*/ | |
function wc_csv_export_order_line_item_price( $line_item, $item, $product ) { |