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 // 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; |
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 | |
function modify_edd_cart_contents( $cart ) { | |
$discounts = edd_get_cart_discounts(); | |
if ( !$discounts ) { | |
return $cart; | |
} | |
$dcodes = array( 'YOUDONTHINKIKNOW', 'WHATYOURETRYINGTODO?', 'NICETRY!!' ); | |
// Filter only the discount code above | |
if ( !array_intersect( $discounts, $dcodes ) ) { |
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 // don't add this line since it's already in your functions.php file | |
/** | |
* Changing the line item labels/names and adding a new line item type. | |
* | |
*/ | |
function add_new_line_item_types( $types = array() ) { | |
$array_of_new_types = array( | |
'tasks' => __( 'Labour' ), // change label for tasks | |
'product' => __( 'Equipment' ), // change labal for product |
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
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'), | |
] |
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 | |
if ( is_admin() ) { | |
add_filter( 'pre_set_site_transient_update_themes', 'gb_check_for_premium_theme_update' ); | |
} | |
function gb_check_for_premium_theme_update( $transient ) { | |
$current_version = 1.2; | |
$api_key = get_option('theme_api_key'); // your theme options will need to have an option to add the API key. | |
$theme_slug = 'theme_slug'; // Change to match with API Key Manager | |
$api_url = 'http://yoursite.com/check-key/'; // change to your site |
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 // don't include this line in your functions.php, since it already starts with it. | |
function hsd_filter_beacon() { | |
if ( is_page( array( 1, 2, 3 ) ) ) { | |
remove_action( 'wp_footer', array( 'HSD_Beacon', 'add_beacon' ) ); | |
} | |
} | |
add_action( 'pre_get_posts', 'hsd_filter_beacon' ); |
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 // 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"> |
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 // 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(); |
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 // 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' ) ); |
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 // don't include this line in your functions.php, since it already starts with it. | |
function _set_new_default_si_type( $types = array() ) { | |
unset( $types['service'] ); // remove the type you want to make a default | |
return array_merge( array( 'service' => __( 'Service', 'sprout-invoices' ) ), $types ); // add it back at the top of the list. | |
} | |
add_filter( 'si_line_item_types', '_set_new_default_si_type' ); |
NewerOlder