Skip to content

Shortcode admin column for Item type and custom item types #812

@aayla-secura

Description

@aayla-secura

Hi there, I noticed a minor bug/inconsistency: In places around the admin side, certain item information is only printed for items that support "Buy now" as determined by getpaid_item_type_supports(..., 'buy_now'). For example, printing the "Buy" action link or the shortcodes within the item info metabox on the item edit page. However, the "shortcode" admin column on the main Items page that lists items is blank for custom item types even if they have registered support for the buy_now feature using the getpaid_item_type_supports hook.

This is because of line 624 in admin/class-getpaid-post-types-admin.php:

  if ( $item->is_type( array( '', 'fee', 'custom' ) ) ) {

should probably use this instead:

  if ( getpaid_item_type_supports( $item->get_type( 'edit' ), 'buy_now' ) ) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions