ClassesBigCommercePost_TypesProductReset Listing

Reset_Listing

Class Reset_Listing

Resets listing data to defaults, reconnecting its title and description to the base product.

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

Constants

ConstantVisibilityTypeValue
ACTIONpublicstring’reset-listing’

Methods

add_row_action

Adds a custom action link to the post row actions for products.

public add_row_action(array $actions, \WP_Post $post): array

Parameters:

ParameterTypeDescription
$actionsarrayThe current post row actions.
$post\WP_PostThe post object.

Return Value:

Modified post row actions.


has_overrides

Checks if the product listing overrides base product fields.

public has_overrides(\WP_Post $post): bool

Parameters:

ParameterTypeDescription
$post\WP_PostThe product post.

Return Value:

True if overrides exist, false otherwise.


get_reset_url

Generates the URL for resetting a product listing.

public get_reset_url(\WP_Post $post): string

Parameters:

ParameterTypeDescription
$post\WP_PostThe product post.

Return Value:

The reset URL.


handle_request

Handles the reset listing request.

public handle_request(): void

Validates the request, resets the listing, and redirects the user.



Automatically generated on 2025-01-21