Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This hook can be used to always mark paid listings as published, regardless of default status.
Usage
add_filter( 'wpbdp_paid_listing_status', 'mark_listing_as_published' );
Parameters
- $new_status (string)
- $payment (array)
Examples
Mark paid listings as published
This example will mark paid listings as published, regardless of default status.
add_filter( 'wpbdp_paid_listing_status', 'mark_listing_as_published' ); function bd_mark_paid_listing_as_published( $new_status, $payment ) { $new_status = 'publish'; return $new_status; }
Change Log
Added in version 3.5.4