Thank you for reaching out to us. Let me see if I understand your issue. You are saying that when you create a new product and you don’t enable Use variations only to construct final product price you see the error you mention above. Is this correct?
Kind regards.
yes
I don’t use variations when saving products. However, PHP program processing determines that it is being used.
This will do the wrong thing and cause a PHP error
Thank you for sharing more information. I have submitted a message to the developers to investigate further your findings.
Kind regards.
Thank you. I will check this out.
We have released an update that should solve this.
Not resolved.
Normally, there seems to be no problem, but the problem may occur after some processing (I don’t know what I did)
stripe-payments\admin\includes\class-asp-admin-product-meta-boxes.php on line 1058-
$variations_groups = filter_input( INPUT_POST, 'asp-variations-group-names', FILTER_UNSAFE_RAW, FILTER_REQUIRE_ARRAY );
// if ( ! empty( $variations_groups ) && is_array( $variations_groups ) ) {
if ( ! empty( $variations_groups ) && is_array( $variations_groups ) && ! empty( $variations_groups[0] ) ) {
I think you normally expect $variations_groups to be null when you’re not using variations, but sometimes with array types the first array element is an empty string.
If you add one judgment condition: ! empty( $variations_groups[0] ), no errors will occur even in irregular cases like this
Thank you. We will try to add something for this condition in the next release again.
We have released a new version with a patch for your issue. Can you check to see if this version fixes your issue.
Thank you.
The error can no longer be reproduce.
My guess is that when the error occurred, asp_variations_names was undefined, so filter_input () became null.
After that, when I corrected the code and executed it to check the operation, update_post_meta( $post_id, ‘asp_variations_names’, false ); was executed, the undefined was resolved, and the error no longer occurred.
However, if you click the Create Group button in variations and update the Edit Product without creating a variation, an empty variation will be created.
When you Pay Now for this item, an empty dropdown select for variation selection will appear at the top of the purchase dialog.
Is this the expected behavior?
After all, wouldn’t it be better to add one more judgment condition ? empty( $variations_groups[0] ),
For now, I think the error no longer occurs during normal use, so I’ll mark it as resolved.