Created
April 26, 2022 11:00
-
-
Save hivepress/016a42ac96c26e70fa68431b2579e0a0 to your computer and use it in GitHub Desktop.
Make attachments optional for marketplace listings #hivepress #marketplace
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 | |
add_filter( | |
'hivepress/v1/models/listing/attributes', | |
function( $attributes ) { | |
if ( isset( $attributes['attachments'] ) ) { | |
$attributes['attachments']['edit_field']['required'] = false; | |
} | |
return $attributes; | |
}, | |
1000 | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment