Generic.php
8 months ago
InvalidCurrency.php
8 months ago
InvalidLanguage.php
8 months ago
InvalidProduct.php
8 months ago
InvalidTerm.php
8 months ago
MissingLanguage.php
8 months ago
InvalidTerm.php
22 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WCML\Rest\Exceptions; |
| 4 | |
| 5 | use WC_REST_Exception; |
| 6 | |
| 7 | class InvalidTerm extends WC_REST_Exception { |
| 8 | |
| 9 | /** |
| 10 | * @param int $term_id |
| 11 | */ |
| 12 | public function __construct( $term_id ) { |
| 13 | parent::__construct( |
| 14 | "422", |
| 15 | /* translators: $s is a term ID */ |
| 16 | sprintf( __( 'Term not found: %d', 'woocommerce-multilingual' ), |
| 17 | $term_id ), |
| 18 | 422 |
| 19 | ); |
| 20 | } |
| 21 | |
| 22 | } |