| 1 |
<?php |
| 2 |
/** |
| 3 |
* Product Controller interface |
| 4 |
* |
| 5 |
* @package SeQura/WC |
| 6 |
* @subpackage SeQura/WC/Controllers |
| 7 |
*/ |
| 8 |
|
| 9 |
namespace SeQura\WC\Controllers\Hooks\Product; |
| 10 |
|
| 11 |
use WP_Post; |
| 12 |
|
| 13 |
/** |
| 14 |
* Product Controller interface |
| 15 |
*/ |
| 16 |
interface Interface_Product_Controller { |
| 17 |
|
| 18 |
/** |
| 19 |
* Handle the widget shortcode callback |
| 20 |
* |
| 21 |
* @param array<string, string> $atts The shortcode attributes |
| 22 |
* @return string |
| 23 |
*/ |
| 24 |
public function do_widget_shortcode( $atts ); |
| 25 |
|
| 26 |
/** |
| 27 |
* Handle the cart widget shortcode callback |
| 28 |
* |
| 29 |
* @param array<string, string> $atts The shortcode attributes |
| 30 |
* @return string |
| 31 |
*/ |
| 32 |
public function do_cart_widget_shortcode( $atts ); |
| 33 |
|
| 34 |
/** |
| 35 |
* Handle the product listing widget shortcode callback |
| 36 |
* |
| 37 |
* @param array<string, string> $atts The shortcode attributes |
| 38 |
* @return string |
| 39 |
*/ |
| 40 |
public function do_product_listing_widget_shortcode( $atts ); |
| 41 |
|
| 42 |
/** |
| 43 |
* Add [sequra_widget] to product page automatically |
| 44 |
* Add [sequra_cart_widget] to cart page automatically |
| 45 |
* |
| 46 |
* @return void |
| 47 |
*/ |
| 48 |
public function add_widget_shortcode_to_page(); |
| 49 |
|
| 50 |
/** |
| 51 |
* Add meta boxes to the product edit page |
| 52 |
* |
| 53 |
* @return void |
| 54 |
*/ |
| 55 |
public function add_meta_boxes(); |
| 56 |
|
| 57 |
/** |
| 58 |
* Render the meta boxes |
| 59 |
* |
| 60 |
* @param WP_Post $post The post object |
| 61 |
* @return void |
| 62 |
*/ |
| 63 |
public function render_meta_boxes( $post ); |
| 64 |
|
| 65 |
/** |
| 66 |
* Save product meta |
| 67 |
* |
| 68 |
* @param int $post_id The post ID |
| 69 |
* @return void |
| 70 |
*/ |
| 71 |
public function save_product_meta( $post_id ); |
| 72 |
} |
| 73 |
|