Skip to content

Instantly share code, notes, and snippets.

View dancameron's full-sized avatar
💭
🍻Cheersing

Dan Cameron dancameron

💭
🍻Cheersing
View GitHub Profile
@dancameron
dancameron / webpack.mix.js
Created February 12, 2021 04:06
apazed: Combining admin.scss and app.css from SASS + PostCSS
mix
.js('resources/js/app.js', 'public/js')
.sass('resources/css/sass/app.scss', 'public/css/app.css')
.options({
processCssUrls: false,
postCss: [
require('postcss-import'),
//tailwindcss('./tailwind.config.js')
require('tailwindcss'),
]
@dancameron
dancameron / functions.php
Created February 4, 2020 20:15
Square CSS for Sprout Invoices
<?php // don't include this line in your functions.php, since it already starts with it.
function _custom_si_pdf_service_scripts() {
ob_start(); ?>
<style type="text/css">
.sq-input {
height: 2em;
padding: .1em;
@dancameron
dancameron / functions.php
Created January 27, 2020 21:10
Custom PDF CSS
<?php // don't include this line in your functions.php, since it already starts with it.
function _custom_si_pdf_service_scripts( $old_scripts_and_styles ) {
$scripts_and_styles = $old_scripts_and_styles; // remove this line if you don't want to remove the default styling and scripts
ob_start(); // place your custom styles and javascript below ?>
<style type="text/css">
@dancameron
dancameron / functions.php
Created January 14, 2020 15:59
Slate Compatibility with Client VAT
<?php // don't include this line in your functions.php, since it already starts with it.
remove_action( 'si_document_vcards', array( 'Woo_Tools', 'add_vat_number_to_doc' ) );
remove_action( 'si_document_client_addy', array( 'SI_Hearts_EU', 'maybe_add_vat' ) );
function add_vat_below_address( $address ) {
ob_start();
SI_Hearts_EU::maybe_add_vat();
$vat .= ob_get_clean();
@dancameron
dancameron / functions.php
Created January 14, 2020 15:49
Remove VAT added by Woocommerce
<?php // don't include this line in your functions.php, since it already starts with it.
remove_action( 'si_document_vcards', array( 'Woo_Tools', 'add_vat_number_to_doc' ) );
<?php // don't include this line in your functions.php, since it already starts with it.
function fee_line_item_types( $types = array() ) {
$types = array(
'task' => __( 'Task', 'sprout-invoices' ),
'service' => __( 'Service', 'sprout-invoices' ),
'product' => __( 'Product', 'sprout-invoices' ),
'fee' => __( 'Fees', 'sprout-invoices' ),
);
@dancameron
dancameron / functions.php
Created January 6, 2020 19:55
Error Logging for Help Scout Desk Troubleshooting
<?php // don't include this in your functions.php, since the start of the file should already have it
function _hsd_api_log( $data, $endpoint ) {
error_log( '************* HSD API LOG *************' );
error_log( 'data' . print_r( $data, true ) );
error_log( 'endpoint' . print_r( $endpoint, true ) );
error_log( '************* HSD API LOG END *************' );
}
add_filter( 'hsd_v2_api_request_params', '_hsd_api_log', 10, 2 );
add_filter( 'hsd_v2_api_request', '_hsd_api_log', 10, 2 );
@dancameron
dancameron / functions.php
Created January 2, 2020 17:27
Set Default Min Payment Amount Due
<?php // don't include this line in your functions.php, since it already starts with it.
function _change_status_of_invoice_submission( SI_Invoice $invoice ) {
update_post_meta( $invoice->get_id(), '_si_client_set_payment', 1 );
}
add_action( 'si_gravity_forms_integration_invoice_created', '_change_status_of_invoice_submission' );
@dancameron
dancameron / functions.php
Created December 13, 2019 18:49
Remove Duplicate Column Headers
<?php // don't include this line in your functions.php, since it already starts with it.
add_filter( 'si_show_all_line_item_headers', '__return_false' );
@dancameron
dancameron / style.css
Created November 27, 2019 16:52
Pagination CSS
.pages .pagination {
display: block;
clear: both;
}
.pages .pagination a {
color: #60A7FC;
background-color: #F9FCFF;
border-color: transparent;
}