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
/** | |
* Add the DIBS Transaction ID to order emails | |
**/ | |
add_filter('woocommerce_email_order_meta_keys', 'dibs_woocommerce_email_order_meta_keys'); | |
function dibs_woocommerce_email_order_meta_keys( $keys ) { | |
$keys['DIBS Transaction ID'] = 'dibs_transaction_no'; | |
return $keys; | |
} |
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 - Payson payment gateway | |
* Change the Payson Direct icon in checkout | |
* | |
**/ | |
function myprefix_change_payson_direct_icon($logourl) { | |
return get_stylesheet_directory_uri(). '/images/my-payson-icon.png'; | |
} | |
add_filter('payson_direct_icon', 'myprefix_change_payson_direct_icon'); |
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
add_filter('woocommerce_currency_symbol', 'my_custom_currency_symbol', 10, 2) ; | |
function my_custom_currency_symbol( $currency_symbol, $currency ) { | |
switch( $currency ) { | |
case 'SEK': $currency_symbol = 'SEK'; | |
break; | |
} | |
return $currency_symbol; | |
} |
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 - DIBS payment gateway | |
* Filter the payment gateway icon used in checkout | |
* | |
**/ | |
// Credit card payment method | |
add_filter('wc_dibs_icon_html', 'my_wc_dibs_icon_html'); | |
function my_wc_dibs_icon_html( ) { |
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
/** | |
* Specter for WooCommerce | |
* Filter the Customer Order Reference sent to Specter. | |
* Useful when you want to pass extra order data that should be visible on the invoice or packing list sent to the customer. | |
* The default value of the Internal comment is the WooCommerce Order number. | |
* | |
**/ | |
add_filter('wc_specter_order_reference', 'my_custom_order_reference'); |
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
/** | |
* Specter for WooCommerce | |
* Filter the Internal Order Comment sent to Specter. | |
* Useful when you want to pass extra order data that only should be visible in Specter for you as a merchant. | |
* Internal Order Comment is not visible on invoices and packing lists for the customer to see. | |
* The default value of the Internal comment is the WooCommerce Order number. | |
* | |
**/ | |
add_filter('wc_specter_internal_comment', 'my_custom_internal_comment'); |
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 the phone number returned from Klarna when customer pays via Klarna Checkout. | |
* Useful when you want to add the country prefix to the phone number. | |
* | |
**/ | |
add_filter('klarna_checkout_billing_phone', 'my_custom_klarna_checkout_billing_phone'); | |
function my_custom_klarna_checkout_billing_phone( $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
/** | |
* DIBS payment gateway for WooCommerce | |
* Filter the language parameter sent to DIBS. | |
* Useful when you want the language of the DIBS Payment Window to match the language in your WooCommerce store. | |
* | |
**/ | |
add_filter( 'dibs_language', 'my_dibs_language' ); | |
function my_dibs_language() { |
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
/** | |
* Add an acquirerinfo parameter sent to DIBS | |
**/ | |
add_filter('dibs_checkout_form', 'my_dibs_checkout_form', 10, 3); | |
function my_dibs_checkout_form( $args, $paytype, $order ) { | |
$args['acquirerinfo'] = ltrim( $order->get_order_number(), '#'); | |
return $args; | |
} |
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
/** | |
* Action hook wc_specter_received_product_data | |
* Save custom product data received from Specter on product updates/changes in Specters system. | |
* | |
**/ | |
add_action( 'wc_specter_received_product_data', 'my_custom_product_update' ); | |
function my_custom_product_update( $article ) { | |
// Update your product here. $article is the returned product data from Specter, stored as an array. |
OlderNewer