Enable Subscription order creation using snippet
add_filter('fluent_cart/order/is_subscription_allowed_in_manual_order', function(){
return true;
});API Endpoint: /wp-json/fluent-cart/v2/orders
Enable Subscription order creation using snippet
add_filter('fluent_cart/order/is_subscription_allowed_in_manual_order', function(){
return true;
});API Endpoint: /wp-json/fluent-cart/v2/orders
| <?php | |
| add_filter('fluent_cart/single_product/variation_view_type', function ($viewType, $data) { | |
| $textOnlyProducts = []; | |
| $imageOnlyProducts = []; | |
| $bothOnlyProducts = []; | |
| $productId = $data['product']->ID; | |
| if(in_array($productId, $textOnlyProducts)) { | |
| return 'text'; |
| <?php | |
| add_filter('fluent_cart/orders_table_columns', function($columns){ | |
| $columns['title_1'] =[ | |
| 'label' => 'The Custom', | |
| 'accessor' => 'iam_custom', | |
| 'render_template' => true, | |
| 'template' => '<div class="flex gap-2"> | |
| {{data.order?.invoice_no || "--"}} |
| <?php | |
| add_filter('fluent_community/template_slug', function ($templateSlug) { | |
| if (is_singular(['fluent-products'])) { | |
| return 'fluent-community-frame.php'; | |
| }else return $templateSlug; | |
| }); |
| <?php | |
| add_action('template_redirect', function() { | |
| if (is_singular('fluent-products')) { | |
| global $wp_query; | |
| $wp_query->set_404(); | |
| status_header(404); | |
| nocache_headers(); | |
| include( get_404_template() ); | |
| exit; |
| <?php | |
| add_filter('fluent_cart/products_table_columns', function($columns){ | |
| $columns['title_1'] =[ | |
| 'label' => 'The Custom', | |
| 'accessor' => 'iam_custom', | |
| 'render_template' => true, | |
| 'template' => '<div class="flex gap-2"> | |
| {{data.order?.invoice_no || "--"}} | |
| <el-button type="primary">Primary</el-button> |
| <?php | |
| add_filter('fluent_cart/widgets/single_product_page', function ($widgets, $product) { | |
| $product = \FluentCart\App\Models\Product::find($product['product_id']); | |
| $value = $product->getMeta('_affiliate_form'); | |
| <?php | |
| function redirect_to_fluentcart_account( $redirect_to, $request, $user ) { | |
| $redirect_to = home_url( '/account/' ); | |
| return $redirect_to; | |
| } | |
| add_filter( 'login_redirect', 'redirect_to_fluentcart_account', 10, 3 ); |