This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter('fluent_community/template_slug', function ($templateSlug) { | |
| if (is_singular(['fluent-products'])) { | |
| return 'fluent-community-frame.php'; | |
| }else return $templateSlug; | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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'); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action('fluent_cart/before_payment_methods', function($args) { | |
| // Add your field here..... | |
| // Example Field | |
| $termsText = 'Yes, I\'d like to receive emails with exclusive offers and updates.'; | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? | |
| add_filter('fluent_cart/shop_query', function ($query, $params) { | |
| if (is_admin()) { | |
| return $query; | |
| } | |
| // Term IDs to exclude (product-categories) | |
| $excluded_ids = [11]; | |
| $query->whereDoesntHave('wp_terms', function ($rel) use ($excluded_ids) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter('gettext', function ($text) { | |
| return $text.' (yap)'; | |
| }); |
NewerOlder