cobra65
Forum Replies Created
-
Nevermind, figured it out. We recently upgraded to newer PHP and some extensions were not installed in that version yet. Added the same as the previous version, then all was well.
Forum: Plugins
In reply to: [WooCommerce] Where is the filter woocommerce_product_get_tax_class?Thanks Jonayed, this really helped. Still not sure where the original filter gets called but it is working as expected.
We have resellers who are tax-exempt but on a few items they use in-house taxes need to be collected. So we can add ‘tx’ to the sku for those variations (or simple products). Then add the filter for both product types. The non-variation filter is called for either product type but the variation filter is only called for variations so it is necessary to add it’s filter after the simple product filter is added so it overrides the simple product result.
I hope the below helps someone:
function adjust_tax_rate_reseller($tax_class, $product) {
if (is_user_logged_in() && current_user_can('reseller')) {
if (strpos($product->get_sku(), 'tx') !== false) {
$tax_class = '';
} else {
$tax_class = 'zero-rate';
}
}
return $tax_class;
}
add_filter('woocommerce_product_get_tax_class', 'adjust_tax_rate_reseller',10,2);
add_filter('woocommerce_product_variation_get_tax_class', 'adjust_tax_rate_reseller',10,2);Also, it appears “Zero rate”, “Zero Rate” and “zero-rate” are all equivalent but not sure where that takes place.
Forum: Plugins
In reply to: [WooCommerce] Where is the filter woocommerce_product_get_tax_class?Jonayed,
Thanks so much for the info, that’s exactly what I was looking for. However, the filter name for that function is woocommerce_product_variation_get_tax_class (see line 69) which still leaves the question, what function is called by filter name woocommerce_product_get_tax_class.
As far as I can tell, woocommerce_product_variation_get_tax_class is called when a product variation is added to the cart and it makes actual variation data available (title, sku, etc.) via the second parameter which is a Product Variation object.
However it appears woocommerce_product_get_tax_class filter is called for all products added to the cart whether they are simple products or variations. And if a variation it only has the parent info in the second parameter, not the variation specific data.
Can you confirm this behavior?
Forum: Plugins
In reply to: [QuadMenu - Mega Menu] Quad Menu Pro supportThey said they did not receive anything. Was an email sent? If so, could you please send it again?
Thanks.
Forum: Plugins
In reply to: [QuadMenu - Mega Menu] Quad Menu Pro supportTicket number is 176
Forum: Plugins
In reply to: [Contact Form 7] From field on mail tab is ignoredFigured it out, there were filters in the theme functions.php
function thetheme_mail_from($old) { return get_option( 'admin_email' ); } add_filter('wp_mail_from', 'thetheme_mail_from'); function thetheme_mail_from_name($old) { return get_option( 'blogname' ); } add_filter('wp_mail_from_name', 'thetheme_mail_from_name');So, new question, is there a way to modify those functions to not apply to CF7 emails but still operate on other emails from WP core?
Forum: Plugins
In reply to: [Contact Form 7] From field on mail tab is ignoredOh, additionally:
File attachments: [file-1]
Mail 2 is not used.
Forum: Plugins
In reply to: [Contact Form 7] From field on mail tab is ignoredHere are the mail tab fields:
From: [email protected]
Subject: This was submitted on the website
Additional headers: Reply-To: [your-email]
Message body: From: [first-name] [last-name] <[your-email]>
Phone: [phone]
Message Body:
[your-message]Forum: Plugins
In reply to: [Contact Form 7] From field on mail tab is ignoredForum: Plugins
In reply to: [Contact Form 7] From field on mail tab is ignoredWe are using version 5.6.4
Forum: Plugins
In reply to: [Flamingo] first and last name in flamingo address bookOh, found the First name and Last name populated correctly in the export of Inbound Messages. But still blank in the export of Address Book. Not sure if this needs to be corrected or I was just looking in the wrong place.
But to avoid confusion, it should work in both exports, not just one. Or if the fields should not be populated in the Address Book export, don’t display them as columns.
Thanks for the plugin, just what I needed.
Forum: Plugins
In reply to: [Flamingo] first and last name in flamingo address bookSame for me.
When data is exported, Email and Full name columns are populated correctly, First name and Last name columns are empty.
Forum: Plugins
In reply to: [Cool Timeline (Horizontal & Vertical Timeline)] How can I turn on revisionsI had thought of that but it will be overwritten next time the plugin is updated. Can you please add a hook to future releases so I can make the addition permanent in my theme’s functions.php?
Thanks much for considering this change.
Patrick,
Fair enough. Thanks for acknowledging improvement can be considered.
Forum: Themes and Templates
In reply to: [Neve] template-part parameter ignored?I see passing the second parameter is implemented in /inc/views/post_layout.php
So the changes to /inc/views/template_parts.php would need to be:
1a. public function render_post($context) {
1b. ‘content’ => $this->get_article_inner_content($context),
2a. private function get_article_inner_content($context) {
2b. After $layout = $this->get_layout(); add this:
if (has_action(‘neve_get_article_inner_’ . $context)) {
ob_start();
do_action(‘neve_get_article_inner_’ . $context,
array($context,
$layout,
$this->get_title(),
$this->get_post_thumbnail(),
$this->get_meta(),
$this->get_excerpt()
)
);
$markup = ob_get_clean();
return $markup;
}I hope you will consider this feature request.
Thanks much.