Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
aayla-secura opened this issue Oct 20, 2024 · 0 comments
Open

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

aayla-secura opened this issue Oct 20, 2024 · 0 comments

Comments

@aayla-secura
Copy link

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' ) ) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant