Hello Support Team,
after updating to v2 I can not stop sending invoice notifications on the free package.
– free packages are in the CPT settings set and synchronized with Invoicing plugin
– package field is active in the custom fields
– your snippet for skipping this is also active:
/**
* Prevent sending invoice email notifications to user for free invoices.
*/
function gd_snippet_prevent_invoice_email_for_free_listing( $recipient, $email_type, $invoice_id, $invoice ) {
if ( class_exists( ‘GeoDir_Pricing_Post_Package’ ) && ! empty( $invoice ) && $invoice->is_free() ) {
$post_packages = GeoDir_Pricing_Post_Package::get_items( array( ‘invoice_id’ => $invoice_id ) );
if ( ! empty( $post_packages ) ) {
$recipient = NULL; // No recipient.
}
}
return $recipient;
}
add_filter( ‘wpinv_email_recipient’, ‘gd_snippet_prevent_invoice_email_for_free_listing’, 100, 4 );
– cache deleted
When a listing is added the Invoicing plugin is still sending the invoice to the user.
How can I stop this, do I missing something?
Thank you for your support!
Greetings, Marius