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 fee_line_item_types( $types = array() ) { | |
$types = array( | |
'task' => __( 'Task', 'sprout-invoices' ), | |
'service' => __( 'Service', 'sprout-invoices' ), | |
'product' => __( 'Product', 'sprout-invoices' ), | |
'fee' => __( 'Fees', 'sprout-invoices' ), | |
); |
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 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 ); |
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 _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' ); |
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. | |
add_filter( 'si_show_all_line_item_headers', '__return_false' ); |
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 in your functions.php, since the start of the file should already have it | |
add_filter( 'suppress_notifications', '__return_true' ); |
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
/** | |
* Adds a print button to the top of estimates and invoices. | |
* @return type | |
*/ | |
function si_print_button() { | |
// check to see if PDF view | |
if ( isset( $_GET['genpdf'] ) ) { | |
return; | |
} |
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
.pages .pagination { | |
display: block; | |
clear: both; | |
} | |
.pages .pagination a { | |
color: #60A7FC; | |
background-color: #F9FCFF; | |
border-color: transparent; | |
} |
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( 'pre_si_invoice_view', array( 'SI_Payment_Terms_Fees', 'show_message_about_term_due' ), 20, 1 ); | |
function _si_get_user_dashboard_links() { | |
if ( class_exists( 'SI_Client_Dashboard' ) ) { | |
$args = apply_filters( 'si_get_users_for_association_args', array( 'fields' => array( 'ID', 'user_email', 'display_name' ) ) ); | |
$users = get_users( $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
<?php // don't include this line in your functions.php, since it already starts with it. | |
remove_action( 'pre_si_invoice_view', array( 'SI_Payment_Terms_Fees', 'show_message_about_term_due' ), 20, 1 ); |
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 si_change_doc_fees_labels( $fees, $doc ) { | |
foreach ( $fees as $key => $fee ) { | |
$fees[ $key ]['always_show'] = 0; | |
} | |
return $fees; | |
} | |
add_filter( 'si_doc_fees', 'si_change_doc_fees_labels', 100, 2 ); |