Is my ND4 filter really ND4?

As I understand, ND4 filter should transmit about 25% of the incident light. I have measured transmittance spectrum of my Fujimi ND4 58mm filter, and got the following result:

transmittance spectrum

So, transmittance is about 40%-45% in the visible range of wavelengths. That’s quite far from the expected 25%. Is my filter not really ND4 (although I bought it as such, and it has the marking on its rim)? Or is my expectation wrong, and this filter is normal?

Questionnaire based product filter / finder

I have products in my woocommerce store, i want to ask a set of few questions to the user, and the on the user input the respective products should show up in the page.

I have followed this guide, but stuck at,

  1. Each time a users submits the questionnaire, we’ll have to loop through the answers provided by a shopper and save them in an array. We have to use the gform_after_submission hook here.

  2. We have to then query WooCommerce products which include the attributes selected and list them.

How to Create a Questionnaire based WooCommerce Product Filter

The Below link is to products by attribute

WooCommerce list products by attribute with multiple values

Thank you.

Why are sheet Filter Views not updating for new rows?

I have a sheet with two filter views, which apply filter on one column and sort on another. The sheet is populated from the API nightly – it has all worked great but today I noticed things in the wrong views.

enter image description here

First issue – Labels column is filtered on containing “CPA” but you can see the one right under the popup is “CVP,feature”.

enter image description here Second issue… Priority is sorted on value but the two new ones at the bottom are not being counted here.

I’ve tried switching filter views, refreshing the page in my browser, even closing and reopening the document, but nothing. What is wrong and how do I fix this?

How do I filter Child Posts by Parent Post ID for Custom Post types in WordPress REST API response?

I have two Custom post types: question and answer. “Questions” are hierarchical and they are parent posts for answers – which are child posts. For every answer, there’s a parent question. When someone asks a question, every answer given is correctly attributed to the same question. This has already been nicely done in the website. While I am building the APP, I can pull in all questions, but when it comes to answers, I can’t seem to filter out answer by parent question.

All questions can be obtained like this: https://domain.com/wp-json/wp/v2/questions

For answers, I am using custom endpoint with this code:

add_action( 'rest_api_init', 'custom_api_get_all_posts' );           function custom_api_get_all_posts() {        register_rest_route( 'app/v1', '/answers', array(          'methods' => 'GET',           'callback' => 'custom_api_get_all_posts_callback'     )); } function custom_api_get_all_posts_callback( $  request ) {  // Initialize the array that will receive the posts' data.      $  posts_data = array(); // Receive and set the page parameter from the $  request for pagination purposes $  paged = $  request->get_param( 'page' ); $  paged = ( isset( $  paged ) || ! ( empty( $  paged ) ) ) ? $  paged : 1;  // Get the posts using the 'post' and 'news' post types // $  avatar_url = get_avatar_url ( get_the_author_meta('ID'), $  size = '50' );  $  posts = get_posts( array(         'paged' => $  paged,                              'posts_per_page' => 10,            'post_type' => 'answer',      ) );  if ( is_array( $  filter ) && array_key_exists( 'question', $  filter ) ) {     $  args['post_parent_id'] = $  filter['question']; }  // Loop through the posts and push the desired data to the array we've initialized earlier in the form of an object foreach( $  posts as $  post ) {     $  id = $  post->ID;      $  posts_data[] = (object) array(          'id' => $  id,          'slug' => $  post->post_name,          'type' => $  post->post_type,         'title' => $  post->post_title,         'content' => $  post->post_content,         'question' => $  post->post_parent,     ); }                   return $  posts_data;                    

}

And by this, I can get all answers with their IDs, Answer Title, Content, and Parent Question Id in GET response at https://domain.com/wp-json/app/v1/answers

QUESTION: How do I have to modify the code to be able to filter out specific answers based on question ID, something like: https://domain.com/wp-json/app/v1/answers?question=1234 where 1234 is an ID for a parent question whose answers we need to display. All suggested filter plugins have failed to work, I’ve tried different forms of codes for so many hours, I really appreciate your help 🙂

Thanks! (Both question and answer are CPTs, and I am using WP Version – 4.9.8)

Filter cross sell list by product it belongs to

I have extended the core cross sell functionality in order to add a custom product relation at the cart. I’m trying to output it a little differently, however, as i want to append these products to each product in the cart’s table row. This means I need to modify the cart item renderer to output the relevant products (which I’ve done), but what seems like the tricky part to me is how to only get the cross-sells for the product currently being rendered, rather than all the cross-sells.

So in my custom block, I override the core _getCollection method to get my custom relation, but it just gets all cross-sells – how would I best go about getting the products only for the current cart item?

Grateful for any pointers in the right direction (a frontender trying to do some backend work 🙂 )

protected function _getCollection() {      var_dump(Mage::registry(('current_product'))); // is null - was wishful thinking that I could use this     var_dump($  this->getData(''));      $  collection = Mage::getModel('catalog/product_link')         ->useCustomLinks()         ->getProductCollection()         ->setStoreId(Mage::app()->getStore()->getId())         ->addStoreFilter()         ->setPageSize(1);      $  this->_addProductAttributesAndPrices($  collection);      Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($  collection);     Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($  collection);     Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($  collection);      return $  collection; } 

Add granularity year expose filter to a Search API indexed result

I have a search API views that I’d like to add an exposed Date filter so people can have a dropdown with only Year in it

is it possible to achieve that? what field should I index? (Post Created) and should I index that as “Date” ?

Also I can get the normal exposed filter to work on Date: node field but not in Search API views

Also almost similar issue here