Skip to content

Instantly share code, notes, and snippets.

@krokedilgists
krokedilgists / aco-custom-css-styles.php
Created May 13, 2020 12:03
Example code of how to customize the style of Avarda Checkout
/**
* Filter hook aco_custom_css_styles
* Example code of how to customize the style of Avarda Checkout.
*
* Add this code to your themes functions.php file or include it in a separate functionality plugin.
*/
add_filter( 'aco_custom_css_styles', 'aco_customize_checkout_style' );
function aco_customize_checkout_style( $styles ) {
$styles = array(
'buttons' =>
@krokedilgists
krokedilgists / aco-custom-css-styles-list.php
Created May 13, 2020 12:18
The list of all the available CSS properties for customizing the Avarda Checkout
/**
* The list of all the available CSS properties for customizing the Avarda Checkout.
* This list can be used as reference when customizing the Avarda Checkout.
*/
$styles = array(
'buttons' =>
array(
'primary' =>
array(
'base' =>
@krokedilgists
krokedilgists / briqpay-filter-create-args.php
Created March 25, 2021 06:57
Modify the create payment session request body before it is sent to Briqpay.
<?php
/**
* Use together with Briqpay for WooCommerce pluign.
* https://krokedil.se/produkt/briqpay-for-woocommerce/
*
* Modify the create payment session request body. In this case we set credit scoring and max amount values to true.
* Read more about Briqpay create session here: https://developer.briqpay.com/#operation/CreateSession.
* Add this code to your themes functions.php file or include it in a separate functionality plugin (https://css-tricks.com/wordpress-functionality-plugins/).
**/
add_filter('briqpay_create_args', 'custom_briqpay_create_args' );
<?php
/**
* Use together with Krokedil Product Documents pluign.
* https://krokedil.com/product/krokedil-product-documents/
*
* Filter kpd_default_document_icon
* Changes the default/generic icon displayed in frontend.
*/
add_filter( 'kpd_default_document_icon', 'custom_kpd_default_document_icon' );
<?php
/**
* Use together with Krokedil Product Documents pluign.
* https://krokedil.com/product/krokedil-product-documents/
*
* Filter kpd_document_icon
* In this example we change icons for xlxs, docx & svg files.
*
* @param string $icon_url The url to the icon.
* @param string $file_type The attached document file type (pdf, jpg etc).