ClassesBigCommercePost_TypesProductUnsupported Products

Unsupported_Products

  • Full name: \BigCommerce\Post_Types\Product\Unsupported_Products

Methods

disallow_publication

Users should not be permitted to publish unsupported posts.

public disallow_publication(array $caps, string $cap, int $user_id, array $args): array

Unfortunately, WP does not provide granular caps for publishing posts, so we are left with a blanket cap for publishing all posts. We just apply this filter on the product single admin, but can do nothing about quick edit in the products list table.

Parameters:

ParameterTypeDescription
$capsarrayReturns the user’s actual capabilities.
$capstringCapability name.
$user_idintThe user ID.
$argsarrayAdds the context to the cap. Typically the object ID.

show_unsupported_status

public show_unsupported_status(array $post_states, \WP_Post $post): array

Parameters:

ParameterTypeDescription
$post_statesarray
$post\WP_Post

prevent_publication

public prevent_publication(array $data, array $postarr): array

Parameters:

ParameterTypeDescription
$dataarrayAn array of sanitized attachment post data.
$postarrarrayAn array of unsanitized attachment post data.


Automatically generated on 2025-01-21